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

Unified Diff: media/base/demuxer_stream.h

Issue 1935873002: Implement disabling and enabling media tracks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@track-control2
Patch Set: Updated comments + dchecks in ffmpeg demux stream Created 4 years, 7 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/base/demuxer_stream.h
diff --git a/media/base/demuxer_stream.h b/media/base/demuxer_stream.h
index 596ab67e83692aba287f11e6c1488a623ffee8e6..51607c973305f7ae3ed42cd8b7a5d0bee42e1b90 100644
--- a/media/base/demuxer_stream.h
+++ b/media/base/demuxer_stream.h
@@ -7,6 +7,7 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
+#include "base/time/time.h"
#include "media/base/media_export.h"
#include "media/base/video_rotation.h"
@@ -91,6 +92,15 @@ class MEDIA_EXPORT DemuxerStream {
virtual VideoRotation video_rotation() = 0;
+ // Indicates whether a DemuxerStream is currently enabled (i.e. should be
+ // decoded and rendered) or not.
+ virtual bool enabled() const = 0;
xhwang 2016/06/04 00:09:43 nit: add empty line
servolk 2016/06/09 21:00:13 Done.
+ // Disables and re-enables the stream. Reading from a disabled stream will
+ // return an end-of-stream (EOS) buffer. When a stream is re-enabled, it needs
+ // to know the current playback position |timestamp| in order to resume
+ // reading data from a key frame preceeding the |timestamp|.
+ virtual void set_enabled(bool enabled, base::TimeDelta timestamp) = 0;
+
protected:
// Only allow concrete implementations to get deleted.
virtual ~DemuxerStream();

Powered by Google App Engine
This is Rietveld 408576698