summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2017-01-05 20:34:14 +0000
committerTim-Philipp Müller <tim@centricular.com>2017-01-05 20:34:14 +0000
commit3ecf1d8fd16ea209d6f3bcde8a97c8b3a3d33478 (patch)
treee70958845b3e1edd7a425eafde4377dc03b485ee
parentcc4e4f63160d074829a89f07be01b3cf9df76439 (diff)
downloadgstreamer-plugins-bad-3ecf1d8fd16ea209d6f3bcde8a97c8b3a3d33478.tar.gz
meson: build decklink plugin
-rw-r--r--meson.build4
-rw-r--r--sys/decklink/meson.build38
-rw-r--r--sys/meson.build2
3 files changed, 43 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index a266d3a65..874c9f710 100644
--- a/meson.build
+++ b/meson.build
@@ -44,6 +44,10 @@ if cc.get_id() == 'msvc'
# are built with MinGW
noseh_link_args = ['/SAFESEH:NO']
else
+ if cxx.has_argument('-Wno-non-virtual-dtor')
+ add_project_arguments('-Wno-non-virtual-dtor', language: 'cpp')
+ endif
+
noseh_link_args = []
endif
diff --git a/sys/decklink/meson.build b/sys/decklink/meson.build
new file mode 100644
index 000000000..27ec00a8d
--- /dev/null
+++ b/sys/decklink/meson.build
@@ -0,0 +1,38 @@
+decklink_sources = [
+ 'gstdecklink.cpp',
+ 'gstdecklinkaudiosink.cpp',
+ 'gstdecklinkvideosink.cpp',
+ 'gstdecklinkaudiosrc.cpp',
+ 'gstdecklinkvideosrc.cpp',
+]
+
+build_decklink = false
+decklink_ldflags = []
+
+libdl = cc.find_library('dl', required: false)
+have_pthread_h = cdata.has('HAVE_PTHREAD_H')
+
+if libdl.found() and have_pthread_h
+ if host_machine.system() == 'linux'
+ decklink_sources += ['linux/DeckLinkAPIDispatch.cpp']
+ build_decklink = true
+ elif host_machine.system() == 'darwin'
+ decklink_sources += ['osx/DeckLinkAPIDispatch.cpp']
+ decklink_ldflags = '-Wl,-framework,CoreFoundation'
+ build_decklink = true
+ else
+ message('Not building decklink plugin for system ' + host_machine.system())
+ endif
+endif
+
+if build_decklink
+ decklink = library('decklink',
+ decklink_sources,
+ cpp_args : gst_plugins_bad_args + [ '-DGST_USE_UNSTABLE_API' ],
+ link_args : decklink_ldflags + noseh_link_args,
+ include_directories : [configinc],
+ dependencies : [gstvideo_dep, gstaudio_dep, gstbase_dep, gst_dep, libm, libdl, dependency('threads')],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif
diff --git a/sys/meson.build b/sys/meson.build
index 3d7dffb13..aee8fd87f 100644
--- a/sys/meson.build
+++ b/sys/meson.build
@@ -5,7 +5,7 @@
#subdir('applemedia')
subdir('bluez')
subdir('d3dvideosink')
-#subdir('decklink')
+subdir('decklink')
subdir('directsound')
#subdir('dshowdecwrapper')
#subdir('dshowsrcwrapper')