| 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 // SourceBufferStream is a data structure that stores media Buffers in ranges. | 5 // SourceBufferStream is a data structure that stores media Buffers in ranges. |
| 6 // Buffers can be appended out of presentation order. Buffers are retrieved by | 6 // Buffers can be appended out of presentation order. Buffers are retrieved by |
| 7 // seeking to the desired start point and calling GetNextBuffer(). Buffers are | 7 // seeking to the desired start point and calling GetNextBuffer(). Buffers are |
| 8 // returned in sequential presentation order. | 8 // returned in sequential presentation order. |
| 9 | 9 |
| 10 #ifndef MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_ | 10 #ifndef MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_ |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 | 134 |
| 135 // Notifies this object that the video config has changed and buffers in | 135 // Notifies this object that the video config has changed and buffers in |
| 136 // future Append() calls should be associated with this new config. | 136 // future Append() calls should be associated with this new config. |
| 137 bool UpdateVideoConfig(const VideoDecoderConfig& config); | 137 bool UpdateVideoConfig(const VideoDecoderConfig& config); |
| 138 | 138 |
| 139 // Returns the largest distance between two adjacent buffers in this stream, | 139 // Returns the largest distance between two adjacent buffers in this stream, |
| 140 // or an estimate if no two adjacent buffers have been appended to the stream | 140 // or an estimate if no two adjacent buffers have been appended to the stream |
| 141 // yet. | 141 // yet. |
| 142 base::TimeDelta GetMaxInterbufferDistance() const; | 142 base::TimeDelta GetMaxInterbufferDistance() const; |
| 143 | 143 |
| 144 void set_memory_limit_for_testing(int memory_limit) { | 144 void set_memory_limit(int memory_limit) { |
| 145 memory_limit_ = memory_limit; | 145 memory_limit_ = memory_limit; |
| 146 } | 146 } |
| 147 | 147 |
| 148 private: | 148 private: |
| 149 friend class SourceBufferStreamTest; | 149 friend class SourceBufferStreamTest; |
| 150 | 150 |
| 151 typedef std::list<SourceBufferRange*> RangeList; | 151 typedef std::list<SourceBufferRange*> RangeList; |
| 152 | 152 |
| 153 // Frees up space if the SourceBufferStream is taking up too much memory. | 153 // Frees up space if the SourceBufferStream is taking up too much memory. |
| 154 void GarbageCollectIfNeeded(); | 154 void GarbageCollectIfNeeded(); |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 | 415 |
| 416 // Indicates that splice frame generation is enabled. | 416 // Indicates that splice frame generation is enabled. |
| 417 const bool splice_frames_enabled_; | 417 const bool splice_frames_enabled_; |
| 418 | 418 |
| 419 DISALLOW_COPY_AND_ASSIGN(SourceBufferStream); | 419 DISALLOW_COPY_AND_ASSIGN(SourceBufferStream); |
| 420 }; | 420 }; |
| 421 | 421 |
| 422 } // namespace media | 422 } // namespace media |
| 423 | 423 |
| 424 #endif // MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_ | 424 #endif // MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_ |
| OLD | NEW |