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

Unified Diff: webkit/glue/simple_webmimeregistry_impl.cc

Issue 12713004: Add Chromium-side changes for MediaSource::isTypeSupported() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Exclude StreamParserFactory for Android Created 7 years, 9 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: webkit/glue/simple_webmimeregistry_impl.cc
diff --git a/webkit/glue/simple_webmimeregistry_impl.cc b/webkit/glue/simple_webmimeregistry_impl.cc
index b8e81a8b5c6385f2c8ab4cc308dea1e66beb9df5..5de1d54cf120c3f54de40bbb130039c4bc43115f 100644
--- a/webkit/glue/simple_webmimeregistry_impl.cc
+++ b/webkit/glue/simple_webmimeregistry_impl.cc
@@ -11,6 +11,7 @@
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
#include "webkit/base/file_path_string_conversions.h"
#include "webkit/media/crypto/key_systems.h"
+#include "webkit/media/webmediasourceclient_impl.h"
using WebKit::WebString;
using WebKit::WebMimeRegistry;
@@ -106,6 +107,18 @@ WebMimeRegistry::SupportsType SimpleWebMimeRegistryImpl::supportsMediaMIMEType(
return IsSupported;
}
+bool SimpleWebMimeRegistryImpl::supportsMediaSourceMIMEType(
+ const WebKit::WebString& mime_type,
+ const WebString& codecs) {
+ const std::string mime_type_ascii = ToASCIIOrEmpty(mime_type);
+ std::vector<std::string> parsed_codec_ids;
+ net::ParseCodecString(ToASCIIOrEmpty(codecs), &parsed_codec_ids, false);
+ if (mime_type_ascii.empty() || parsed_codec_ids.size() == 0)
+ return false;
+ return webkit_media::WebMediaSourceClientImpl::isTypeSupported(
scherkus (not reviewing) 2013/03/14 18:49:40 why not call media::StreamParserFactory::IsTypeSup
acolwell GONE FROM CHROMIUM 2013/03/14 20:08:49 git cl upload said "no!" I think it is because cod
scherkus (not reviewing) 2013/03/14 20:21:03 well that's because media/ isn't in webkit/glue/DE
acolwell GONE FROM CHROMIUM 2013/03/14 20:56:35 Done.
+ mime_type_ascii, parsed_codec_ids);
+}
+
WebMimeRegistry::SupportsType
SimpleWebMimeRegistryImpl::supportsNonImageMIMEType(
const WebString& mime_type) {

Powered by Google App Engine
This is Rietveld 408576698