1v4l2codecs_sources = [ 2 'plugin.c', 3 'gstv4l2codecallocator.c', 4 'gstv4l2codecdevice.c', 5 'gstv4l2codech264dec.c', 6 'gstv4l2codecmpeg2dec.c', 7 'gstv4l2codecpool.c', 8 'gstv4l2codecvp8dec.c', 9 'gstv4l2codecvp9dec.c', 10 'gstv4l2decoder.c', 11 'gstv4l2format.c', 12 'gstv4l2codecalphadecodebin.c', 13] 14 15libgudev_dep = dependency('gudev-1.0', required: get_option('v4l2codecs')) 16 17if get_option('v4l2codecs').disabled() 18 have_v4l2 = false 19 message('V4L2 CODECs plugin is disabled') 20else 21 # Should only be built on Linux, check for Linux kernel headers even though 22 # we have our own copy. 23 have_v4l2 = cc.has_header('linux/videodev2.h') 24 if get_option('v4l2codecs').enabled() and not have_v4l2 25 error('V4L2i CODECs is requested but kernel headers were not found') 26 endif 27 28 # Find makedev in various header files. Different operating systems put the 29 # macro in different header files. 30 foreach name: ['mkdev', 'sysmacros', 'types'] 31 have_makedev = cc.has_header_symbol('sys/@0@.h'.format(name), 'makedev') 32 cdata.set10('HAVE_MAKEDEV_IN_' + name.to_upper(), have_makedev) 33 endforeach 34endif 35 36 37if have_v4l2 and libgudev_dep.found() 38 gstv4l2codecs = library('gstv4l2codecs', 39 v4l2codecs_sources, 40 c_args : gst_plugins_bad_args, 41 cpp_args: gst_plugins_bad_args, 42 include_directories : [configinc], 43 dependencies : [gstbase_dep, gstcodecs_dep, gstallocators_dep, libgudev_dep, 44 gstpbutils_dep,], 45 install : true, 46 install_dir : plugins_install_dir, 47 ) 48 pkgconfig.generate(gstv4l2codecs, install_dir : plugins_pkgconfig_install_dir) 49 plugins += [gstv4l2codecs] 50endif 51