Bug 1329543 - Remove kEMEKeySystemPrimetime. r=gerald
authorChris Pearce <cpearce@mozilla.com>
Sat, 14 Jan 2017 11:26:37 +0800
changeset 357867 f4956aa25be693f755e0278c6344ab1c4fcd44b1
parent 357866 79f11e99a81abfcb16f5887360aa387265e28307
child 357868 a54e6cd31eb643e0dc33ae5859b709cbcdc7a9ff
push id10621
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 16:02:43 +0000
treeherdermozilla-aurora@dca7b42e6c67 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1329543
milestone53.0a1
Bug 1329543 - Remove kEMEKeySystemPrimetime. r=gerald MozReview-Commit-ID: FNvnpZVPMMt
dom/media/VideoUtils.cpp
dom/media/VideoUtils.h
dom/media/gmp/GMPParent.cpp
dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp
--- a/dom/media/VideoUtils.cpp
+++ b/dom/media/VideoUtils.cpp
@@ -27,17 +27,16 @@
 
 #include <functional>
 #include <stdint.h>
 
 namespace mozilla {
 
 NS_NAMED_LITERAL_CSTRING(kEMEKeySystemClearkey, "org.w3.clearkey");
 NS_NAMED_LITERAL_CSTRING(kEMEKeySystemWidevine, "com.widevine.alpha");
-NS_NAMED_LITERAL_CSTRING(kEMEKeySystemPrimetime, "com.adobe.primetime");
 
 using layers::PlanarYCbCrImage;
 
 CheckedInt64 SaferMultDiv(int64_t aValue, uint32_t aMul, uint32_t aDiv) {
   int64_t major = aValue / aDiv;
   int64_t remainder = aValue % aDiv;
   return CheckedInt64(remainder) * aMul / aDiv + CheckedInt64(major) * aMul;
 }
--- a/dom/media/VideoUtils.h
+++ b/dom/media/VideoUtils.h
@@ -41,17 +41,16 @@ using mozilla::CheckedUint32;
 // mozilla::Monitor non-reentrant.
 namespace mozilla {
 
 class MediaContentType;
 
 // EME Key System String.
 extern const nsLiteralCString kEMEKeySystemClearkey;
 extern const nsLiteralCString kEMEKeySystemWidevine;
-extern const nsLiteralCString kEMEKeySystemPrimetime;
 
 /**
  * ReentrantMonitorConditionallyEnter
  *
  * Enters the supplied monitor only if the conditional value |aEnter| is true.
  * E.g. Used to allow unmonitored read access on the decode thread,
  * and monitored access on all other threads.
  */
--- a/dom/media/gmp/GMPParent.cpp
+++ b/dom/media/gmp/GMPParent.cpp
@@ -896,25 +896,16 @@ GMPParent::ReadGMPInfoFile(nsIFile* aFil
 #if defined(XP_LINUX) && defined(MOZ_GMP_SANDBOX)
       if (!mozilla::SandboxInfo::Get().CanSandboxMedia()) {
         printf_stderr("GMPParent::ReadGMPMetaData: Plugin \"%s\" is an EME CDM"
                       " but this system can't sandbox it; not loading.\n",
                       mDisplayName.get());
         return GenericPromise::CreateAndReject(NS_ERROR_FAILURE, __func__);
       }
 #endif
-#ifdef XP_WIN
-      // Adobe GMP doesn't work without SSE2. Check the tags to see if
-      // the decryptor is for the Adobe GMP, and refuse to load it if
-      // SSE2 isn't supported.
-      if (cap.mAPITags.Contains(kEMEKeySystemPrimetime) &&
-          !mozilla::supports_sse2()) {
-        return GenericPromise::CreateAndReject(NS_ERROR_FAILURE, __func__);
-      }
-#endif // XP_WIN
     }
 
     mCapabilities.AppendElement(Move(cap));
   }
 
   if (mCapabilities.IsEmpty()) {
     return GenericPromise::CreateAndReject(NS_ERROR_FAILURE, __func__);
   }
--- a/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp
+++ b/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp
@@ -104,25 +104,23 @@ GMPDecoderModule::DecoderNeedsConversion
 /* static */
 const Maybe<nsCString>
 GMPDecoderModule::PreferredGMP(const nsACString& aMimeType)
 {
   Maybe<nsCString> rv;
   if (aMimeType.EqualsLiteral("audio/mp4a-latm")) {
     switch (MediaPrefs::GMPAACPreferred()) {
       case 1: rv.emplace(kEMEKeySystemClearkey); break;
-      case 2: rv.emplace(kEMEKeySystemPrimetime); break;
       default: break;
     }
   }
 
   if (MP4Decoder::IsH264(aMimeType)) {
     switch (MediaPrefs::GMPH264Preferred()) {
       case 1: rv.emplace(kEMEKeySystemClearkey); break;
-      case 2: rv.emplace(kEMEKeySystemPrimetime); break;
       default: break;
     }
   }
 
   return rv;
 }
 
 /* static */