Backed out 2 changesets (bug 1319159) for frequent media test failures a=backout
authorWes Kocher <wkocher@mozilla.com>
Fri, 13 Jan 2017 13:23:56 -0800
changeset 374420 68c824ad72b817189143af771bb34408c72ad495
parent 374419 babe3f8a0258fb592e17a590450de6ceb09460c3
child 374421 fc4d5c2cade3b7822267b06c6554f3335b2f3c45
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1319159
milestone53.0a1
backs outafb84605c3c47a8c16e6d2719c49f4626ab21f3c
a14cade8b9627585d42abc2f6e72deaf4c335a25
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 2 changesets (bug 1319159) for frequent media test failures a=backout Backed out changeset afb84605c3c4 (bug 1319159) Backed out changeset a14cade8b962 (bug 1319159) MozReview-Commit-ID: 1ZWV6BPE8ne
b2g/installer/package-manifest.in
browser/installer/package-manifest.in
dom/media/gmp/GMPChild.cpp
dom/media/gmp/GMPParent.cpp
media/gmp-clearkey/0.1/clearkey.info.in
media/gmp-clearkey/0.1/manifest.json.in
media/gmp-clearkey/0.1/moz.build
--- a/b2g/installer/package-manifest.in
+++ b/b2g/installer/package-manifest.in
@@ -797,16 +797,16 @@ bin/libfreebl_32int64_3.so
 #endif
 
 #ifdef PACKAGE_MOZTT
 @RESPATH@/fonts/*
 #endif
 
 ; media
 @RESPATH@/gmp-clearkey/0.1/@DLL_PREFIX@clearkey@DLL_SUFFIX@
-@RESPATH@/gmp-clearkey/0.1/manifest.json
+@RESPATH@/gmp-clearkey/0.1/clearkey.info
 
 #ifdef PKG_LOCALE_MANIFEST
 #include @PKG_LOCALE_MANIFEST@
 #endif
 
 @RESPATH@/components/simpleServices.js
 @RESPATH@/components/utils.manifest
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -792,17 +792,17 @@ bin/libfreebl_32int64_3.so
 
 #if defined(MOZ_ASAN) && defined(CLANG_CL)
 @BINPATH@/clang_rt.asan_dynamic-*.dll
 #endif
 
 
 ; media
 @RESPATH@/gmp-clearkey/0.1/@DLL_PREFIX@clearkey@DLL_SUFFIX@
-@RESPATH@/gmp-clearkey/0.1/manifest.json
+@RESPATH@/gmp-clearkey/0.1/clearkey.info
 
 ; gfx
 #ifdef XP_WIN
 @RESPATH@/components/GfxSanityTest.manifest
 @RESPATH@/components/SanityTest.js
 #endif
 
 #ifdef MOZ_MULET
--- a/dom/media/gmp/GMPChild.cpp
+++ b/dom/media/gmp/GMPChild.cpp
@@ -294,19 +294,22 @@ GMPChild::GetAPI(const char* aAPIName,
 mozilla::ipc::IPCResult
 GMPChild::RecvPreloadLibs(const nsCString& aLibs)
 {
 #ifdef XP_WIN
   // Pre-load DLLs that need to be used by the EME plugin but that can't be
   // loaded after the sandbox has started
   // Items in this must be lowercase!
   static const char *const whitelist[] = {
+    "d3d9.dll", // Create an `IDirect3D9` to get adapter information
     "dxva2.dll", // Get monitor information
     "evr.dll", // MFGetStrideForBitmapInfoHeader
     "mfplat.dll", // MFCreateSample, MFCreateAlignedMemoryBuffer, MFCreateMediaType
+    "msauddecmft.dll", // AAC decoder (on Windows 8)
+    "msmpeg2adec.dll", // AAC decoder (on Windows 7)
     "msmpeg2vdec.dll", // H.264 decoder
   };
 
   nsTArray<nsCString> libs;
   SplitAt(", ", aLibs, libs);
   for (nsCString lib : libs) {
     ToLowerCase(lib);
     for (const char* whiteListedLib : whitelist) {
--- a/dom/media/gmp/GMPParent.cpp
+++ b/dom/media/gmp/GMPParent.cpp
@@ -953,64 +953,32 @@ GMPParent::ParseChromiumManifest(const n
                                  m.mX_cdm_host_versions.ToInteger(&ignored))) {
     return GenericPromise::CreateAndReject(NS_ERROR_FAILURE, __func__);
   }
 
   mDisplayName = NS_ConvertUTF16toUTF8(m.mName);
   mDescription = NS_ConvertUTF16toUTF8(m.mDescription);
   mVersion = NS_ConvertUTF16toUTF8(m.mVersion);
 
-  nsCString kEMEKeySystem;
-
-  // We hard code a few of the settings because they can't be stored in the
-  // widevine manifest without making our API different to widevine's.
-  if (mDisplayName.EqualsASCII("clearkey")) {
-    kEMEKeySystem = kEMEKeySystemClearkey;
-#if XP_WIN
-    mLibs = NS_LITERAL_CSTRING("dxva2.dll, msmpeg2vdec.dll, evr.dll, mfh264dec.dll, mfplat.dll");
-#endif
-  } else if (mDisplayName.EqualsASCII("WidevineCdm")) {
-    kEMEKeySystem = kEMEKeySystemWidevine;
-#if XP_WIN
-    mLibs = NS_LITERAL_CSTRING("dxva2.dll");
-#endif
-  } else {
-    return GenericPromise::CreateAndReject(NS_ERROR_FAILURE, __func__);
-  }
-
   GMPCapability video(NS_LITERAL_CSTRING(GMP_API_VIDEO_DECODER));
-
-  nsCString codecsString = NS_ConvertUTF16toUTF8(m.mX_cdm_codecs);
-  nsTArray<nsCString> codecs;
-  SplitAt(",", codecsString, codecs);
-
-  for (const nsCString& chromiumCodec : codecs) {
-    nsCString codec;
-    if (chromiumCodec.EqualsASCII("vp8")) {
-      codec = NS_LITERAL_CSTRING("vp8");
-    } else if (chromiumCodec.EqualsASCII("vp9.0")) {
-      codec = NS_LITERAL_CSTRING("vp9");
-    } else if (chromiumCodec.EqualsASCII("avc1")) {
-      codec = NS_LITERAL_CSTRING("h264");
-    } else {
-      return GenericPromise::CreateAndReject(NS_ERROR_FAILURE, __func__);
-    }
-
-    video.mAPITags.AppendElement(codec);
-  }
-
-  video.mAPITags.AppendElement(kEMEKeySystem);
+  video.mAPITags.AppendElement(NS_LITERAL_CSTRING("h264"));
+  video.mAPITags.AppendElement(NS_LITERAL_CSTRING("vp8"));
+  video.mAPITags.AppendElement(NS_LITERAL_CSTRING("vp9"));
+  video.mAPITags.AppendElement(kEMEKeySystemWidevine);
   mCapabilities.AppendElement(Move(video));
 
   GMPCapability decrypt(NS_LITERAL_CSTRING(GMP_API_DECRYPTOR));
-
-  decrypt.mAPITags.AppendElement(kEMEKeySystem);
+  decrypt.mAPITags.AppendElement(kEMEKeySystemWidevine);
   mCapabilities.AppendElement(Move(decrypt));
 
+  MOZ_ASSERT(mName.EqualsLiteral("widevinecdm"));
   mAdapter = NS_LITERAL_STRING("widevine");
+#ifdef XP_WIN
+  mLibs = NS_LITERAL_CSTRING("dxva2.dll");
+#endif
 
   return GenericPromise::CreateAndResolve(true, __func__);
 }
 
 bool
 GMPParent::CanBeSharedCrossNodeIds() const
 {
   return !mAsyncShutdownInProgress &&
new file mode 100644
--- /dev/null
+++ b/media/gmp-clearkey/0.1/clearkey.info.in
@@ -0,0 +1,10 @@
+Name: clearkey
+Description: ClearKey Gecko Media Plugin
+Version: 1
+#ifdef ENABLE_WMF
+APIs: eme-decrypt-v9[org.w3.clearkey], decode-video[h264:org.w3.clearkey]
+Libraries: dxva2.dll, d3d9.dll, msmpeg2vdec.dll, msmpeg2adec.dll, MSAudDecMFT.dll, evr.dll, mfheaacdec.dll, mfh264dec.dll, mfplat.dll
+#else
+APIs: eme-decrypt-v9[org.w3.clearkey]
+Libraries:
+#endif
deleted file mode 100644
--- a/media/gmp-clearkey/0.1/manifest.json.in
+++ /dev/null
@@ -1,13 +0,0 @@
-{
-    "name": "clearkey",
-    "description": "ClearKey Gecko Media Plugin",
-    "version": "1",
-    "x-cdm-module-versions": "4",
-    "x-cdm-interface-versions": "8",
-    "x-cdm-host-versions": "8",
-#ifdef ENABLE_WMF
-    "x-cdm-codecs": "avc1"
-#else
-    "x-cdm-codecs": ""
-#endif
-}
\ No newline at end of file
--- a/media/gmp-clearkey/0.1/moz.build
+++ b/media/gmp-clearkey/0.1/moz.build
@@ -3,17 +3,17 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SharedLibrary('clearkey')
 
 FINAL_TARGET = 'dist/bin/gmp-clearkey/0.1'
 
-FINAL_TARGET_PP_FILES += ['manifest.json.in']
+FINAL_TARGET_PP_FILES += ['clearkey.info.in']
 
 UNIFIED_SOURCES += [
     'ClearKeyAsyncShutdown.cpp',
     'ClearKeyBase64.cpp',
     'ClearKeyDecryptionManager.cpp',
     'ClearKeyPersistence.cpp',
     'ClearKeySession.cpp',
     'ClearKeySessionManager.cpp',