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

Unified Diff: media/base/video_decoder.h

Issue 1143223007: media: Reland "Simplify {Audio|Video}Decoder initialization callback." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « media/base/test_helpers.cc ('k') | media/cast/sender/h264_vt_encoder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_decoder.h
diff --git a/media/base/video_decoder.h b/media/base/video_decoder.h
index 85c08f3e375a88d85569c0a4f806c9b9bec422f0..f7bae3cce463e4725007047a4ad6ccfd03728cf4 100644
--- a/media/base/video_decoder.h
+++ b/media/base/video_decoder.h
@@ -25,11 +25,14 @@ class MEDIA_EXPORT VideoDecoder {
// TODO(rileya): Now that both AudioDecoder and VideoDecoder Status enums
// match, break them into a decoder_status.h.
enum Status {
- kOk, // Everything went as planned.
- kAborted, // Decode was aborted as a result of Reset() being called.
+ kOk, // Everything went as planned.
+ kAborted, // Decode was aborted as a result of Reset() being called.
kDecodeError // Decoding error happened.
};
+ // Callback for VideoDecoder initialization.
+ typedef base::Callback<void(bool success)> InitCB;
+
// Callback for VideoDecoder to return a decoded frame whenever it becomes
// available. Only non-EOS frames should be returned via this callback.
typedef base::Callback<void(const scoped_refptr<VideoFrame>&)> OutputCB;
@@ -51,7 +54,7 @@ class MEDIA_EXPORT VideoDecoder {
virtual std::string GetDisplayName() const = 0;
// Initializes a VideoDecoder with the given |config|, executing the
- // |status_cb| upon completion. |output_cb| is called for each output frame
+ // |init_cb| upon completion. |output_cb| is called for each output frame
// decoded by Decode().
//
// If |low_delay| is true then the decoder is not allowed to queue frames,
@@ -64,10 +67,10 @@ class MEDIA_EXPORT VideoDecoder {
// 1) The VideoDecoder will be reinitialized if it was initialized before.
// Upon reinitialization, all internal buffered frames will be dropped.
// 2) This method should not be called during pending decode or reset.
- // 3) No VideoDecoder calls should be made before |status_cb| is executed.
+ // 3) No VideoDecoder calls should be made before |init_cb| is executed.
virtual void Initialize(const VideoDecoderConfig& config,
bool low_delay,
- const PipelineStatusCB& status_cb,
+ const InitCB& init_cb,
const OutputCB& output_cb) = 0;
// Requests a |buffer| to be decoded. The status of the decoder and decoded
« no previous file with comments | « media/base/test_helpers.cc ('k') | media/cast/sender/h264_vt_encoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698