Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1215)

Unified Diff: media/filters/ffmpeg_demuxer.h

Issue 23702007: Render inband text tracks in the media pipeline (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: incorporate aaron's comments (10/16) Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/filters/ffmpeg_demuxer.h
diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h
index 04a39e57d40b9a94d1f6b75d0ba213ab3ff357bb..69f0c33b0959b061e25c3f84c74ea34d4ee05431 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.h"
#include "media/base/video_decoder_config.h"
#include "media/filters/blocking_url_protocol.h"
@@ -82,6 +83,7 @@ class FFmpegDemuxerStream : public DemuxerStream {
virtual void EnableBitstreamConverter() OVERRIDE;
virtual AudioDecoderConfig audio_decoder_config() OVERRIDE;
virtual VideoDecoderConfig video_decoder_config() OVERRIDE;
+ virtual TextTrackConfig text_track_config() OVERRIDE;
// Returns the range of buffered data in this stream.
Ranges<base::TimeDelta> GetBufferedRanges() const;
@@ -93,6 +95,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;
@@ -131,6 +139,7 @@ class MEDIA_EXPORT FFmpegDemuxer : public Demuxer {
FFmpegDemuxer(const scoped_refptr<base::MessageLoopProxy>& message_loop,
DataSource* data_source,
const NeedKeyCB& need_key_cb,
+ bool enable_text,
const scoped_refptr<MediaLog>& media_log);
virtual ~FFmpegDemuxer();
@@ -184,6 +193,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 +246,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_;

Powered by Google App Engine
This is Rietveld 408576698