meson: build vcdsrc plugin
authorTim-Philipp Müller <tim@centricular.com>
Sat, 15 Dec 2018 18:24:11 +0000 (18:24 +0000)
committerSebastian Dröge <slomo@coaxion.net>
Mon, 17 Dec 2018 09:12:53 +0000 (09:12 +0000)
meson_options.txt
sys/meson.build
sys/vcd/meson.build [new file with mode: 0644]

index 2997bb4..49b3787 100644 (file)
@@ -132,6 +132,7 @@ option('srt', type : 'feature', value : 'auto', description : 'Secure, Reliable,
 option('srtp', type : 'feature', value : 'auto', description : 'Secure RTP codec plugin')
 option('ttml', type : 'feature', value : 'auto', description : 'TTML subtitle parser and renderer plugin')
 option('uvch264', type : 'feature', value : 'auto', description : 'UVC compliant H.264 camera source plugin')
+option('vcd', type : 'feature', value : 'auto', description : 'VCD source plugin')
 option('voaacenc', type : 'feature', value : 'auto', description : 'AAC audio encoder plugin')
 option('vulkan', type : 'feature', value : 'auto', description : 'Vulkan video sink plugin')
 option('wasapi', type : 'feature', value : 'auto', description : 'Windows Audio Session API source/sink plugin')
index 726e7a8..1129282 100644 (file)
@@ -18,7 +18,7 @@ subdir('msdk')
 subdir('opensles')
 subdir('shm')
 subdir('uvch264')
-#subdir('vcd')
+subdir('vcd')
 #subdir('vdpau')
 subdir('wasapi')
 subdir('winks')
@@ -111,4 +111,4 @@ elif get_option('nvdec').enabled()
   error('The nvdec plugin was enabled explicitly, but required CUDA dependencies were not found.')
 elif get_option('nvenc').enabled()
   error('The nvenc plugin was enabled explicitly, but required CUDA dependencies were not found.')
-endif
\ No newline at end of file
+endif
diff --git a/sys/vcd/meson.build b/sys/vcd/meson.build
new file mode 100644 (file)
index 0000000..2b02840
--- /dev/null
@@ -0,0 +1,16 @@
+if get_option('vcd').disabled()
+  subdir_done()
+endif
+
+if cc.has_header ('linux/cdrom.h')
+  gstvcd = library('gstvcdsrc', 'vcdsrc.c',
+    c_args: gst_plugins_bad_args,
+    include_directories: [configinc],
+    dependencies : [gstbase_dep],
+    install: true,
+    install_dir: plugins_install_dir
+  )
+  pkgconfig.generate(gstvcd, install_dir: plugins_pkgconfig_install_dir)
+elif get_option('vcd').enabled()
+  error('vcd plugin enabled but linux/cdrom.h not found')
+endif