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(); |