OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // SourceBufferStream is a data structure that stores media Buffers in ranges. | 5 // SourceBufferStream is a data structure that stores media Buffers in ranges. |
6 // Buffers can be appended out of presentation order. Buffers are retrieved by | 6 // Buffers can be appended out of presentation order. Buffers are retrieved by |
7 // seeking to the desired start point and calling GetNextBuffer(). Buffers are | 7 // seeking to the desired start point and calling GetNextBuffer(). Buffers are |
8 // returned in sequential presentation order. | 8 // returned in sequential presentation order. |
9 | 9 |
10 #ifndef MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_ | 10 #ifndef MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_ |
(...skipping 31 matching lines...) Loading... |
42 kSuccess, | 42 kSuccess, |
43 kNeedBuffer, | 43 kNeedBuffer, |
44 kConfigChange, | 44 kConfigChange, |
45 kEndOfStream | 45 kEndOfStream |
46 }; | 46 }; |
47 | 47 |
48 SourceBufferStream(const AudioDecoderConfig& audio_config, | 48 SourceBufferStream(const AudioDecoderConfig& audio_config, |
49 const LogCB& log_cb); | 49 const LogCB& log_cb); |
50 SourceBufferStream(const VideoDecoderConfig& video_config, | 50 SourceBufferStream(const VideoDecoderConfig& video_config, |
51 const LogCB& log_cb); | 51 const LogCB& log_cb); |
| 52 explicit SourceBufferStream(const LogCB& log_cb); |
52 | 53 |
53 ~SourceBufferStream(); | 54 ~SourceBufferStream(); |
54 | 55 |
55 // Signals that the next buffers appended are part of a new media segment | 56 // Signals that the next buffers appended are part of a new media segment |
56 // starting at |media_segment_start_time|. | 57 // starting at |media_segment_start_time|. |
57 void OnNewMediaSegment(base::TimeDelta media_segment_start_time); | 58 void OnNewMediaSegment(base::TimeDelta media_segment_start_time); |
58 | 59 |
59 // Add the |buffers| to the SourceBufferStream. Buffers within the queue are | 60 // Add the |buffers| to the SourceBufferStream. Buffers within the queue are |
60 // expected to be in order, but multiple calls to Append() may add buffers out | 61 // expected to be in order, but multiple calls to Append() may add buffers out |
61 // of order or overlapping. Assumes all buffers within |buffers| are in | 62 // of order or overlapping. Assumes all buffers within |buffers| are in |
(...skipping 301 matching lines...) Loading... |
363 // config. GetNextBuffer() must not be called again until | 364 // config. GetNextBuffer() must not be called again until |
364 // GetCurrentXXXDecoderConfig() has been called. | 365 // GetCurrentXXXDecoderConfig() has been called. |
365 bool config_change_pending_; | 366 bool config_change_pending_; |
366 | 367 |
367 DISALLOW_COPY_AND_ASSIGN(SourceBufferStream); | 368 DISALLOW_COPY_AND_ASSIGN(SourceBufferStream); |
368 }; | 369 }; |
369 | 370 |
370 } // namespace media | 371 } // namespace media |
371 | 372 |
372 #endif // MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_ | 373 #endif // MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_ |
OLD | NEW |