Add VideoCodec::PreferDecodeLate
The purpose is so that a decoder (Android) that only have a limited number of output buffers can make sure that decoding is done just before the frame is needed.
Removed unused iSupportsRenderTiming and the settings structs since it was not used.
Added VCMReceiver::FrameForDecoding unit test for the case when PreferDecodeLate is set.
Note that this does not change the current behaviour. We actually currently always decode frames late. This cl is to make sure the behaviour is kept for Android, if the default behaviour is changed.
Review URL: https://codereview.webrtc.org/1428293003
Cr-Commit-Position: refs/heads/master@{#10974}
diff --git a/webrtc/video_decoder.h b/webrtc/video_decoder.h
index 3d04104..30e2779 100644
--- a/webrtc/video_decoder.h
+++ b/webrtc/video_decoder.h
@@ -73,6 +73,11 @@
virtual int32_t Release() = 0;
virtual int32_t Reset() = 0;
+
+ // Returns true if the decoder prefer to decode frames late.
+ // That is, it can not decode infinite number of frames before the decoded
+ // frame is consumed.
+ virtual bool PrefersLateDecoding() const { return true; }
};
// Class used to wrap external VideoDecoders to provide a fallback option on
@@ -97,6 +102,7 @@
int32_t Release() override;
int32_t Reset() override;
+ bool PrefersLateDecoding() const override;
private:
bool InitFallbackDecoder();