| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 // the last Seek() call. | 83 // the last Seek() call. |
| 84 // Returns kSuccess if |out_buffer| is filled with a valid buffer, kNeedBuffer | 84 // Returns kSuccess if |out_buffer| is filled with a valid buffer, kNeedBuffer |
| 85 // if there is not enough data buffered to fulfill the request, and | 85 // if there is not enough data buffered to fulfill the request, and |
| 86 // kConfigChange if the next buffer requires a config change. | 86 // kConfigChange if the next buffer requires a config change. |
| 87 Status GetNextBuffer(scoped_refptr<StreamParserBuffer>* out_buffer); | 87 Status GetNextBuffer(scoped_refptr<StreamParserBuffer>* out_buffer); |
| 88 | 88 |
| 89 // Returns a list of the buffered time ranges. | 89 // Returns a list of the buffered time ranges. |
| 90 Ranges<base::TimeDelta> GetBufferedTime() const; | 90 Ranges<base::TimeDelta> GetBufferedTime() const; |
| 91 | 91 |
| 92 // Notifies this object that end of stream has been signalled. | 92 // Notifies this object that end of stream has been signalled. |
| 93 void EndOfStream(); | 93 void MarkEndOfStream(); |
| 94 | 94 |
| 95 // Cancel the previous end of stream notification. | 95 // Clear the end of stream state set by MarkEndOfStream(). |
| 96 void CancelEndOfStream(); | 96 void UnmarkEndOfStream(); |
| 97 | 97 |
| 98 const AudioDecoderConfig& GetCurrentAudioDecoderConfig(); | 98 const AudioDecoderConfig& GetCurrentAudioDecoderConfig(); |
| 99 const VideoDecoderConfig& GetCurrentVideoDecoderConfig(); | 99 const VideoDecoderConfig& GetCurrentVideoDecoderConfig(); |
| 100 | 100 |
| 101 // Notifies this object that the audio config has changed and buffers in | 101 // Notifies this object that the audio config has changed and buffers in |
| 102 // future Append() calls should be associated with this new config. | 102 // future Append() calls should be associated with this new config. |
| 103 bool UpdateAudioConfig(const AudioDecoderConfig& config); | 103 bool UpdateAudioConfig(const AudioDecoderConfig& config); |
| 104 | 104 |
| 105 // Notifies this object that the video config has changed and buffers in | 105 // Notifies this object that the video config has changed and buffers in |
| 106 // future Append() calls should be associated with this new config. | 106 // future Append() calls should be associated with this new config. |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 // config. GetNextBuffer() must not be called again until | 337 // config. GetNextBuffer() must not be called again until |
| 338 // GetCurrentXXXDecoderConfig() has been called. | 338 // GetCurrentXXXDecoderConfig() has been called. |
| 339 bool config_change_pending_; | 339 bool config_change_pending_; |
| 340 | 340 |
| 341 DISALLOW_COPY_AND_ASSIGN(SourceBufferStream); | 341 DISALLOW_COPY_AND_ASSIGN(SourceBufferStream); |
| 342 }; | 342 }; |
| 343 | 343 |
| 344 } // namespace media | 344 } // namespace media |
| 345 | 345 |
| 346 #endif // MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_ | 346 #endif // MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_ |
| OLD | NEW |