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

Side by Side Diff: media/mp3/mp3_stream_parser.cc

Issue 23014009: media: Opus support for WebM in Media Source (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing errors causing try bot failure 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
« no previous file with comments | « media/filters/stream_parser_factory.cc ('k') | media/mp4/mp4_stream_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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/mp3/mp3_stream_parser.h" 5 #include "media/mp3/mp3_stream_parser.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "media/base/bit_reader.h" 10 #include "media/base/bit_reader.h"
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 371
372 if (config_.IsValidConfig() && 372 if (config_.IsValidConfig() &&
373 (config_.samples_per_second() != sample_rate || 373 (config_.samples_per_second() != sample_rate ||
374 config_.channel_layout() != channel_layout)) { 374 config_.channel_layout() != channel_layout)) {
375 // Clear config data so that a config change is initiated. 375 // Clear config data so that a config change is initiated.
376 config_ = AudioDecoderConfig(); 376 config_ = AudioDecoderConfig();
377 } 377 }
378 378
379 if (!config_.IsValidConfig()) { 379 if (!config_.IsValidConfig()) {
380 config_.Initialize(kCodecMP3, kSampleFormatF32, channel_layout, 380 config_.Initialize(kCodecMP3, kSampleFormatF32, channel_layout,
381 sample_rate, NULL, 0, false, false); 381 sample_rate, NULL, 0, false, false,
382 base::TimeDelta(), base::TimeDelta());
382 383
383 base::TimeDelta base_timestamp; 384 base::TimeDelta base_timestamp;
384 if (timestamp_helper_) 385 if (timestamp_helper_)
385 base_timestamp = timestamp_helper_->GetTimestamp(); 386 base_timestamp = timestamp_helper_->GetTimestamp();
386 387
387 timestamp_helper_.reset(new AudioTimestampHelper(sample_rate)); 388 timestamp_helper_.reset(new AudioTimestampHelper(sample_rate));
388 timestamp_helper_->SetBaseTimestamp(base_timestamp); 389 timestamp_helper_->SetBaseTimestamp(base_timestamp);
389 390
390 VideoDecoderConfig video_config; 391 VideoDecoderConfig video_config;
391 bool success = config_cb_.Run(config_, video_config); 392 bool success = config_cb_.Run(config_, video_config);
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 continue; 557 continue;
557 } 558 }
558 559
559 return candidate_start_code - data; 560 return candidate_start_code - data;
560 } 561 }
561 562
562 return 0; 563 return 0;
563 } 564 }
564 565
565 } // namespace media 566 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/stream_parser_factory.cc ('k') | media/mp4/mp4_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698