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 "media/base/media_export.h" | 10 #include "media/base/media_export.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 84 // A DemuxerStream that returns 'true' to this may return the 'kConfigChange' | 84 // 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 | 85 // 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 | 86 // capable of taking appropriate action to handle config changes. Otherwise |
| 87 // audio_decoder_config() and video_decoder_config()'s return values are | 87 // audio_decoder_config() and video_decoder_config()'s return values are |
| 88 // guaranteed to remain constant, and the client may make optimizations based | 88 // guaranteed to remain constant, and the client may make optimizations based |
| 89 // on this. | 89 // on this. |
| 90 virtual bool SupportsConfigChanges() = 0; | 90 virtual bool SupportsConfigChanges() = 0; |
| 91 | 91 |
| 92 virtual VideoRotation video_rotation() = 0; | 92 virtual VideoRotation video_rotation() = 0; |
| 93 | 93 |
| 94 // Get the data buffer size, in bytes. | |
|
wolenetz
2015/06/12 21:31:57
nit: s/size/size limit/
servolk
2015/06/16 01:30:51
Done.
| |
| 95 virtual int GetMemoryLimit() const; | |
|
wolenetz
2015/06/12 21:31:56
nit: signed int: is a range including negative val
servolk
2015/06/16 01:30:51
The best type for this is probably size_t, but the
| |
| 96 | |
| 97 // Set the data buffer size, in bytes. | |
|
wolenetz
2015/06/12 21:31:56
nit ditto (limit)
servolk
2015/06/16 01:30:51
Done.
| |
| 98 virtual void SetMemoryLimit(int memory_limit); | |
|
wolenetz
2015/06/12 21:31:56
nit ditto (int ?)
Also, is a DemuxerStream valid
servolk
2015/06/16 01:30:51
Yes, there are reasonable defaults for memory limi
| |
| 99 | |
| 94 protected: | 100 protected: |
| 95 // Only allow concrete implementations to get deleted. | 101 // Only allow concrete implementations to get deleted. |
| 96 virtual ~DemuxerStream(); | 102 virtual ~DemuxerStream(); |
| 97 }; | 103 }; |
| 98 | 104 |
| 99 } // namespace media | 105 } // namespace media |
| 100 | 106 |
| 101 #endif // MEDIA_BASE_DEMUXER_STREAM_H_ | 107 #endif // MEDIA_BASE_DEMUXER_STREAM_H_ |
| OLD | NEW |