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

Unified Diff: media/base/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 | « content/renderer/media/webmediaplayer_impl.cc ('k') | media/base/demuxer_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/demuxer.h
diff --git a/media/base/demuxer.h b/media/base/demuxer.h
index a2dad22d67cb28c6085bef3353443693b0ab08e6..9b671f007cb65e2ed9b3eda6157c1ca0db6a2ed5 100644
--- a/media/base/demuxer.h
+++ b/media/base/demuxer.h
@@ -15,6 +15,8 @@
namespace media {
+class TextTrackConfig;
+
class MEDIA_EXPORT DemuxerHost : public DataSourceHost {
public:
// Sets the duration of the media in microseconds.
@@ -25,6 +27,13 @@ class MEDIA_EXPORT DemuxerHost : public DataSourceHost {
// method with PIPELINE_OK.
virtual void OnDemuxerError(PipelineStatus error) = 0;
+ // Add |text_stream| to the collection managed by the text renderer.
+ virtual void AddTextStream(DemuxerStream* text_stream,
+ const TextTrackConfig& config) = 0;
+
+ // Remove |text_stream| from the presentation.
+ virtual void RemoveTextStream(DemuxerStream* text_stream) = 0;
+
protected:
virtual ~DemuxerHost();
};
@@ -45,7 +54,8 @@ class MEDIA_EXPORT Demuxer {
// The demuxer does not own |host| as it is guaranteed to outlive the
// lifetime of the demuxer. Don't delete it!
virtual void Initialize(DemuxerHost* host,
- const PipelineStatusCB& status_cb) = 0;
+ const PipelineStatusCB& status_cb,
+ bool enable_text_tracks) = 0;
// Carry out any actions required to seek to the given time, executing the
// callback upon completion.
@@ -66,7 +76,8 @@ class MEDIA_EXPORT Demuxer {
// TODO(scherkus): this might not be needed http://crbug.com/234708
virtual void OnAudioRendererDisabled() = 0;
- // Returns the given stream type, or NULL if that type is not present.
+ // Returns the first stream of the given stream type (which is not allowed
+ // to be DemuxerStream::TEXT), or NULL if that type of stream is not present.
virtual DemuxerStream* GetStream(DemuxerStream::Type type) = 0;
// Returns the starting time for the media file.
« no previous file with comments | « content/renderer/media/webmediaplayer_impl.cc ('k') | media/base/demuxer_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698