2020-02-03 15:06:46 +00:00
|
|
|
v4l2codecs_sources = [
|
|
|
|
'plugin.c',
|
2020-02-13 04:45:14 +00:00
|
|
|
'gstv4l2codecallocator.c',
|
2020-02-04 20:52:45 +00:00
|
|
|
'gstv4l2codecdevice.c',
|
2020-02-09 16:31:11 +00:00
|
|
|
'gstv4l2codech264dec.c',
|
2022-07-12 12:56:07 +00:00
|
|
|
'gstv4l2codech265dec.c',
|
2021-04-06 19:40:28 +00:00
|
|
|
'gstv4l2codecmpeg2dec.c',
|
2020-02-13 04:45:14 +00:00
|
|
|
'gstv4l2codecpool.c',
|
2020-04-28 00:26:54 +00:00
|
|
|
'gstv4l2codecvp8dec.c',
|
2021-03-30 16:30:46 +00:00
|
|
|
'gstv4l2codecvp9dec.c',
|
2020-02-06 02:42:56 +00:00
|
|
|
'gstv4l2decoder.c',
|
2020-02-10 23:02:37 +00:00
|
|
|
'gstv4l2format.c',
|
2021-05-22 19:29:09 +00:00
|
|
|
'gstv4l2codecalphadecodebin.c',
|
2020-02-03 15:06:46 +00:00
|
|
|
]
|
|
|
|
|
2023-04-18 19:28:30 +00:00
|
|
|
libgudev_dep = dependency('gudev-1.0', required: get_option('v4l2codecs'), allow_fallback: true)
|
2020-02-04 20:52:45 +00:00
|
|
|
|
2020-03-26 19:57:17 +00:00
|
|
|
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
|
2020-05-10 09:38:11 +00:00
|
|
|
|
|
|
|
# Find makedev in various header files. Different operating systems put the
|
|
|
|
# macro in different header files.
|
|
|
|
foreach name: ['mkdev', 'sysmacros', 'types']
|
|
|
|
have_makedev = cc.has_header_symbol('sys/@0@.h'.format(name), 'makedev')
|
|
|
|
cdata.set10('HAVE_MAKEDEV_IN_' + name.to_upper(), have_makedev)
|
|
|
|
endforeach
|
2020-03-26 19:57:17 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
if have_v4l2 and libgudev_dep.found()
|
2020-02-04 20:52:45 +00:00
|
|
|
gstv4l2codecs = library('gstv4l2codecs',
|
|
|
|
v4l2codecs_sources,
|
|
|
|
c_args : gst_plugins_bad_args,
|
|
|
|
cpp_args: gst_plugins_bad_args,
|
|
|
|
include_directories : [configinc],
|
2021-05-22 19:29:09 +00:00
|
|
|
dependencies : [gstbase_dep, gstcodecs_dep, gstallocators_dep, libgudev_dep,
|
|
|
|
gstpbutils_dep,],
|
2020-02-04 20:52:45 +00:00
|
|
|
install : true,
|
|
|
|
install_dir : plugins_install_dir,
|
|
|
|
)
|
|
|
|
plugins += [gstv4l2codecs]
|
|
|
|
endif
|