Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Side by Side Diff: media/filters/source_buffer_range.h

Issue 2171133002: Implement opus seek preroll for MediaSourceExtensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/BUILD.gn ('k') | media/filters/source_buffer_range.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 // Return the config ID for the buffer at |timestamp|. Precondition: callers
41 // must first verify CanSeekTo(timestamp) == true.
42 int GetConfigIdAtTime(DecodeTimestamp timestamp);
43
44 // Return true if all buffers in range of [start, end] have the same config
45 // ID. Precondition: callers must first verify that
46 // CanSeekTo(start) == CanSeekTo(end) == true.
47 bool SameConfigThruRange(DecodeTimestamp start, DecodeTimestamp end);
48
40 // Sequential buffers with the same decode timestamp make sense under certain 49 // Sequential buffers with the same decode timestamp make sense under certain
41 // conditions, typically when the first buffer is a keyframe. Due to some 50 // 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 51 // 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 52 // timestamp as a previous non-keyframe, the playback of the sequence might
44 // involve some throwaway decode work. This method supports detecting this 53 // involve some throwaway decode work. This method supports detecting this
45 // situation so that callers can log warnings (it returns true in this case 54 // situation so that callers can log warnings (it returns true in this case
46 // only). 55 // only).
47 // For all other cases, including more typical same-DTS sequences, this method 56 // For all other cases, including more typical same-DTS sequences, this method
48 // returns false. Examples of typical situations where DTS of two consecutive 57 // returns false. Examples of typical situations where DTS of two consecutive
49 // frames can be equal: 58 // frames can be equal:
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 325
317 // Stores the amount of memory taken up by the data in |buffers_|. 326 // Stores the amount of memory taken up by the data in |buffers_|.
318 size_t size_in_bytes_; 327 size_t size_in_bytes_;
319 328
320 DISALLOW_COPY_AND_ASSIGN(SourceBufferRange); 329 DISALLOW_COPY_AND_ASSIGN(SourceBufferRange);
321 }; 330 };
322 331
323 } // namespace media 332 } // namespace media
324 333
325 #endif // MEDIA_FILTERS_SOURCE_BUFFER_RANGE_H_ 334 #endif // MEDIA_FILTERS_SOURCE_BUFFER_RANGE_H_
OLDNEW
« no previous file with comments | « media/BUILD.gn ('k') | media/filters/source_buffer_range.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698