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

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

Issue 11088047: Support encrypted audio stream in demuxer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 (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 #include "media/webm/webm_stream_parser.h" 5 #include "media/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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 381
382 if (!config_cb_.Run(config_helper.audio_config(), video_config)) { 382 if (!config_cb_.Run(config_helper.audio_config(), video_config)) {
383 DVLOG(1) << "New config data isn't allowed."; 383 DVLOG(1) << "New config data isn't allowed.";
384 return -1; 384 return -1;
385 } 385 }
386 386
387 cluster_parser_.reset(new WebMClusterParser( 387 cluster_parser_.reset(new WebMClusterParser(
388 info_parser.timecode_scale(), 388 info_parser.timecode_scale(),
389 tracks_parser.audio_track_num(), 389 tracks_parser.audio_track_num(),
390 tracks_parser.video_track_num(), 390 tracks_parser.video_track_num(),
391 tracks_parser.audio_encryption_key_id(),
391 tracks_parser.video_encryption_key_id())); 392 tracks_parser.video_encryption_key_id()));
392 393
393 ChangeState(kParsingClusters); 394 ChangeState(kParsingClusters);
394 395
395 if (!init_cb_.is_null()) { 396 if (!init_cb_.is_null()) {
396 init_cb_.Run(true, duration); 397 init_cb_.Run(true, duration);
397 init_cb_.Reset(); 398 init_cb_.Reset();
398 } 399 }
399 400
400 return bytes_parsed; 401 return bytes_parsed;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 if (!video_buffers.empty() && !video_cb_.Run(video_buffers)) 450 if (!video_buffers.empty() && !video_cb_.Run(video_buffers))
450 return -1; 451 return -1;
451 452
452 if (cluster_ended) 453 if (cluster_ended)
453 end_of_segment_cb_.Run(); 454 end_of_segment_cb_.Run();
454 455
455 return bytes_parsed; 456 return bytes_parsed;
456 } 457 }
457 458
458 } // namespace media 459 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698