Index: net/base/mime_util.h |
diff --git a/net/base/mime_util.h b/net/base/mime_util.h |
index 80f440ef3e0adc990e121c2f4a608e40608f7e87..06b918ff05a2bfe262db65c8ed7416fb7118c656 100644 |
--- a/net/base/mime_util.h |
+++ b/net/base/mime_util.h |
@@ -20,6 +20,7 @@ |
#include <string> |
#include <vector> |
+#include "base/callback.h" |
#include "base/files/file_path.h" |
#include "net/base/net_export.h" |
@@ -93,6 +94,20 @@ NET_EXPORT void ParseCodecString(const std::string& codecs, |
std::vector<std::string>* codecs_out, |
bool strip); |
+// Returns true if the given |codec_id|, identified by a codec id string |
+// described in RFC 6381, is supported. Returns false if the codec id is not |
+// recognized or if that codec is not supported. |
+NET_EXPORT bool IsCodecSupported(const std::string& codec_id); |
+ |
+// The default implementation of IsCodecSupported, it can be overridden by |
+// providing a custom callback via SetIsCodecSupportedCB. |
+NET_EXPORT bool DefaultIsCodecSupported(const std::string& codec_id); |
+ |
+// Provides a custom, platform-specific implementation of IsCodecSupported. |
+typedef base::Callback<bool(const std::string&)> IsCodecSupportedCB; |
+NET_EXPORT void SetIsCodecSupportedCB( |
+ const IsCodecSupportedCB& is_codec_supported_cb); |
+ |
// Check to see if a particular MIME type is in our list which only supports a |
// certain subset of codecs. |
NET_EXPORT bool IsStrictMediaMimeType(const std::string& mime_type); |