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

Unified Diff: media/filters/stream_parser_factory.cc

Issue 13652011: media: Support VP9 in media source. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nit. Created 7 years, 8 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/webm/webm_video_client.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 0cd8b9a0b435ba1fecc4ddb07cc2d8ee848ea2cc..43b6729231d87a876fab4f3d78078b888698498b 100644
--- a/media/filters/stream_parser_factory.cc
+++ b/media/filters/stream_parser_factory.cc
@@ -4,9 +4,11 @@
#include "media/filters/stream_parser_factory.h"
+#include "base/command_line.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "media/base/media_log.h"
+#include "media/base/media_switches.h"
#include "media/webm/webm_stream_parser.h"
#if defined(GOOGLE_CHROME_BUILD) || defined(USE_PROPRIETARY_CODECS)
@@ -42,10 +44,12 @@ struct SupportedTypeInfo {
};
static const CodecInfo kVP8CodecInfo = { "vp8", CodecInfo::VIDEO, NULL };
+static const CodecInfo kVP9CodecInfo = { "vp9", CodecInfo::VIDEO, NULL };
static const CodecInfo kVorbisCodecInfo = { "vorbis", CodecInfo::AUDIO, NULL };
static const CodecInfo* kVideoWebMCodecs[] = {
&kVP8CodecInfo,
+ &kVP9CodecInfo,
&kVorbisCodecInfo,
NULL
};
@@ -205,11 +209,19 @@ static bool IsSupported(const std::string& type,
return false;
}
+ const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
switch (codec_type) {
case CodecInfo::AUDIO:
*has_audio = true;
break;
case CodecInfo::VIDEO:
+ // TODO(tomfinegan): Remove this check (or negate it, if we just
+ // negate the flag) when VP9 is enabled by default.
+ if (MatchPattern(codec_id, kVP9CodecInfo.pattern) &&
+ !cmd_line->HasSwitch(switches::kEnableVp9Playback)) {
+ return false;
+ }
+
*has_video = true;
break;
default:
« no previous file with comments | « media/filters/pipeline_integration_test.cc ('k') | media/webm/webm_video_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698