Bug 1205582 - Add pref to disable GMP trial create. r=edwin
authorChris Pearce <cpearce@mozilla.com>
Fri, 18 Sep 2015 18:35:14 +1200
changeset 295801 7641104770a80015e63597b58cb312fefcbd9ab4
parent 295800 5b52aac3102684d57140b1eda99f56eb37b4f285
child 295802 37cc5cf46da48c7dcd48f346437a85e2944c8c9f
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersedwin
bugs1205582
milestone43.0a1
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
Bug 1205582 - Add pref to disable GMP trial create. r=edwin
browser/app/profile/firefox.js
dom/media/eme/MediaKeySystemAccessManager.cpp
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1832,16 +1832,20 @@ pref("identity.fxaccounts.migrateToDevEd
 #ifdef MOZ_WIDGET_GTK
 pref("ui.key.menuAccessKeyFocuses", true);
 #endif
 
 // Encrypted media extensions.
 pref("media.eme.enabled", true);
 pref("media.eme.apiVisible", true);
 
+// Whether we should run a test-pattern through EME GMPs before assuming they'll
+// decode H.264.
+pref("media.gmp.trial-create.enabled", true);
+
 #ifdef MOZ_ADOBE_EME
 pref("browser.eme.ui.enabled", true);
 pref("media.gmp-eme-adobe.enabled", true);
 #endif
 
 // Play with different values of the decay time and get telemetry,
 // 0 means to randomize (and persist) the experiment value in users' profiles,
 // -1 means no experiment is run and we use the preferred value for frecency (6h)
--- a/dom/media/eme/MediaKeySystemAccessManager.cpp
+++ b/dom/media/eme/MediaKeySystemAccessManager.cpp
@@ -79,16 +79,17 @@ MediaKeySystemAccessManager::Request(Det
 
 static bool
 ShouldTrialCreateGMP(const nsAString& aKeySystem)
 {
   // Trial create where the CDM has a decoder;
   // * ClearKey and Primetime on Windows Vista and later.
   // * Primetime on MacOSX Lion and later.
   return
+    Preferences::GetBool("media.gmp.trial-create.enabled", false) &&
 #ifdef XP_WIN
     IsVistaOrLater();
 #elif defined(XP_MACOSX)
     aKeySystem.EqualsLiteral("com.adobe.primetime") &&
     nsCocoaFeatures::OnLionOrLater();
 #else
     false;
 #endif