build: make libavfilter mandatory

The complex filter support that will be added makes much more complex
use of libavfilter, and I'm not going to bother with adding hacks to
keep libavfilter optional.
This commit is contained in:
wm4 2016-02-05 23:17:33 +01:00
parent 8af70561a4
commit 45345d9c41
5 changed files with 12 additions and 22 deletions

View File

@ -59,9 +59,7 @@ static const struct af_info *const filter_list[] = {
&af_info_rubberband, &af_info_rubberband,
#endif #endif
&af_info_scaletempo, &af_info_scaletempo,
#if HAVE_LIBAVFILTER
&af_info_lavfi, &af_info_lavfi,
#endif
NULL NULL
}; };

View File

@ -36,15 +36,12 @@
#include <libavcodec/avcodec.h> #include <libavcodec/avcodec.h>
#include <libavformat/avformat.h> #include <libavformat/avformat.h>
#include <libswscale/swscale.h> #include <libswscale/swscale.h>
#include <libavfilter/avfilter.h>
#if HAVE_LIBAVDEVICE #if HAVE_LIBAVDEVICE
#include <libavdevice/avdevice.h> #include <libavdevice/avdevice.h>
#endif #endif
#if HAVE_LIBAVFILTER
#include <libavfilter/avfilter.h>
#endif
#if HAVE_LIBAVRESAMPLE #if HAVE_LIBAVRESAMPLE
#include <libavresample/avresample.h> #include <libavresample/avresample.h>
#endif #endif
@ -161,10 +158,8 @@ void init_libav(struct mpv_global *global)
avcodec_register_all(); avcodec_register_all();
av_register_all(); av_register_all();
avformat_network_init(); avformat_network_init();
#if HAVE_LIBAVFILTER
avfilter_register_all(); avfilter_register_all();
#endif
#if HAVE_LIBAVDEVICE #if HAVE_LIBAVDEVICE
avdevice_register_all(); avdevice_register_all();
#endif #endif
@ -196,9 +191,7 @@ void print_libav_versions(struct mp_log *log, int v)
{"libavcodec", LIBAVCODEC_VERSION_INT, avcodec_version()}, {"libavcodec", LIBAVCODEC_VERSION_INT, avcodec_version()},
{"libavformat", LIBAVFORMAT_VERSION_INT, avformat_version()}, {"libavformat", LIBAVFORMAT_VERSION_INT, avformat_version()},
{"libswscale", LIBSWSCALE_VERSION_INT, swscale_version()}, {"libswscale", LIBSWSCALE_VERSION_INT, swscale_version()},
#if HAVE_LIBAVFILTER
{"libavfilter", LIBAVFILTER_VERSION_INT, avfilter_version()}, {"libavfilter", LIBAVFILTER_VERSION_INT, avfilter_version()},
#endif
#if HAVE_LIBAVRESAMPLE #if HAVE_LIBAVRESAMPLE
{"libavresample", LIBAVRESAMPLE_VERSION_INT, avresample_version()}, {"libavresample", LIBAVRESAMPLE_VERSION_INT, avresample_version()},
#endif #endif

View File

@ -71,7 +71,6 @@ static const vf_info_t *const filter_list[] = {
&vf_info_noformat, &vf_info_noformat,
&vf_info_flip, &vf_info_flip,
#if HAVE_LIBAVFILTER
&vf_info_mirror, &vf_info_mirror,
&vf_info_lavfi, &vf_info_lavfi,
&vf_info_rotate, &vf_info_rotate,
@ -79,7 +78,6 @@ static const vf_info_t *const filter_list[] = {
&vf_info_pullup, &vf_info_pullup,
&vf_info_yadif, &vf_info_yadif,
&vf_info_stereo3d, &vf_info_stereo3d,
#endif
&vf_info_eq, &vf_info_eq,
&vf_info_dsize, &vf_info_dsize,

View File

@ -422,9 +422,10 @@ FFmpeg/Libav libraries. You need at least {0}. Aborting.".format(libav_versions_
'req': True, 'req': True,
'fmsg': 'No resampler found. Install libavresample or libswresample (FFmpeg).' 'fmsg': 'No resampler found. Install libavresample or libswresample (FFmpeg).'
}, { }, {
'name': '--libavfilter', 'name': 'libavfilter',
'desc': 'libavfilter', 'desc': 'libavfilter',
'func': check_pkg_config('libavfilter', '>= 5.0.0'), 'func': check_pkg_config('libavfilter', '>= 5.0.0'),
'req': True,
}, { }, {
'name': '--libavdevice', 'name': '--libavdevice',
'desc': 'libavdevice', 'desc': 'libavdevice',

View File

@ -120,7 +120,7 @@ def build(ctx):
( "audio/filter/af_equalizer.c" ), ( "audio/filter/af_equalizer.c" ),
( "audio/filter/af_format.c" ), ( "audio/filter/af_format.c" ),
( "audio/filter/af_lavcac3enc.c" ), ( "audio/filter/af_lavcac3enc.c" ),
( "audio/filter/af_lavfi.c", "libavfilter" ), ( "audio/filter/af_lavfi.c" ),
( "audio/filter/af_lavrresample.c" ), ( "audio/filter/af_lavrresample.c" ),
( "audio/filter/af_pan.c" ), ( "audio/filter/af_pan.c" ),
( "audio/filter/af_rubberband.c", "rubberband" ), ( "audio/filter/af_rubberband.c", "rubberband" ),
@ -298,20 +298,20 @@ def build(ctx):
( "video/filter/vf_expand.c" ), ( "video/filter/vf_expand.c" ),
( "video/filter/vf_flip.c" ), ( "video/filter/vf_flip.c" ),
( "video/filter/vf_format.c" ), ( "video/filter/vf_format.c" ),
( "video/filter/vf_gradfun.c", "libavfilter"), ( "video/filter/vf_gradfun.c" ),
( "video/filter/vf_lavfi.c", "libavfilter"), ( "video/filter/vf_lavfi.c" ),
( "video/filter/vf_mirror.c", "libavfilter"), ( "video/filter/vf_mirror.c" ),
( "video/filter/vf_noformat.c" ), ( "video/filter/vf_noformat.c" ),
( "video/filter/vf_pullup.c", "libavfilter"), ( "video/filter/vf_pullup.c" ),
( "video/filter/vf_rotate.c", "libavfilter"), ( "video/filter/vf_rotate.c" ),
( "video/filter/vf_scale.c" ), ( "video/filter/vf_scale.c" ),
( "video/filter/vf_stereo3d.c", "libavfilter"), ( "video/filter/vf_stereo3d.c" ),
( "video/filter/vf_sub.c" ), ( "video/filter/vf_sub.c" ),
( "video/filter/vf_vapoursynth.c", "vapoursynth-core" ), ( "video/filter/vf_vapoursynth.c", "vapoursynth-core" ),
( "video/filter/vf_vavpp.c", "vaapi"), ( "video/filter/vf_vavpp.c", "vaapi"),
( "video/filter/vf_vdpaupp.c", "vdpau" ), ( "video/filter/vf_vdpaupp.c", "vdpau" ),
( "video/filter/vf_vdpaurb.c", "vdpau" ), ( "video/filter/vf_vdpaurb.c", "vdpau" ),
( "video/filter/vf_yadif.c", "libavfilter"), ( "video/filter/vf_yadif.c" ),
( "video/out/aspect.c" ), ( "video/out/aspect.c" ),
( "video/out/bitmap_packer.c" ), ( "video/out/bitmap_packer.c" ),
( "video/out/cocoa/video_view.m", "cocoa" ), ( "video/out/cocoa/video_view.m", "cocoa" ),