OLD | NEW |
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_FORMATS_WEBM_WEBM_CLUSTER_PARSER_H_ | 5 #ifndef MEDIA_FORMATS_WEBM_WEBM_CLUSTER_PARSER_H_ |
6 #define MEDIA_FORMATS_WEBM_WEBM_CLUSTER_PARSER_H_ | 6 #define MEDIA_FORMATS_WEBM_WEBM_CLUSTER_PARSER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <deque> | 10 #include <deque> |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 // due to missing duration, the buffer is given an estimated duration and | 177 // due to missing duration, the buffer is given an estimated duration and |
178 // included in the result. | 178 // included in the result. |
179 // Otherwise, if there are is a buffer held aside due to missing duration for | 179 // Otherwise, if there are is a buffer held aside due to missing duration for |
180 // any of the tracks, no buffers with same or greater (decode) timestamp will | 180 // any of the tracks, no buffers with same or greater (decode) timestamp will |
181 // be included in the buffers. | 181 // be included in the buffers. |
182 // The returned deques are cleared by Parse() or Reset() and updated by the | 182 // The returned deques are cleared by Parse() or Reset() and updated by the |
183 // next calls to Get{Audio,Video}Buffers(). | 183 // next calls to Get{Audio,Video}Buffers(). |
184 // If no Parse() or Reset() has occurred since the last call to Get{Audio, | 184 // If no Parse() or Reset() has occurred since the last call to Get{Audio, |
185 // Video,Text}Buffers(), then the previous BufferQueue& is returned again | 185 // Video,Text}Buffers(), then the previous BufferQueue& is returned again |
186 // without any recalculation. | 186 // without any recalculation. |
187 const BufferQueue& GetAudioBuffers(); | 187 void GetBuffers(StreamParser::BufferQueueMap* buffers); |
188 const BufferQueue& GetVideoBuffers(); | |
189 | 188 |
190 // Constructs and returns a subset of |text_track_map_| containing only | 189 // Constructs and returns a subset of |text_track_map_| containing only |
191 // tracks with non-empty buffer queues produced by the last Parse() and | 190 // tracks with non-empty buffer queues produced by the last Parse() and |
192 // filtered to exclude any buffers that have (decode) timestamp same or | 191 // filtered to exclude any buffers that have (decode) timestamp same or |
193 // greater than the lowest (decode) timestamp across all tracks of any buffer | 192 // greater than the lowest (decode) timestamp across all tracks of any buffer |
194 // held aside due to missing duration (unless the end of cluster has been | 193 // held aside due to missing duration (unless the end of cluster has been |
195 // reached). | 194 // reached). |
196 // The returned map is cleared by Parse() or Reset() and updated by the next | 195 // The returned map is cleared by Parse() or Reset() and updated by the next |
197 // call to GetTextBuffers(). | 196 // call to GetTextBuffers(). |
198 // If no Parse() or Reset() has occurred since the last call to | 197 // If no Parse() or Reset() has occurred since the last call to |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 DecodeTimestamp ready_buffer_upper_bound_; | 316 DecodeTimestamp ready_buffer_upper_bound_; |
318 | 317 |
319 scoped_refptr<MediaLog> media_log_; | 318 scoped_refptr<MediaLog> media_log_; |
320 | 319 |
321 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMClusterParser); | 320 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMClusterParser); |
322 }; | 321 }; |
323 | 322 |
324 } // namespace media | 323 } // namespace media |
325 | 324 |
326 #endif // MEDIA_FORMATS_WEBM_WEBM_CLUSTER_PARSER_H_ | 325 #endif // MEDIA_FORMATS_WEBM_WEBM_CLUSTER_PARSER_H_ |
OLD | NEW |