| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 static const uint16_t kOpusFrameDurationsMu[]; | 48 static const uint16_t kOpusFrameDurationsMu[]; |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 // Helper class that manages per-track state. | 51 // Helper class that manages per-track state. |
| 52 class Track { | 52 class Track { |
| 53 public: | 53 public: |
| 54 Track(int track_num, | 54 Track(int track_num, |
| 55 bool is_video, | 55 bool is_video, |
| 56 base::TimeDelta default_duration, | 56 base::TimeDelta default_duration, |
| 57 const scoped_refptr<MediaLog>& media_log); | 57 const scoped_refptr<MediaLog>& media_log); |
| 58 Track(const Track& other); |
| 58 ~Track(); | 59 ~Track(); |
| 59 | 60 |
| 60 int track_num() const { return track_num_; } | 61 int track_num() const { return track_num_; } |
| 61 | 62 |
| 62 // If a buffer is currently held aside pending duration calculation, returns | 63 // If a buffer is currently held aside pending duration calculation, returns |
| 63 // its decode timestamp. Otherwise, returns kInfiniteDuration(). | 64 // its decode timestamp. Otherwise, returns kInfiniteDuration(). |
| 64 DecodeTimestamp GetReadyUpperBound(); | 65 DecodeTimestamp GetReadyUpperBound(); |
| 65 | 66 |
| 66 // Prepares |ready_buffers_| for retrieval. Prior to calling, | 67 // Prepares |ready_buffers_| for retrieval. Prior to calling, |
| 67 // |ready_buffers_| must be empty. Moves all |buffers_| with decode | 68 // |ready_buffers_| must be empty. Moves all |buffers_| with decode |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 DecodeTimestamp ready_buffer_upper_bound_; | 320 DecodeTimestamp ready_buffer_upper_bound_; |
| 320 | 321 |
| 321 scoped_refptr<MediaLog> media_log_; | 322 scoped_refptr<MediaLog> media_log_; |
| 322 | 323 |
| 323 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMClusterParser); | 324 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMClusterParser); |
| 324 }; | 325 }; |
| 325 | 326 |
| 326 } // namespace media | 327 } // namespace media |
| 327 | 328 |
| 328 #endif // MEDIA_FORMATS_WEBM_WEBM_CLUSTER_PARSER_H_ | 329 #endif // MEDIA_FORMATS_WEBM_WEBM_CLUSTER_PARSER_H_ |
| OLD | NEW |