[FFmpeg-devel] libavfilter: vid.stab filters patch for 0.98 version -> configure version check added
Stefano Sabatini
stefasab at gmail.com
Sun Jan 12 09:23:10 CET 2014
On date Saturday 2014-01-11 23:00:43 +0100, Georg Martius encoded:
> Hi,
>
> as Stefano pointed out to me:
> > pkg-config --help
> > [...]
> > --atleast-version=VERSION return 0 if the module is at
> > least version VERSION --exact-version=VERSION return 0 if
> > the module is at exactly version VERSION --max-version=VERSION
> > return 0 if the module is at no newer than version VERSION
> >
> > Why don't you use one of these?
> Because I didn't know and didn't see it. Find the fixed patch attached.
>
> > Alternatively you could use check_cpp_version, see how it is done for
> > libx264.
> Yes, but in the library header does not have the version in an apporiate
> format yet -> will be fixed.
>
> Regards,
> Georg
>
> On Monday 06 January 2014 11:14:25 Roger Pack wrote:
> > On 1/4/14, Georg Martius <georg.martius at web.de> wrote:
> > > Hi all,
> > >
> > > please find attached the patch for vf_vidstab* in libavfilter to work with
> > > the
> > > newest version of the vid.stab library.
> >
> > What version is the current filter based off (also I failed to see a
> > git tag for 0.97?)
> > Thank you.
> > -roger-
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> --
> ---- Georg Martius, Tel: +49 177 6413311 -----
> --------- http://georg.hronopik.de -------------
> From c4979a263324f86bc83aa151347e3425b6790e1d Mon Sep 17 00:00:00 2001
> From: Georg Martius <martius at mis.mpg.de>
> Date: Thu, 9 Jan 2014 22:22:16 +0100
> Subject: [PATCH] configure: added version check for pkg libraries, used for
> vidstab
>
>
> Signed-off-by: Georg Martius <martius at mis.mpg.de>
> ---
> configure | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 101954e..4717811 100755
> --- a/configure
> +++ b/configure
> @@ -1006,6 +1006,14 @@ check_pkg_config(){
> set_safe ${pkg}_libs $pkg_libs
> }
>
> +check_pkg_version(){
> + log check_pkg_version "$@"
> + pkgandversion="$1"
> + shift 1
> + check_cmd $pkg_config --exists --print-errors $pkgandversion ||
> + die "ERROR: $pkgandversion failed (via pkg-config)"
> +}
> +
This is redundant with check_pkg_config()
What about changing check_pkg_config() like this:
check_pkg_config(){
log check_pkg_config "$@"
- pkg="$1"
+ pkgandversion="$1"
+ pkg="${1%% *}"
headers="$2"
funcs="$3"
shift 3
- check_cmd $pkg_config --exists --print-errors $pkg || return
+ check_cmd $pkg_config --exists --print-errors $pkgandversion || return
pkg_cflags=$($pkg_config --cflags $pkg)
pkg_libs=$($pkg_config --libs $pkg)
check_func_headers "$headers" "$funcs" $pkg_cflags $pkg_libs "$@" &&
> check_exec(){
> check_ld "cc" "$@" && { enabled cross_compile || $TMPE >> $logfile 2>&1; }
> }
> @@ -4270,7 +4278,8 @@ enabled libtwolame && require libtwolame twolame.h twolame_init -ltwolame
> die "ERROR: libtwolame must be installed and version must be >= 0.3.10"; }
> enabled libutvideo && require_cpp utvideo "stdint.h stdlib.h utvideo/utvideo.h utvideo/Codec.h" 'CCodec*' -lutvideo -lstdc++
> enabled libv4l2 && require_pkg_config libv4l2 libv4l2.h v4l2_ioctl
> -enabled libvidstab && require_pkg_config vidstab vid.stab/libvidstab.h vsMotionDetectInit
> +enabled libvidstab && { require_pkg_config vidstab vid.stab/libvidstab.h vsMotionDetectInit &&
> + check_pkg_version "vidstab >= 0.98"; }
Then this would be:
enabled libvidstab && { require_pkg_config "vidstab >= 0.98" vid.stab/libvidstab.h vsMotionDetectInit; }
--
FFmpeg = Fanciful Fascinating Mystic Pitiless Ecletic Gorilla
More information about the ffmpeg-devel
mailing list