Chromium Code Reviews| Index: media/base/pipeline.h |
| diff --git a/media/base/pipeline.h b/media/base/pipeline.h |
| index 91b6c5ea958d7e7154b161e91e723c9dee5d8c0e..84cf55182b92baf75f832d7b63caafd1e794fb73 100644 |
| --- a/media/base/pipeline.h |
| +++ b/media/base/pipeline.h |
| @@ -97,6 +97,15 @@ class MEDIA_EXPORT Pipeline |
| : public base::RefCountedThreadSafe<Pipeline>, |
| public DemuxerHost { |
| public: |
| + |
| + // Current buffering state in terms of HTMLMediaElement.readyState values. |
| + enum ReadyState { |
| + HaveMetadata, |
|
Ami GONE FROM CHROMIUM
2012/08/15 18:00:08
kChromiumStyle
acolwell GONE FROM CHROMIUM
2012/08/15 23:21:15
Done.
|
| + HaveEnoughData, |
| + }; |
| + |
| + typedef base::Callback<void(ReadyState)> ReadyStateCB; |
| + |
| // Constructs a media pipeline that will execute on |message_loop|. |
| Pipeline(MessageLoop* message_loop, MediaLog* media_log); |
| @@ -113,7 +122,8 @@ class MEDIA_EXPORT Pipeline |
| void Start(scoped_ptr<FilterCollection> filter_collection, |
| const PipelineStatusCB& ended_cb, |
| const PipelineStatusCB& error_cb, |
| - const PipelineStatusCB& start_cb); |
| + const PipelineStatusCB& start_cb, |
| + const ReadyStateCB& ready_state_cb); |
|
scherkus (not reviewing)
2012/08/15 19:53:43
docs?
acolwell GONE FROM CHROMIUM
2012/08/15 23:21:15
Done.
|
| // Asynchronously stops the pipeline, executing |stop_cb| when the pipeline |
| // teardown has completed. |
| @@ -295,7 +305,8 @@ class MEDIA_EXPORT Pipeline |
| void StartTask(scoped_ptr<FilterCollection> filter_collection, |
| const PipelineStatusCB& ended_cb, |
| const PipelineStatusCB& error_cb, |
| - const PipelineStatusCB& start_cb); |
| + const PipelineStatusCB& start_cb, |
| + const ReadyStateCB& ready_state_cb); |
| // InitializeTask() performs initialization in multiple passes. It is executed |
| // as a result of calling Start() or InitializationComplete() that advances |
| @@ -493,6 +504,7 @@ class MEDIA_EXPORT Pipeline |
| base::Closure stop_cb_; |
| PipelineStatusCB ended_cb_; |
| PipelineStatusCB error_cb_; |
| + ReadyStateCB ready_state_cb_; |
| // Audio renderer reference used for setting the volume and determining |
| // when playback has finished. |