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

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: Minor improvements 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..84ab8f4c9d3eb3faf9eb2e462ac5db5ebb0fa896 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,14 @@ 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. When a stream is disabled the current pending
+ // read (or the next read request) reports kDisabled status. Calling Read
+ // again after that will yield a kEnabled result if the stream is later
wolenetz 2016/05/27 20:49:42 nit: IIUC, s/When a stream is disabled/When a stre
+ // reenabled, or end_of_stream buffer if stream ends without being reenabled.
wolenetz 2016/05/27 20:49:42 nit: How precisely is it determined that a stream
servolk 2016/05/27 21:23:27 Oh, sorry this comment was out of date, I've just
+ virtual bool enabled() const = 0;
+ 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