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

Unified Diff: media/filters/audio_renderer_impl.h

Issue 11148011: Move audio decoder initialization to AudioRendererImpl. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: nits Created 8 years, 2 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/pipeline_unittest.cc ('k') | media/filters/audio_renderer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/audio_renderer_impl.h
diff --git a/media/filters/audio_renderer_impl.h b/media/filters/audio_renderer_impl.h
index 998bdb5eff5863a4bbaba9a8d694688ae4308b96..b154acf8a7535f1b7971129340f6ac05bbc27fe6 100644
--- a/media/filters/audio_renderer_impl.h
+++ b/media/filters/audio_renderer_impl.h
@@ -41,8 +41,10 @@ class MEDIA_EXPORT AudioRendererImpl
// Methods called on pipeline thread ----------------------------------------
// AudioRenderer implementation.
- virtual void Initialize(const scoped_refptr<AudioDecoder>& decoder,
+ virtual void Initialize(const scoped_refptr<DemuxerStream>& stream,
+ const AudioDecoderList& decoders,
const PipelineStatusCB& init_cb,
+ const StatisticsCB& statistics_cb,
const base::Closure& underflow_cb,
const TimeCB& time_cb,
const base::Closure& ended_cb,
@@ -134,6 +136,18 @@ class MEDIA_EXPORT AudioRendererImpl
// in the kPrerolling state.
bool IsBeforePrerollTime(const scoped_refptr<Buffer>& buffer);
+ // Pops the front of |decoders|, assigns it to |decoder_| and then
+ // calls initialize on the new decoder.
+ void InitializeNextDecoder(const scoped_refptr<DemuxerStream>& demuxer_stream,
+ scoped_ptr<AudioDecoderList> decoders);
+
+ // Called when |decoder_| initialization completes.
+ // |demuxer_stream| & |decoders| are used if initialization failed and
+ // InitializeNextDecoder() needs to be called again.
+ void OnDecoderInitDone(const scoped_refptr<DemuxerStream>& demuxer_stream,
+ scoped_ptr<AudioDecoderList> decoders,
+ PipelineStatus status);
+
// Audio decoder.
scoped_refptr<AudioDecoder> decoder_;
@@ -166,6 +180,9 @@ class MEDIA_EXPORT AudioRendererImpl
base::TimeDelta audio_time_buffered_;
base::TimeDelta current_time_;
+ PipelineStatusCB init_cb_;
+ StatisticsCB statistics_cb_;
+
// Filter callbacks.
base::Closure pause_cb_;
PipelineStatusCB preroll_cb_;
« no previous file with comments | « media/base/pipeline_unittest.cc ('k') | media/filters/audio_renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698