Index: media/filters/ffmpeg_demuxer.h |
diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h |
index 04a39e57d40b9a94d1f6b75d0ba213ab3ff357bb..69f6c969ab0ebbbbb98e9e7122e6d1d55e70b643 100644 |
--- a/media/filters/ffmpeg_demuxer.h |
+++ b/media/filters/ffmpeg_demuxer.h |
@@ -34,6 +34,7 @@ |
#include "media/base/decoder_buffer_queue.h" |
#include "media/base/demuxer.h" |
#include "media/base/pipeline.h" |
+#include "media/base/text_track_config.h" |
#include "media/base/video_decoder_config.h" |
#include "media/filters/blocking_url_protocol.h" |
@@ -93,6 +94,12 @@ class FFmpegDemuxerStream : public DemuxerStream { |
// Returns true if this stream has capacity for additional data. |
bool HasAvailableCapacity(); |
+ TextKind GetTextKind() const; |
+ |
+ // Returns the value associated with |key| in the metadata for the avstream. |
+ // Returns an empty string if the key is not present. |
+ std::string GetMetadata(const char* key) const; |
+ |
private: |
friend class FFmpegDemuxerTest; |
@@ -136,7 +143,8 @@ class MEDIA_EXPORT FFmpegDemuxer : public Demuxer { |
// Demuxer implementation. |
virtual void Initialize(DemuxerHost* host, |
- const PipelineStatusCB& status_cb) OVERRIDE; |
+ const PipelineStatusCB& status_cb, |
+ bool enable_text_tracks) OVERRIDE; |
virtual void Stop(const base::Closure& callback) OVERRIDE; |
virtual void Seek(base::TimeDelta time, const PipelineStatusCB& cb) OVERRIDE; |
virtual void OnAudioRendererDisabled() OVERRIDE; |
@@ -184,6 +192,10 @@ class MEDIA_EXPORT FFmpegDemuxer : public Demuxer { |
// FFmpegDemuxerStream. |
FFmpegDemuxerStream* GetFFmpegStream(DemuxerStream::Type type) const; |
+ // Called after the streams have been collected from the media, to allow |
+ // the text renderer to bind each text stream to the cue rendering engine. |
+ void AddTextStreams(); |
+ |
DemuxerHost* host_; |
scoped_refptr<base::MessageLoopProxy> message_loop_; |
@@ -233,6 +245,9 @@ class MEDIA_EXPORT FFmpegDemuxer : public Demuxer { |
// drops packets destined for AUDIO demuxer streams on the floor). |
bool audio_disabled_; |
+ // Whether text streams have been enabled for this demuxer. |
+ bool text_enabled_; |
+ |
// Set if we know duration of the audio stream. Used when processing end of |
// stream -- at this moment we definitely know duration. |
bool duration_known_; |