Bug 1245789 - Added support for --enable-eme=widevine and expose MOZ_$(keySystem)_EME in dom/media/{eme,gmp}. r=glandium,a=ritu
authorChris Pearce <cpearce@mozilla.com>
Thu, 21 Apr 2016 10:16:01 +1200
changeset 325942 4847e3f9f27855f5ed30fd468867d7c1b4f8d658
parent 325941 07b03160180d0124d084ed46492ec5fd48c09826
child 325943 c9c73c8fba8c0d4bcc4c8f6dc1dfa57532e01f51
push id1128
push userjlund@mozilla.com
push dateWed, 01 Jun 2016 01:31:59 +0000
treeherdermozilla-release@fe0d30de989d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium, ritu
bugs1245789
milestone47.0a2
Bug 1245789 - Added support for --enable-eme=widevine and expose MOZ_$(keySystem)_EME in dom/media/{eme,gmp}. r=glandium,a=ritu We need to not build Widevine by default, and when enabled we will need to be able to ifdef on MOZ_WIDEVINE_EME (see next patch) so that we can not build the code on platforms where it can't possibly work (Android specifcally, as Widevine isn't available as a Chromium plugin there).
dom/media/eme/moz.build
dom/media/gmp/moz.build
old-configure.in
--- a/dom/media/eme/moz.build
+++ b/dom/media/eme/moz.build
@@ -1,14 +1,17 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
+for cdm in CONFIG['MOZ_EME_MODULES']:
+    DEFINES['MOZ_%s_EME' % cdm.upper()] = True
+
 EXPORTS.mozilla.dom += [
     'MediaEncryptedEvent.h',
     'MediaKeyError.h',
     'MediaKeyMessageEvent.h',
     'MediaKeys.h',
     'MediaKeySession.h',
     'MediaKeyStatusMap.h',
     'MediaKeySystemAccess.h',
--- a/dom/media/gmp/moz.build
+++ b/dom/media/gmp/moz.build
@@ -1,14 +1,17 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
+for cdm in CONFIG['MOZ_EME_MODULES']:
+    DEFINES['MOZ_%s_EME' % cdm.upper()] = True
+
 XPIDL_MODULE = 'content_geckomediaplugins'
 
 XPIDL_SOURCES += [
     'mozIGeckoMediaPluginChromeService.idl',
     'mozIGeckoMediaPluginService.idl',
 ]
 
 EXPORTS += [
@@ -109,17 +112,17 @@ UNIFIED_SOURCES += [
     'GMPVideoPlaneImpl.cpp',
 ]
 
 if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin'):
   DIRS += [
       'rlz',
   ]
 
-if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Linux'):
+if 'widevine' in CONFIG['MOZ_EME_MODULES']:
   DIRS += [
       'widevine-adapter',
   ]
 
 IPDL_SOURCES += [
   'GMPTypes.ipdlh',
   'PGMP.ipdl',
   'PGMPAudioDecoder.ipdl',
--- a/old-configure.in
+++ b/old-configure.in
@@ -5167,17 +5167,17 @@ if test x"$MOZ_WIDGET_TOOLKIT" = x"gonk"
 fi
 
 
 dnl ========================================================
 dnl = EME support
 dnl ========================================================
 
 MOZ_ARG_ENABLE_STRING(eme,
-[  --enable-eme[=adobe]  Enable support for Encrypted Media Extensions  ],
+[  --enable-eme[=adobe,widevine]  Enable support for Encrypted Media Extensions  ],
     MOZ_EME_ARGS=$enableval)
 
 if test "$MOZ_EME_ARGS"; then
     if test "$MOZ_EME_ARGS" = "no"; then
         dnl EME explicitly disabled with --disable-eme
         MOZ_EME=
     elif test "$MOZ_EME_ARGS" = "yes"; then
         dnl EME explicitly enabled with --enable-eme