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

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: removing nit 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
Index: net/base/mime_util.h
diff --git a/net/base/mime_util.h b/net/base/mime_util.h
index 6c943a7f7da83dc1f1e021c6db4578bfe7188621..24c4414342a29cb9c631badd6791e95779a227d3 100644
--- a/net/base/mime_util.h
+++ b/net/base/mime_util.h
@@ -94,12 +94,33 @@ 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.
+// IsNotSupported - The underlying platform is known not to support the given
+// MIME type and codec combination.
+// IsSuported - The underlying platform is known to support the given MIME
+// type and codec combination.
+// MayBeSupported - The underlying platform is unsure whether the given MIME
+// type and codec combination can be rendered or not before
+// actually trying to play it.
Ryan Sleevi 2014/06/12 19:03:53 Document these inline, as suggested // Comment de
+enum SupportsType {
+ IsNotSupported,
+ IsSupported,
+ 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 a
+// codec is supported, but additional codec parameters were supplied (such as
+// profile) for which the support cannot be decided.
Ryan Sleevi 2014/06/12 19:03:53 Still doesn't document what happens in the case of
+// * Returns IsNotSupported if either the |mime_type| is not supported or the
+// |mime_type| is supported but atleast one of the codecs within |codecs| is
Ryan Sleevi 2014/06/12 19:03:53 s/atleast/at least/
+// not supported for the |mime_type|.
+NET_EXPORT SupportsType IsSupportedStrictMediaMimeType(
const std::string& mime_type,
const std::vector<std::string>& codecs);

Powered by Google App Engine
This is Rietveld 408576698