Bug 1100164 - Fix gmp-clearkey path - r=unfocused
authorEdwin Flores <edwin@mozilla.com>
Thu, 20 Nov 2014 11:17:47 +1300
changeset 240877 5d895a54de81cfd46cc1b5986311333fbadaa7df
parent 240876 d24d7dfddb48b88bcf3c3379c2f426990f2275fc
child 240878 6d8adc89991c59a374092f02d220e52aa1effe12
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersunfocused
bugs1100164
milestone36.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 1100164 - Fix gmp-clearkey path - r=unfocused
toolkit/mozapps/extensions/internal/OpenH264Provider.jsm
--- a/toolkit/mozapps/extensions/internal/OpenH264Provider.jsm
+++ b/toolkit/mozapps/extensions/internal/OpenH264Provider.jsm
@@ -22,16 +22,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
                                   "resource://gre/modules/GMPInstallManager.jsm");
 
 const URI_EXTENSION_STRINGS    = "chrome://mozapps/locale/extensions/extensions.properties";
 const STRING_TYPE_NAME         = "type.%ID%.name";
 
 const SEC_IN_A_DAY              = 24 * 60 * 60;
 
 const EME_PREF_ENABLED         = "media.eme.enabled";
+const NS_GRE_BIN_DIR           = "GreBinD";
 const CLEARKEY_PLUGIN_ID       = "gmp-clearkey";
 const CLEARKEY_VERSION         = "0.1";
 
 const OPENH264_PLUGIN_ID       = "gmp-gmpopenh264";
 const OPENH264_PREF_BRANCH     = "media." + OPENH264_PLUGIN_ID + ".";
 const OPENH264_PREF_ENABLED    = "enabled";
 const OPENH264_PREF_VERSION    = "version";
 const OPENH264_PREF_LASTUPDATE = "lastUpdate";
@@ -278,17 +279,18 @@ let OpenH264Provider = {
         gmpService.addPluginDirectory(this.gmpPath);
       } catch (e if e.name == 'NS_ERROR_NOT_AVAILABLE') {
         this._log.warn("startup() - adding gmp directory failed with " + e.name + " - sandboxing not available?");
       }
     }
 
     if (Preferences.get(EME_PREF_ENABLED, false)) {
       try {
-        gmpService.addPluginDirectory(OS.Path.join(OS.Constants.Path.libDir,
+        let greBinDir = Services.dirsvc.get(NS_GRE_BIN_DIR, Ci.nsILocalFile);
+        gmpService.addPluginDirectory(OS.Path.join(greBinDir.path,
                                                    CLEARKEY_PLUGIN_ID,
                                                    CLEARKEY_VERSION));
       } catch (e) {
         this._log.warn("startup() - adding clearkey CDM failed", e);
       }
     }
 
     let telemetry = {};