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

Unified Diff: media/base/audio_renderer.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 | « no previous file | media/base/filter_collection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_renderer.h
diff --git a/media/base/audio_renderer.h b/media/base/audio_renderer.h
index b3a33159261e70b16fc11d4e45ffba4205fabd86..19459ac62dac7ab82c89bff38f14d751bcbcbf22 100644
--- a/media/base/audio_renderer.h
+++ b/media/base/audio_renderer.h
@@ -5,6 +5,8 @@
#ifndef MEDIA_BASE_AUDIO_RENDERER_H_
#define MEDIA_BASE_AUDIO_RENDERER_H_
+#include <list>
+
#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/time.h"
@@ -14,10 +16,13 @@
namespace media {
class AudioDecoder;
+class DemuxerStream;
class MEDIA_EXPORT AudioRenderer
: public base::RefCountedThreadSafe<AudioRenderer> {
public:
+ typedef std::list<scoped_refptr<AudioDecoder> > AudioDecoderList;
+
// First parameter is the current time that has been rendered.
// Second parameter is the maximum time value that the clock cannot exceed.
typedef base::Callback<void(base::TimeDelta, base::TimeDelta)> TimeCB;
@@ -25,6 +30,8 @@ class MEDIA_EXPORT AudioRenderer
// Initialize a AudioRenderer with the given AudioDecoder, executing the
// |init_cb| upon completion.
//
+ // |statistics_cb| is executed periodically with audio rendering stats.
+ //
// |underflow_cb| is executed when the renderer runs out of data to pass to
// the audio card during playback. ResumeAfterUnderflow() must be called
// to resume playback. Pause(), Preroll(), or Stop() cancels the underflow
@@ -39,8 +46,10 @@ class MEDIA_EXPORT AudioRenderer
// executed.
//
// |error_cb| is executed if an error was encountered.
- 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,
« no previous file with comments | « no previous file | media/base/filter_collection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698