gstreamer/sys/v4l2codecs/meson.build
Nicolas Dufresne bf9f82c8c3 v4l2codecs: Factor out plugin registration
This introduce a common place for generic functions and factor out the plugin
registration code. This code is nearly identical between implementation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1216>
2020-04-28 22:53:11 +00:00

39 lines
1.1 KiB
Meson

v4l2codecs_sources = [
'plugin.c',
'gstv4l2codecallocator.c',
'gstv4l2codecdevice.c',
'gstv4l2codech264dec.c',
'gstv4l2codecpool.c',
'gstv4l2codecvp8dec.c',
'gstv4l2decoder.c',
'gstv4l2format.c',
]
libgudev_dep = dependency('gudev-1.0', required: get_option('v4l2codecs'))
if get_option('v4l2codecs').disabled()
have_v4l2 = false
message('V4L2 CODECs plugin is disabled')
else
# Should only be built on Linux, check for Linux kernel headers even though
# we have our own copy.
have_v4l2 = cc.has_header('linux/videodev2.h')
if get_option('v4l2codecs').enabled() and not have_v4l2
error('V4L2i CODECs is requested but kernel headers were not found')
endif
endif
if have_v4l2 and libgudev_dep.found()
gstv4l2codecs = library('gstv4l2codecs',
v4l2codecs_sources,
c_args : gst_plugins_bad_args,
cpp_args: gst_plugins_bad_args,
include_directories : [configinc],
dependencies : [gstbase_dep, gstcodecs_dep, gstallocators_dep, libgudev_dep],
install : true,
install_dir : plugins_install_dir,
)
pkgconfig.generate(gstv4l2codecs, install_dir : plugins_pkgconfig_install_dir)
plugins += [gstv4l2codecs]
endif