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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
286 // timestamps that match |start| will be removed. | 286 // timestamps that match |start| will be removed. |
287 // |*deleted_buffers| - Filled with buffers for the current playback position | 287 // |*deleted_buffers| - Filled with buffers for the current playback position |
288 // if the removal range included the current playback position. These buffers | 288 // if the removal range included the current playback position. These buffers |
289 // can be used as candidates for placing in the |track_buffer_|. | 289 // can be used as candidates for placing in the |track_buffer_|. |
290 void RemoveInternal( | 290 void RemoveInternal( |
291 base::TimeDelta start, base::TimeDelta end, bool is_exclusive, | 291 base::TimeDelta start, base::TimeDelta end, bool is_exclusive, |
292 BufferQueue* deleted_buffers); | 292 BufferQueue* deleted_buffers); |
293 | 293 |
294 bool is_video() const { return video_configs_.size() > 0; } | 294 bool is_video() const { return video_configs_.size() > 0; } |
295 | 295 |
296 // See GetNextBuffer(). | |
acolwell GONE FROM CHROMIUM
2014/01/10 22:53:31
nit: It would be good to at least outline the divi
| |
297 Status GetNextBufferInternal(scoped_refptr<StreamParserBuffer>* out_buffer); | |
298 | |
296 // Callback used to report error strings that can help the web developer | 299 // Callback used to report error strings that can help the web developer |
297 // figure out what is wrong with the content. | 300 // figure out what is wrong with the content. |
298 LogCB log_cb_; | 301 LogCB log_cb_; |
299 | 302 |
300 // List of disjoint buffered ranges, ordered by start time. | 303 // List of disjoint buffered ranges, ordered by start time. |
301 RangeList ranges_; | 304 RangeList ranges_; |
302 | 305 |
303 // Indicates which decoder config is being used by the decoder. | 306 // Indicates which decoder config is being used by the decoder. |
304 // GetNextBuffer() is only allows to return buffers that have a | 307 // GetNextBuffer() is only allows to return buffers that have a |
305 // config ID that matches this index. If there is a mismatch then | 308 // config ID that matches this index. If there is a mismatch then |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
362 | 365 |
363 // The maximum amount of data in bytes the stream will keep in memory. | 366 // The maximum amount of data in bytes the stream will keep in memory. |
364 int memory_limit_; | 367 int memory_limit_; |
365 | 368 |
366 // Indicates that a kConfigChanged status has been reported by GetNextBuffer() | 369 // Indicates that a kConfigChanged status has been reported by GetNextBuffer() |
367 // and GetCurrentXXXDecoderConfig() must be called to update the current | 370 // and GetCurrentXXXDecoderConfig() must be called to update the current |
368 // config. GetNextBuffer() must not be called again until | 371 // config. GetNextBuffer() must not be called again until |
369 // GetCurrentXXXDecoderConfig() has been called. | 372 // GetCurrentXXXDecoderConfig() has been called. |
370 bool config_change_pending_; | 373 bool config_change_pending_; |
371 | 374 |
375 // Used by GetNextBuffer() when a buffer with fade out is returned from | |
376 // GetNextBufferInternal(). Will be set to the returned buffer and will be | |
377 // consumed after the fade out section has been exhausted. | |
378 scoped_refptr<StreamParserBuffer> fade_in_buffer_; | |
379 | |
380 // Indicates which of the fade out preroll buffers in |fade_in_buffer_| should | |
381 // be handled out next. | |
382 size_t fade_out_preroll_index_; | |
383 | |
384 | |
372 DISALLOW_COPY_AND_ASSIGN(SourceBufferStream); | 385 DISALLOW_COPY_AND_ASSIGN(SourceBufferStream); |
373 }; | 386 }; |
374 | 387 |
375 } // namespace media | 388 } // namespace media |
376 | 389 |
377 #endif // MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_ | 390 #endif // MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_ |
OLD | NEW |