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

Side by Side Diff: media/formats/webm/webm_stream_parser.cc

Issue 195973006: Allow StreamParsers to request automatic timestampOffset updates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "media/formats/webm/webm_stream_parser.h" 5 #include "media/formats/webm/webm_stream_parser.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 tracks_parser.video_track_num(), 208 tracks_parser.video_track_num(),
209 tracks_parser.text_tracks(), 209 tracks_parser.text_tracks(),
210 tracks_parser.ignored_tracks(), 210 tracks_parser.ignored_tracks(),
211 tracks_parser.audio_encryption_key_id(), 211 tracks_parser.audio_encryption_key_id(),
212 tracks_parser.video_encryption_key_id(), 212 tracks_parser.video_encryption_key_id(),
213 log_cb_)); 213 log_cb_));
214 214
215 ChangeState(kParsingClusters); 215 ChangeState(kParsingClusters);
216 216
217 if (!init_cb_.is_null()) { 217 if (!init_cb_.is_null()) {
218 init_cb_.Run(true, duration); 218 init_cb_.Run(true, duration, false);
acolwell GONE FROM CHROMIUM 2014/03/17 22:52:17 Please change this code to use base::ResetAndRetur
DaleCurtis 2014/03/18 00:14:02 Done.
219 init_cb_.Reset(); 219 init_cb_.Reset();
220 } 220 }
221 221
222 return bytes_parsed; 222 return bytes_parsed;
223 } 223 }
224 224
225 int WebMStreamParser::ParseCluster(const uint8* data, int size) { 225 int WebMStreamParser::ParseCluster(const uint8* data, int size) {
226 if (!cluster_parser_) 226 if (!cluster_parser_)
227 return -1; 227 return -1;
228 228
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 281
282 return bytes_parsed; 282 return bytes_parsed;
283 } 283 }
284 284
285 void WebMStreamParser::FireNeedKey(const std::string& key_id) { 285 void WebMStreamParser::FireNeedKey(const std::string& key_id) {
286 std::vector<uint8> key_id_vector(key_id.begin(), key_id.end()); 286 std::vector<uint8> key_id_vector(key_id.begin(), key_id.end());
287 need_key_cb_.Run(kWebMEncryptInitDataType, key_id_vector); 287 need_key_cb_.Run(kWebMEncryptInitDataType, key_id_vector);
288 } 288 }
289 289
290 } // namespace media 290 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698