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

Unified Diff: media/base/audio_renderer.h

Issue 10918022: Move AudioDecoder initialization into AudioRenderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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') | media/base/filter_collection.h » ('J')
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..712c231e0451ebbb1abf0bcaf3bc6dd2ca7e96e3 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,16 +16,22 @@
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;
- // Initialize a AudioRenderer with the given AudioDecoder, executing the
- // |init_cb| upon completion.
+ // Initialize a AudioRenderer with the given DemuxerStream and
+ // AudioDecoderList, executing |init_cb| callback upon completion.
+
+ // |statistics_cb| is executed periodically with audio rendering stats, such
+ // as the number of decoded audio samples.
//
// |underflow_cb| is executed when the renderer runs out of data to pass to
// the audio card during playback. ResumeAfterUnderflow() must be called
@@ -39,8 +47,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') | media/base/filter_collection.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698