Index: media/webm/webm_tracks_parser.h |
diff --git a/media/webm/webm_tracks_parser.h b/media/webm/webm_tracks_parser.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1625b90cb23a040edd858332e8c9ea2eab48c0b8 |
--- /dev/null |
+++ b/media/webm/webm_tracks_parser.h |
@@ -0,0 +1,55 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef MEDIA_WEBM_WEBM_TRACKS_PARSER_H_ |
+#define MEDIA_WEBM_WEBM_TRACKS_PARSER_H_ |
+ |
+#include "media/webm/webm_parser.h" |
+ |
+#include "base/time.h" |
+ |
+namespace media { |
+ |
+// Parser for WebM Tracks element. |
+class WebMTracksParser : private WebMParserClient { |
scherkus (not reviewing)
2011/06/24 18:27:37
public
acolwell GONE FROM CHROMIUM
2011/06/27 23:48:25
Done.
|
+ public: |
+ WebMTracksParser(int64 timecode_scale); |
+ virtual ~WebMTracksParser(); |
+ |
+ // Parses a WebM Tracks element in |buf|. |
+ // |
+ // Returns the number of bytes parsed on success. Returns -1 |
+ // on error. |
+ int Parse(const uint8* buf, int size); |
+ |
+ int64 audio_track_num() const; |
scherkus (not reviewing)
2011/06/24 18:27:37
inline if you want
acolwell GONE FROM CHROMIUM
2011/06/27 23:48:25
Done.
|
+ base::TimeDelta audio_default_duration() const; |
+ |
+ int64 video_track_num() const; |
+ base::TimeDelta video_default_duration() const; |
+ |
+ private: |
+ // WebMParserClient methods |
+ virtual bool OnListStart(int id); |
+ virtual bool OnListEnd(int id); |
+ virtual bool OnUInt(int id, int64 val); |
+ virtual bool OnFloat(int id, double val); |
+ virtual bool OnBinary(int id, const uint8* data, int size); |
+ virtual bool OnString(int id, const std::string& str); |
+ virtual bool OnSimpleBlock(int track_num, int timecode, int flags, |
+ const uint8* data, int size); |
+ int64 timecode_scale_; |
+ |
+ int64 track_type_; |
+ int64 track_num_; |
+ int64 track_default_duration_; |
+ int64 audio_track_num_; |
+ base::TimeDelta audio_default_duration_; |
+ int64 video_track_num_; |
+ base::TimeDelta video_default_duration_; |
+}; |
+ |
scherkus (not reviewing)
2011/06/24 18:27:37
DISALLOW etc
acolwell GONE FROM CHROMIUM
2011/06/27 23:48:25
Done.
|
+} // namespace media |
+ |
+#endif // MEDIA_WEBM_WEBM_TRACKS_PARSER_H_ |