Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1089)

Unified Diff: media/filters/fake_video_decoder.h

Issue 297553002: Add callback in VideoDecoder and AudioDecoder to return decoded frames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/filters/fake_video_decoder.h
diff --git a/media/filters/fake_video_decoder.h b/media/filters/fake_video_decoder.h
index 03ed111a5e93df2e87f055262f718cd9361de5f2..21cb2a1f7962da0de603911f78401952040381cd 100644
--- a/media/filters/fake_video_decoder.h
+++ b/media/filters/fake_video_decoder.h
@@ -32,19 +32,18 @@ class FakeVideoDecoder : public VideoDecoder {
public:
// Constructs an object with a decoding delay of |decoding_delay| frames.
FakeVideoDecoder(int decoding_delay,
- bool supports_get_decode_output,
xhwang 2014/06/05 21:53:50 Yay!
int max_parallel_decoding_requests);
virtual ~FakeVideoDecoder();
// VideoDecoder implementation.
virtual void Initialize(const VideoDecoderConfig& config,
bool low_delay,
- const PipelineStatusCB& status_cb) OVERRIDE;
+ const PipelineStatusCB& status_cb,
+ const OutputCB& output_cb) OVERRIDE;
virtual void Decode(const scoped_refptr<DecoderBuffer>& buffer,
const DecodeCB& decode_cb) OVERRIDE;
virtual void Reset(const base::Closure& closure) OVERRIDE;
virtual void Stop() OVERRIDE;
- virtual scoped_refptr<VideoFrame> GetDecodeOutput() OVERRIDE;
virtual int GetMaxDecodeRequests() const OVERRIDE;
// Holds the next init/decode/reset callback from firing.
@@ -76,8 +75,7 @@ class FakeVideoDecoder : public VideoDecoder {
// Callback for updating |total_bytes_decoded_|.
void OnFrameDecoded(int buffer_size,
const DecodeCB& decode_cb,
- Status status,
- const scoped_refptr<VideoFrame>& video_frame);
+ Status status);
// Runs |decode_cb| or puts it to |held_decode_callbacks_| depending on
// current value of |hold_decode_|.
@@ -91,7 +89,6 @@ class FakeVideoDecoder : public VideoDecoder {
base::ThreadChecker thread_checker_;
const size_t decoding_delay_;
- const bool supports_get_decode_output_;
const int max_parallel_decoding_requests_;
State state_;
@@ -99,6 +96,8 @@ class FakeVideoDecoder : public VideoDecoder {
CallbackHolder<PipelineStatusCB> init_cb_;
CallbackHolder<base::Closure> reset_cb_;
+ OutputCB output_cb_;
+
bool hold_decode_;
std::list<DecodeCB> held_decode_callbacks_;

Powered by Google App Engine
This is Rietveld 408576698