Chromium Code Reviews| Index: media/base/pipeline.h |
| diff --git a/media/base/pipeline.h b/media/base/pipeline.h |
| index 5a13633ddc43842a415434f4b2badaaa94384350..3d0655db0e05cce52933325e9c1af7f5304c33f9 100644 |
| --- a/media/base/pipeline.h |
| +++ b/media/base/pipeline.h |
| @@ -10,6 +10,7 @@ |
| #include "base/gtest_prod_util.h" |
| #include "base/synchronization/condition_variable.h" |
| #include "base/synchronization/lock.h" |
| +#include "media/base/audio_renderer.h" |
| #include "media/base/demuxer.h" |
| #include "media/base/filter_host.h" |
| #include "media/base/media_export.h" |
| @@ -27,7 +28,6 @@ class TimeDelta; |
| namespace media { |
| class AudioDecoder; |
| -class AudioRenderer; |
| class Clock; |
| class Filter; |
| class FilterCollection; |
| @@ -102,7 +102,8 @@ class MEDIA_EXPORT PipelineStatusNotification { |
| class MEDIA_EXPORT Pipeline |
| : public base::RefCountedThreadSafe<Pipeline>, |
| public FilterHost, |
| - public DemuxerHost { |
| + public DemuxerHost, |
| + public AudioRendererHost { |
| public: |
| // Constructs a media pipeline that will execute on |message_loop|. |
| Pipeline(MessageLoop* message_loop, MediaLog* media_log); |
| @@ -301,7 +302,10 @@ class MEDIA_EXPORT Pipeline |
| virtual base::TimeDelta GetDuration() const OVERRIDE; |
| virtual void SetNaturalVideoSize(const gfx::Size& size) OVERRIDE; |
| virtual void NotifyEnded() OVERRIDE; |
| - virtual void DisableAudioRenderer() OVERRIDE; |
| + |
| + // AudioRendererHost implementation. |
| + virtual void AudioRendererEnded() OVERRIDE; |
| + virtual void AudioRendererDisabled() OVERRIDE; |
| // Callbacks executed by filters upon completing initialization. |
| void OnFilterInitialize(PipelineStatus status); |
| @@ -359,7 +363,7 @@ class MEDIA_EXPORT Pipeline |
| void NotifyEndedTask(); |
| // Carries out disabling the audio renderer. |
| - void DisableAudioRendererTask(); |
| + void AudioRendererDisabledTask(); |
| // Carries out advancing to the next filter during Play()/Pause()/Seek(). |
| void FilterStateTransitionTask(); |
| @@ -410,21 +414,21 @@ class MEDIA_EXPORT Pipeline |
| // Compute the time corresponding to a byte offset. |
| base::TimeDelta TimeForByteOffset_Locked(int64 byte_offset) const; |
| - // Initiates a Stop() on |demuxer_| & |pipeline_filter_|. |callback| |
| - // is called once both objects have been stopped. |
| - void DoStop(const base::Closure& callback); |
| - |
| - // Called when |demuxer_| has stopped. This method calls Stop() |
| - // on |pipeline_filter_|. |
| - void OnDemuxerStopDone(const base::Closure& callback); |
| + // Initiates an asynchronous Pause/Flush/Play/Stop() call sequence executing |
| + // |done_cb| when completed. |
| + void DoPause(const base::Closure& done_cb); |
| + void DoFlush(const base::Closure& done_cb); |
| + void DoPlay(const base::Closure& done_cb); |
| + void DoStop(const base::Closure& done_cb); |
| - // Initiates a Seek() on the |demuxer_| & |pipeline_filter_|. |
| + // Initiates an asynchronous Seek() call sequence executing |done_cb| when |
|
acolwell GONE FROM CHROMIUM
2012/07/10 16:34:37
s/done_cb/seek_cb_ since there are no done_cb para
scherkus (not reviewing)
2012/07/17 03:43:00
Done.
|
| + // completed. Seek() is separated from the other operations as we will |
| + // prematurely terminate the call sequence if an error occurs. |
| void DoSeek(base::TimeDelta seek_timestamp); |
| - |
| - // Called when |demuxer_| finishes seeking. If seeking was successful, |
| - // then Seek() is called on |pipeline_filter_|. |
| void OnDemuxerSeekDone(base::TimeDelta seek_timestamp, |
| PipelineStatus status); |
| + void OnAudioRendererSeekDone(base::TimeDelta seek_timestamp, |
| + PipelineStatus status); |
| void OnAudioUnderflow(); |
| @@ -433,6 +437,8 @@ class MEDIA_EXPORT Pipeline |
| // Report pipeline |status| through |cb| avoiding duplicate error reporting. |
| void ReportStatus(const PipelineStatusCB& cb, PipelineStatus status); |
| + void RunOnPipelineThread(const base::Closure& closure); |
| + |
| // Message loop used to execute pipeline tasks. |
| scoped_refptr<base::MessageLoopProxy> message_loop_; |