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

Unified Diff: media/base/mime_util_internal.h

Issue 1728193004: Media: Do not support new codecs with legacy MIME type names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android - extra comma caused empty string codec Created 4 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
« no previous file with comments | « content/browser/media/media_canplaytype_browsertest.cc ('k') | media/base/mime_util_internal.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/mime_util_internal.h
diff --git a/media/base/mime_util_internal.h b/media/base/mime_util_internal.h
index 5e06b54fc8b3fbd944e2e99113a5647d2471ad11..815d1cb79d0c044670fb967f1e04e3831d006c7e 100644
--- a/media/base/mime_util_internal.h
+++ b/media/base/mime_util_internal.h
@@ -87,9 +87,17 @@ class MEDIA_EXPORT MimeUtil {
};
typedef std::map<std::string, CodecEntry> StringToCodecMappings;
- // For faster lookup, keep hash sets.
+ // Initializes the supported media types into hash sets for faster lookup.
void InitializeMimeTypeMaps();
+ // Initializes the supported media formats (|media_format_map_|).
+ void AddSupportedMediaFormats();
+
+ // Adds |mime_type| with the specified codecs to |media_format_map_|.
+ void AddContainerWithCodecs(const std::string& mime_type,
+ const std::string& codecs_list,
+ bool is_proprietary_mime_type);
+
// Returns IsSupported if all codec IDs in |codecs| are unambiguous and are
// supported in |mime_type_lower_case|. MayBeSupported is returned if at least
// one codec ID in |codecs| is ambiguous but all the codecs are supported.
@@ -144,8 +152,9 @@ class MEDIA_EXPORT MimeUtil {
// A map of mime_types and hash map of the supported codecs for the mime_type.
MediaFormatMappings media_format_map_;
- // Keeps track of whether proprietary codec support should be
- // advertised to callers.
+ // List of proprietary containers in |media_format_map_|.
+ std::vector<std::string> proprietary_media_containers_;
+ // Whether proprietary codec support should be advertised to callers.
bool allow_proprietary_codecs_;
// Lookup table for string compare based string -> Codec mappings.
« no previous file with comments | « content/browser/media/media_canplaytype_browsertest.cc ('k') | media/base/mime_util_internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698