mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 08:11:16 +00:00
205a23f456
The other platforms, specifically macOS have not been supported already because this plugin loads so or dll. Moreover, NVIDIA dropped support for macOS as of CUDA 11.0. See also https://developer.nvidia.com/nvidia-cuda-toolkit-11_0_0-developer-tools-mac-hosts Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2283>
93 lines
2.3 KiB
Meson
93 lines
2.3 KiB
Meson
nvcodec_sources = [
|
|
'plugin.c',
|
|
'gstnvenc.c',
|
|
'gstnvbaseenc.c',
|
|
'gstnvh264enc.c',
|
|
'gstnvh265enc.c',
|
|
'gstnvdec.c',
|
|
'gstcuvidloader.c',
|
|
'gstnvdecoder.c',
|
|
'gstnvh264dec.c',
|
|
'gstnvh265dec.c',
|
|
'gstcudabasetransform.c',
|
|
'gstcudamemorycopy.c',
|
|
'cuda-converter.c',
|
|
'gstcudafilter.c',
|
|
'gstcudabasefilter.c',
|
|
'gstcudaconvert.c',
|
|
'gstcudascale.c',
|
|
'gstnvvp8dec.c',
|
|
'gstnvvp9dec.c',
|
|
'gstnvencoder.cpp',
|
|
'gstnvh264encoder.cpp',
|
|
'gstnvh265encoder.cpp',
|
|
]
|
|
|
|
nvmm_sources = [
|
|
'gstcudanvmm.c',
|
|
]
|
|
|
|
if get_option('nvcodec').disabled()
|
|
subdir_done()
|
|
endif
|
|
|
|
if not gstcuda_dep.found()
|
|
if get_option('nvcodec').enabled()
|
|
error('The nvcodec was enabled explicitly, but required gstcuda dependency is not found')
|
|
endif
|
|
subdir_done()
|
|
endif
|
|
|
|
plugin_incdirs = [configinc, cuda_stubinc]
|
|
extra_args = ['-DGST_USE_UNSTABLE_API']
|
|
|
|
if gstgl_dep.found()
|
|
extra_args += ['-DHAVE_NVCODEC_GST_GL=1']
|
|
endif
|
|
|
|
if gstd3d11_dep.found()
|
|
extra_args += ['-DGST_CUDA_HAS_D3D=1', '-DCOBJMACROS']
|
|
endif
|
|
|
|
if host_system == 'linux'
|
|
have_nvmm = false
|
|
if cc.has_header('nvbufsurface.h')
|
|
have_nvmm = true
|
|
elif cc.has_header('/opt/nvidia/deepstream/deepstream/sources/includes/nvbufsurface.h')
|
|
# XXX: Should add an option for SDK path??
|
|
have_nvmm = true
|
|
plugin_incdirs += [include_directories('/opt/nvidia/deepstream/deepstream/sources/includes')]
|
|
endif
|
|
|
|
if have_nvmm
|
|
extra_args += ['-DHAVE_NVCODEC_NVMM']
|
|
nvcodec_sources += nvmm_sources
|
|
endif
|
|
endif
|
|
|
|
override_opt = []
|
|
if host_system == 'windows'
|
|
# MinGW 32bits compiler seems to be complaining about redundant-decls
|
|
# when ComPtr is in use. Let's just disable the warning
|
|
if cc.get_id() != 'msvc'
|
|
extra_args += cc.get_supported_arguments([
|
|
'-Wno-redundant-decls',
|
|
])
|
|
endif
|
|
else
|
|
override_opt += ['cpp_std=c++11']
|
|
endif
|
|
|
|
gstnvcodec = library('gstnvcodec',
|
|
nvcodec_sources,
|
|
c_args : gst_plugins_bad_args + extra_args,
|
|
cpp_args : gst_plugins_bad_args + extra_args,
|
|
override_options: override_opt,
|
|
include_directories : plugin_incdirs,
|
|
dependencies : [gstbase_dep, gstvideo_dep, gstpbutils_dep, gstgl_dep, gstglproto_dep, gmodule_dep, gstcodecs_dep, gstd3d11_dep, gstcuda_dep],
|
|
install : true,
|
|
install_dir : plugins_install_dir,
|
|
)
|
|
pkgconfig.generate(gstnvcodec, install_dir : plugins_pkgconfig_install_dir)
|
|
plugins += [gstnvcodec]
|
|
|