va: Remove libgudev crumbs in library.

In commit e699aaeb we moved linking of libgudev to the plugin rather
the library, because it's only used in the plugin. But the dependency
check is still done in library.

This patch removes the dependency check in library, and updates the
dependency check in plugin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1650>
This commit is contained in:
Víctor Manuel Jáquez Leal 2022-02-07 11:27:57 +01:00 committed by GStreamer Marge Bot
parent 6676b1e75c
commit 5e4c152de4
2 changed files with 2 additions and 12 deletions

View file

@ -26,7 +26,6 @@ libva_req = ['>= 1.6']
libva_dep = dependency('libva', version: libva_req, required: va_option) libva_dep = dependency('libva', version: libva_req, required: va_option)
libva_drm_dep = dependency('libva-drm', version: libva_req, required: va_option) libva_drm_dep = dependency('libva-drm', version: libva_req, required: va_option)
libgudev_dep = dependency('gudev-1.0', required: va_option)
libdrm_dep = dependency('libdrm', required: false, fallback: ['libdrm', 'ext_libdrm']) libdrm_dep = dependency('libdrm', required: false, fallback: ['libdrm', 'ext_libdrm'])
if not (libva_dep.found() and libva_drm_dep.found()) if not (libva_dep.found() and libva_drm_dep.found())

View file

@ -22,26 +22,17 @@ va_sources = [
'vasurfaceimage.c', 'vasurfaceimage.c',
] ]
va_option = get_option('va') if not gstva_dep.found()
if va_option.disabled() or host_system != 'linux'
subdir_done() subdir_done()
endif endif
libgudev_dep = dependency('gudev-1.0', required: false) libgudev_dep = dependency('gudev-1.0', required: false)
cdata.set10('HAVE_GUDEV', libgudev_dep.found())
if not gstva_dep.found() or not libgudev_dep.found()
if va_option.enabled()
error('The va plugin was enabled explicity, but required dependencies were not found.')
endif
subdir_done()
endif
if libva_dep.version().version_compare('>= 1.8') if libva_dep.version().version_compare('>= 1.8')
va_sources += 'gstvaav1dec.c' va_sources += 'gstvaav1dec.c'
endif endif
cdata.set10('HAVE_GUDEV', libgudev_dep.found())
driverdir = libva_dep.get_variable('driverdir', default_value: '') driverdir = libva_dep.get_variable('driverdir', default_value: '')
if driverdir == '' if driverdir == ''
driverdir = join_paths(get_option('prefix'), get_option('libdir'), 'dri') driverdir = join_paths(get_option('prefix'), get_option('libdir'), 'dri')