Bug 1166169 - Add MOZ_GONK_MEDIACODEC in configure and define it in moz.build. r=cpearce, r=glandium
authorBlake Wu <bwu@mozilla.com>
Thu, 21 May 2015 14:38:51 +0800
changeset 276116 d02884b7a126c235f4230875ba3cc7e1e1fbd95e
parent 276115 04cb8c5a32707c3b9033571183b2905f95280bed
child 276117 0cf2984f2c5918d43f697c8bf3e9df5440cf8770
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce, glandium
bugs1166169
milestone41.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 1166169 - Add MOZ_GONK_MEDIACODEC in configure and define it in moz.build. r=cpearce, r=glandium
configure.in
dom/media/fmp4/moz.build
dom/media/platforms/moz.build
--- a/configure.in
+++ b/configure.in
@@ -5323,16 +5323,21 @@ if test -n "$MOZ_FFMPEG" -a -z "$MOZ_FMP
     AC_MSG_ERROR([Fragmented MP4 support must be enabled if using FFMPEG])
 fi
 
 if test -n "$MOZ_FMP4"; then
     AC_DEFINE(MOZ_FMP4)
     MOZ_EME=1
 fi;
 
+if test "$MOZ_WIDGET_TOOLKIT" = "gonk" -a -n "$MOZ_FMP4" -a "$ANDROID_VERSION" -ge "18"; then
+    MOZ_GONK_MEDIACODEC=1
+    AC_SUBST(MOZ_GONK_MEDIACODEC)
+fi
+
 dnl ========================================================
 dnl = EME support
 dnl ========================================================
 
 MOZ_ARG_DISABLE_BOOL(eme,
 [  --disable-eme  Disable support for Encrypted Media Extensions],
     MOZ_EME=,
     MOZ_EME=1)
--- a/dom/media/fmp4/moz.build
+++ b/dom/media/fmp4/moz.build
@@ -22,8 +22,11 @@ SOURCES += [
 ]
 
 FINAL_LIBRARY = 'xul'
 
 FAIL_ON_WARNINGS = True
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     DEFINES['NOMINMAX'] = True
+
+if CONFIG['MOZ_GONK_MEDIACODEC']:
+    DEFINES['MOZ_GONK_MEDIACODEC'] = True
--- a/dom/media/platforms/moz.build
+++ b/dom/media/platforms/moz.build
@@ -54,17 +54,17 @@ if CONFIG['MOZ_APPLEMEDIA']:
       'apple/AppleVDALinker.cpp',
       'apple/AppleVTDecoder.cpp',
       'apple/AppleVTLinker.cpp',
   ]
   OS_LIBS += [
       '-framework AudioToolbox',
   ]
 
-if CONFIG['MOZ_FMP4'] and CONFIG['ANDROID_VERSION'] >= '18'and CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
+if CONFIG['MOZ_GONK_MEDIACODEC']:
     DEFINES['MOZ_GONK_MEDIACODEC'] = True
     DIRS += ['gonk']
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
     EXPORTS += [
         'android/AndroidDecoderModule.h',