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