Chromium Code Reviews| Index: media/base/pipeline.h |
| diff --git a/media/base/pipeline.h b/media/base/pipeline.h |
| index 09ff90416390fc8a3cc5d1f5071ee515df939c58..1b305adbe8a0bb9e763a1c93080d8fbab14916b0 100644 |
| --- a/media/base/pipeline.h |
| +++ b/media/base/pipeline.h |
| @@ -30,6 +30,7 @@ namespace media { |
| class Clock; |
| class FilterCollection; |
| class MediaLog; |
| +class TextRenderer; |
| class VideoRenderer; |
| // Pipeline runs the media pipeline. Filters are created and called on the |
| @@ -232,6 +233,11 @@ class MEDIA_EXPORT Pipeline : public DemuxerHost { |
| // DemuxerHost implementaion. |
| virtual void SetDuration(base::TimeDelta duration) OVERRIDE; |
| virtual void OnDemuxerError(PipelineStatus error) OVERRIDE; |
| + virtual void AddTextStream(DemuxerStream* text_stream, |
| + TextKind kind, |
| + const std::string& label, |
| + const std::string& language) OVERRIDE; |
| + virtual void RemoveTextStream(DemuxerStream* text_stream) OVERRIDE; |
| // Initiates teardown sequence in response to a runtime error. |
| // |
| @@ -244,6 +250,7 @@ class MEDIA_EXPORT Pipeline : public DemuxerHost { |
| // Callbacks executed when a renderer has ended. |
| void OnAudioRendererEnded(); |
| void OnVideoRendererEnded(); |
| + void OnTextRendererEnded(); |
| // Callback executed by filters to update statistics. |
| void OnUpdateStatistics(const PipelineStatistics& stats); |
| @@ -283,14 +290,21 @@ class MEDIA_EXPORT Pipeline : public DemuxerHost { |
| // Carries out notifying filters that we are seeking to a new timestamp. |
| void SeekTask(base::TimeDelta time, const PipelineStatusCB& seek_cb); |
| - // Handles audio/video ended logic and running |ended_cb_|. |
| + // Handles audio/video/text ended logic and running |ended_cb_|. |
| void DoAudioRendererEnded(); |
| void DoVideoRendererEnded(); |
| + void DoTextRendererEnded(); |
| void RunEndedCallbackIfNeeded(); |
| // Carries out disabling the audio renderer. |
| void AudioDisabledTask(); |
| + // Carries out adding a new text stream to the text renderer. |
| + void AddTextStreamTask(DemuxerStream* text_stream, |
| + TextKind kind, |
|
acolwell GONE FROM CHROMIUM
2013/10/21 20:10:40
nit: Use const TextTrackConfig& here instead.
Matthew Heaney (Chromium)
2013/10/23 05:09:01
Done.
|
| + const std::string& label, |
| + const std::string& language); |
| + |
| // Kicks off initialization for each media object, executing |done_cb| with |
| // the result when completed. |
| void InitializeDemuxer(const PipelineStatusCB& done_cb); |
| @@ -392,7 +406,7 @@ class MEDIA_EXPORT Pipeline : public DemuxerHost { |
| // reset the pipeline state, and restore this to PIPELINE_OK. |
| PipelineStatus status_; |
| - // Whether the media contains rendered audio and video streams. |
| + // 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. |
| @@ -405,9 +419,10 @@ class MEDIA_EXPORT Pipeline : public DemuxerHost { |
| // Member that tracks the current state. |
| State state_; |
| - // Whether we've received the audio/video ended events. |
| + // Whether we've received the audio/video/text ended events. |
| bool audio_ended_; |
| bool video_ended_; |
| + bool text_ended_; |
| // Set to true in DisableAudioRendererTask(). |
| bool audio_disabled_; |
| @@ -434,6 +449,7 @@ class MEDIA_EXPORT Pipeline : public DemuxerHost { |
| // playback rate, and determining when playback has finished. |
| scoped_ptr<AudioRenderer> audio_renderer_; |
| scoped_ptr<VideoRenderer> video_renderer_; |
| + scoped_ptr<TextRenderer> text_renderer_; |
| PipelineStatistics statistics_; |