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

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: Addressed CR comments & split code out into separate files. Created 9 years, 6 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
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 : private WebMParserClient {
scherkus (not reviewing) 2011/06/24 18:27:37 public
acolwell GONE FROM CHROMIUM 2011/06/27 23:48:25 Done.
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;
scherkus (not reviewing) 2011/06/24 18:27:37 inline if you want
acolwell GONE FROM CHROMIUM 2011/06/27 23:48:25 Done.
27 base::TimeDelta audio_default_duration() const;
28
29 int64 video_track_num() const;
30 base::TimeDelta video_default_duration() const;
31
32 private:
33 // WebMParserClient methods
34 virtual bool OnListStart(int id);
35 virtual bool OnListEnd(int id);
36 virtual bool OnUInt(int id, int64 val);
37 virtual bool OnFloat(int id, double val);
38 virtual bool OnBinary(int id, const uint8* data, int size);
39 virtual bool OnString(int id, const std::string& str);
40 virtual bool OnSimpleBlock(int track_num, int timecode, int flags,
41 const uint8* data, int size);
42 int64 timecode_scale_;
43
44 int64 track_type_;
45 int64 track_num_;
46 int64 track_default_duration_;
47 int64 audio_track_num_;
48 base::TimeDelta audio_default_duration_;
49 int64 video_track_num_;
50 base::TimeDelta video_default_duration_;
51 };
52
scherkus (not reviewing) 2011/06/24 18:27:37 DISALLOW etc
acolwell GONE FROM CHROMIUM 2011/06/27 23:48:25 Done.
53 } // namespace media
54
55 #endif // MEDIA_WEBM_WEBM_TRACKS_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698