2021-05-06 10:23:23 +00:00
|
|
|
va_sources = [
|
|
|
|
'gstvadisplay.c',
|
|
|
|
'gstvadisplay_drm.c',
|
|
|
|
'gstvadisplay_wrapped.c',
|
|
|
|
]
|
|
|
|
|
|
|
|
va_headers = [
|
|
|
|
'gstvadisplay.h',
|
|
|
|
'gstvadisplay_drm.h',
|
|
|
|
'gstvadisplay_wrapped.h',
|
|
|
|
'va_fwd.h',
|
|
|
|
'va-prelude.h',
|
|
|
|
]
|
|
|
|
|
|
|
|
gstva_dep = dependency('', required : false)
|
|
|
|
|
|
|
|
va_option = get_option('va')
|
|
|
|
if va_option.disabled() or host_system != 'linux'
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
|
|
|
libva_req = ['>= 1.6']
|
|
|
|
|
|
|
|
libva_dep = dependency('libva', 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'])
|
|
|
|
|
2021-10-03 13:45:58 +00:00
|
|
|
if not (libva_dep.found() and libva_drm_dep.found())
|
2021-05-06 10:23:23 +00:00
|
|
|
if va_option.enabled()
|
|
|
|
error('The va lib was enabled explicity, but required dependencies were not found.')
|
|
|
|
endif
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
2021-10-03 13:45:58 +00:00
|
|
|
cdata.set10('HAVE_LIBDRM', libdrm_dep.found())
|
2021-05-06 10:23:23 +00:00
|
|
|
|
|
|
|
gstva = library('gstva-' + api_version,
|
|
|
|
va_sources,
|
2021-10-01 14:31:18 +00:00
|
|
|
c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_VA', '-DG_LOG_DOMAIN="GStreamer-VA"'],
|
2021-05-06 10:23:23 +00:00
|
|
|
include_directories : [configinc, libsinc],
|
|
|
|
version : libversion,
|
|
|
|
soversion : soversion,
|
|
|
|
install : true,
|
2021-10-03 13:45:58 +00:00
|
|
|
dependencies : [gst_dep, libva_dep, libva_drm_dep, libdrm_dep],
|
2021-05-06 10:23:23 +00:00
|
|
|
)
|
|
|
|
|
2020-06-27 04:39:00 +00:00
|
|
|
pkg_name = 'gstreamer-va-1.0'
|
|
|
|
libraries += [[pkg_name, {'lib': gstva}]]
|
2021-05-06 10:23:23 +00:00
|
|
|
pkgconfig.generate(gstva,
|
|
|
|
libraries : gst_dep,
|
|
|
|
variables : pkgconfig_variables,
|
|
|
|
subdirs : pkgconfig_subdirs,
|
2020-06-27 04:39:00 +00:00
|
|
|
name : pkg_name,
|
2021-05-06 10:23:23 +00:00
|
|
|
description : 'GStreamer VA support',
|
|
|
|
)
|
|
|
|
|
|
|
|
gstva_dep = declare_dependency(link_with : gstva,
|
|
|
|
include_directories : [libsinc],
|
2021-10-03 13:45:58 +00:00
|
|
|
dependencies : [gst_dep, libva_dep, libva_drm_dep, libdrm_dep])
|
2020-06-27 04:39:00 +00:00
|
|
|
meson.override_dependency(pkg_name, gstva_dep)
|