mirror of
https://github.com/mpv-player/mpv
synced 2025-02-16 12:17:12 +00:00
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
|
||||
&af_info_bs2b,
|
||||
#endif
|
||||
#if HAVE_AF_LAVFI
|
||||
#if HAVE_LIBAVFILTER
|
||||
&af_info_lavfi,
|
||||
#endif
|
||||
// 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-libavdevice disable libavdevice demuxers [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:
|
||||
--enable-jpeg enable JPEG input/output support [autodetect]
|
||||
@ -488,8 +486,6 @@ _rpath=no
|
||||
lua=auto
|
||||
libpostproc=auto
|
||||
libavfilter=auto
|
||||
vf_lavfi=auto
|
||||
af_lavfi=auto
|
||||
libavdevice=auto
|
||||
_stream_cache=yes
|
||||
_priority=no
|
||||
@ -708,10 +704,6 @@ for ac_option do
|
||||
--disable-libavdevice) libavdevice=no ;;
|
||||
--enable-libavfilter) libavfilter=auto ;;
|
||||
--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 ;;
|
||||
--disable-enca) _enca=no ;;
|
||||
@ -2733,25 +2725,11 @@ fi
|
||||
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"
|
||||
if test "$libavfilter" = auto ; then
|
||||
libavfilter=no
|
||||
|
||||
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
|
||||
if pkg_config_add "libavfilter >= 3.90.100" ; then
|
||||
libavfilter=yes
|
||||
else
|
||||
res_comment="not found or broken"
|
||||
fi
|
||||
fi
|
||||
if test "$libavfilter" = yes ; then
|
||||
@ -2762,41 +2740,10 @@ fi
|
||||
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"
|
||||
if test "$libavdevice" = auto ; then
|
||||
libavdevice=no
|
||||
# Usually, libavdevice depends on libavfilter
|
||||
if test "$libavfilter" = yes && pkg_config_add "libavdevice >= 54.0.0" ; then
|
||||
if pkg_config_add "libavdevice >= 54.0.0" ; then
|
||||
libavdevice=yes
|
||||
fi
|
||||
fi
|
||||
@ -3259,8 +3206,6 @@ LUA = $lua
|
||||
LIBPOSTPROC = $libpostproc
|
||||
LIBAVDEVICE = $libavdevice
|
||||
LIBAVFILTER = $libavfilter
|
||||
VF_LAVFI = $vf_lavfi
|
||||
AF_LAVFI = $af_lavfi
|
||||
LIBSMBCLIENT = $_smb
|
||||
LIBQUVI = $_libquvi4
|
||||
LIBQUVI9 = $_libquvi9
|
||||
@ -3399,8 +3344,6 @@ $def_avcodec_has_metadata_update_side_data
|
||||
$def_libpostproc
|
||||
$def_libavdevice
|
||||
$def_libavfilter
|
||||
$def_vf_lavfi
|
||||
$def_af_lavfi
|
||||
|
||||
$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-$(WAYLAND) += video/out/vo_wayland.c video/out/wayland_common.c
|
||||
|
||||
SOURCES-$(VF_LAVFI) += video/filter/vf_lavfi.c
|
||||
SOURCES-$(AF_LAVFI) += audio/filter/af_lavfi.c
|
||||
SOURCES-$(LIBAVFILTER) += video/filter/vf_lavfi.c \
|
||||
audio/filter/af_lavfi.c
|
||||
|
||||
SOURCES-$(LUA) += player/lua.c
|
||||
|
||||
|
@ -56,7 +56,7 @@ bool mp_parse_cfgfiles(struct MPContext *mpctx)
|
||||
char *conffile;
|
||||
|
||||
// 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");
|
||||
if (conffile && mp_path_exists(conffile))
|
||||
m_config_parse_config_file(mpctx->mconfig, conffile, 0);
|
||||
|
@ -84,7 +84,7 @@ static const vf_info_t *const filter_list[] = {
|
||||
#if HAVE_LIBPOSTPROC
|
||||
&vf_info_pp,
|
||||
#endif
|
||||
#if HAVE_VF_LAVFI
|
||||
#if HAVE_LIBAVFILTER
|
||||
&vf_info_lavfi,
|
||||
#endif
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
struct vf_lw_opts;
|
||||
|
||||
#if HAVE_VF_LAVFI
|
||||
#if HAVE_LIBAVFILTER
|
||||
|
||||
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',
|
||||
'desc': 'libavfilter',
|
||||
'func': compose_checks(
|
||||
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
|
||||
'func': check_pkg_config('libavfilter', '>= 3.90.100'),
|
||||
}, {
|
||||
'name': '--libavdevice',
|
||||
'desc': 'libavdevice',
|
||||
|
@ -115,7 +115,7 @@ def build(ctx):
|
||||
( "audio/filter/af_karaoke.c" ),
|
||||
( "audio/filter/af_ladspa.c", "ladspa" ),
|
||||
( "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_pan.c" ),
|
||||
( "audio/filter/af_scaletempo.c" ),
|
||||
@ -306,7 +306,7 @@ def build(ctx):
|
||||
( "video/filter/vf_gradfun.c" ),
|
||||
( "video/filter/vf_hqdn3d.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_noformat.c" ),
|
||||
( "video/filter/vf_noise.c" ),
|
||||
|
Loading…
Reference in New Issue
Block a user