Remove EncodedFrame::MissingFrame and start removing Decode() param
Remove EncodedFrame::MissingFrame, as it was always false in actual
in-use code anyway, and remove usages of the Decode missing_frames param
within WebRTC. Uses/overrides in other projects will be cleaned up
shortly, allowing that variant to be removed from the interface.
Bug: webrtc:15444
Change-Id: Id299d82e441a351deff81c0f2812707a985d23d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317802
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Tony Herre <herre@google.com>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#40662}
diff --git a/modules/video_coding/codecs/av1/dav1d_decoder.cc b/modules/video_coding/codecs/av1/dav1d_decoder.cc
index a2cd6d8..3100c0d 100644
--- a/modules/video_coding/codecs/av1/dav1d_decoder.cc
+++ b/modules/video_coding/codecs/av1/dav1d_decoder.cc
@@ -35,7 +35,6 @@
bool Configure(const Settings& settings) override;
int32_t Decode(const EncodedImage& encoded_image,
- bool missing_frames,
int64_t render_time_ms) override;
int32_t RegisterDecodeCompleteCallback(
DecodedImageCallback* callback) override;
@@ -119,7 +118,6 @@
}
int32_t Dav1dDecoder::Decode(const EncodedImage& encoded_image,
- bool /*missing_frames*/,
int64_t /*render_time_ms*/) {
if (!context_ || decode_complete_callback_ == nullptr) {
return WEBRTC_VIDEO_CODEC_UNINITIALIZED;
diff --git a/modules/video_coding/codecs/av1/libaom_av1_unittest.cc b/modules/video_coding/codecs/av1/libaom_av1_unittest.cc
index 29aa539..766b766 100644
--- a/modules/video_coding/codecs/av1/libaom_av1_unittest.cc
+++ b/modules/video_coding/codecs/av1/libaom_av1_unittest.cc
@@ -89,8 +89,8 @@
void Decode(int64_t frame_id, const EncodedImage& image) {
ASSERT_THAT(decoder_, NotNull());
- int32_t error = decoder_->Decode(image, /*missing_frames=*/false,
- /*render_time_ms=*/image.capture_time_ms_);
+ int32_t error =
+ decoder_->Decode(image, /*render_time_ms=*/image.capture_time_ms_);
if (error != WEBRTC_VIDEO_CODEC_OK) {
ADD_FAILURE() << "Failed to decode frame id " << frame_id
<< " with error code " << error << " by decoder#"
diff --git a/modules/video_coding/codecs/h264/test/h264_impl_unittest.cc b/modules/video_coding/codecs/h264/test/h264_impl_unittest.cc
index b8dc859..b8a9add 100644
--- a/modules/video_coding/codecs/h264/test/h264_impl_unittest.cc
+++ b/modules/video_coding/codecs/h264/test/h264_impl_unittest.cc
@@ -62,7 +62,7 @@
ASSERT_TRUE(WaitForEncodedFrame(&encoded_frame, &codec_specific_info));
// First frame should be a key frame.
encoded_frame._frameType = VideoFrameType::kVideoFrameKey;
- EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, decoder_->Decode(encoded_frame, false, 0));
+ EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, decoder_->Decode(encoded_frame, 0));
std::unique_ptr<VideoFrame> decoded_frame;
absl::optional<uint8_t> decoded_qp;
ASSERT_TRUE(WaitForDecodedFrame(&decoded_frame, &decoded_qp));
@@ -87,7 +87,7 @@
ASSERT_TRUE(WaitForEncodedFrame(&encoded_frame, &codec_specific_info));
// First frame should be a key frame.
encoded_frame._frameType = VideoFrameType::kVideoFrameKey;
- EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, decoder_->Decode(encoded_frame, false, 0));
+ EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, decoder_->Decode(encoded_frame, 0));
std::unique_ptr<VideoFrame> decoded_frame;
absl::optional<uint8_t> decoded_qp;
ASSERT_TRUE(WaitForDecodedFrame(&decoded_frame, &decoded_qp));
diff --git a/modules/video_coding/codecs/multiplex/include/multiplex_decoder_adapter.h b/modules/video_coding/codecs/multiplex/include/multiplex_decoder_adapter.h
index e73f7d0..d58981e 100644
--- a/modules/video_coding/codecs/multiplex/include/multiplex_decoder_adapter.h
+++ b/modules/video_coding/codecs/multiplex/include/multiplex_decoder_adapter.h
@@ -33,7 +33,6 @@
// Implements VideoDecoder
bool Configure(const Settings& settings) override;
int32_t Decode(const EncodedImage& input_image,
- bool missing_frames,
int64_t render_time_ms) override;
int32_t RegisterDecodeCompleteCallback(
DecodedImageCallback* callback) override;
diff --git a/modules/video_coding/codecs/multiplex/multiplex_decoder_adapter.cc b/modules/video_coding/codecs/multiplex/multiplex_decoder_adapter.cc
index 0ad3d38..9641df3 100644
--- a/modules/video_coding/codecs/multiplex/multiplex_decoder_adapter.cc
+++ b/modules/video_coding/codecs/multiplex/multiplex_decoder_adapter.cc
@@ -125,7 +125,6 @@
}
int32_t MultiplexDecoderAdapter::Decode(const EncodedImage& input_image,
- bool missing_frames,
int64_t render_time_ms) {
MultiplexImage image = MultiplexEncodedImagePacker::Unpack(input_image);
@@ -149,8 +148,7 @@
int32_t rv = 0;
for (size_t i = 0; i < image.image_components.size(); i++) {
rv = decoders_[image.image_components[i].component_index]->Decode(
- image.image_components[i].encoded_image, missing_frames,
- render_time_ms);
+ image.image_components[i].encoded_image, render_time_ms);
if (rv != WEBRTC_VIDEO_CODEC_OK)
return rv;
}
diff --git a/modules/video_coding/codecs/multiplex/test/multiplex_adapter_unittest.cc b/modules/video_coding/codecs/multiplex/test/multiplex_adapter_unittest.cc
index be0f5de..a2f36a3 100644
--- a/modules/video_coding/codecs/multiplex/test/multiplex_adapter_unittest.cc
+++ b/modules/video_coding/codecs/multiplex/test/multiplex_adapter_unittest.cc
@@ -218,7 +218,7 @@
ASSERT_TRUE(WaitForEncodedFrame(&encoded_frame, &codec_specific_info));
EXPECT_EQ(kVideoCodecMultiplex, codec_specific_info.codecType);
- EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, decoder_->Decode(encoded_frame, false, -1));
+ EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, decoder_->Decode(encoded_frame, -1));
std::unique_ptr<VideoFrame> decoded_frame;
absl::optional<uint8_t> decoded_qp;
ASSERT_TRUE(WaitForDecodedFrame(&decoded_frame, &decoded_qp));
@@ -235,7 +235,7 @@
ASSERT_TRUE(WaitForEncodedFrame(&encoded_frame, &codec_specific_info));
EXPECT_EQ(kVideoCodecMultiplex, codec_specific_info.codecType);
- EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, decoder_->Decode(encoded_frame, false, 0));
+ EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, decoder_->Decode(encoded_frame, 0));
std::unique_ptr<VideoFrame> decoded_frame;
absl::optional<uint8_t> decoded_qp;
ASSERT_TRUE(WaitForDecodedFrame(&decoded_frame, &decoded_qp));
diff --git a/modules/video_coding/codecs/test/video_codec_test.cc b/modules/video_coding/codecs/test/video_codec_test.cc
index 82620248..587af46 100644
--- a/modules/video_coding/codecs/test/video_codec_test.cc
+++ b/modules/video_coding/codecs/test/video_codec_test.cc
@@ -355,8 +355,7 @@
callbacks_[frame.Timestamp()] = std::move(callback);
}
- decoder_->Decode(frame, /*missing_frames=*/false,
- /*render_time_ms=*/0);
+ decoder_->Decode(frame, /*render_time_ms=*/0);
}
void Flush() override {
diff --git a/modules/video_coding/codecs/test/videoprocessor.cc b/modules/video_coding/codecs/test/videoprocessor.cc
index cb934c4..3d7f6ff 100644
--- a/modules/video_coding/codecs/test/videoprocessor.cc
+++ b/modules/video_coding/codecs/test/videoprocessor.cc
@@ -638,7 +638,7 @@
frame_stat->decode_start_ns = rtc::TimeNanos();
frame_stat->decode_return_code =
- decoders_->at(spatial_idx)->Decode(encoded_image, false, 0);
+ decoders_->at(spatial_idx)->Decode(encoded_image, 0);
}
const webrtc::EncodedImage* VideoProcessor::BuildAndStoreSuperframe(
diff --git a/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc b/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc
index 1ac7189..01cedb5 100644
--- a/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc
+++ b/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc
@@ -37,7 +37,6 @@
namespace webrtc {
namespace {
-constexpr int kVp8ErrorPropagationTh = 30;
// vpx_decoder.h documentation indicates decode deadline is time in us, with
// "Set to zero for unlimited.", but actual implementation requires this to be
// a mode with 0 meaning allow delay and 1 not allowing it.
@@ -122,7 +121,6 @@
decode_complete_callback_(NULL),
inited_(false),
decoder_(NULL),
- propagation_cnt_(-1),
last_frame_width_(0),
last_frame_height_(0),
key_frame_required_(true),
@@ -156,7 +154,6 @@
return false;
}
- propagation_cnt_ = -1;
inited_ = true;
// Always start with a complete key frame.
@@ -170,7 +167,12 @@
}
int LibvpxVp8Decoder::Decode(const EncodedImage& input_image,
- bool missing_frames,
+ int64_t render_time_ms) {
+ return Decode(input_image, /*missing_frames=*/false, render_time_ms);
+}
+
+int LibvpxVp8Decoder::Decode(const EncodedImage& input_image,
+ bool /*missing_frames*/,
int64_t /*render_time_ms*/) {
if (!inited_) {
return WEBRTC_VIDEO_CODEC_UNINITIALIZED;
@@ -179,9 +181,6 @@
return WEBRTC_VIDEO_CODEC_UNINITIALIZED;
}
if (input_image.data() == NULL && input_image.size() > 0) {
- // Reset to avoid requesting key frames too often.
- if (propagation_cnt_ > 0)
- propagation_cnt_ = 0;
return WEBRTC_VIDEO_CODEC_ERR_PARAMETER;
}
@@ -234,34 +233,6 @@
return WEBRTC_VIDEO_CODEC_ERROR;
key_frame_required_ = false;
}
- // Restrict error propagation using key frame requests.
- // Reset on a key frame refresh.
- if (input_image._frameType == VideoFrameType::kVideoFrameKey) {
- propagation_cnt_ = -1;
- // Start count on first loss.
- } else if (missing_frames && propagation_cnt_ == -1) {
- propagation_cnt_ = 0;
- }
- if (propagation_cnt_ >= 0) {
- propagation_cnt_++;
- }
-
- vpx_codec_iter_t iter = NULL;
- vpx_image_t* img;
- int ret;
-
- // Check for missing frames.
- if (missing_frames) {
- // Call decoder with zero data length to signal missing frames.
- if (vpx_codec_decode(decoder_, NULL, 0, 0, kDecodeDeadlineRealtime)) {
- // Reset to avoid requesting key frames too often.
- if (propagation_cnt_ > 0)
- propagation_cnt_ = 0;
- return WEBRTC_VIDEO_CODEC_ERROR;
- }
- img = vpx_codec_get_frame(decoder_, &iter);
- iter = NULL;
- }
const uint8_t* buffer = input_image.data();
if (input_image.size() == 0) {
@@ -269,31 +240,20 @@
}
if (vpx_codec_decode(decoder_, buffer, input_image.size(), 0,
kDecodeDeadlineRealtime)) {
- // Reset to avoid requesting key frames too often.
- if (propagation_cnt_ > 0) {
- propagation_cnt_ = 0;
- }
return WEBRTC_VIDEO_CODEC_ERROR;
}
- img = vpx_codec_get_frame(decoder_, &iter);
+ vpx_codec_iter_t iter = NULL;
+ vpx_image_t* img = vpx_codec_get_frame(decoder_, &iter);
int qp;
vpx_codec_err_t vpx_ret =
vpx_codec_control(decoder_, VPXD_GET_LAST_QUANTIZER, &qp);
RTC_DCHECK_EQ(vpx_ret, VPX_CODEC_OK);
- ret = ReturnFrame(img, input_image.Timestamp(), qp, input_image.ColorSpace());
+ int ret =
+ ReturnFrame(img, input_image.Timestamp(), qp, input_image.ColorSpace());
if (ret != 0) {
- // Reset to avoid requesting key frames too often.
- if (ret < 0 && propagation_cnt_ > 0)
- propagation_cnt_ = 0;
return ret;
}
- // Check Vs. threshold
- if (propagation_cnt_ > kVp8ErrorPropagationTh) {
- // Reset to avoid requesting key frames too often.
- propagation_cnt_ = 0;
- return WEBRTC_VIDEO_CODEC_ERROR;
- }
return WEBRTC_VIDEO_CODEC_OK;
}
diff --git a/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.h b/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.h
index f9acd70..74f4dc7 100644
--- a/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.h
+++ b/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.h
@@ -31,6 +31,11 @@
bool Configure(const Settings& settings) override;
int Decode(const EncodedImage& input_image,
+ int64_t /*render_time_ms*/) override;
+
+ // TODO(bugs.webrtc.org/15444): Remove once all subclasses have been migrated
+ // to expecting calls Decode without a missing_frames param.
+ int Decode(const EncodedImage& input_image,
bool missing_frames,
int64_t /*render_time_ms*/) override;
@@ -61,7 +66,6 @@
DecodedImageCallback* decode_complete_callback_;
bool inited_;
vpx_codec_ctx_t* decoder_;
- int propagation_cnt_;
int last_frame_width_;
int last_frame_height_;
bool key_frame_required_;
diff --git a/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc b/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc
index 839d696..14ac8aa 100644
--- a/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc
+++ b/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc
@@ -286,7 +286,7 @@
// First frame should be a key frame.
encoded_frame._frameType = VideoFrameType::kVideoFrameKey;
- EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, decoder_->Decode(encoded_frame, false, -1));
+ EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, decoder_->Decode(encoded_frame, -1));
std::unique_ptr<VideoFrame> decoded_frame;
absl::optional<uint8_t> decoded_qp;
ASSERT_TRUE(WaitForDecodedFrame(&decoded_frame, &decoded_qp));
@@ -501,7 +501,7 @@
// First frame should be a key frame.
encoded_frame._frameType = VideoFrameType::kVideoFrameKey;
encoded_frame.ntp_time_ms_ = kTestNtpTimeMs;
- EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, decoder_->Decode(encoded_frame, false, -1));
+ EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, decoder_->Decode(encoded_frame, -1));
std::unique_ptr<VideoFrame> decoded_frame;
absl::optional<uint8_t> decoded_qp;
diff --git a/modules/video_coding/codecs/vp9/libvpx_vp9_decoder.cc b/modules/video_coding/codecs/vp9/libvpx_vp9_decoder.cc
index a981f25..2dec061 100644
--- a/modules/video_coding/codecs/vp9/libvpx_vp9_decoder.cc
+++ b/modules/video_coding/codecs/vp9/libvpx_vp9_decoder.cc
@@ -188,7 +188,6 @@
}
int LibvpxVp9Decoder::Decode(const EncodedImage& input_image,
- bool missing_frames,
int64_t /*render_time_ms*/) {
if (!inited_) {
return WEBRTC_VIDEO_CODEC_UNINITIALIZED;
diff --git a/modules/video_coding/codecs/vp9/libvpx_vp9_decoder.h b/modules/video_coding/codecs/vp9/libvpx_vp9_decoder.h
index 65fc553..4275836 100644
--- a/modules/video_coding/codecs/vp9/libvpx_vp9_decoder.h
+++ b/modules/video_coding/codecs/vp9/libvpx_vp9_decoder.h
@@ -29,7 +29,6 @@
bool Configure(const Settings& settings) override;
int Decode(const EncodedImage& input_image,
- bool missing_frames,
int64_t /*render_time_ms*/) override;
int RegisterDecodeCompleteCallback(DecodedImageCallback* callback) override;
diff --git a/modules/video_coding/codecs/vp9/test/vp9_impl_unittest.cc b/modules/video_coding/codecs/vp9/test/vp9_impl_unittest.cc
index 3bf165f..993fd24 100644
--- a/modules/video_coding/codecs/vp9/test/vp9_impl_unittest.cc
+++ b/modules/video_coding/codecs/vp9/test/vp9_impl_unittest.cc
@@ -143,7 +143,7 @@
ASSERT_TRUE(WaitForEncodedFrame(&encoded_frame, &codec_specific_info));
// First frame should be a key frame.
encoded_frame._frameType = VideoFrameType::kVideoFrameKey;
- EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, decoder_->Decode(encoded_frame, false, 0));
+ EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, decoder_->Decode(encoded_frame, 0));
std::unique_ptr<VideoFrame> decoded_frame;
absl::optional<uint8_t> decoded_qp;
ASSERT_TRUE(WaitForDecodedFrame(&decoded_frame, &decoded_qp));
@@ -193,7 +193,7 @@
ASSERT_TRUE(WaitForEncodedFrame(&encoded_frame, &codec_specific_info));
// Encoded frame without explicit color space information.
- EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, decoder_->Decode(encoded_frame, false, 0));
+ EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, decoder_->Decode(encoded_frame, 0));
std::unique_ptr<VideoFrame> decoded_frame;
absl::optional<uint8_t> decoded_qp;
ASSERT_TRUE(WaitForDecodedFrame(&decoded_frame, &decoded_qp));
@@ -211,7 +211,7 @@
ASSERT_TRUE(WaitForEncodedFrame(&encoded_frame, &codec_specific_info));
// First frame should be a key frame.
encoded_frame._frameType = VideoFrameType::kVideoFrameKey;
- EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, decoder_->Decode(encoded_frame, false, 0));
+ EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, decoder_->Decode(encoded_frame, 0));
std::unique_ptr<VideoFrame> decoded_frame;
absl::optional<uint8_t> decoded_qp;
ASSERT_TRUE(WaitForDecodedFrame(&decoded_frame, &decoded_qp));
@@ -2063,7 +2063,7 @@
ASSERT_TRUE(WaitForEncodedFrame(&encoded_frame, &codec_specific_info));
// First frame should be a key frame.
encoded_frame._frameType = VideoFrameType::kVideoFrameKey;
- EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, decoder_->Decode(encoded_frame, false, 0));
+ EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, decoder_->Decode(encoded_frame, 0));
std::unique_ptr<VideoFrame> decoded_frame;
absl::optional<uint8_t> decoded_qp;
ASSERT_TRUE(WaitForDecodedFrame(&decoded_frame, &decoded_qp));
diff --git a/modules/video_coding/generic_decoder.cc b/modules/video_coding/generic_decoder.cc
index 7ebc387..a13fe8e 100644
--- a/modules/video_coding/generic_decoder.cc
+++ b/modules/video_coding/generic_decoder.cc
@@ -282,17 +282,16 @@
}
int32_t VCMGenericDecoder::Decode(const EncodedFrame& frame, Timestamp now) {
- return Decode(frame, now, frame.RenderTimeMs(), frame.MissingFrame());
+ return Decode(frame, now, frame.RenderTimeMs());
}
int32_t VCMGenericDecoder::Decode(const VCMEncodedFrame& frame, Timestamp now) {
- return Decode(frame, now, frame.RenderTimeMs(), frame.MissingFrame());
+ return Decode(frame, now, frame.RenderTimeMs());
}
int32_t VCMGenericDecoder::Decode(const EncodedImage& frame,
Timestamp now,
- int64_t render_time_ms,
- int64_t missing_frame) {
+ int64_t render_time_ms) {
TRACE_EVENT1("webrtc", "VCMGenericDecoder::Decode", "timestamp",
frame.Timestamp());
FrameInfo frame_info;
@@ -319,7 +318,7 @@
frame_info.frame_type = frame.FrameType();
_callback->Map(std::move(frame_info));
- int32_t ret = decoder_->Decode(frame, missing_frame, render_time_ms);
+ int32_t ret = decoder_->Decode(frame, render_time_ms);
VideoDecoder::DecoderInfo decoder_info = decoder_->GetDecoderInfo();
if (decoder_info != decoder_info_) {
RTC_LOG(LS_INFO) << "Changed decoder implementation to: "
diff --git a/modules/video_coding/generic_decoder.h b/modules/video_coding/generic_decoder.h
index be08fc6..b1fb1f3 100644
--- a/modules/video_coding/generic_decoder.h
+++ b/modules/video_coding/generic_decoder.h
@@ -120,8 +120,7 @@
private:
int32_t Decode(const EncodedImage& frame,
Timestamp now,
- int64_t render_time_ms,
- int64_t missing_frame);
+ int64_t render_time_ms);
VCMDecodedFrameCallback* _callback = nullptr;
VideoDecoder* const decoder_;
VideoContentType _last_keyframe_content_type;
diff --git a/modules/video_coding/utility/simulcast_test_fixture_impl.cc b/modules/video_coding/utility/simulcast_test_fixture_impl.cc
index 5a111c0..338835e 100644
--- a/modules/video_coding/utility/simulcast_test_fixture_impl.cc
+++ b/modules/video_coding/utility/simulcast_test_fixture_impl.cc
@@ -894,9 +894,9 @@
EncodedImage encoded_frame;
// Only encoding one frame - so will be a key frame.
encoder_callback.GetLastEncodedKeyFrame(&encoded_frame);
- EXPECT_EQ(0, decoder_->Decode(encoded_frame, false, 0));
+ EXPECT_EQ(0, decoder_->Decode(encoded_frame, 0));
encoder_callback.GetLastEncodedFrame(&encoded_frame);
- decoder_->Decode(encoded_frame, false, 0);
+ decoder_->Decode(encoded_frame, 0);
EXPECT_EQ(2, decoder_callback.DecodedFrames());
}
@@ -932,7 +932,7 @@
EXPECT_EQ(decodedImage.width(), kDefaultWidth / 4);
EXPECT_EQ(decodedImage.height(), kDefaultHeight / 4);
}));
- EXPECT_EQ(0, decoder_->Decode(encoded_frame[0], false, 0));
+ EXPECT_EQ(0, decoder_->Decode(encoded_frame[0], 0));
EXPECT_CALL(decoder_callback, Decoded(_, _, _))
.WillOnce(::testing::Invoke([](VideoFrame& decodedImage,
@@ -941,7 +941,7 @@
EXPECT_EQ(decodedImage.width(), kDefaultWidth / 2);
EXPECT_EQ(decodedImage.height(), kDefaultHeight / 2);
}));
- EXPECT_EQ(0, decoder_->Decode(encoded_frame[1], false, 0));
+ EXPECT_EQ(0, decoder_->Decode(encoded_frame[1], 0));
EXPECT_CALL(decoder_callback, Decoded(_, _, _))
.WillOnce(::testing::Invoke([](VideoFrame& decodedImage,
@@ -950,7 +950,7 @@
EXPECT_EQ(decodedImage.width(), kDefaultWidth);
EXPECT_EQ(decodedImage.height(), kDefaultHeight);
}));
- EXPECT_EQ(0, decoder_->Decode(encoded_frame[2], false, 0));
+ EXPECT_EQ(0, decoder_->Decode(encoded_frame[2], 0));
}
void SimulcastTestFixtureImpl::
diff --git a/modules/video_coding/video_receiver2_unittest.cc b/modules/video_coding/video_receiver2_unittest.cc
index b524316..88a19df 100644
--- a/modules/video_coding/video_receiver2_unittest.cc
+++ b/modules/video_coding/video_receiver2_unittest.cc
@@ -123,7 +123,7 @@
auto decoder = std::make_unique<NiceMock<MockVideoDecoder>>();
EXPECT_CALL(*decoder, RegisterDecodeCompleteCallback)
.WillOnce(Return(WEBRTC_VIDEO_CODEC_OK));
- EXPECT_CALL(*decoder, Decode).WillOnce(Return(WEBRTC_VIDEO_CODEC_OK));
+ EXPECT_CALL(*decoder, Decode(_, _)).WillOnce(Return(WEBRTC_VIDEO_CODEC_OK));
EXPECT_CALL(*decoder, Release).WillOnce(Return(WEBRTC_VIDEO_CODEC_OK));
// Register the decoder. Note that this moves ownership of the mock object
diff --git a/modules/video_coding/video_receiver_unittest.cc b/modules/video_coding/video_receiver_unittest.cc
index 8a70664..2063653 100644
--- a/modules/video_coding/video_receiver_unittest.cc
+++ b/modules/video_coding/video_receiver_unittest.cc
@@ -109,7 +109,7 @@
++header->sequenceNumber;
}
receiver_.Process();
- EXPECT_CALL(decoder_, Decode(_, _, _)).Times(0);
+ EXPECT_CALL(decoder_, Decode(_, _)).Times(0);
EXPECT_EQ(VCM_FRAME_NOT_READY, receiver_.Decode(kMaxWaitTimeMs));
}
@@ -123,7 +123,7 @@
EXPECT_CALL(packet_request_callback_, ResendPackets(_, _)).Times(0);
receiver_.Process();
- EXPECT_CALL(decoder_, Decode(_, _, _)).Times(1);
+ EXPECT_CALL(decoder_, Decode(_, _)).Times(1);
EXPECT_EQ(0, receiver_.Decode(kMaxWaitTimeMs));
}