Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_BASE_DEMUXER_STREAM_H_ | 5 #ifndef MEDIA_BASE_DEMUXER_STREAM_H_ |
| 6 #define MEDIA_BASE_DEMUXER_STREAM_H_ | 6 #define MEDIA_BASE_DEMUXER_STREAM_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/time/time.h" | |
| 10 #include "media/base/media_export.h" | 11 #include "media/base/media_export.h" |
| 11 #include "media/base/video_rotation.h" | 12 #include "media/base/video_rotation.h" |
| 12 | 13 |
| 13 namespace media { | 14 namespace media { |
| 14 | 15 |
| 15 class AudioDecoderConfig; | 16 class AudioDecoderConfig; |
| 16 class DecoderBuffer; | 17 class DecoderBuffer; |
| 17 class VideoDecoderConfig; | 18 class VideoDecoderConfig; |
| 18 | 19 |
| 19 class MEDIA_EXPORT DemuxerStream { | 20 class MEDIA_EXPORT DemuxerStream { |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 84 // A DemuxerStream that returns 'true' to this may return the 'kConfigChange' | 85 // A DemuxerStream that returns 'true' to this may return the 'kConfigChange' |
| 85 // status from a Read() call. In this case the client is expected to be | 86 // status from a Read() call. In this case the client is expected to be |
| 86 // capable of taking appropriate action to handle config changes. Otherwise | 87 // capable of taking appropriate action to handle config changes. Otherwise |
| 87 // audio_decoder_config() and video_decoder_config()'s return values are | 88 // audio_decoder_config() and video_decoder_config()'s return values are |
| 88 // guaranteed to remain constant, and the client may make optimizations based | 89 // guaranteed to remain constant, and the client may make optimizations based |
| 89 // on this. | 90 // on this. |
| 90 virtual bool SupportsConfigChanges() = 0; | 91 virtual bool SupportsConfigChanges() = 0; |
| 91 | 92 |
| 92 virtual VideoRotation video_rotation() = 0; | 93 virtual VideoRotation video_rotation() = 0; |
| 93 | 94 |
| 95 // Indicates whether a DemuxerStream is currently enabled (i.e. should be | |
| 96 // decoded and rendered) or not. When a stream is disabled the current pending | |
| 97 // read (or the next read request) reports kDisabled status. Calling Read | |
| 98 // 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
| |
| 99 // 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
| |
| 100 virtual bool enabled() const = 0; | |
| 101 virtual void set_enabled(bool enabled, base::TimeDelta timestamp) = 0; | |
| 102 | |
| 94 protected: | 103 protected: |
| 95 // Only allow concrete implementations to get deleted. | 104 // Only allow concrete implementations to get deleted. |
| 96 virtual ~DemuxerStream(); | 105 virtual ~DemuxerStream(); |
| 97 }; | 106 }; |
| 98 | 107 |
| 99 } // namespace media | 108 } // namespace media |
| 100 | 109 |
| 101 #endif // MEDIA_BASE_DEMUXER_STREAM_H_ | 110 #endif // MEDIA_BASE_DEMUXER_STREAM_H_ |
| OLD | NEW |