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

Unified Diff: chrome/common/chrome_content_client.cc

Issue 42003002: Extract supported codecs from CDM component manifest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use constant; support existing manifests Created 7 years, 2 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: chrome/common/chrome_content_client.cc
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
index e380249862956a24008df18c2b8dfc5014e7febc..dc5a39c3abde68c607abeaa27cdacda75af4c3b4 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -9,6 +9,7 @@
#include "base/debug/crash_logging.h"
#include "base/file_util.h"
#include "base/path_service.h"
+#include "base/strings/string16.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
@@ -289,6 +290,25 @@ void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) {
kWidevineCdmPluginMimeType,
kWidevineCdmPluginExtension,
kWidevineCdmPluginMimeTypeDescription);
+
+ // Add the supported codecs as if they came from the component manifest.
+ base::string16 codecs = base::ASCIIToUTF16(kCdmSupportedCodecVorbis) +
+ base::ASCIIToUTF16(",") +
xhwang 2013/10/25 17:33:22 do we have comments anywhere about the format? e.g
ddorwin 2013/10/25 19:03:40 Done. Added constant and simplified this.
+ base::ASCIIToUTF16(kCdmSupportedCodecVp8);
+#if defined(USE_PROPRIETARY_CODECS)
+#if defined(WIDEVINE_CDM_AAC_SUPPORT_AVAILABLE)
+ codecs += (base::ASCIIToUTF16(",") +
+ base::ASCIIToUTF16(kCdmSupportedCodecAac));
+#endif
+#if defined(WIDEVINE_CDM_AVC1_SUPPORT_AVAILABLE)
xhwang 2013/10/25 17:33:22 Per offline discussion, add a TODO about renaming
ddorwin 2013/10/25 19:03:40 Done.
+ codecs += (base::ASCIIToUTF16(",") +
+ base::ASCIIToUTF16(kCdmSupportedCodecAvc1));
+#endif
+#endif // defined(USE_PROPRIETARY_CODECS)
+ widevine_cdm_mime_type.additional_param_names.push_back(
+ base::ASCIIToUTF16(kCdmSupportedCodecsParamName));
+ widevine_cdm_mime_type.additional_param_values.push_back(codecs);
+
widevine_cdm.mime_types.push_back(widevine_cdm_mime_type);
widevine_cdm.permissions = kWidevineCdmPluginPermissions;
plugins->push_back(widevine_cdm);

Powered by Google App Engine
This is Rietveld 408576698