[vlc-devel] [PATCH] Check libavcodec and libavutil for existence of struct and function when enabling vdpau
Rémi Denis-Courmont
remi at remlab.net
Tue Apr 2 11:38:01 CEST 2013
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
More information about the vlc-devel
mailing list