Fix unused variables warnning

This commit is contained in:
dijunkun
2023-12-13 17:23:20 +08:00
parent d4abc318a4
commit 0b80124b3c
19 changed files with 73 additions and 76 deletions

View File

@@ -29,8 +29,6 @@ int AudioEncoder::Init() {
std::chrono::high_resolution_clock::now().time_since_epoch())
.count());
int err;
int applications[3] = {OPUS_APPLICATION_AUDIO, OPUS_APPLICATION_VOIP,
OPUS_APPLICATION_RESTRICTED_LOWDELAY};
opus_encoder_ = opus_encoder_create(sample_rate_, channel_num_,
OPUS_APPLICATION_VOIP, &err);

View File

@@ -125,10 +125,10 @@ int FfmpegVideoDecoder::Decode(
}
if (on_receive_decoded_frame) {
uint64_t start_ts = static_cast<uint64_t>(
std::chrono::duration_cast<std::chrono::microseconds>(
std::chrono::high_resolution_clock::now().time_since_epoch())
.count());
// uint64_t start_ts = static_cast<uint64_t>(
// std::chrono::duration_cast<std::chrono::microseconds>(
// std::chrono::high_resolution_clock::now().time_since_epoch())
// .count());
if (1) {
av_image_fill_arrays(frame_nv12_->data, frame_nv12_->linesize,
@@ -144,10 +144,10 @@ int FfmpegVideoDecoder::Decode(
frame_->data[1], frame_->width * frame_->height / 2);
}
uint64_t now_ts = static_cast<uint64_t>(
std::chrono::duration_cast<std::chrono::microseconds>(
std::chrono::high_resolution_clock::now().time_since_epoch())
.count());
// uint64_t now_ts = static_cast<uint64_t>(
// std::chrono::duration_cast<std::chrono::microseconds>(
// std::chrono::high_resolution_clock::now().time_since_epoch())
// .count());
// LOG_ERROR("cost {}", now_ts - start_ts);

View File

@@ -133,7 +133,7 @@ int OpenH264Decoder::Init() {
sDecParam.eEcActiveIdc = ERROR_CON_SLICE_COPY;
sDecParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT;
int32_t iRet = openh264_decoder_->Initialize(&sDecParam);
openh264_decoder_->Initialize(&sDecParam);
int trace_level = WELS_LOG_QUIET;
openh264_decoder_->SetOption(DECODER_OPTION_TRACE_LEVEL, &trace_level);
@@ -156,11 +156,10 @@ int OpenH264Decoder::Decode(
// LOG_WARN("Receive key frame");
}
SBufferInfo sDstBufInfo = {0};
SBufferInfo sDstBufInfo;
memset(&sDstBufInfo, 0, sizeof(SBufferInfo));
int iRet = openh264_decoder_->DecodeFrameNoDelay(data, size, yuv_data_,
&sDstBufInfo);
openh264_decoder_->DecodeFrameNoDelay(data, size, yuv_data_, &sDstBufInfo);
if (sDstBufInfo.iBufferStatus == 1) {
if (on_receive_decoded_frame) {

View File

@@ -206,7 +206,6 @@ int OpenH264Encoder::Encode(
}
}
const uint8_t start_code[4] = {0, 0, 0, 1};
size_t frag = 0;
int encoded_frame_size = 0;
for (int layer = 0; layer < info.iLayerNum; ++layer) {