2021-02-23 16:56:53 +00:00
|
|
|
if get_option('onnx').disabled()
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2023-10-19 20:16:21 +00:00
|
|
|
onnxrt_dep = dependency('libonnxruntime', version : '>= 1.16.1', required : get_option('onnx'))
|
2023-06-26 14:55:53 +00:00
|
|
|
|
|
|
|
extra_args = []
|
|
|
|
extra_deps = []
|
|
|
|
if gstcuda_dep.found()
|
|
|
|
extra_args += ['-DHAVE_CUDA']
|
|
|
|
extra_deps += [gstcuda_dep]
|
|
|
|
endif
|
2021-02-23 16:56:53 +00:00
|
|
|
|
|
|
|
if onnxrt_dep.found()
|
|
|
|
gstonnx = library('gstonnx',
|
|
|
|
'gstonnx.c',
|
2024-01-25 05:02:30 +00:00
|
|
|
'decoders/gstssdobjectdetector.c',
|
2023-06-26 14:55:53 +00:00
|
|
|
'gstonnxinference.cpp',
|
2021-02-23 16:56:53 +00:00
|
|
|
'gstonnxclient.cpp',
|
2023-06-26 14:55:53 +00:00
|
|
|
'tensor/gsttensormeta.c',
|
|
|
|
c_args : gst_plugins_bad_args + extra_args,
|
|
|
|
cpp_args : gst_plugins_bad_args + extra_args,
|
2021-02-23 16:56:53 +00:00
|
|
|
link_args : noseh_link_args,
|
2023-10-19 20:16:21 +00:00
|
|
|
include_directories : [configinc, libsinc, cuda_stubinc],
|
2023-12-05 17:21:37 +00:00
|
|
|
dependencies : [gstbase_dep, gstvideo_dep, gstanalytics_dep, onnxrt_dep,
|
2024-01-25 03:31:21 +00:00
|
|
|
libm, gio_dep] + extra_deps,
|
2021-02-23 16:56:53 +00:00
|
|
|
install : true,
|
|
|
|
install_dir : plugins_install_dir,
|
|
|
|
)
|
|
|
|
plugins += [gstonnx]
|
|
|
|
endif
|