[vlc-devel] [PATCH] Check libavcodec and libavutil for existence of

Maarten Vergouwe mvergouwe at telenet.be
Tue Apr 2 15:52:01 CEST 2013


If two different packages provide the same library but with a different
versioning, you're screwed with pkg-config. I wasn't part of any debate,
but checking against a version number is downright stupid.
If you want to stay with version checking, you need to at least communicate
to the user which version of ffmpeg you need or which version of libav.


2013/4/2 <mvergouwe at telenet.be>

>  struct and function when enabling vdpau
> X-PHP-Originating-Script: 0:func.inc
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
> Date: Tue, 02 Apr 2013 11:38:01 +0200
> From: =?UTF-8?Q?R=C3=A9mi_Denis-Courmont?= <remi at remlab.net>
> Cc: Maarten Vergouwe <mvergouwe at telenet.be>
> In-Reply-To: <1364894766-31238-1-git-send-email-mvergouwe at telenet.be>
> References: <1364894766-31238-1-git-send-email-mvergouwe at telenet.be>
> Message-ID: <db0c673bcae63859543145b7a00f1b65 at chewa.net>
> X-Sender: remi at remlab.net
> User-Agent: RoundCube Webmail/0.3.1
>
> On Tue, 2 Apr 2013 11:26:06 +0200, Maarten Vergouwe <mvergouwe at telenet.be>
>
> wrote:
>
> > ---
>
> >  configure.ac | 17 ++++++++++-------
>
> >  1 file changed, 10 insertions(+), 7 deletions(-)
>
> >
>
> > diff --git a/configure.ac b/configure.ac
>
> > index 6b44139..4d0841d 100644
>
> > --- a/configure.ac
>
> > +++ b/configure.ac
>
> > @@ -3037,16 +3037,19 @@ dnl AM_CONDITIONAL([HAVE_VDPAU], [test
>
> > "${have_vdpau}" = "yes"])
>
> >
>
> >  have_avcodec_vdpau="no"
>
> >  AS_IF([test "${have_vdpau}" = "yes"], [
>
> > -  PKG_CHECK_EXISTS([libavutil >= 0.52.4 libavcodec >= 54.36.0], [
>
> > -    have_avcodec_vdpau="yes"
>
>
>
> This is correct and consistent with upstream's doc/APIchanges.
>
>
>
> If this check fails, your upstream version is broken. Not a VLC bug.
>
>
>
> > +  AC_CHECK_DECL(av_freep, [
>
> > +    AC_CHECK_MEMBER( [struct AVVDPAUContext.decoder], [
>
> > have_avcodec_vdpau="yes" ], [], [[#include <libavcodec/vdpau.h>]])
>
> > +    ], [], [[#include <libavutil/mem.h>]])
>
> > +])
>
>
>
> No thank you. I wrote and effectively maintain the vdpau plumbing and I
>
> refuse to have such horrible stuff when pkg-config is superior and easier.
>
> The libav/ffmpeg version bugs discussion has already been had and I am not
>
> aware of any upstream change that would grant reopening the debate.
>
>
>
> > +
>
> > +AS_IF([test "${have_avcodec_vdpau}" = "no"], [
>
> > +  AS_IF([test -n "${enable_vdpau}"], [
>
> > +    AC_MSG_ERROR([libavutil >= 0.52.4 (with av_freep) and libavcodec >=
>
> > 54.87.0 (with struct AVVDPAUContext) are required for VDPAU decoding.])
>
>
>
> This is worse than the previous message and also incorrect/inconsistent.
>
>
>
> >    ], [
>
> > -    AS_IF([test -n "${enable_vdpau}"], [
>
> > -      AC_MSG_ERROR([libavutil >= 0.52.4 and libavcodec >= 54.36.0 are
>
> > required for VDPAU decoding.])
>
> > -    ], [
>
> > -      AC_MSG_WARN([libavutil >= 0.52.4 and libavcodec >= 54.36.0 are
>
> > required for VDPAU decoding.])
>
> > -    ])
>
> > +    AC_MSG_WARN([libavutil >= 0.52.4 (with av_freep) and libavcodec >=
>
> > 54.87.0 (with struct AVVDPAUContext) are required for VDPAU decoding.])
>
>
>
> And this is wrong too.
>
>
>
> >    ])
>
> >  ])
>
> > +
>
> >  AM_CONDITIONAL([HAVE_AVCODEC_VDPAU], [test "${have_avcodec_vdpau}" =
>
> >  "yes"])
>
>
>
> --
>
> Rémi Denis-Courmont
>
> Sent from my collocated server
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20130402/9cb527b9/attachment.html>


More information about the vlc-devel mailing list