[FFmpeg-devel] libavfilter: vid.stab filters patch for 0.98 version -> configure version check added

Clément Bœsch u at pkh.me
Tue Jan 14 16:53:06 CET 2014


On Tue, Jan 14, 2014 at 12:09:31PM +0100, Stefano Sabatini wrote:
> On date Monday 2014-01-13 21:58:48 +0100, Georg Martius encoded:
> > Hi,
> > > > 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?)
> > 0.96. There was no official 0.97 release
> > 
> > > > > Thank you.
> > > > > -roger-
> > > > > _______________________________________________
> > > > > ffmpeg-devel mailing list
> > > > > ffmpeg-devel at ffmpeg.org
> > > > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > > > 
> > > > 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 "$@" &&
> 
> > Yes looks good to me. Can you now apply my patch for the filters that one can 
> > compile with the newest vid.stab version?
> > Yes and please add the comment:
> > Fixes ticket #3296
> 
> Check patch in attachment, tested and works here, depends on filter
> code patch.
> -- 
> FFmpeg = Fierce & Faithful Mortal Political Erudite Guru

> From 61f6528ff5446455ee0d47a8a43df5bcbb8c5200 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: add version check for pkg libraries, and use it
>  for vidstab
> 
> Also fix trac ticket #3296.
> 
> Signed-off-by: Georg Martius <martius at mis.mpg.de>
> Signed-off-by: Stefano Sabatini <stefasab at gmail.com>
> ---
>  configure | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/configure b/configure
> index 8d4833e..bff28e0 100755
> --- a/configure
> +++ b/configure
> @@ -1032,11 +1032,12 @@ check_lib_cpp(){
>  
>  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 "$@" &&
> @@ -4451,7 +4452,7 @@ 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 >= 0.98" vid.stab/libvidstab.h vsMotionDetectInit; }

I guess you can remove the { }

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140114/c35f0497/attachment.asc>


More information about the ffmpeg-devel mailing list