| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // |out_buffer|'s timestamp may be earlier than the |timestamp| passed to | 115 // |out_buffer|'s timestamp may be earlier than the |timestamp| passed to |
| 116 // the last Seek() call. | 116 // the last Seek() call. |
| 117 // Returns kSuccess if |out_buffer| is filled with a valid buffer, kNeedBuffer | 117 // Returns kSuccess if |out_buffer| is filled with a valid buffer, kNeedBuffer |
| 118 // if there is not enough data buffered to fulfill the request, and | 118 // if there is not enough data buffered to fulfill the request, and |
| 119 // kConfigChange if the next buffer requires a config change. | 119 // kConfigChange if the next buffer requires a config change. |
| 120 Status GetNextBuffer(scoped_refptr<StreamParserBuffer>* out_buffer); | 120 Status GetNextBuffer(scoped_refptr<StreamParserBuffer>* out_buffer); |
| 121 | 121 |
| 122 // Returns a list of the buffered time ranges. | 122 // Returns a list of the buffered time ranges. |
| 123 Ranges<base::TimeDelta> GetBufferedTime() const; | 123 Ranges<base::TimeDelta> GetBufferedTime() const; |
| 124 | 124 |
| 125 // Returns the highest buffered PTS or base::TimeDelta() if nothing is |
| 126 // buffered. |
| 127 base::TimeDelta GetHighestPresentationTimestamp() const; |
| 128 |
| 125 // Returns the duration of the buffered ranges, which is equivalent | 129 // Returns the duration of the buffered ranges, which is equivalent |
| 126 // to the end timestamp of the last buffered range. If no data is buffered | 130 // to the end timestamp of the last buffered range. If no data is buffered |
| 127 // then base::TimeDelta() is returned. | 131 // then base::TimeDelta() is returned. |
| 128 base::TimeDelta GetBufferedDuration() const; | 132 base::TimeDelta GetBufferedDuration() const; |
| 129 | 133 |
| 130 // Returns the size of the buffered data in bytes. | 134 // Returns the size of the buffered data in bytes. |
| 131 size_t GetBufferedSize() const; | 135 size_t GetBufferedSize() const; |
| 132 | 136 |
| 133 // Notifies this object that end of stream has been signalled. | 137 // Notifies this object that end of stream has been signalled. |
| 134 void MarkEndOfStream(); | 138 void MarkEndOfStream(); |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 int num_track_buffer_gap_warning_logs_ = 0; | 460 int num_track_buffer_gap_warning_logs_ = 0; |
| 457 int num_garbage_collect_algorithm_logs_ = 0; | 461 int num_garbage_collect_algorithm_logs_ = 0; |
| 458 int num_strange_same_timestamps_logs_ = 0; | 462 int num_strange_same_timestamps_logs_ = 0; |
| 459 | 463 |
| 460 DISALLOW_COPY_AND_ASSIGN(SourceBufferStream); | 464 DISALLOW_COPY_AND_ASSIGN(SourceBufferStream); |
| 461 }; | 465 }; |
| 462 | 466 |
| 463 } // namespace media | 467 } // namespace media |
| 464 | 468 |
| 465 #endif // MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_ | 469 #endif // MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_ |
| OLD | NEW |