| 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 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 int GetRemovalGOP( | 123 int GetRemovalGOP( |
| 124 DecodeTimestamp start_timestamp, DecodeTimestamp end_timestamp, | 124 DecodeTimestamp start_timestamp, DecodeTimestamp end_timestamp, |
| 125 int bytes_to_free, DecodeTimestamp* end_removal_timestamp); | 125 int 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 | 282 |
| 281 // Stores the amount of memory taken up by the data in |buffers_|. | 283 // Stores the amount of memory taken up by the data in |buffers_|. |
| 282 int size_in_bytes_; | 284 int size_in_bytes_; |
| 283 | 285 |
| 284 DISALLOW_COPY_AND_ASSIGN(SourceBufferRange); | 286 DISALLOW_COPY_AND_ASSIGN(SourceBufferRange); |
| 285 }; | 287 }; |
| 286 | 288 |
| 287 } // namespace media | 289 } // namespace media |
| 288 | 290 |
| 289 #endif // MEDIA_FILTERS_SOURCE_BUFFER_RANGE_H_ | 291 #endif // MEDIA_FILTERS_SOURCE_BUFFER_RANGE_H_ |
| OLD | NEW |