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

Unified Diff: net/base/mime_util.h

Issue 254983006: Fix: Adding list of supported codecs for MP4 containers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adding check for std::string::npos Created 6 years, 6 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 | « content/renderer/renderer_webkitplatformsupport_impl.cc ('k') | net/base/mime_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/mime_util.h
diff --git a/net/base/mime_util.h b/net/base/mime_util.h
index 6c943a7f7da83dc1f1e021c6db4578bfe7188621..3275464676460737ff5a0a48b09b148ed76a7a35 100644
--- a/net/base/mime_util.h
+++ b/net/base/mime_util.h
@@ -94,12 +94,34 @@ NET_EXPORT void ParseCodecString(const std::string& codecs,
// certain subset of codecs.
NET_EXPORT bool IsStrictMediaMimeType(const std::string& mime_type);
-// Check to see if a particular MIME type is in our list which only supports a
-// certain subset of codecs. Returns true if and only if all codecs are
-// supported for that specific MIME type, false otherwise. If this returns
-// false you will still need to check if the media MIME tpyes and codecs are
-// supported.
-NET_EXPORT bool IsSupportedStrictMediaMimeType(
+// Indicates that the MIME type and (possible codec string) are supported by the
+// underlying platform.
+enum SupportsType {
+ // The underlying platform is known not to support the given MIME type and
+ // codec combination.
+ IsNotSupported,
+
+ // The underlying platform is known to support the given MIME type and codec
+ // combination.
+ IsSupported,
+
+ // The underlying platform is unsure whether the given MIME type and codec
+ // combination can be rendered or not before actually trying to play it.
+ MayBeSupported
+};
+
+// Checks the |mime_type| and |codecs| against the MIME types known to support
+// only a particular subset of codecs.
+// * Returns IsSupported if the |mime_type| is supported and all the codecs
+// within the |codecs| are supported for the |mime_type|.
+// * Returns MayBeSupported if the |mime_type| is supported and is known to
+// support only a subset of codecs, but |codecs| was empty. Also returned if
+// all the codecs in |codecs| are supported, but additional codec parameters
+// were supplied (such as profile) for which the support cannot be decided.
+// * Returns IsNotSupported if either the |mime_type| is not supported or the
+// |mime_type| is supported but at least one of the codecs within |codecs| is
+// not supported for the |mime_type|.
+NET_EXPORT SupportsType IsSupportedStrictMediaMimeType(
const std::string& mime_type,
const std::vector<std::string>& codecs);
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.cc ('k') | net/base/mime_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698