diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-20 00:53:01 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-20 00:53:01 +0000 |
commit | 074248931d91c43c612ee611342a5c354f580b2e (patch) | |
tree | 654b9a2a73672ae31daba1161fa969c8646bd11a /webkit/glue/simple_webmimeregistry_impl.cc | |
parent | 57675d4d32433b20aa1852690c69ddbf18693f1f (diff) | |
download | chromium_src-074248931d91c43c612ee611342a5c354f580b2e.zip chromium_src-074248931d91c43c612ee611342a5c354f580b2e.tar.gz chromium_src-074248931d91c43c612ee611342a5c354f580b2e.tar.bz2 |
Chromium side changes for enabling VP8 and WebM support.
Patches by Frank Galligan (fgalligan@google.com), Tom Finegan (tomfinegan@google.com) and James Zern (jzern@google.com).
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2093007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47759 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/simple_webmimeregistry_impl.cc')
-rw-r--r-- | webkit/glue/simple_webmimeregistry_impl.cc | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/webkit/glue/simple_webmimeregistry_impl.cc b/webkit/glue/simple_webmimeregistry_impl.cc index f12f48b..5dd227f 100644 --- a/webkit/glue/simple_webmimeregistry_impl.cc +++ b/webkit/glue/simple_webmimeregistry_impl.cc @@ -54,9 +54,28 @@ WebMimeRegistry::SupportsType SimpleWebMimeRegistryImpl::supportsMediaMIMEType( if (!net::IsSupportedMediaMimeType(ToASCIIOrEmpty(mime_type).c_str())) return IsNotSupported; + // Check list of strict codecs to see if it is supported. + if (net::IsStrictMediaMimeType(ToASCIIOrEmpty(mime_type).c_str())) { + // We support the container, but no codecs were specified. + if (codecs.isNull()) + return MayBeSupported; + + // Check if the codecs are a perfect match. + std::vector<std::string> strict_codecs; + net::ParseCodecString(ToASCIIOrEmpty(codecs).c_str(), + &strict_codecs, + false); + if (!net::IsSupportedStrictMediaMimeType(ToASCIIOrEmpty(mime_type).c_str(), + strict_codecs)) + return IsNotSupported; + + // Good to go! + return IsSupported; + } + // If we don't recognize the codec, it's possible we support it. std::vector<std::string> parsed_codecs; - net::ParseCodecString(ToASCIIOrEmpty(codecs).c_str(), &parsed_codecs); + net::ParseCodecString(ToASCIIOrEmpty(codecs).c_str(), &parsed_codecs, true); if (!net::AreSupportedMediaCodecs(parsed_codecs)) return MayBeSupported; |