| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_WEBM_WEBM_CLUSTER_PARSER_H_ | 5 #ifndef MEDIA_WEBM_WEBM_CLUSTER_PARSER_H_ |
| 6 #define MEDIA_WEBM_WEBM_CLUSTER_PARSER_H_ | 6 #define MEDIA_WEBM_WEBM_CLUSTER_PARSER_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // Returns -1 if the parse fails. | 30 // Returns -1 if the parse fails. |
| 31 // Returns 0 if more data is needed. | 31 // Returns 0 if more data is needed. |
| 32 // Returns the number of bytes parsed on success. | 32 // Returns the number of bytes parsed on success. |
| 33 int Parse(const uint8* buf, int size); | 33 int Parse(const uint8* buf, int size); |
| 34 | 34 |
| 35 const BufferQueue& audio_buffers() const { return audio_buffers_; } | 35 const BufferQueue& audio_buffers() const { return audio_buffers_; } |
| 36 const BufferQueue& video_buffers() const { return video_buffers_; } | 36 const BufferQueue& video_buffers() const { return video_buffers_; } |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 // WebMParserClient methods. | 39 // WebMParserClient methods. |
| 40 virtual bool OnListStart(int id); | 40 virtual bool OnListStart(int id) OVERRIDE; |
| 41 virtual bool OnListEnd(int id); | 41 virtual bool OnListEnd(int id) OVERRIDE; |
| 42 virtual bool OnUInt(int id, int64 val); | 42 virtual bool OnUInt(int id, int64 val) OVERRIDE; |
| 43 virtual bool OnFloat(int id, double val); | 43 virtual bool OnFloat(int id, double val) OVERRIDE; |
| 44 virtual bool OnBinary(int id, const uint8* data, int size); | 44 virtual bool OnBinary(int id, const uint8* data, int size) OVERRIDE; |
| 45 virtual bool OnString(int id, const std::string& str); | 45 virtual bool OnString(int id, const std::string& str) OVERRIDE; |
| 46 virtual bool OnSimpleBlock(int track_num, int timecode, int flags, | 46 virtual bool OnSimpleBlock(int track_num, int timecode, int flags, |
| 47 const uint8* data, int size); | 47 const uint8* data, int size) OVERRIDE; |
| 48 | 48 |
| 49 double timecode_multiplier_; // Multiplier used to convert timecodes into | 49 double timecode_multiplier_; // Multiplier used to convert timecodes into |
| 50 // microseconds. | 50 // microseconds. |
| 51 int audio_track_num_; | 51 int audio_track_num_; |
| 52 base::TimeDelta audio_default_duration_; | 52 base::TimeDelta audio_default_duration_; |
| 53 int video_track_num_; | 53 int video_track_num_; |
| 54 base::TimeDelta video_default_duration_; | 54 base::TimeDelta video_default_duration_; |
| 55 | 55 |
| 56 int64 last_block_timecode_; | 56 int64 last_block_timecode_; |
| 57 | 57 |
| 58 int64 cluster_timecode_; | 58 int64 cluster_timecode_; |
| 59 BufferQueue audio_buffers_; | 59 BufferQueue audio_buffers_; |
| 60 BufferQueue video_buffers_; | 60 BufferQueue video_buffers_; |
| 61 | 61 |
| 62 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMClusterParser); | 62 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMClusterParser); |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 } // namespace media | 65 } // namespace media |
| 66 | 66 |
| 67 #endif // MEDIA_WEBM_WEBM_CLUSTER_PARSER_H_ | 67 #endif // MEDIA_WEBM_WEBM_CLUSTER_PARSER_H_ |
| OLD | NEW |