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

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: Created 7 years, 4 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..c39836184222a334cda47c9e2c56fbcde5e8ec55 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"
@@ -44,6 +45,13 @@ struct AVStream;
namespace media {
+// Indicate to the player that an inband text track has been detected in
+// the media. The |index| refers to the index of the stream.
+typedef base::Callback<void(TextKind kind,
+ const std::string& label,
+ const std::string& language,
+ int index)> FFmpegAddTextTrackCB;
+
class MediaLog;
class FFmpegDemuxer;
class FFmpegGlue;
@@ -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,
+ const FFmpegAddTextTrackCB& add_text_track_cb,
const scoped_refptr<MediaLog>& media_log);
virtual ~FFmpegDemuxer();
@@ -142,6 +151,8 @@ class MEDIA_EXPORT FFmpegDemuxer : public Demuxer {
virtual void OnAudioRendererDisabled() OVERRIDE;
virtual void SetPlaybackRate(float playback_rate) OVERRIDE;
virtual DemuxerStream* GetStream(DemuxerStream::Type type) OVERRIDE;
+ virtual int GetStreamCount() const OVERRIDE;
+ virtual DemuxerStream* GetStreamByIndex(int index) OVERRIDE;
virtual base::TimeDelta GetStartTime() const OVERRIDE;
// Calls |need_key_cb_| with the initialization data encountered in the file.
@@ -243,6 +254,7 @@ class MEDIA_EXPORT FFmpegDemuxer : public Demuxer {
scoped_ptr<FFmpegGlue> glue_;
const NeedKeyCB need_key_cb_;
+ const FFmpegAddTextTrackCB add_text_track_cb_;
DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer);
};

Powered by Google App Engine
This is Rietveld 408576698