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

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 (9/28) Created 7 years, 3 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 7304beab2446aea9cf12b3e6538d1f35c5332fcd..18044f1f86ba96e7cf378709eb2b9ff348f54596 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"
@@ -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;
@@ -131,6 +138,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();
@@ -185,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_;
@@ -234,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