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

Unified Diff: media/filters/stream_parser_factory.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/pipeline_integration_test.cc ('k') | media/mp3/mp3_stream_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/stream_parser_factory.cc
diff --git a/media/filters/stream_parser_factory.cc b/media/filters/stream_parser_factory.cc
index 2b2ec9cbcee42a04cac673c9ef16f89a5237c19b..4d2e524538da21896dc7d8e6b6cbba546e6c13e6 100644
--- a/media/filters/stream_parser_factory.cc
+++ b/media/filters/stream_parser_factory.cc
@@ -41,6 +41,7 @@ struct CodecInfo {
HISTOGRAM_MPEG4AAC,
HISTOGRAM_EAC3,
HISTOGRAM_MP3,
+ HISTOGRAM_OPUS,
HISTOGRAM_MAX // Must be the last entry.
};
@@ -66,6 +67,8 @@ static const CodecInfo kVP9CodecInfo = { "vp9", CodecInfo::VIDEO, NULL,
CodecInfo::HISTOGRAM_VP9 };
static const CodecInfo kVorbisCodecInfo = { "vorbis", CodecInfo::AUDIO, NULL,
CodecInfo::HISTOGRAM_VORBIS };
+static const CodecInfo kOpusCodecInfo = { "opus", CodecInfo::AUDIO, NULL,
+ CodecInfo::HISTOGRAM_OPUS };
static const CodecInfo* kVideoWebMCodecs[] = {
&kVP8CodecInfo,
@@ -75,11 +78,13 @@ static const CodecInfo* kVideoWebMCodecs[] = {
&kVP9CodecInfo,
#endif
&kVorbisCodecInfo,
+ &kOpusCodecInfo,
NULL
};
static const CodecInfo* kAudioWebMCodecs[] = {
&kVorbisCodecInfo,
+ &kOpusCodecInfo,
NULL
};
@@ -233,7 +238,11 @@ static bool VerifyCodec(
return false;
}
#endif
-
+ if (codec_info->tag == CodecInfo::HISTOGRAM_OPUS) {
+ const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
+ if (!cmd_line->HasSwitch(switches::kEnableOpusPlayback))
+ return false;
+ }
if (audio_codecs)
audio_codecs->push_back(codec_info->tag);
return true;
« no previous file with comments | « media/filters/pipeline_integration_test.cc ('k') | media/mp3/mp3_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698