Chromium Code Reviews| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 30 | 30 |
| 31 // Policy for handling large gaps between buffers. Continuous media like | 31 // Policy for handling large gaps between buffers. Continuous media like |
| 32 // audio & video should use NO_GAPS_ALLOWED. Discontinuous media like | 32 // audio & video should use NO_GAPS_ALLOWED. Discontinuous media like |
| 33 // timed text should use ALLOW_GAPS because large differences in timestamps | 33 // timed text should use ALLOW_GAPS because large differences in timestamps |
| 34 // are common and acceptable. | 34 // are common and acceptable. |
| 35 enum GapPolicy { | 35 enum GapPolicy { |
| 36 NO_GAPS_ALLOWED, | 36 NO_GAPS_ALLOWED, |
| 37 ALLOW_GAPS | 37 ALLOW_GAPS |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 int GetConfigIdAtTime(DecodeTimestamp timestamp); | |
|
chcunningham
2016/07/22 01:50:28
TODO: document these functions
wolenetz
2016/12/02 00:18:49
(Done)
| |
| 41 | |
| 42 bool SameConfigThruRange(DecodeTimestamp start, DecodeTimestamp end); | |
| 43 | |
| 40 // Sequential buffers with the same decode timestamp make sense under certain | 44 // Sequential buffers with the same decode timestamp make sense under certain |
| 41 // conditions, typically when the first buffer is a keyframe. Due to some | 45 // conditions, typically when the first buffer is a keyframe. Due to some |
| 42 // atypical media append behaviors where a new keyframe might have the same | 46 // atypical media append behaviors where a new keyframe might have the same |
| 43 // timestamp as a previous non-keyframe, the playback of the sequence might | 47 // timestamp as a previous non-keyframe, the playback of the sequence might |
| 44 // involve some throwaway decode work. This method supports detecting this | 48 // involve some throwaway decode work. This method supports detecting this |
| 45 // situation so that callers can log warnings (it returns true in this case | 49 // situation so that callers can log warnings (it returns true in this case |
| 46 // only). | 50 // only). |
| 47 // For all other cases, including more typical same-DTS sequences, this method | 51 // For all other cases, including more typical same-DTS sequences, this method |
| 48 // returns false. Examples of typical situations where DTS of two consecutive | 52 // returns false. Examples of typical situations where DTS of two consecutive |
| 49 // frames can be equal: | 53 // frames can be equal: |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 316 | 320 |
| 317 // Stores the amount of memory taken up by the data in |buffers_|. | 321 // Stores the amount of memory taken up by the data in |buffers_|. |
| 318 size_t size_in_bytes_; | 322 size_t size_in_bytes_; |
| 319 | 323 |
| 320 DISALLOW_COPY_AND_ASSIGN(SourceBufferRange); | 324 DISALLOW_COPY_AND_ASSIGN(SourceBufferRange); |
| 321 }; | 325 }; |
| 322 | 326 |
| 323 } // namespace media | 327 } // namespace media |
| 324 | 328 |
| 325 #endif // MEDIA_FILTERS_SOURCE_BUFFER_RANGE_H_ | 329 #endif // MEDIA_FILTERS_SOURCE_BUFFER_RANGE_H_ |
| OLD | NEW |