Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MEDIA_WEBM_WEBM_INFO_PARSER_H_ | |
| 6 #define MEDIA_WEBM_WEBM_INFO_PARSER_H_ | |
| 7 | |
| 8 #include "media/webm/webm_parser.h" | |
| 9 | |
| 10 namespace media { | |
| 11 | |
| 12 // Parser for WebM Info element. | |
| 13 class WebMInfoParser : private WebMParserClient { | |
| 14 public: | |
| 15 WebMInfoParser(); | |
| 16 virtual ~WebMInfoParser(); | |
| 17 | |
| 18 // Parses a WebM Info element in |buf|. | |
| 19 // | |
| 20 // Returns the number of bytes parsed on success. Returns -1 | |
| 21 // on error. | |
| 22 int Parse(const uint8* buf, int size); | |
| 23 | |
| 24 int64 timecode_scale() const; | |
| 25 double duration() const; | |
|
scherkus (not reviewing)
2011/06/24 18:27:37
these can be inlined if you so desire
acolwell GONE FROM CHROMIUM
2011/06/27 23:48:25
Done.
| |
| 26 | |
| 27 private: | |
| 28 // WebMParserClient methods | |
| 29 virtual bool OnListStart(int id); | |
| 30 virtual bool OnListEnd(int id); | |
| 31 virtual bool OnUInt(int id, int64 val); | |
| 32 virtual bool OnFloat(int id, double val); | |
| 33 virtual bool OnBinary(int id, const uint8* data, int size); | |
| 34 virtual bool OnString(int id, const std::string& str); | |
| 35 virtual bool OnSimpleBlock(int track_num, int timecode, int flags, | |
| 36 const uint8* data, int size); | |
| 37 | |
| 38 int64 timecode_scale_; | |
| 39 double duration_; | |
| 40 }; | |
|
scherkus (not reviewing)
2011/06/24 18:27:37
DISALLOW etc
acolwell GONE FROM CHROMIUM
2011/06/27 23:48:25
Done.
| |
| 41 | |
| 42 } // namespace media | |
| 43 | |
| 44 #endif // MEDIA_WEBM_WEBM_INFO_PARSER_H_ | |
| OLD | NEW |