Removed old OnDecodedFrame callback.

Bug: webrtc:9106
Change-Id: Idb13ca9984f1e74585640e78da60a291218f4ade
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183981
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32093}
This commit is contained in:
philipel 2020-09-11 16:05:56 +02:00 committed by Commit Bot
parent 6b4d962947
commit a028a1a0f7
3 changed files with 10 additions and 18 deletions

View File

@ -43,16 +43,8 @@ class VideoStreamDecoderInterface {
virtual void OnContinuousUntil(
const video_coding::VideoLayerFrameId& key) = 0;
// Called with the decoded frame.
virtual void OnDecodedFrame(VideoFrame frame,
absl::optional<int> decode_time_ms,
absl::optional<int> qp) {}
// TODO(philipel): Make pure virtual and remove old function above when
// it is no longer used.
virtual void OnDecodedFrame(VideoFrame frame, const FrameInfo& meta_info) {
OnDecodedFrame(std::move(frame), meta_info.decode_time_ms, meta_info.qp);
}
const FrameInfo& frame_info) = 0;
};
virtual ~VideoStreamDecoderInterface() = default;

View File

@ -22,9 +22,9 @@ class NullCallbacks : public VideoStreamDecoderInterface::Callbacks {
~NullCallbacks() override = default;
void OnNonDecodableState() override {}
void OnContinuousUntil(const video_coding::VideoLayerFrameId& key) override {}
void OnDecodedFrame(VideoFrame decodedImage,
absl::optional<int> decode_time_ms,
absl::optional<int> qp) override {}
void OnDecodedFrame(VideoFrame frame,
const VideoStreamDecoderInterface::Callbacks::FrameInfo&
frame_info) override {}
};
TEST(VideoStreamDecoderCreate, CreateVideoStreamDecoder) {

View File

@ -32,12 +32,12 @@ class MockVideoStreamDecoderCallbacks
OnContinuousUntil,
(const video_coding::VideoLayerFrameId& key),
(override));
MOCK_METHOD(void,
OnDecodedFrame,
(VideoFrame decodedImage,
absl::optional<int> decode_time_ms,
absl::optional<int> qp),
(override));
MOCK_METHOD(
void,
OnDecodedFrame,
(VideoFrame frame,
const VideoStreamDecoderInterface::Callbacks::FrameInfo& frame_info),
(override));
};
class StubVideoDecoder : public VideoDecoder {