Bug 1257104 - Move --disable-fmp4 to moz.configure. r=ted

Note the imply_option from --enable-ffmpeg replaces the explicit check from
old-configure.in and triggers an error in the same circumstances.
This commit is contained in:
Mike Hommey 2016-03-16 17:50:42 +09:00
parent 294a1dd5b6
commit d5fe73840f
4 changed files with 20 additions and 38 deletions

View File

@ -258,6 +258,7 @@ def wanted_mozconfig_variables(help):
'MOZILLABUILD', 'MOZILLABUILD',
'MOZ_ARTIFACT_BUILDS', 'MOZ_ARTIFACT_BUILDS',
'MOZ_BUILD_APP', 'MOZ_BUILD_APP',
'MOZ_FMP4',
'MOZ_INSTRUMENT_EVENT_LOOP', 'MOZ_INSTRUMENT_EVENT_LOOP',
'PERL', 'PERL',
'RPMBUILD', 'RPMBUILD',

View File

@ -200,7 +200,6 @@ def old_configure_options(*options):
'--enable-extensions', '--enable-extensions',
'--enable-faststripe', '--enable-faststripe',
'--enable-feeds', '--enable-feeds',
'--enable-fmp4',
'--enable-gamepad', '--enable-gamepad',
'--enable-gc-trace', '--enable-gc-trace',
'--enable-gconf', '--enable-gconf',

View File

@ -165,7 +165,6 @@ if test -n "$gonkdir" ; then
MOZ_OMX_DECODER=1 MOZ_OMX_DECODER=1
AC_SUBST(MOZ_OMX_DECODER) AC_SUBST(MOZ_OMX_DECODER)
MOZ_RTSP=1 MOZ_RTSP=1
MOZ_FMP4=1
MOZ_SECUREELEMENT=1 MOZ_SECUREELEMENT=1
;; ;;
17|18) 17|18)
@ -187,7 +186,6 @@ if test -n "$gonkdir" ; then
MOZ_OMX_ENCODER=1 MOZ_OMX_ENCODER=1
AC_SUBST(MOZ_OMX_ENCODER) AC_SUBST(MOZ_OMX_ENCODER)
AC_DEFINE(MOZ_OMX_ENCODER) AC_DEFINE(MOZ_OMX_ENCODER)
MOZ_FMP4=1
MOZ_SECUREELEMENT=1 MOZ_SECUREELEMENT=1
;; ;;
19) 19)
@ -206,7 +204,6 @@ if test -n "$gonkdir" ; then
MOZ_SECUREELEMENT=1 MOZ_SECUREELEMENT=1
AC_SUBST(MOZ_AUDIO_OFFLOAD) AC_SUBST(MOZ_AUDIO_OFFLOAD)
AC_DEFINE(MOZ_AUDIO_OFFLOAD) AC_DEFINE(MOZ_AUDIO_OFFLOAD)
MOZ_FMP4=1
;; ;;
21|22) 21|22)
GONK_INCLUDES="-I$gonkdir/frameworks/native/include -I$gonkdir/frameworks/av/include -I$gonkdir/frameworks/av/include/media -I$gonkdir/frameworks/av/include/camera -I$gonkdir/frameworks/native/include/media/openmax -I$gonkdir/frameworks/av/media/libstagefright/include -I$gonkdir/external/mdnsresponder/mDNSShared" GONK_INCLUDES="-I$gonkdir/frameworks/native/include -I$gonkdir/frameworks/av/include -I$gonkdir/frameworks/av/include/media -I$gonkdir/frameworks/av/include/camera -I$gonkdir/frameworks/native/include/media/openmax -I$gonkdir/frameworks/av/media/libstagefright/include -I$gonkdir/external/mdnsresponder/mDNSShared"
@ -216,7 +213,6 @@ if test -n "$gonkdir" ; then
AC_DEFINE(MOZ_OMX_ENCODER) AC_DEFINE(MOZ_OMX_ENCODER)
AC_SUBST(MOZ_AUDIO_OFFLOAD) AC_SUBST(MOZ_AUDIO_OFFLOAD)
AC_DEFINE(MOZ_AUDIO_OFFLOAD) AC_DEFINE(MOZ_AUDIO_OFFLOAD)
MOZ_FMP4=1
MOZ_B2G_CAMERA=1 MOZ_B2G_CAMERA=1
if test -d "$gonkdir/system/bluetoothd"; then if test -d "$gonkdir/system/bluetoothd"; then
MOZ_B2G_BT=1 MOZ_B2G_BT=1
@ -3066,11 +3062,6 @@ MOZ_TREMOR=
MOZ_SAMPLE_TYPE_FLOAT32= MOZ_SAMPLE_TYPE_FLOAT32=
MOZ_SAMPLE_TYPE_S16= MOZ_SAMPLE_TYPE_S16=
MOZ_DIRECTSHOW= MOZ_DIRECTSHOW=
if test -n "$MOZ_FMP4"; then
MOZ_FMP4=1
else
MOZ_FMP4=
fi
MOZ_WEBRTC=1 MOZ_WEBRTC=1
MOZ_PEERCONNECTION= MOZ_PEERCONNECTION=
MOZ_SRTP= MOZ_SRTP=
@ -4355,31 +4346,6 @@ dnl ========================================================
dnl = Built-in fragmented MP4 support. dnl = Built-in fragmented MP4 support.
dnl ======================================================== dnl ========================================================
if test "$OS_TARGET" = Android -a -z "$gonkdir"; then
MOZ_FMP4=1
fi
if test -n "$MOZ_WMF" -o -n "$MOZ_FFMPEG" -o -n "$MOZ_APPLEMEDIA"; then
dnl Enable fragmented MP4 parser on Windows by default.
dnl We will also need to enable it on other platforms as we implement
dnl platform decoder support there too.
MOZ_FMP4=1
fi
MOZ_ARG_DISABLE_BOOL(fmp4,
[ --disable-fmp4 Disable support for in built Fragmented MP4 parsing],
MOZ_FMP4=,
MOZ_FMP4=1)
if test -n "$MOZ_FFMPEG" -a -z "$MOZ_FMP4"; then
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 x"$MOZ_WIDGET_TOOLKIT" = x"gonk" -a -n "$MOZ_FMP4" -a -n "$ANDROID_VERSION"; then if test x"$MOZ_WIDGET_TOOLKIT" = x"gonk" -a -n "$MOZ_FMP4" -a -n "$ANDROID_VERSION"; then
# we now know for sure that $ANDROID_VERSION is not an empty string! # we now know for sure that $ANDROID_VERSION is not an empty string!
if test "$ANDROID_VERSION" -ge "18"; then if test "$ANDROID_VERSION" -ge "18"; then
@ -7971,7 +7937,6 @@ AC_SUBST(MOZ_VORBIS)
AC_SUBST(MOZ_TREMOR) AC_SUBST(MOZ_TREMOR)
AC_SUBST(MOZ_FFVPX) AC_SUBST(MOZ_FFVPX)
AC_SUBST_LIST(FFVPX_ASFLAGS) AC_SUBST_LIST(FFVPX_ASFLAGS)
AC_SUBST(MOZ_FMP4)
AC_SUBST(MOZ_EME) AC_SUBST(MOZ_EME)
AC_SUBST(MOZ_DIRECTSHOW) AC_SUBST(MOZ_DIRECTSHOW)
AC_SUBST(MOZ_ANDROID_OMX) AC_SUBST(MOZ_ANDROID_OMX)

View File

@ -178,7 +178,6 @@ def wmf(value, target):
if enabled: if enabled:
set_config('MOZ_WMF', '1') set_config('MOZ_WMF', '1')
set_define('MOZ_WMF', '1') set_define('MOZ_WMF', '1')
add_old_configure_assignment('MOZ_WMF', '1')
return enabled return enabled
@ -195,5 +194,23 @@ def ffmpeg(value, target):
if enabled: if enabled:
set_define('MOZ_FFMPEG', '1') set_define('MOZ_FFMPEG', '1')
set_config('MOZ_FFMPEG', '1') set_config('MOZ_FFMPEG', '1')
add_old_configure_assignment('MOZ_FFMPEG', '1') imply_option('--enable-fmp4', '--enable-ffmpeg')
return enabled
# Built-in fragmented MP4 support.
# ==============================================================
option('--disable-fmp4', env='MOZ_FMP4',
help='Disable support for in built Fragmented MP4 parsing')
@depends('--disable-fmp4', target, wmf, applemedia)
def fmp4(value, target, wmf, applemedia):
enabled = bool(value)
if value.origin == 'default':
# target.os == 'Android' includes all B2G versions
enabled = wmf or applemedia or target.os == 'Android'
if enabled:
set_config('MOZ_FMP4', '1')
set_define('MOZ_FMP4', '1')
add_old_configure_assignment('MOZ_FMP4', '1')
return enabled return enabled