| Index: media/base/audio_renderer.h
|
| diff --git a/media/base/audio_renderer.h b/media/base/audio_renderer.h
|
| index 48ab6846b73ee2738c70ce9435454a7afa3aa873..faa4232c42c301e217f3163b2d75689c6b311f6b 100644
|
| --- a/media/base/audio_renderer.h
|
| +++ b/media/base/audio_renderer.h
|
| @@ -11,12 +11,13 @@
|
| #include "media/base/buffering_state.h"
|
| #include "media/base/media_export.h"
|
| #include "media/base/pipeline_status.h"
|
| +#include "media/base/time_source.h"
|
|
|
| namespace media {
|
|
|
| class DemuxerStream;
|
|
|
| -class MEDIA_EXPORT AudioRenderer {
|
| +class MEDIA_EXPORT AudioRenderer : public TimeSource {
|
| public:
|
| // First parameter is the current time that has been rendered.
|
| // Second parameter is the maximum time value that the clock cannot exceed.
|
| @@ -30,8 +31,6 @@ class MEDIA_EXPORT AudioRenderer {
|
| //
|
| // |statistics_cb| is executed periodically with audio rendering stats.
|
| //
|
| - // |time_cb| is executed whenever time has advanced by way of audio rendering.
|
| - //
|
| // |buffering_state_cb| is executed when audio rendering has either run out of
|
| // data or has enough data to continue playback.
|
| //
|
| @@ -41,19 +40,10 @@ class MEDIA_EXPORT AudioRenderer {
|
| virtual void Initialize(DemuxerStream* stream,
|
| const PipelineStatusCB& init_cb,
|
| const StatisticsCB& statistics_cb,
|
| - const TimeCB& time_cb,
|
| const BufferingStateCB& buffering_state_cb,
|
| const base::Closure& ended_cb,
|
| const PipelineStatusCB& error_cb) = 0;
|
|
|
| - // Signal audio playback to start at the current rate. It is expected that
|
| - // |time_cb| will eventually start being run with time updates.
|
| - virtual void StartRendering() = 0;
|
| -
|
| - // Signal audio playback to stop until further notice. It is expected that
|
| - // |time_cb| will no longer be run.
|
| - virtual void StopRendering() = 0;
|
| -
|
| // Discard any audio data, executing |callback| when completed.
|
| //
|
| // Clients should expect |buffering_state_cb| to be called with
|
| @@ -61,18 +51,14 @@ class MEDIA_EXPORT AudioRenderer {
|
| virtual void Flush(const base::Closure& callback) = 0;
|
|
|
| // Starts playback by reading from |stream| and decoding and rendering audio.
|
| - // |timestamp| is the media timestamp playback should start rendering from.
|
| //
|
| // Only valid to call after a successful Initialize() or Flush().
|
| - virtual void StartPlayingFrom(base::TimeDelta timestamp) = 0;
|
| + virtual void StartPlaying() = 0;
|
|
|
| // Stop all operations in preparation for being deleted, executing |callback|
|
| // when complete.
|
| virtual void Stop(const base::Closure& callback) = 0;
|
|
|
| - // Updates the current playback rate.
|
| - virtual void SetPlaybackRate(float playback_rate) = 0;
|
| -
|
| // Sets the output volume.
|
| virtual void SetVolume(float volume) = 0;
|
|
|
|
|