Bug 1265038 - Turn on Adobe EME by build config rather than per-platform basis. r?jwwang draft
authorChris Pearce <cpearce@mozilla.com>
Mon, 18 Apr 2016 14:22:58 +1200
changeset 352383 22d267cdb668efcf7680c8c5c901b94b1bb84433
parent 352277 1da1937a9e03154ae7c60089f2dcf5ad9ee20fa3
child 518654 9d3aeb4a120b32023fa7a1996c2af9c16b4cfd27
push id15695
push usercpearce@mozilla.com
push dateMon, 18 Apr 2016 03:32:28 +0000
reviewersjwwang
bugs1265038
milestone48.0a1
Bug 1265038 - Turn on Adobe EME by build config rather than per-platform basis. r?jwwang We end up showing the "Adobe EME is preffed off" UI on MacOSX because we're check for Adobe EME support based on platform, not based on whether it's configured on in the mozconfig. We should really only check for Adobe EME if 'ac_add_options --enable-eme=adobe' is present in the build config, as otherwise preffing it on isn't going to work. MozReview-Commit-ID: CpSAh6gUU1S
dom/media/eme/MediaKeySystemAccess.cpp
--- a/dom/media/eme/MediaKeySystemAccess.cpp
+++ b/dom/media/eme/MediaKeySystemAccess.cpp
@@ -29,20 +29,16 @@
 #include "GMPUtils.h"
 #include "nsAppDirectoryServiceDefs.h"
 #include "nsDirectoryServiceUtils.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsXULAppAPI.h"
 #include "gmp-audio-decode.h"
 #include "gmp-video-decode.h"
 
-#if defined(XP_WIN) || defined(XP_MACOSX)
-#define PRIMETIME_EME_SUPPORTED 1
-#endif
-
 namespace mozilla {
 namespace dom {
 
 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(MediaKeySystemAccess,
                                       mParent)
 NS_IMPL_CYCLE_COLLECTING_ADDREF(MediaKeySystemAccess)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(MediaKeySystemAccess)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(MediaKeySystemAccess)
@@ -275,17 +271,17 @@ MediaKeySystemAccess::GetKeySystemStatus
   if (aKeySystem.EqualsLiteral("org.w3.clearkey")) {
     if (!Preferences::GetBool("media.eme.clearkey.enabled", true)) {
       aOutMessage = NS_LITERAL_CSTRING("ClearKey was disabled");
       return MediaKeySystemStatus::Cdm_disabled;
     }
     return EnsureMinCDMVersion(mps, aKeySystem, aMinCdmVersion, aOutMessage, aOutCdmVersion);
   }
 
-#ifdef PRIMETIME_EME_SUPPORTED
+#ifdef MOZ_ADOBE_EME
   if (aKeySystem.EqualsLiteral("com.adobe.primetime")) {
     if (!Preferences::GetBool("media.gmp-eme-adobe.enabled", false)) {
       aOutMessage = NS_LITERAL_CSTRING("Adobe EME disabled");
       return MediaKeySystemStatus::Cdm_disabled;
     }
 #ifdef XP_WIN
     // Win Vista and later only.
     if (!IsVistaOrLater()) {