mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 21:21:12 +00:00
855f84c558
- Replace deprecated methods - Add a check on ORT version we are compatible with. - Add clarification to the example given. - Add the url to retrieve the model mentioned in the example. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3388>
31 lines
999 B
Meson
31 lines
999 B
Meson
if get_option('onnx').disabled()
|
|
subdir_done()
|
|
endif
|
|
|
|
|
|
onnxrt_dep = dependency('libonnxruntime', version : '>= 1.13.1', required : get_option('onnx'))
|
|
|
|
if onnxrt_dep.found()
|
|
onnxrt_include_root = onnxrt_dep.get_variable('includedir')
|
|
onnxrt_includes = [onnxrt_include_root / 'core/session', onnxrt_include_root / 'core']
|
|
onnxrt_dep_args = []
|
|
|
|
compiler = meson.get_compiler('cpp')
|
|
if compiler.has_header(onnxrt_include_root / 'core/providers/cuda/cuda_provider_factory.h')
|
|
onnxrt_dep_args = ['-DGST_ML_ONNX_RUNTIME_HAVE_CUDA']
|
|
endif
|
|
gstonnx = library('gstonnx',
|
|
'gstonnx.c',
|
|
'gstonnxelement.c',
|
|
'gstonnxobjectdetector.cpp',
|
|
'gstonnxclient.cpp',
|
|
c_args : gst_plugins_bad_args,
|
|
cpp_args: onnxrt_dep_args,
|
|
link_args : noseh_link_args,
|
|
include_directories : [configinc, libsinc, onnxrt_includes],
|
|
dependencies : [gstbase_dep, gstvideo_dep, onnxrt_dep, libm],
|
|
install : true,
|
|
install_dir : plugins_install_dir,
|
|
)
|
|
plugins += [gstonnx]
|
|
endif
|