OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_FILTERS_SOURCE_BUFFER_RANGE_H_ | 5 #ifndef MEDIA_FILTERS_SOURCE_BUFFER_RANGE_H_ |
6 #define MEDIA_FILTERS_SOURCE_BUFFER_RANGE_H_ | 6 #define MEDIA_FILTERS_SOURCE_BUFFER_RANGE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 117 |
118 // Gets the range of GOP to secure at least |bytes_to_free| from | 118 // Gets the range of GOP to secure at least |bytes_to_free| from |
119 // [|start_timestamp|, |end_timestamp|). | 119 // [|start_timestamp|, |end_timestamp|). |
120 // Returns the size of the buffers to secure if the buffers of | 120 // Returns the size of the buffers to secure if the buffers of |
121 // [|start_timestamp|, |end_removal_timestamp|) is removed. | 121 // [|start_timestamp|, |end_removal_timestamp|) is removed. |
122 // Will not update |end_removal_timestamp| if the returned size is 0. | 122 // Will not update |end_removal_timestamp| if the returned size is 0. |
123 size_t GetRemovalGOP( | 123 size_t GetRemovalGOP( |
124 DecodeTimestamp start_timestamp, DecodeTimestamp end_timestamp, | 124 DecodeTimestamp start_timestamp, DecodeTimestamp end_timestamp, |
125 size_t bytes_to_free, DecodeTimestamp* end_removal_timestamp); | 125 size_t bytes_to_free, DecodeTimestamp* end_removal_timestamp); |
126 | 126 |
| 127 bool FirstGOPEarlierThanMediaTime(DecodeTimestamp media_time) const; |
| 128 |
127 // Indicates whether the GOP at the beginning or end of the range contains the | 129 // Indicates whether the GOP at the beginning or end of the range contains the |
128 // next buffer position. | 130 // next buffer position. |
129 bool FirstGOPContainsNextBufferPosition() const; | 131 bool FirstGOPContainsNextBufferPosition() const; |
130 bool LastGOPContainsNextBufferPosition() const; | 132 bool LastGOPContainsNextBufferPosition() const; |
131 | 133 |
132 // Updates |out_buffer| with the next buffer in presentation order. Seek() | 134 // Updates |out_buffer| with the next buffer in presentation order. Seek() |
133 // must be called before calls to GetNextBuffer(), and buffers are returned | 135 // must be called before calls to GetNextBuffer(), and buffers are returned |
134 // in order from the last call to Seek(). Returns true if |out_buffer| is | 136 // in order from the last call to Seek(). Returns true if |out_buffer| is |
135 // filled with a valid buffer, false if there is not enough data to fulfill | 137 // filled with a valid buffer, false if there is not enough data to fulfill |
136 // the request. | 138 // the request. |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 | 288 |
287 // Stores the amount of memory taken up by the data in |buffers_|. | 289 // Stores the amount of memory taken up by the data in |buffers_|. |
288 size_t size_in_bytes_; | 290 size_t size_in_bytes_; |
289 | 291 |
290 DISALLOW_COPY_AND_ASSIGN(SourceBufferRange); | 292 DISALLOW_COPY_AND_ASSIGN(SourceBufferRange); |
291 }; | 293 }; |
292 | 294 |
293 } // namespace media | 295 } // namespace media |
294 | 296 |
295 #endif // MEDIA_FILTERS_SOURCE_BUFFER_RANGE_H_ | 297 #endif // MEDIA_FILTERS_SOURCE_BUFFER_RANGE_H_ |
OLD | NEW |