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

Unified Diff: media/base/audio_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 | « content/renderer/pepper/video_decoder_shim.cc ('k') | media/base/mock_filters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_decoder.h
diff --git a/media/base/audio_decoder.h b/media/base/audio_decoder.h
index cee0bbcaf5263977e40dfc6c1b28abe4fa4c2210..3da8547c8ee963ce35232403aed4afdef37633e0 100644
--- a/media/base/audio_decoder.h
+++ b/media/base/audio_decoder.h
@@ -26,11 +26,14 @@ class MEDIA_EXPORT AudioDecoder {
// TODO(rileya): Now that both AudioDecoder and VideoDecoder Status enums
// match, break them into a decoder_status.h.
enum Status {
- kOk, // We're all good.
- kAborted, // We aborted as a result of Reset() or destruction.
+ kOk, // We're all good.
+ kAborted, // We aborted as a result of Reset() or destruction.
kDecodeError // A decoding error occurred.
};
+ // Callback for VideoDecoder initialization.
+ typedef base::Callback<void(bool success)> InitCB;
+
// Callback for AudioDecoder 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<AudioBuffer>&)> OutputCB;
@@ -53,10 +56,10 @@ class MEDIA_EXPORT AudioDecoder {
// Initializes an AudioDecoder with the given DemuxerStream, executing the
// callback upon completion.
- // |statistics_cb| is used to update global pipeline statistics.
+ // |init_cb| is used to return initialization status.
// |output_cb| is called for decoded audio buffers (see Decode()).
virtual void Initialize(const AudioDecoderConfig& config,
- const PipelineStatusCB& status_cb,
+ const InitCB& init_cb,
const OutputCB& output_cb) = 0;
// Requests samples to be decoded. Only one decode may be in flight at any
« no previous file with comments | « content/renderer/pepper/video_decoder_shim.cc ('k') | media/base/mock_filters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698