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

Unified Diff: media/webm/webm_audio_client.cc

Issue 23014009: media: Opus support for WebM in Media Source (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adding pipeline integration test Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: media/webm/webm_audio_client.cc
diff --git a/media/webm/webm_audio_client.cc b/media/webm/webm_audio_client.cc
index e52f44b4a9a7f33ee8bf8119b044999e4e4c8eee..3cec3fb10ed7df0d4109e545a946f3abc79fb879 100644
--- a/media/webm/webm_audio_client.cc
+++ b/media/webm/webm_audio_client.cc
@@ -26,12 +26,15 @@ void WebMAudioClient::Reset() {
bool WebMAudioClient::InitializeConfig(
const std::string& codec_id, const std::vector<uint8>& codec_private,
- bool is_encrypted, AudioDecoderConfig* config) {
+ int64 seek_pre_roll, int64 codec_delay, bool is_encrypted,
+ AudioDecoderConfig* config) {
DCHECK(config);
AudioCodec audio_codec = kUnknownAudioCodec;
if (codec_id == "A_VORBIS") {
audio_codec = kCodecVorbis;
+ } else if (codec_id == "A_OPUS" || codec_id == "A_OPUS/EXPERIMENTAL") {
acolwell GONE FROM CHROMIUM 2013/08/28 20:44:47 The spec only specifies A_OPUS. I'd prefer to forc
vignesh 2013/08/29 21:37:31 Right now ffmpeg puts A_OPUS/EXPERIMENTAL. I thoug
acolwell GONE FROM CHROMIUM 2013/09/03 20:14:01 I have concerns that a large amount of content wil
vignesh 2013/09/03 22:43:03 I understand your concern. I will remove the Exper
+ audio_codec = kCodecOpus;
} else {
MEDIA_LOG(log_cb_) << "Unsupported audio codec_id " << codec_id;
return false;
@@ -63,8 +66,12 @@ bool WebMAudioClient::InitializeConfig(
}
config->Initialize(
- audio_codec, kSampleFormatPlanarF32, channel_layout,
+ audio_codec,
+ (audio_codec == kCodecOpus) ? kSampleFormatS16 : kSampleFormatPlanarF32,
+ channel_layout,
Tom Finegan 2013/08/28 01:35:35 Ditto on the question re unconditional S16 for Opu
vignesh 2013/08/29 21:37:31 Done.
samples_per_second, extra_data, extra_data_size, is_encrypted, true);
+ config->set_seek_pre_roll(seek_pre_roll);
+ config->set_codec_delay(codec_delay);
return config->IsValidConfig();
}

Powered by Google App Engine
This is Rietveld 408576698