2017-01-05 20:34:14 +00:00
|
|
|
decklink_sources = [
|
|
|
|
'gstdecklink.cpp',
|
|
|
|
'gstdecklinkaudiosink.cpp',
|
|
|
|
'gstdecklinkvideosink.cpp',
|
|
|
|
'gstdecklinkaudiosrc.cpp',
|
|
|
|
'gstdecklinkvideosrc.cpp',
|
|
|
|
]
|
|
|
|
|
2018-07-27 13:29:23 +00:00
|
|
|
if get_option('decklink').disabled()
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
2017-01-05 20:34:14 +00:00
|
|
|
build_decklink = false
|
|
|
|
decklink_ldflags = []
|
2017-05-04 22:31:38 +00:00
|
|
|
decklink_libs = []
|
2017-01-05 20:34:14 +00:00
|
|
|
|
2018-07-27 13:29:23 +00:00
|
|
|
if host_system == 'windows'
|
2017-05-04 22:31:38 +00:00
|
|
|
decklink_sources += ['win/DeckLinkAPIDispatch.cpp', 'win/DeckLinkAPI_i.c']
|
2017-05-04 23:00:59 +00:00
|
|
|
if cxx.get_id() == 'msvc'
|
|
|
|
# FIXME: Use commsuppwd.lib for debug builds?
|
2018-07-27 13:29:23 +00:00
|
|
|
comutil_dep = cxx.find_library('comsuppw', required : get_option('decklink'))
|
2017-05-04 23:00:59 +00:00
|
|
|
if comutil_dep.found()
|
|
|
|
build_decklink = true
|
|
|
|
decklink_libs = [comutil_dep]
|
|
|
|
endif
|
|
|
|
else
|
2017-01-05 20:34:14 +00:00
|
|
|
build_decklink = true
|
2017-05-04 22:31:38 +00:00
|
|
|
endif
|
|
|
|
else
|
2018-07-27 13:29:23 +00:00
|
|
|
libdl = cc.find_library('dl', required: get_option('decklink'))
|
2017-05-04 22:31:38 +00:00
|
|
|
have_pthread_h = cdata.has('HAVE_PTHREAD_H')
|
|
|
|
if libdl.found() and have_pthread_h
|
|
|
|
decklink_libs = [libm, libdl, dependency('threads')]
|
2018-08-16 21:29:26 +00:00
|
|
|
if host_system == 'linux'
|
2017-05-04 22:31:38 +00:00
|
|
|
decklink_sources += ['linux/DeckLinkAPIDispatch.cpp']
|
|
|
|
build_decklink = true
|
2018-08-16 21:29:26 +00:00
|
|
|
elif ['darwin', 'ios'].contains(host_system)
|
2017-05-04 22:31:38 +00:00
|
|
|
decklink_sources += ['osx/DeckLinkAPIDispatch.cpp']
|
|
|
|
decklink_ldflags = ['-Wl,-framework,CoreFoundation']
|
|
|
|
build_decklink = true
|
|
|
|
endif
|
2017-01-05 20:34:14 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
if build_decklink
|
2017-05-04 22:31:38 +00:00
|
|
|
message('Building decklink plugin')
|
2017-01-05 20:45:15 +00:00
|
|
|
decklink = library('gstdecklink',
|
2017-01-05 20:34:14 +00:00
|
|
|
decklink_sources,
|
|
|
|
cpp_args : gst_plugins_bad_args + [ '-DGST_USE_UNSTABLE_API' ],
|
|
|
|
link_args : decklink_ldflags + noseh_link_args,
|
|
|
|
include_directories : [configinc],
|
2017-05-04 22:31:38 +00:00
|
|
|
dependencies : [gstvideo_dep, gstaudio_dep, gstbase_dep, gst_dep] + decklink_libs,
|
2017-01-05 20:34:14 +00:00
|
|
|
install : true,
|
|
|
|
install_dir : plugins_install_dir,
|
|
|
|
)
|
2018-04-24 18:05:30 +00:00
|
|
|
pkgconfig.generate(decklink, install_dir : plugins_pkgconfig_install_dir)
|
2018-10-22 09:30:45 +00:00
|
|
|
plugins += [decklink]
|
2017-05-04 22:31:38 +00:00
|
|
|
else
|
|
|
|
message('Not building decklink plugin for "@0@'.format(host_machine.system()))
|
2017-01-05 20:34:14 +00:00
|
|
|
endif
|