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

Unified Diff: media/base/demuxer_stream.h

Issue 692323002: Move Liveness from DemuxerStreamProvider to DemuxerStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « no previous file | media/base/demuxer_stream.cc » ('j') | media/base/pipeline_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/demuxer_stream.h
diff --git a/media/base/demuxer_stream.h b/media/base/demuxer_stream.h
index fd590d374408f02afca54f8db9affdcbacf7e246..6e315f877590f552a7287fedcb4de33aa3d916c4 100644
--- a/media/base/demuxer_stream.h
+++ b/media/base/demuxer_stream.h
@@ -26,6 +26,12 @@ class MEDIA_EXPORT DemuxerStream {
NUM_TYPES, // Always keep this entry as the last one!
};
+ enum Liveness {
+ LIVENESS_UNKNOWN,
+ LIVENESS_RECORDED,
+ LIVENESS_LIVE,
+ };
+
// Status returned in the Read() callback.
// kOk : Indicates the second parameter is Non-NULL and contains media data
// or the end of the stream.
@@ -58,17 +64,19 @@ class MEDIA_EXPORT DemuxerStream {
const scoped_refptr<DecoderBuffer>&)>ReadCB;
virtual void Read(const ReadCB& read_cb) = 0;
- // Returns the audio decoder configuration. It is an error to call this method
- // if type() != AUDIO.
+ // Returns the audio/video decoder configuration. It is an error to call the
+ // audio method on a video stream and vice versa. After |kConfigChanged| is
+ // returned in a Read(), the caller should call this method again to retrieve
+ // the new config.
virtual AudioDecoderConfig audio_decoder_config() = 0;
-
- // Returns the video decoder configuration. It is an error to call this method
- // if type() != VIDEO.
virtual VideoDecoderConfig video_decoder_config() = 0;
// Returns the type of stream.
virtual Type type() = 0;
wolenetz 2014/11/11 23:48:07 nit: adding const seems reasonable to me here (and
xhwang 2014/11/14 06:38:04 Done.
+ // Returns liveness of the streams provided, i.e. whether recorded or live.
+ virtual Liveness liveness();
wolenetz 2014/11/11 23:48:07 nit: ditto const
xhwang 2014/11/14 06:38:04 Done.
+
virtual void EnableBitstreamConverter();
// Whether or not this DemuxerStream allows midstream configuration changes.
« no previous file with comments | « no previous file | media/base/demuxer_stream.cc » ('j') | media/base/pipeline_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698