Hi,
On Tue, 18 May 2010, Rob Savoye wrote:
On 05/18/2010 11:18 AM, Gwenole Beauchesne wrote:
IIRC, the exact date is 2010/01/18 with the commit of a patch to install
<libavcodec/vaapi.h>. i.e. you can check for that file, thus meaning
that the FFmpeg installation is VA-API capable.
Ah, I'll modify my version check. Currently I look for ffmpeg revno
52.45.0, and it it's newer than that, vaapi configure support is enabled
when using ffmpeg.
Here is a patch to properly check for VA-API support in FFmpeg.
Regards,
Gwenole.
From fcbbc86614c83ef1d6a455f6d51bf30eec908d4d Mon Sep 17 00:00:00 2001
From: Gwenole Beauchesne <[email protected]>
Date: Wed, 19 May 2010 07:29:24 +0000
Subject: [PATCH 2/2] Fix check for VA-API support in FFmpeg.
---
macros/ffmpeg.m4 | 40 +++++++++++++++-------------------------
1 files changed, 15 insertions(+), 25 deletions(-)
diff --git a/macros/ffmpeg.m4 b/macros/ffmpeg.m4
index 25f453a..f65e3c1 100644
--- a/macros/ffmpeg.m4
+++ b/macros/ffmpeg.m4
@@ -22,7 +22,6 @@ AC_DEFUN([GNASH_PATH_FFMPEG],
backupCFLAGS="$CFLAGS"
avcodec_h=""
ffmpeg_top_incl=""
- have_ffmpeg_vaapi="no"
dnl If the user specify an path to include headers from, we assume it's the full
dnl path to the header file, and not the top level path without the 'ffmpeg' node
@@ -222,20 +221,10 @@ AC_DEFUN([GNASH_PATH_FFMPEG],
dnl AC_EGREP_HEADER(avcodec_decode_audio2, ${avcodec_h}, [avfound=yes], [avfound=no])
- dnl This makes sure the version of ffmpeg is new enough to contain
- dnl the libva support.
- if test x"${enable_vaapi}" = x"yes"; then
- if test -z "$ffmpeg_num_version" -o "$ffmpeg_num_version" -lt 52480; then
- AC_MSG_WARN([Wrong ffmpeg/libavcodec version! 52.48.0 or greater required to use libVA, $ffmpeg_version detected.])
- else
- ffmpeg_version_check=ok
- fi
+ if test -z "$ffmpeg_num_version" -o "$ffmpeg_num_version" -lt 511100; then
+ AC_MSG_WARN([Wrong ffmpeg/libavcodec version! 51.11.0 or greater required, $ffmpeg_version detected.])
else
- if test -z "$ffmpeg_num_version" -o "$ffmpeg_num_version" -lt 511100; then
- AC_MSG_WARN([Wrong ffmpeg/libavcodec version! 51.11.0 or greater required, $ffmpeg_version detected.])
- else
- ffmpeg_version_check=ok
- fi
+ ffmpeg_version_check=ok
fi
if test ! -z "$ffmpeg_num_version" -a "$ffmpeg_num_version" -gt 512800; then
@@ -263,17 +252,6 @@ dnl AC_EGREP_HEADER(avcodec_decode_audio2, ${avcodec_h}, [avfound=yes], [avfou
else
AC_DEFINE(FFMPEG_NELLYMOSER, 1, [Define if ffmpeg can decode NELLYMOSER audio])
fi
- if test -z "$ffmpeg_num_version" -o "$ffmpeg_num_version" -gt 524800; then
- dnl 52.48.0 (r21285) or higher required for VAAPI support
- have_ffmpeg_vaapi=yes
- AC_DEFINE(FFMPEG_VAAPI, 1, [Define if ffmpeg supports VAAPI])
- else
- have_ffmpeg_vaapi=no
- fi
- if test -z "$ffmpeg_num_version" -o "$ffmpeg_num_version" -gt 52450; then
- dnl 52.45.0 (r20957) or higher required for VAAPI support
- AC_DEFINE(FFMPEG_VAAPI, 1, [Define if ffmpeg supports VAAPI.])
- fi
else
AC_MSG_WARN([Could not check ffmpeg version (can't find avcodec.h file)])
# ffmpeg_version_check=ok # this is NOT ok, why would it be ?!
@@ -311,6 +289,18 @@ dnl AC_EGREP_HEADER(avcodec_decode_audio2, ${avcodec_h}, [avfound=yes], [avfou
ffmpeg_version_check=
fi
+ AC_MSG_CHECKING([for libavcodec/vaapi.h])
+ have_ffmpeg_vaapi="no"
+ if test -f "${ffmpeg_top_incl}/ffmpeg/vaapi.h"; then
+ have_ffmpeg_vaapi="yes"
+ AC_DEFINE(HAVE_FFMPEG_VAAPI_H, 1, [Defined if ffmpeg/vaapi.h is found])
+ fi
+ if test -f "${ffmpeg_top_incl}/libavcodec/vaapi.h"; then
+ have_ffmpeg_vaapi="yes"
+ AC_DEFINE(HAVE_LIBAVCODEC_VAAPI_H, 1, [Defined if libavcodec/vaapi.h is found])
+ fi
+ AC_MSG_RESULT($have_ffmpeg_vaapi)
+
dnl ---------------------------------
dnl
dnl FFMPEG libs checking
--
1.7.0.4
_______________________________________________
Gnash-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-dev