 Chromium Code Reviews
 Chromium Code Reviews Issue 1171263004:
  Allow setting memory limits on media::DemuxerStream  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1171263004:
  Allow setting memory limits on media::DemuxerStream  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| 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 maximum amount of data that this DemuxerStream is allowed to buffer | |
| 
philipj_slow
2015/06/11 08:44:05
I suppose document the unit, bytes?
 
servolk
2015/06/12 00:50:48
Done.
 | |
| 95 virtual int GetMemoryLimit() const = 0; | |
| 96 | |
| 97 // Set the maximum amount of data that this DemuxerStream is allowed to buffer | |
| 98 virtual void SetMemoryLimit(int memory_limit) = 0; | |
| 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 |