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

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

Issue 23014009: media: Opus support for WebM in Media Source (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 bool cluster_ended() const { return cluster_ended_; } 103 bool cluster_ended() const { return cluster_ended_; }
104 104
105 private: 105 private:
106 // WebMParserClient methods. 106 // WebMParserClient methods.
107 virtual WebMParserClient* OnListStart(int id) OVERRIDE; 107 virtual WebMParserClient* OnListStart(int id) OVERRIDE;
108 virtual bool OnListEnd(int id) OVERRIDE; 108 virtual bool OnListEnd(int id) OVERRIDE;
109 virtual bool OnUInt(int id, int64 val) OVERRIDE; 109 virtual bool OnUInt(int id, int64 val) OVERRIDE;
110 virtual bool OnBinary(int id, const uint8* data, int size) OVERRIDE; 110 virtual bool OnBinary(int id, const uint8* data, int size) OVERRIDE;
111 111
112 bool ParseBlock(bool is_simple_block, const uint8* buf, int size, 112 bool ParseBlock(bool is_simple_block, const uint8* buf, int size,
113 const uint8* additional, int additional_size, int duration); 113 const uint8* additional, int additional_size, int duration,
114 int64 discard_padding);
114 bool OnBlock(bool is_simple_block, int track_num, int timecode, int duration, 115 bool OnBlock(bool is_simple_block, int track_num, int timecode, int duration,
115 int flags, const uint8* data, int size, 116 int flags, const uint8* data, int size,
116 const uint8* additional, int additional_size); 117 const uint8* additional, int additional_size,
118 int64 discard_padding);
117 119
118 // Resets the Track objects associated with each text track. 120 // Resets the Track objects associated with each text track.
119 void ResetTextTracks(); 121 void ResetTextTracks();
120 122
121 // Search for the indicated track_num among the text tracks. Returns NULL 123 // Search for the indicated track_num among the text tracks. Returns NULL
122 // if that track num is not a text track. 124 // if that track num is not a text track.
123 Track* FindTextTrack(int track_num); 125 Track* FindTextTrack(int track_num);
124 126
125 double timecode_multiplier_; // Multiplier used to convert timecodes into 127 double timecode_multiplier_; // Multiplier used to convert timecodes into
126 // microseconds. 128 // microseconds.
127 std::set<int64> ignored_tracks_; 129 std::set<int64> ignored_tracks_;
128 std::string audio_encryption_key_id_; 130 std::string audio_encryption_key_id_;
129 std::string video_encryption_key_id_; 131 std::string video_encryption_key_id_;
130 132
131 WebMListParser parser_; 133 WebMListParser parser_;
132 134
133 int64 last_block_timecode_; 135 int64 last_block_timecode_;
134 scoped_ptr<uint8[]> block_data_; 136 scoped_ptr<uint8[]> block_data_;
135 int block_data_size_; 137 int block_data_size_;
136 int64 block_duration_; 138 int64 block_duration_;
137 int64 block_add_id_; 139 int64 block_add_id_;
138 scoped_ptr<uint8[]> block_additional_data_; 140 scoped_ptr<uint8[]> block_additional_data_;
139 int block_additional_data_size_; 141 int block_additional_data_size_;
142 int64 discard_padding_;
140 143
141 int64 cluster_timecode_; 144 int64 cluster_timecode_;
142 base::TimeDelta cluster_start_time_; 145 base::TimeDelta cluster_start_time_;
143 bool cluster_ended_; 146 bool cluster_ended_;
144 147
145 Track audio_; 148 Track audio_;
146 Track video_; 149 Track video_;
147 TextTrackMap text_track_map_; 150 TextTrackMap text_track_map_;
148 LogCB log_cb_; 151 LogCB log_cb_;
149 152
150 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMClusterParser); 153 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMClusterParser);
151 }; 154 };
152 155
153 } // namespace media 156 } // namespace media
154 157
155 #endif // MEDIA_WEBM_WEBM_CLUSTER_PARSER_H_ 158 #endif // MEDIA_WEBM_WEBM_CLUSTER_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698