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

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: fix mojo 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') | no next file with comments »
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..596ab67e83692aba287f11e6c1488a623ffee8e6 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,16 +64,18 @@ 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;
+ virtual Type type() const = 0;
+
+ // Returns liveness of the streams provided, i.e. whether recorded or live.
+ virtual Liveness liveness() const;
virtual void EnableBitstreamConverter();
« no previous file with comments | « no previous file | media/base/demuxer_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698