meson: build more examples
authorTim-Philipp Müller <tim@centricular.com>
Mon, 8 Oct 2018 22:47:42 +0000 (23:47 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Sun, 25 Nov 2018 14:59:16 +0000 (14:59 +0000)
See https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/576

tests/examples/audiomixmatrix/meson.build [new file with mode: 0644]
tests/examples/avsamplesink/meson.build [new file with mode: 0644]
tests/examples/camerabin2/meson.build [new file with mode: 0644]
tests/examples/codecparsers/meson.build [new file with mode: 0644]
tests/examples/directfb/meson.build [new file with mode: 0644]
tests/examples/meson.build
tests/examples/mxf/meson.build [new file with mode: 0644]
tests/examples/uvch264/meson.build [new file with mode: 0644]
tests/icles/meson.build [new file with mode: 0644]
tests/meson.build

diff --git a/tests/examples/audiomixmatrix/meson.build b/tests/examples/audiomixmatrix/meson.build
new file mode 100644 (file)
index 0000000..9002ca4
--- /dev/null
@@ -0,0 +1,5 @@
+executable('test-audiomixmatrix', 'test-audiomixmatrix.c',
+  include_directories : [configinc],
+  dependencies : gst_dep,
+  c_args : gst_plugins_bad_args,
+  install: false)
diff --git a/tests/examples/avsamplesink/meson.build b/tests/examples/avsamplesink/meson.build
new file mode 100644 (file)
index 0000000..78f43bb
--- /dev/null
@@ -0,0 +1,14 @@
+if ['darwin', 'ios'].contains(host_system)
+  avfoundation_dep = dependency('appleframeworks', modules : ['AVFoundation'], required : get_option('examples'))
+  quartzcore_dep = dependency('appleframeworks', modules : ['QuartzCore'], required : get_option('examples'))
+  corefoundation_dep = dependency('appleframeworks', modules : ['CoreFoundation'], required : get_option('examples'))
+  cocoa_dep = dependency('appleframeworks', modules : ['Cocoa'], required : get_option('examples'))
+
+  if quartzcore_dep.found() and avfoundation_dep.found() and corefoundation_dep.found() and cocoa_dep.found()
+    executable('avsamplesink', 'main.m',
+      include_directories : [configinc],
+      dependencies : [gst_dep, avfoundation_dep, quartzcore_dep, corefoundation_dep, cocoa_dep],
+      c_args : gst_plugins_bad_args,
+      install: false)
+  endif
+endif
diff --git a/tests/examples/camerabin2/meson.build b/tests/examples/camerabin2/meson.build
new file mode 100644 (file)
index 0000000..3db3db1
--- /dev/null
@@ -0,0 +1,24 @@
+gtk_dep = dependency('gtk+-3.0', required : get_option('examples'))
+gdk_x11_dep = dependency('gdk-x11-3.0', required : get_option('examples'))
+if gtk_dep.found() and gdk_x11_dep.found()
+  camera2_args = [
+    '-DGST_USE_UNSTABLE_API',
+    '-DCAMERA_APPS_UIDIR="@0@"'.format(meson.current_source_dir()),
+    cc.get_supported_link_arguments('-fvisibility=default'),
+  ]
+  gmodule_export_dep = dependency('gmodule-export-2.0')
+  executable('gst-camera2', 'gst-camera2.c',
+    include_directories : [configinc],
+    dependencies : [gstphotography_dep, gtk_dep, gdk_x11_dep, gst_dep, gstvideo_dep, gstpbutils_dep, gmodule_export_dep],
+    c_args : gst_plugins_bad_args + camera2_args,
+    install: false)
+endif
+
+x11_dep = dependency('x11', required : get_option('examples'))
+if x11_dep.found()
+  executable('gst-camerabin2-test', 'gst-camerabin2-test.c',
+    include_directories : [configinc],
+    dependencies : [gstphotography_dep, x11_dep, gst_dep, gstvideo_dep, gstpbutils_dep],
+    c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'],
+    install: false)
+endif
diff --git a/tests/examples/codecparsers/meson.build b/tests/examples/codecparsers/meson.build
new file mode 100644 (file)
index 0000000..f5c7dcc
--- /dev/null
@@ -0,0 +1,11 @@
+executable('parse-jpeg', 'parse-jpeg.c',
+  include_directories : [configinc],
+  dependencies : [gstcodecparsers_dep, gst_dep],
+  c_args : gst_plugins_bad_args,
+  install: false)
+
+executable('parse-vp8', 'parse-vp8.c',
+  include_directories : [configinc],
+  dependencies : [gstcodecparsers_dep, gst_dep],
+  c_args : gst_plugins_bad_args,
+  install: false)
diff --git a/tests/examples/directfb/meson.build b/tests/examples/directfb/meson.build
new file mode 100644 (file)
index 0000000..75fc145
--- /dev/null
@@ -0,0 +1,7 @@
+if directfb_dep.found()
+  executable('gstdfb', 'gstdfb.c',
+    include_directories : [configinc],
+    dependencies : [gst_dep, directfb_dep, libm],
+    c_args : gst_plugins_bad_args,
+    install: false)
+endif
index c0963d6..9fb09b1 100644 (file)
@@ -1,15 +1,15 @@
 # FIXME - Add other missing examples!
-#subdir('audiomixmatrix')
-#subdir('avsamplesink')
-#subdir('camerabin2')
-#subdir('codecparsers')
+subdir('audiomixmatrix')
+subdir('avsamplesink')
+subdir('camerabin2')
+subdir('codecparsers')
 subdir('compositor')
-#subdir('directfb')
+subdir('directfb')
 #subdir('ipcpipeline')
 subdir('mpegts')
-#subdir('mxf')
+subdir('mxf')
 #subdir('opencv')
-#subdir('uvch264')
+subdir('uvch264')
 subdir('waylandsink')
 subdir('webrtc')
 
diff --git a/tests/examples/mxf/meson.build b/tests/examples/mxf/meson.build
new file mode 100644 (file)
index 0000000..cfdf5ec
--- /dev/null
@@ -0,0 +1,7 @@
+if gtk_dep.found()
+  executable('mxfdemux-structure', 'mxfdemux-structure.c',
+    include_directories : [configinc],
+    dependencies: [gst_dep, gtk_dep],
+    c_args : gst_plugins_bad_args,
+    install: false)
+endif
diff --git a/tests/examples/uvch264/meson.build b/tests/examples/uvch264/meson.build
new file mode 100644 (file)
index 0000000..97db2e4
--- /dev/null
@@ -0,0 +1,12 @@
+if gtk_dep.found() and gdk_x11_dep.found()
+  test_uvch264_args = [
+    '-DGST_USE_UNSTABLE_API',
+    cc.get_supported_link_arguments('-fvisibility=default'),
+  ]
+  gmodule_export_dep = dependency('gmodule-export-2.0')
+  executable('test-uvch264', 'test-uvch264.c',
+    include_directories : [configinc],
+    dependencies : [gtk_dep, gdk_x11_dep, gst_dep, gstvideo_dep, gmodule_export_dep],
+    c_args : gst_plugins_bad_args + test_uvch264_args,
+    install: false)
+endif
diff --git a/tests/icles/meson.build b/tests/icles/meson.build
new file mode 100644 (file)
index 0000000..1b8dce6
--- /dev/null
@@ -0,0 +1,6 @@
+if not get_option('soundtouch').disabled() and soundtouch_dep.found()
+  executable('pitch-test', 'pitch-test.c',
+    include_directories: [configinc],
+    dependencies: [glib_dep, gst_dep, gstcontroller_dep],
+    install: false)
+endif
index 035ba3c..ba2d1f0 100644 (file)
@@ -6,4 +6,5 @@ if host_system != 'windows'
 endif
 if not get_option('examples').disabled()
   subdir('examples')
+  subdir('icles')
 endif