mirror of https://github.com/mpv-player/mpv
build: simplify libavfilter configure checks
This is all not needed anymore. In particular, remove all configure switches except --enable-libavfilter.
This commit is contained in:
parent
c9d328319e
commit
98cd2c4122
|
@ -87,7 +87,7 @@ static struct af_info* filter_list[] = {
|
||||||
#if HAVE_LIBBS2B
|
#if HAVE_LIBBS2B
|
||||||
&af_info_bs2b,
|
&af_info_bs2b,
|
||||||
#endif
|
#endif
|
||||||
#if HAVE_AF_LAVFI
|
#if HAVE_LIBAVFILTER
|
||||||
&af_info_lavfi,
|
&af_info_lavfi,
|
||||||
#endif
|
#endif
|
||||||
// Must come last, because they're fallback format conversion filter
|
// Must come last, because they're fallback format conversion filter
|
||||||
|
|
|
@ -327,8 +327,6 @@ Optional features:
|
||||||
--disable-libpostproc disable postprocess filter (vf_pp) [autodetect]
|
--disable-libpostproc disable postprocess filter (vf_pp) [autodetect]
|
||||||
--disable-libavdevice disable libavdevice demuxers [autodetect]
|
--disable-libavdevice disable libavdevice demuxers [autodetect]
|
||||||
--disable-libavfilter disable libavfilter [autodetect]
|
--disable-libavfilter disable libavfilter [autodetect]
|
||||||
--disable-vf-lavfi disable vf_lavfi libavfilter bridge [audodetect]
|
|
||||||
--disable-af-lavfi disable af_lavfi libavfilter bridge [audodetect]
|
|
||||||
|
|
||||||
Codecs:
|
Codecs:
|
||||||
--enable-jpeg enable JPEG input/output support [autodetect]
|
--enable-jpeg enable JPEG input/output support [autodetect]
|
||||||
|
@ -488,8 +486,6 @@ _rpath=no
|
||||||
lua=auto
|
lua=auto
|
||||||
libpostproc=auto
|
libpostproc=auto
|
||||||
libavfilter=auto
|
libavfilter=auto
|
||||||
vf_lavfi=auto
|
|
||||||
af_lavfi=auto
|
|
||||||
libavdevice=auto
|
libavdevice=auto
|
||||||
_stream_cache=yes
|
_stream_cache=yes
|
||||||
_priority=no
|
_priority=no
|
||||||
|
@ -708,10 +704,6 @@ for ac_option do
|
||||||
--disable-libavdevice) libavdevice=no ;;
|
--disable-libavdevice) libavdevice=no ;;
|
||||||
--enable-libavfilter) libavfilter=auto ;;
|
--enable-libavfilter) libavfilter=auto ;;
|
||||||
--disable-libavfilter) libavfilter=no ;;
|
--disable-libavfilter) libavfilter=no ;;
|
||||||
--enable-vf-lavfi) vf_lavfi=auto ;;
|
|
||||||
--disable-vf-lavfi) vf_lavfi=no ;;
|
|
||||||
--enable-af-lavfi) af_lavfi=auto ;;
|
|
||||||
--disable-af-lavfi) af_lavfi=no ;;
|
|
||||||
|
|
||||||
--enable-enca) _enca=yes ;;
|
--enable-enca) _enca=yes ;;
|
||||||
--disable-enca) _enca=no ;;
|
--disable-enca) _enca=no ;;
|
||||||
|
@ -2733,25 +2725,11 @@ fi
|
||||||
echores "$_avutil_has_qp_api"
|
echores "$_avutil_has_qp_api"
|
||||||
|
|
||||||
|
|
||||||
# libavfilter as it can be used by vf_lavfi is 3.45.101 in FFmpeg, and
|
|
||||||
# 3.5.0 in Libav. Completely useless version numbers.
|
|
||||||
echocheck "libavfilter"
|
echocheck "libavfilter"
|
||||||
if test "$libavfilter" = auto ; then
|
if test "$libavfilter" = auto ; then
|
||||||
libavfilter=no
|
libavfilter=no
|
||||||
|
if pkg_config_add "libavfilter >= 3.90.100" ; then
|
||||||
cat > $TMPC <<EOF
|
|
||||||
#include <libavfilter/avfilter.h>
|
|
||||||
void vf_next_query_format() {}
|
|
||||||
int main(void) {
|
|
||||||
avfilter_register_all();
|
|
||||||
vf_next_query_format();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
if cc_check `$_pkg_config libavfilter --cflags --libs` && pkg_config_add "libavfilter" ; then
|
|
||||||
libavfilter=yes
|
libavfilter=yes
|
||||||
else
|
|
||||||
res_comment="not found or broken"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if test "$libavfilter" = yes ; then
|
if test "$libavfilter" = yes ; then
|
||||||
|
@ -2762,41 +2740,10 @@ fi
|
||||||
echores "$libavfilter"
|
echores "$libavfilter"
|
||||||
|
|
||||||
|
|
||||||
echocheck "using libavfilter through vf_lavfi"
|
|
||||||
if test "$vf_lavfi" = auto ; then
|
|
||||||
vf_lavfi=no
|
|
||||||
if test "$libavfilter" = yes ; then
|
|
||||||
vf_lavfi=yes
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test "$vf_lavfi" = yes ; then
|
|
||||||
def_vf_lavfi='#define HAVE_VF_LAVFI 1'
|
|
||||||
else
|
|
||||||
def_vf_lavfi='#define HAVE_VF_LAVFI 0'
|
|
||||||
fi
|
|
||||||
echores "$vf_lavfi"
|
|
||||||
|
|
||||||
|
|
||||||
echocheck "using libavfilter through af_lavfi"
|
|
||||||
if test "$af_lavfi" = auto ; then
|
|
||||||
af_lavfi=no
|
|
||||||
if test "$libavfilter" = yes ; then
|
|
||||||
af_lavfi=yes
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test "$af_lavfi" = yes ; then
|
|
||||||
def_af_lavfi='#define HAVE_AF_LAVFI 1'
|
|
||||||
else
|
|
||||||
def_af_lavfi='#define HAVE_AF_LAVFI 0'
|
|
||||||
fi
|
|
||||||
echores "$af_lavfi"
|
|
||||||
|
|
||||||
|
|
||||||
echocheck "libavdevice >= 54.0.0"
|
echocheck "libavdevice >= 54.0.0"
|
||||||
if test "$libavdevice" = auto ; then
|
if test "$libavdevice" = auto ; then
|
||||||
libavdevice=no
|
libavdevice=no
|
||||||
# Usually, libavdevice depends on libavfilter
|
if pkg_config_add "libavdevice >= 54.0.0" ; then
|
||||||
if test "$libavfilter" = yes && pkg_config_add "libavdevice >= 54.0.0" ; then
|
|
||||||
libavdevice=yes
|
libavdevice=yes
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -3259,8 +3206,6 @@ LUA = $lua
|
||||||
LIBPOSTPROC = $libpostproc
|
LIBPOSTPROC = $libpostproc
|
||||||
LIBAVDEVICE = $libavdevice
|
LIBAVDEVICE = $libavdevice
|
||||||
LIBAVFILTER = $libavfilter
|
LIBAVFILTER = $libavfilter
|
||||||
VF_LAVFI = $vf_lavfi
|
|
||||||
AF_LAVFI = $af_lavfi
|
|
||||||
LIBSMBCLIENT = $_smb
|
LIBSMBCLIENT = $_smb
|
||||||
LIBQUVI = $_libquvi4
|
LIBQUVI = $_libquvi4
|
||||||
LIBQUVI9 = $_libquvi9
|
LIBQUVI9 = $_libquvi9
|
||||||
|
@ -3399,8 +3344,6 @@ $def_avcodec_has_metadata_update_side_data
|
||||||
$def_libpostproc
|
$def_libpostproc
|
||||||
$def_libavdevice
|
$def_libavdevice
|
||||||
$def_libavfilter
|
$def_libavfilter
|
||||||
$def_vf_lavfi
|
|
||||||
$def_af_lavfi
|
|
||||||
|
|
||||||
$def_dlopen
|
$def_dlopen
|
||||||
|
|
||||||
|
|
|
@ -130,8 +130,8 @@ SOURCES-$(X11) += video/out/vo_x11.c video/out/x11_common.c
|
||||||
SOURCES-$(XV) += video/out/vo_xv.c
|
SOURCES-$(XV) += video/out/vo_xv.c
|
||||||
SOURCES-$(WAYLAND) += video/out/vo_wayland.c video/out/wayland_common.c
|
SOURCES-$(WAYLAND) += video/out/vo_wayland.c video/out/wayland_common.c
|
||||||
|
|
||||||
SOURCES-$(VF_LAVFI) += video/filter/vf_lavfi.c
|
SOURCES-$(LIBAVFILTER) += video/filter/vf_lavfi.c \
|
||||||
SOURCES-$(AF_LAVFI) += audio/filter/af_lavfi.c
|
audio/filter/af_lavfi.c
|
||||||
|
|
||||||
SOURCES-$(LUA) += player/lua.c
|
SOURCES-$(LUA) += player/lua.c
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ bool mp_parse_cfgfiles(struct MPContext *mpctx)
|
||||||
char *conffile;
|
char *conffile;
|
||||||
|
|
||||||
// The #if is a stupid hack to avoid errors if libavfilter is not available.
|
// The #if is a stupid hack to avoid errors if libavfilter is not available.
|
||||||
#if HAVE_VF_LAVFI && HAVE_ENCODING
|
#if HAVE_LIBAVFILTER && HAVE_ENCODING
|
||||||
conffile = mp_find_config_file(tmp, mpctx->global, "encoding-profiles.conf");
|
conffile = mp_find_config_file(tmp, mpctx->global, "encoding-profiles.conf");
|
||||||
if (conffile && mp_path_exists(conffile))
|
if (conffile && mp_path_exists(conffile))
|
||||||
m_config_parse_config_file(mpctx->mconfig, conffile, 0);
|
m_config_parse_config_file(mpctx->mconfig, conffile, 0);
|
||||||
|
|
|
@ -84,7 +84,7 @@ static const vf_info_t *const filter_list[] = {
|
||||||
#if HAVE_LIBPOSTPROC
|
#if HAVE_LIBPOSTPROC
|
||||||
&vf_info_pp,
|
&vf_info_pp,
|
||||||
#endif
|
#endif
|
||||||
#if HAVE_VF_LAVFI
|
#if HAVE_LIBAVFILTER
|
||||||
&vf_info_lavfi,
|
&vf_info_lavfi,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
struct vf_lw_opts;
|
struct vf_lw_opts;
|
||||||
|
|
||||||
#if HAVE_VF_LAVFI
|
#if HAVE_LIBAVFILTER
|
||||||
|
|
||||||
extern const struct m_sub_options vf_lw_conf;
|
extern const struct m_sub_options vf_lw_conf;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
#include <libavfilter/avfilter.h>
|
|
||||||
static void vf_next_query_format() {}
|
|
||||||
int main(void) {
|
|
||||||
avfilter_register_all();
|
|
||||||
vf_next_query_format();
|
|
||||||
return 0;
|
|
||||||
}
|
|
15
wscript
15
wscript
|
@ -370,20 +370,7 @@ Libav libraries ({0}). Aborting.".format(" ".join(libav_pkg_config_checks))
|
||||||
}, {
|
}, {
|
||||||
'name': '--libavfilter',
|
'name': '--libavfilter',
|
||||||
'desc': 'libavfilter',
|
'desc': 'libavfilter',
|
||||||
'func': compose_checks(
|
'func': check_pkg_config('libavfilter', '>= 3.90.100'),
|
||||||
check_pkg_config('libavfilter'),
|
|
||||||
check_cc(fragment=load_fragment('libavfilter.c'),
|
|
||||||
use='libavfilter')),
|
|
||||||
}, {
|
|
||||||
'name': '--vf-lavfi',
|
|
||||||
'desc': 'using libavfilter through vf_lavfi',
|
|
||||||
'deps': [ 'libavfilter' ],
|
|
||||||
'func': check_true
|
|
||||||
}, {
|
|
||||||
'name': '--af-lavfi',
|
|
||||||
'desc': 'using libavfilter through af_lavfi',
|
|
||||||
'deps': [ 'libavfilter' ],
|
|
||||||
'func': check_true
|
|
||||||
}, {
|
}, {
|
||||||
'name': '--libavdevice',
|
'name': '--libavdevice',
|
||||||
'desc': 'libavdevice',
|
'desc': 'libavdevice',
|
||||||
|
|
|
@ -115,7 +115,7 @@ def build(ctx):
|
||||||
( "audio/filter/af_karaoke.c" ),
|
( "audio/filter/af_karaoke.c" ),
|
||||||
( "audio/filter/af_ladspa.c", "ladspa" ),
|
( "audio/filter/af_ladspa.c", "ladspa" ),
|
||||||
( "audio/filter/af_lavcac3enc.c" ),
|
( "audio/filter/af_lavcac3enc.c" ),
|
||||||
( "audio/filter/af_lavfi.c", "af-lavfi" ),
|
( "audio/filter/af_lavfi.c", "libavfilter" ),
|
||||||
( "audio/filter/af_lavrresample.c" ),
|
( "audio/filter/af_lavrresample.c" ),
|
||||||
( "audio/filter/af_pan.c" ),
|
( "audio/filter/af_pan.c" ),
|
||||||
( "audio/filter/af_scaletempo.c" ),
|
( "audio/filter/af_scaletempo.c" ),
|
||||||
|
@ -306,7 +306,7 @@ def build(ctx):
|
||||||
( "video/filter/vf_gradfun.c" ),
|
( "video/filter/vf_gradfun.c" ),
|
||||||
( "video/filter/vf_hqdn3d.c" ),
|
( "video/filter/vf_hqdn3d.c" ),
|
||||||
( "video/filter/vf_ilpack.c" ),
|
( "video/filter/vf_ilpack.c" ),
|
||||||
( "video/filter/vf_lavfi.c", "vf-lavfi"),
|
( "video/filter/vf_lavfi.c", "libavfilter"),
|
||||||
( "video/filter/vf_mirror.c" ),
|
( "video/filter/vf_mirror.c" ),
|
||||||
( "video/filter/vf_noformat.c" ),
|
( "video/filter/vf_noformat.c" ),
|
||||||
( "video/filter/vf_noise.c" ),
|
( "video/filter/vf_noise.c" ),
|
||||||
|
|
Loading…
Reference in New Issue