From 294a1dd5b6c03d20b06c583c241fb43b31bef5cc Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Wed, 16 Mar 2016 17:46:13 +0900 Subject: [PATCH] Bug 1257104 - Move --disable-ffmpeg to moz.configure. r=ted --- build/moz.configure/old.configure | 1 - old-configure.in | 23 ----------------------- toolkit/moz.configure | 17 +++++++++++++++++ 3 files changed, 17 insertions(+), 24 deletions(-) diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure index cfe31c8b1089..31a0f9c4569c 100644 --- a/build/moz.configure/old.configure +++ b/build/moz.configure/old.configure @@ -200,7 +200,6 @@ def old_configure_options(*options): '--enable-extensions', '--enable-faststripe', '--enable-feeds', - '--enable-ffmpeg', '--enable-fmp4', '--enable-gamepad', '--enable-gc-trace', diff --git a/old-configure.in b/old-configure.in index 0614664be83f..0d5e2aa9febf 100644 --- a/old-configure.in +++ b/old-configure.in @@ -3071,7 +3071,6 @@ if test -n "$MOZ_FMP4"; then else MOZ_FMP4= fi -MOZ_FFMPEG= MOZ_WEBRTC=1 MOZ_PEERCONNECTION= MOZ_SRTP= @@ -4352,27 +4351,6 @@ if test -n "$MOZ_DIRECTSHOW"; then AC_DEFINE(MOZ_DIRECTSHOW) fi; -dnl ======================================================== -dnl FFmpeg H264/AAC Decoding Support -dnl ======================================================== -case "$OS_TARGET" in -WINNT|Android) - ;; -*) - MOZ_FFMPEG=1 - ;; -esac - -MOZ_ARG_DISABLE_BOOL(ffmpeg, -[ --disable-ffmpeg Disable FFmpeg for fragmented H264/AAC decoding], - MOZ_FFMPEG=, - MOZ_FFMPEG=1 -) - -if test -n "$MOZ_FFMPEG"; then - AC_DEFINE(MOZ_FFMPEG) -fi; - dnl ======================================================== dnl = Built-in fragmented MP4 support. dnl ======================================================== @@ -7991,7 +7969,6 @@ AC_SUBST(WIN32_GUI_EXE_LDFLAGS) AC_SUBST(MOZ_VORBIS) AC_SUBST(MOZ_TREMOR) -AC_SUBST(MOZ_FFMPEG) AC_SUBST(MOZ_FFVPX) AC_SUBST_LIST(FFVPX_ASFLAGS) AC_SUBST(MOZ_FMP4) diff --git a/toolkit/moz.configure b/toolkit/moz.configure index 575e00f31f49..07199c3f8a3e 100644 --- a/toolkit/moz.configure +++ b/toolkit/moz.configure @@ -180,3 +180,20 @@ def wmf(value, target): set_define('MOZ_WMF', '1') add_old_configure_assignment('MOZ_WMF', '1') return enabled + + +# FFmpeg H264/AAC Decoding Support +# ============================================================== +option('--disable-ffmpeg', + help='Disable FFmpeg for fragmented H264/AAC decoding') + +@depends('--disable-ffmpeg', target) +def ffmpeg(value, target): + enabled = bool(value) + if value.origin == 'default': + enabled = target.os not in ('Android', 'WINNT') + if enabled: + set_define('MOZ_FFMPEG', '1') + set_config('MOZ_FFMPEG', '1') + add_old_configure_assignment('MOZ_FFMPEG', '1') + return enabled