gstreamer/sys/va/meson.build
Víctor Manuel Jáquez Leal 79d11c2022 va: VA-API H.264 decoder and infrastructure
New plugin with an element for H.264 decoding with VA-API. This novel
approach, different from gstreamer-vaapi, uses gstcodecs library for
state handling.

The code is expected to looks cleaner because it uses VA-API without
further layers or wrappers.

* It uses the first supported DRM device as default VA display (other
  displays will be supported through user's GstContext)
* Requires libva >= 1.6
* No multiview/stereo profiles neither interlaced streams because
  gstcodecs doesn't handle them yet
* It is incompatible with gstreamer-vaapi
* Even if memory:VAMemory is exposed, it is not handled yet by any
  other element
* Caps templates are generated dynamically querying VAAPI, but YV12
  and I420 are added for system memory caps because they seem to be
  supported for all the drivers when downloading frames onto main
  memory, as they are used by xvimagesink and others, avoiding color
  conversion.
* Surfaces aren't bounded to context, so they can grow beyond the DBP
  size, allowing smooth reverse playback.
* There isn't yet error handling and recovery.
* 10-bit H.264 streams aren't supported by libva.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1379>
2020-06-28 11:47:35 +02:00

54 lines
1.6 KiB
Meson

va_sources = [
'plugin.c',
'gstvaallocator.c',
'gstvacaps.c',
'gstvadecoder.c',
'gstvadisplay.c',
'gstvadisplay_drm.c',
'gstvadisplay_wrapped.c',
'gstvadevice.c',
'gstvah264dec.c',
'gstvapool.c',
'gstvaprofile.c',
'gstvavideoformat.c',
]
va_option = get_option('va')
if va_option.disabled()
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'])
have_va = libva_dep.found() and libva_drm_dep.found()
if not (have_va and libgudev_dep.found())
if va_option.enabled()
error('The va plugin was enabled explicity, but required dependencies were not found.')
endif
subdir_done()
endif
cdata.set10('HAVE_LIBDRM', libdrm_dep.found())
driverdir = libva_dep.get_pkgconfig_variable('driverdir')
if driverdir == ''
driverdir = join_paths(get_option('prefix'), get_option('libdir'), 'dri')
endif
gstva_cargs = ['-DLIBVA_DRIVERS_PATH="' + driverdir + '"']
gstva = library('gstva',
va_sources,
c_args : gst_plugins_bad_args + extra_c_args + gstva_cargs + ['-std=c99'],
include_directories : [configinc],
dependencies : [gstbase_dep, gstvideo_dep, gstcodecs_dep, libva_dep, gstallocators_dep, libva_drm_dep, libgudev_dep, libdrm_dep] + extra_dep,
install : true,
install_dir : plugins_install_dir,
)
pkgconfig.generate(gstva, install_dir : plugins_pkgconfig_install_dir)
plugins += [gstva]