mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 00:06:36 +00:00
build: check for libva-2.0
Check for libva-2.0 since libva's developers decided to increase the library's version number. https://bugzilla.gnome.org/show_bug.cgi?id=784398
This commit is contained in:
parent
d8de185355
commit
8f2eb70803
3 changed files with 43 additions and 10 deletions
25
configure.ac
25
configure.ac
|
@ -120,6 +120,11 @@ AG_GST_SET_PACKAGE_RELEASE_DATETIME_WITH_NANO([$PACKAGE_VERSION_NANO],
|
|||
["${srcdir}/gstreamer-vaapi.doap"],
|
||||
[$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_MICRO])
|
||||
|
||||
AC_ARG_WITH([libva],
|
||||
[AS_HELP_STRING([--with-libva[[=VERSION]]],
|
||||
[which version of libva use (1 or 2) @<:@default=check@:>@])],
|
||||
[], [with_libva="check"])
|
||||
|
||||
AC_ARG_ENABLE([encoders],
|
||||
AS_HELP_STRING([--enable-encoders],
|
||||
[enable video encoders @<:@default=yes@:>@]),
|
||||
|
@ -505,15 +510,23 @@ dnl -- VA-API --
|
|||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
dnl Core API
|
||||
PKG_CHECK_MODULES([LIBVA], [libva >= $VAAPI_REQ libva != 0.99.0])
|
||||
VA_VERSION_STR=`$PKG_CONFIG --modversion libva`
|
||||
VA_DRIVERS_PATH=`$PKG_CONFIG --variable=driverdir libva`
|
||||
LIBVA_VERSION=
|
||||
AS_CASE([$with_libva],
|
||||
[2], [PKG_CHECK_MODULES([LIBVA], [libva-2.0 >= 1.0.0],
|
||||
[LIBVA_VERSION="-2.0"])],
|
||||
[1], [PKG_CHECK_MODULES([LIBVA], [libva >= $VAAPI_REQ libva != 0.99.0])],
|
||||
[PKG_CHECK_MODULES([LIBVA], [libva-2.0 >= 1.0.0],
|
||||
[LIBVA_VERSION="-2.0"],
|
||||
[PKG_CHECK_MODULES([LIBVA], [libva >= $VAAPI_REQ libva != 0.99.0])])])
|
||||
|
||||
VA_VERSION_STR=`$PKG_CONFIG --modversion libva$LIBVA_VERSION`
|
||||
VA_DRIVERS_PATH=`$PKG_CONFIG --variable=driverdir libva$LIBVA_VERSION`
|
||||
AC_DEFINE_UNQUOTED([VA_DRIVERS_PATH], ["$VA_DRIVERS_PATH"],
|
||||
[VA drivers path])
|
||||
|
||||
dnl VA/DRM API
|
||||
if test $USE_DRM -eq 1; then
|
||||
PKG_CHECK_MODULES([LIBVA_DRM], [libva-drm >= $VAAPI_DRM_REQ],
|
||||
PKG_CHECK_MODULES([LIBVA_DRM], [libva-drm$LIBVA_VERSION >= $VAAPI_DRM_REQ],
|
||||
[
|
||||
saved_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $LIBVA_DRM_CFLAGS"
|
||||
|
@ -524,7 +537,7 @@ fi
|
|||
|
||||
dnl VA/X11 API
|
||||
if test $USE_X11 -eq 1; then
|
||||
PKG_CHECK_MODULES(LIBVA_X11, [libva-x11 >= $VAAPI_X11_REQ],
|
||||
PKG_CHECK_MODULES(LIBVA_X11, [libva-x11$LIBVA_VERSION >= $VAAPI_X11_REQ],
|
||||
[], [USE_X11=0])
|
||||
fi
|
||||
|
||||
|
@ -884,7 +897,7 @@ fi
|
|||
|
||||
dnl VA/Wayland API
|
||||
if test $USE_WAYLAND -eq 1; then
|
||||
PKG_CHECK_MODULES([LIBVA_WAYLAND], [libva-wayland >= $VAAPI_WLD_REQ],
|
||||
PKG_CHECK_MODULES([LIBVA_WAYLAND], [libva-wayland$LIBVA_VERSION >= $VAAPI_WLD_REQ],
|
||||
[], [USE_WAYLAND=0])
|
||||
fi
|
||||
|
||||
|
|
27
meson.build
27
meson.build
|
@ -38,11 +38,30 @@ gstcodecparsers_dep = dependency('gstreamer-codecparsers-1.0', version : gst_req
|
|||
gstgl_dep = dependency('gstreamer-gl-1.0', version : gst_req,
|
||||
fallback : ['gst-plugins-bad', 'gstgl_dep'], required: false)
|
||||
gmodule_dep = dependency('gmodule-2.0', required: false)
|
||||
libva_dep = dependency('libva', version: libva_req)
|
||||
|
||||
libva_drm_dep = dependency('libva-drm', version: '>= 0.33.0', required: false)
|
||||
libva_wayland_dep = dependency('libva-wayland', version: '>= 0.33.0', required: false)
|
||||
libva_x11_dep = dependency('libva-x11', version: '>= 0.31.0', required: false)
|
||||
libva_version = ''
|
||||
if get_option('with_libva') == 'auto'
|
||||
libva_dep = dependency('libva-2.0', required : false)
|
||||
if not libva_dep.found()
|
||||
libva_dep = dependency('libva', version: libva_req)
|
||||
else
|
||||
libva_version = '-2.0'
|
||||
endif
|
||||
else
|
||||
if get_option('with_libva') == '2'
|
||||
libva_dep = dependency('libva-2.0')
|
||||
libva_version = '-2.0'
|
||||
else
|
||||
libva_dep = dependency('libva', version: libva_req)
|
||||
endif
|
||||
endif
|
||||
|
||||
libva_drm_dep = dependency('libva-drm' + libva_version, version: '>= 0.33.0',
|
||||
required: false)
|
||||
libva_wayland_dep = dependency('libva-wayland' + libva_version,
|
||||
version: '>= 0.33.0', required: false)
|
||||
libva_x11_dep = dependency('libva-x11' + libva_version, version: '>= 0.31.0',
|
||||
required: false)
|
||||
libdrm_dep = dependency('libdrm', required: false)
|
||||
libudev_dep = dependency('libudev', required: false)
|
||||
egl_dep = dependency('egl', required: false)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
option('with_libva', type : 'combo', choices : ['1', '2', 'auto'], value : 'auto')
|
||||
option('with_encoders', type : 'combo', choices : ['yes', 'no', 'auto'], value : 'auto')
|
||||
option('with_drm', type : 'combo', choices : ['yes', 'no', 'auto'], value : 'auto')
|
||||
option('with_x11', type : 'combo', choices : ['yes', 'no', 'auto'], value : 'auto')
|
||||
|
|
Loading…
Reference in a new issue