Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(822)

Side by Side Diff: media/webm/webm_tracks_parser.h

Issue 7203002: Adding ChunkDemuxer implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unit tests and nits Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/webm/webm_parser.cc ('k') | media/webm/webm_tracks_parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_TRACKS_PARSER_H_
6 #define MEDIA_WEBM_WEBM_TRACKS_PARSER_H_
7
8 #include "media/webm/webm_parser.h"
9
10 #include "base/time.h"
11
12 namespace media {
13
14 // Parser for WebM Tracks element.
15 class WebMTracksParser : public WebMParserClient {
16 public:
17 WebMTracksParser(int64 timecode_scale);
18 virtual ~WebMTracksParser();
19
20 // Parses a WebM Tracks element in |buf|.
21 //
22 // Returns the number of bytes parsed on success. Returns -1
23 // on error.
24 int Parse(const uint8* buf, int size);
25
26 int64 audio_track_num() const { return audio_track_num_; }
27 base::TimeDelta audio_default_duration() const {
28 return audio_default_duration_;
29 }
30
31 int64 video_track_num() const { return video_track_num_; }
32 base::TimeDelta video_default_duration() const {
33 return video_default_duration_;
34 }
35
36 private:
37 // WebMParserClient methods
38 virtual bool OnListStart(int id);
39 virtual bool OnListEnd(int id);
40 virtual bool OnUInt(int id, int64 val);
41 virtual bool OnFloat(int id, double val);
42 virtual bool OnBinary(int id, const uint8* data, int size);
43 virtual bool OnString(int id, const std::string& str);
44 virtual bool OnSimpleBlock(int track_num, int timecode, int flags,
45 const uint8* data, int size);
46 int64 timecode_scale_;
47
48 int64 track_type_;
49 int64 track_num_;
50 int64 track_default_duration_;
51 int64 audio_track_num_;
52 base::TimeDelta audio_default_duration_;
53 int64 video_track_num_;
54 base::TimeDelta video_default_duration_;
55
56 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMTracksParser);
57 };
58
59 } // namespace media
60
61 #endif // MEDIA_WEBM_WEBM_TRACKS_PARSER_H_
OLDNEW
« no previous file with comments | « media/webm/webm_parser.cc ('k') | media/webm/webm_tracks_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698