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

Unified Diff: components/cdm/renderer/widevine_key_systems.cc

Issue 557723003: Implement Chromium side of MediaKeys.isTypeSupported(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Work around performance warning. Created 6 years, 3 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 | « components/cdm/renderer/android_key_systems.cc ('k') | content/content_common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cdm/renderer/widevine_key_systems.cc
diff --git a/components/cdm/renderer/widevine_key_systems.cc b/components/cdm/renderer/widevine_key_systems.cc
index 2a41322112eac5fac5e2dd64a7c46eff29705304..d08b6ad9239e6d242a1bd2cf3e9e3f9e545ae091 100644
--- a/components/cdm/renderer/widevine_key_systems.cc
+++ b/components/cdm/renderer/widevine_key_systems.cc
@@ -8,6 +8,7 @@
#include <vector>
#include "base/logging.h"
+#include "content/public/common/eme_constants.h"
#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
@@ -49,6 +50,16 @@ void AddWidevineWithCodecs(WidevineCdmType widevine_cdm_type,
// initDataType.
info.supported_codecs = supported_codecs;
+ // Here we assume that support for a container imples support for the
+ // associated initialization data type. KeySystems handles validating
+ // |init_data_type| x |container| pairings.
+ if (supported_codecs & content::EME_CODEC_WEBM_ALL)
+ info.supported_init_data_types |= content::EME_INIT_DATA_TYPE_WEBM;
+#if defined(USE_PROPRIETARY_CODECS)
+ if (supported_codecs & content::EME_CODEC_MP4_ALL)
+ info.supported_init_data_types |= content::EME_INIT_DATA_TYPE_CENC;
+#endif // defined(USE_PROPRIETARY_CODECS)
+
#if defined(ENABLE_PEPPER_CDMS)
info.pepper_type = kWidevineCdmPluginMimeType;
#endif // defined(ENABLE_PEPPER_CDMS)
« no previous file with comments | « components/cdm/renderer/android_key_systems.cc ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698