2023-10-21 07:26:40 +00:00
|
|
|
aja_option = get_option('aja') \
|
|
|
|
.require(host_system == 'linux',
|
|
|
|
error_message: 'AJA plugin is currently only available on Linux')
|
|
|
|
if aja_option.disabled()
|
|
|
|
subdir_done()
|
2021-02-05 17:03:21 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
common_flags = [
|
|
|
|
'-DAJALinux=1',
|
|
|
|
'-DAJA_LINUX=1',
|
|
|
|
]
|
|
|
|
|
|
|
|
thread_dep = dependency('threads')
|
|
|
|
rt_dep = cxx.find_library('rt', required : false)
|
|
|
|
|
|
|
|
aja_sdk_dir = get_option('aja-sdk-dir')
|
2023-10-21 07:02:43 +00:00
|
|
|
if aja_sdk_dir == ''
|
2023-10-21 07:26:40 +00:00
|
|
|
ajantv2_dep = dependency('libajantv2', include_type: 'system',
|
|
|
|
required: aja_option, allow_fallback: true)
|
2023-10-21 07:02:43 +00:00
|
|
|
if not ajantv2_dep.found()
|
|
|
|
subdir_done()
|
|
|
|
endif
|
2023-10-21 07:26:40 +00:00
|
|
|
aja_includedirs = []
|
2023-10-21 07:02:43 +00:00
|
|
|
else
|
|
|
|
aja_includedirs = include_directories(
|
|
|
|
f'@aja_sdk_dir@/ajalibraries',
|
|
|
|
f'@aja_sdk_dir@/ajalibraries/ajantv2/includes',
|
|
|
|
f'@aja_sdk_dir@/ajalibraries/ajantv2/src/lin',
|
2023-10-21 07:26:40 +00:00
|
|
|
is_system: true,
|
2023-10-21 07:02:43 +00:00
|
|
|
)
|
2021-02-05 17:03:21 +00:00
|
|
|
|
2023-10-21 07:26:40 +00:00
|
|
|
message(f'Looking for AJA SDK in @aja_sdk_dir@')
|
2023-10-21 07:02:43 +00:00
|
|
|
if not cxx.has_header('ajabase/common/videotypes.h',
|
2023-10-21 07:26:40 +00:00
|
|
|
include_directories: aja_includedirs,
|
|
|
|
required: aja_option)
|
|
|
|
subdir_done()
|
2023-10-21 07:02:43 +00:00
|
|
|
endif
|
2021-02-05 17:03:21 +00:00
|
|
|
|
2023-10-21 07:02:43 +00:00
|
|
|
ajantv2_lib = cxx.find_library('ajantv2',
|
|
|
|
# If the header is found, this should also be
|
|
|
|
required : true,
|
|
|
|
dirs : [f'@aja_sdk_dir@/lib'],
|
|
|
|
)
|
|
|
|
ajantv2_dep = declare_dependency(
|
|
|
|
dependencies: ajantv2_lib,
|
2023-10-21 07:26:40 +00:00
|
|
|
include_directories: aja_includedirs)
|
2023-10-21 07:02:43 +00:00
|
|
|
endif
|
2021-02-05 17:03:21 +00:00
|
|
|
|
|
|
|
gstaja = library('gstaja',
|
|
|
|
['plugin.cpp',
|
|
|
|
'gstajacommon.cpp',
|
|
|
|
'gstajasink.cpp',
|
|
|
|
'gstajasinkcombiner.cpp',
|
2021-02-08 18:31:22 +00:00
|
|
|
'gstajasrc.cpp',
|
|
|
|
'gstajasrcdemux.cpp',
|
2021-08-27 11:40:29 +00:00
|
|
|
'gstajadeviceprovider.cpp',
|
2021-02-05 17:03:21 +00:00
|
|
|
],
|
2023-10-21 07:26:40 +00:00
|
|
|
override_options : ['cpp_std=c++11'],
|
|
|
|
cpp_args : gst_plugins_bad_args + common_flags,
|
|
|
|
include_directories : [configinc],
|
2021-02-05 17:03:21 +00:00
|
|
|
link_args : noseh_link_args,
|
|
|
|
dependencies : [gstvideo_dep, gstaudio_dep, gstbase_dep, gst_dep, ajantv2_dep, thread_dep, rt_dep],
|
|
|
|
install : true,
|
|
|
|
install_dir : plugins_install_dir,
|
|
|
|
)
|
|
|
|
|
2023-10-21 07:26:40 +00:00
|
|
|
plugins += [gstaja]
|