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

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: fix compile errors 11/21 #6 Created 7 years, 1 month 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
« no previous file with comments | « media/filters/chunk_demuxer_unittest.cc ('k') | media/filters/ffmpeg_demuxer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « media/filters/chunk_demuxer_unittest.cc ('k') | media/filters/ffmpeg_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698