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

Unified Diff: media/base/demuxer_stream.h

Issue 208263018: Add SupportsConfigChanges() to DemuxerStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@audioconverterchunk
Patch Set: Make comment not specific to video_decoder_config(). Created 6 years, 9 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
« no previous file with comments | « no previous file | media/base/fake_text_track_stream.h » ('j') | media/filters/decoder_stream.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 4e07c66d8fe51ca939c21ead65e895320d4943f6..87f53e7307fcec7982b85be91639b4a536dd4ee2 100644
--- a/media/base/demuxer_stream.h
+++ b/media/base/demuxer_stream.h
@@ -40,6 +40,8 @@ class MEDIA_EXPORT DemuxerStream {
// new configuration to properly decode the buffers read
// from this point forward. The second parameter MUST be NULL
// when this status is returned.
+ // This will only be returned if SupportsConfigChanges()
+ // returns 'true' for this DemuxerStream.
enum Status {
kOk,
kAborted,
@@ -68,6 +70,16 @@ class MEDIA_EXPORT DemuxerStream {
virtual void EnableBitstreamConverter() = 0;
+ // Whether or not this DemuxerStream allows midstream configuration changes.
+ //
+ // A DemuxerStream that returns 'true' to this may return the 'kConfigChange'
+ // status from a Read() call. In this case the client is expected to be
+ // capable of taking appropriate action to handle config changes. Otherwise
+ // audio_decoder_config() and video_decoder_config()'s return values are
+ // guaranteed to remain constant, and the client may make optimizations based
+ // on this.
+ virtual bool SupportsConfigChanges() = 0;
+
protected:
// Only allow concrete implementations to get deleted.
virtual ~DemuxerStream();
« no previous file with comments | « no previous file | media/base/fake_text_track_stream.h » ('j') | media/filters/decoder_stream.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698