diff options
author | wm4 <wm4@nowhere> | 2013-03-11 00:16:34 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-04-21 04:39:58 +0200 |
commit | 79797181598facbdb055e16fc7c13abbb1aa7db9 (patch) | |
tree | 037e17871dcf2dacb651f9dfead4bcc79b74e5f2 /configure | |
parent | 778e9c06336e77909a2e2bc87aec85dc8cb08811 (diff) | |
download | mpv-79797181598facbdb055e16fc7c13abbb1aa7db9.tar.bz2 mpv-79797181598facbdb055e16fc7c13abbb1aa7db9.tar.xz |
vf_lavfi: add libavfilter bridge
Requires recent FFmpeg/Libav git versions. Earlier versions will not
be supported, as the API is different. (A libavfilter version that
uses AVFrame instead of AVFilterBuffer is needed.)
Note that this is sort of useless, because the option parser prevents
you from making use of the full libavfilter graph syntax. This has to be
fixed later.
Most of the filter creation code (half of the config() function) has
been taken from avplay.c.
This code is not based on MPlayer's vf_lavfi. The MPlayer code doesn't
compile as it hasn't been updated through multiple libavfilter API
changes, making it completely useless as a starting point.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 49 |
1 files changed, 44 insertions, 5 deletions
@@ -328,8 +328,9 @@ Optional features: --disable-libass-osd disable OSD rendering with libass [autodetect] --enable-rpath enable runtime linker path for extra libs [disabled] --disable-libpostproc disable postprocess filter (vf_pp) [autodetect] - --enable-libavdevice enable libavdevice demuxers [disabled] - --enable-libavfilter enable libavfilter [disabled] [unused] + --disable-libavdevice enable libavdevice demuxers [autodetect] + --disable-libavfilter enable libavfilter [autodetect] + --disable-vf-lavfi enable vf_lavfi libavfilter bridge [audodetect] Codecs: --enable-mng enable MNG input support [autodetect] @@ -487,7 +488,8 @@ _ass=auto _libass_osd=auto _rpath=no libpostproc=auto -libavfilter=no +libavfilter=auto +vf_lavfi=auto libavdevice=no _stream_cache=yes _priority=no @@ -702,6 +704,8 @@ 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-enca) _enca=yes ;; --disable-enca) _enca=no ;; @@ -2694,11 +2698,25 @@ fi echores "$_avutil_has_refcounting" -echocheck "libavfilter >= 3.17.0" +# 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 - if pkg_config_add "libavfilter >= 3.17.0" ; 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 + else + res_comment="not found or broken" fi fi if test "$libavfilter" = yes ; then @@ -2709,6 +2727,25 @@ fi echores "$libavfilter" +echocheck "using libavfilter through vf_lavfi" +if test "$vf_lavfi" = auto ; then + vf_lavfi=no + if test "$libavfilter" = yes ; then + if test "$_avutil_has_refcounting" = no ; then + res_comment="libavutil too old" + else + vf_lavfi=yes + fi + fi +fi +if test "$vf_lavfi" = yes ; then + def_vf_lavfi='#define CONFIG_VF_LAVFI 1' +else + def_vf_lavfi='#undef CONFIG_VF_LAVFI' +fi +echores "$vf_lavfi" + + echocheck "libavdevice >= 54.0.0" if test "$libavdevice" = auto ; then libavdevice=no @@ -3044,6 +3081,7 @@ LCMS2 = $_lcms2 LIBPOSTPROC = $libpostproc LIBAVDEVICE = $libavdevice LIBAVFILTER = $libavfilter +VF_LAVFI = $vf_lavfi LIBSMBCLIENT = $_smb LIBQUVI = $_libquvi LIBTHEORA = $_theora @@ -3200,6 +3238,7 @@ $def_avutil_has_qp_api $def_libpostproc $def_libavdevice $def_libavfilter +$def_vf_lavfi /* Audio output drivers */ |