Chromium Code Reviews| Index: media/base/pipeline.h |
| diff --git a/media/base/pipeline.h b/media/base/pipeline.h |
| index 330cc35681cd830e10a14e79a580b6d9e170cc9d..59b6eecd2c072f2d45a662ffc0dbd8741d9e8882 100644 |
| --- a/media/base/pipeline.h |
| +++ b/media/base/pipeline.h |
| @@ -83,7 +83,6 @@ class MEDIA_EXPORT PipelineStatusNotification { |
| // ^ SetError() |
| // | |
| // [ Any State Other Than InitXXX ] |
| - |
| // |
| // Initialization is a series of state transitions from "Created" through each |
| // filter initialization state. When all filter initialization states have |
| @@ -103,24 +102,15 @@ class MEDIA_EXPORT Pipeline |
| Pipeline(MessageLoop* message_loop, MediaLog* media_log); |
| // Build a pipeline to using the given filter collection to construct a filter |
| - // chain. |
| - // |
| - // Pipeline initialization is an inherently asynchronous process. Clients can |
| - // either poll the IsInitialized() method (discouraged) or optionally pass in |
| - // |start_cb|, which will be executed when initialization completes. |
| + // chain, executing |start_cb| when initialization has completed. |
| // |
| - // The following permanent callbacks will be executed as follows: |
| - // |start_cb_| will be executed when Start is done (successfully or not). |
| + // The following permanent callbacks will be executed as follows up until |
| + // Stop() has completed: |
|
Ami GONE FROM CHROMIUM
2012/08/09 20:46:23
I thought error during Stop() doesn't fire error_c
scherkus (not reviewing)
2012/08/09 21:02:59
You are correct but as discussed offline this is a
|
| // |ended_cb| will be executed whenever the media reaches the end. |
| - // |error_cb_| will be executed whenever an error occurs but hasn't |
| + // |error_cb| will be executed whenever an error occurs but hasn't |
| // been reported already through another callback. |
| // |
| - // These callbacks are only executed after Start() has been called and until |
| - // Stop() has completed. |
| - // |
| // It is an error to call this method after the pipeline has already started. |
| - // |
| - // TODO(scherkus): remove IsInitialized() and force clients to use callbacks. |
| void Start(scoped_ptr<FilterCollection> filter_collection, |
| const PipelineStatusCB& ended_cb, |
| const PipelineStatusCB& error_cb, |
| @@ -155,11 +145,6 @@ class MEDIA_EXPORT Pipeline |
| // the pipeline. |
| bool IsRunning() const; |
| - // Returns true if the pipeline has been started and fully initialized to a |
| - // point where playback controls will be respected. Note that it is possible |
| - // for a pipeline to be started but not initialized (i.e., an error occurred). |
| - bool IsInitialized() const; |
| - |
| // Returns true if the media has audio. |
| bool HasAudio() const; |
| @@ -216,6 +201,9 @@ class MEDIA_EXPORT Pipeline |
| // Gets the current pipeline statistics. |
| PipelineStatistics GetStatistics() const; |
| + // TODO(scherkus): Remove IsInitializedForTesting() after stop/error teardown |
| + // paths are sane, see http://crbug.com/110228 |
| + bool IsInitializedForTesting(); |
|
scherkus (not reviewing)
2012/08/09 19:27:10
FYI this gets removed in follow-up CL http://coder
|
| void SetClockForTesting(Clock* clock); |
| void SetErrorForTesting(PipelineStatus status); |
| @@ -261,9 +249,6 @@ class MEDIA_EXPORT Pipeline |
| // Helper method to tell whether we are in transition to stop state. |
| bool IsPipelineTearingDown(); |
| - // We could also be delayed by a transition during seek is performed. |
| - bool IsPipelineStopPending(); |
| - |
| // Helper method to tell whether we are in transition to seek state. |
| bool IsPipelineSeeking(); |
| @@ -447,9 +432,6 @@ class MEDIA_EXPORT Pipeline |
| // Whether or not the pipeline is in transition for a seek operation. |
| bool seek_pending_; |
| - // Whether or not the pipeline is pending a stop operation. |
| - bool stop_pending_; |
| - |
| // Whether or not the pipeline is perform a stop operation. |
| bool tearing_down_; |