| Index: media/base/pipeline.h
|
| diff --git a/media/base/pipeline.h b/media/base/pipeline.h
|
| index 9b0ebdf3f45da672935e6d18b5ee7a481bb59cda..c8f30e4fd7b723953a8587af75b6be69060d01ef 100644
|
| --- a/media/base/pipeline.h
|
| +++ b/media/base/pipeline.h
|
| @@ -67,6 +67,11 @@ class VideoRenderer;
|
| // "Stopped" state.
|
| class MEDIA_EXPORT Pipeline : public DemuxerHost {
|
| public:
|
| + // Types of tracks the pipeline may initialize.
|
| + enum TrackType { AUDIO, VIDEO };
|
| +
|
| + typedef base::Callback<void(TrackType)> HasTrackCB;
|
| +
|
| // Buffering states the pipeline transitions between during playback.
|
| // kHaveMetadata:
|
| // Indicates that the following things are known:
|
| @@ -99,15 +104,18 @@ class MEDIA_EXPORT Pipeline : public DemuxerHost {
|
| // |ended_cb| will be executed whenever the media reaches the end.
|
| // |error_cb| will be executed whenever an error occurs but hasn't
|
| // been reported already through another callback.
|
| - // |buffering_state_cb| Optional callback that will be executed whenever the
|
| - // pipeline's buffering state changes.
|
| - // |duration_change_cb| Optional callback that will be executed whenever the
|
| + // |has_track_cb| optional callback that wii be executed whenever the
|
| + // pipeline initializes a track.
|
| + // |buffering_state_cb| will be executed whenever the pipeline's buffering
|
| + // state changes.
|
| + // |duration_change_cb| optional callback that will be executed whenever the
|
| // presentation duration changes.
|
| // It is an error to call this method after the pipeline has already started.
|
| void Start(scoped_ptr<FilterCollection> filter_collection,
|
| const base::Closure& ended_cb,
|
| const PipelineStatusCB& error_cb,
|
| const PipelineStatusCB& seek_cb,
|
| + const HasTrackCB& has_track_cb,
|
| const BufferingStateCB& buffering_state_cb,
|
| const base::Closure& duration_change_cb);
|
|
|
| @@ -134,12 +142,6 @@ class MEDIA_EXPORT Pipeline : public DemuxerHost {
|
| // the pipeline.
|
| bool IsRunning() const;
|
|
|
| - // Returns true if the media has audio.
|
| - bool HasAudio() const;
|
| -
|
| - // Returns true if the media has video.
|
| - bool HasVideo() const;
|
| -
|
| // Gets the current playback rate of the pipeline. When the pipeline is
|
| // started, the playback rate will be 0.0f. A rate of 1.0f indicates
|
| // that the pipeline is rendering the media at the standard rate. Valid
|
| @@ -262,12 +264,7 @@ class MEDIA_EXPORT Pipeline : public DemuxerHost {
|
| // The following "task" methods correspond to the public methods, but these
|
| // methods are run as the result of posting a task to the Pipeline's
|
| // task runner.
|
| - void StartTask(scoped_ptr<FilterCollection> filter_collection,
|
| - const base::Closure& ended_cb,
|
| - const PipelineStatusCB& error_cb,
|
| - const PipelineStatusCB& seek_cb,
|
| - const BufferingStateCB& buffering_state_cb,
|
| - const base::Closure& duration_change_cb);
|
| + void StartTask();
|
|
|
| // Stops and destroys all filters, placing the pipeline in the kStopped state.
|
| void StopTask(const base::Closure& stop_cb);
|
| @@ -402,13 +399,6 @@ class MEDIA_EXPORT Pipeline : public DemuxerHost {
|
| // reset the pipeline state, and restore this to PIPELINE_OK.
|
| PipelineStatus status_;
|
|
|
| - // Whether the media contains rendered audio or video streams.
|
| - // TODO(fischman,scherkus): replace these with checks for
|
| - // {audio,video}_decoder_ once extraction of {Audio,Video}Decoder from the
|
| - // Filter heirarchy is done.
|
| - bool has_audio_;
|
| - bool has_video_;
|
| -
|
| // The following data members are only accessed by tasks posted to
|
| // |task_runner_|.
|
|
|
| @@ -432,6 +422,7 @@ class MEDIA_EXPORT Pipeline : public DemuxerHost {
|
| // Permanent callbacks passed in via Start().
|
| base::Closure ended_cb_;
|
| PipelineStatusCB error_cb_;
|
| + HasTrackCB has_track_cb_;
|
| BufferingStateCB buffering_state_cb_;
|
| base::Closure duration_change_cb_;
|
|
|
|
|