nvdec,nvenc: Port to dynamic library loading
... and put them into new nvcodec plugin.
* nvcodec plugin
Now each nvenc and nvdec element is moved to be a part of nvcodec plugin
for better interoperability.
Additionally, cuda runtime API header dependencies
(i.e., cuda_runtime_api.h and cuda_gl_interop.h) are removed.
Note that cuda runtime APIs have prefix "cuda". Since 1.16 release with
Windows support, only "cuda.h" and "cudaGL.h" dependent symbols have
been used except for some defined types. However, those types could be
replaced with other types which were defined by "cuda.h".
* dynamic library loading
CUDA library will be opened with g_module_open() instead of build-time linking.
On Windows, nvcuda.dll is installed to system path by CUDA Toolkit
installer, and on *nix, user should ensure that libcuda.so.1 can be
loadable (i.e., via LD_LIBRARY_PATH or default dlopen path)
Therefore, NVIDIA_VIDEO_CODEC_SDK_PATH env build time dependency for Windows
is removed.
2019-05-17 13:27:50 +00:00
|
|
|
nvcodec_sources = [
|
|
|
|
'plugin.c',
|
|
|
|
'gstnvenc.c',
|
|
|
|
'gstnvbaseenc.c',
|
|
|
|
'gstnvh264enc.c',
|
|
|
|
'gstnvh265enc.c',
|
|
|
|
'gstcudaloader.c',
|
|
|
|
'gstnvdec.c',
|
|
|
|
'gstcuvidloader.c',
|
2018-11-23 13:01:41 +00:00
|
|
|
'gstcudacontext.c',
|
|
|
|
'gstcudautils.c',
|
2020-04-16 14:27:31 +00:00
|
|
|
'gstnvdecoder.c',
|
|
|
|
'gstnvh264dec.c',
|
2020-06-19 20:57:59 +00:00
|
|
|
'gstnvh265dec.c',
|
2019-08-19 09:02:56 +00:00
|
|
|
'gstcudamemory.c',
|
|
|
|
'gstcudabufferpool.c',
|
2019-10-16 13:42:06 +00:00
|
|
|
'gstcudabasetransform.c',
|
2022-03-03 18:33:41 +00:00
|
|
|
'gstcudamemorycopy.c',
|
2019-10-16 13:42:24 +00:00
|
|
|
'gstcudanvrtc.c',
|
|
|
|
'gstnvrtcloader.c',
|
2019-10-16 13:42:39 +00:00
|
|
|
'cuda-converter.c',
|
2019-10-16 13:42:55 +00:00
|
|
|
'gstcudafilter.c',
|
|
|
|
'gstcudabasefilter.c',
|
|
|
|
'gstcudaconvert.c',
|
2019-10-16 13:43:09 +00:00
|
|
|
'gstcudascale.c',
|
2020-10-30 11:37:44 +00:00
|
|
|
'gstnvvp8dec.c',
|
2020-10-30 14:22:01 +00:00
|
|
|
'gstnvvp9dec.c',
|
nvdec,nvenc: Port to dynamic library loading
... and put them into new nvcodec plugin.
* nvcodec plugin
Now each nvenc and nvdec element is moved to be a part of nvcodec plugin
for better interoperability.
Additionally, cuda runtime API header dependencies
(i.e., cuda_runtime_api.h and cuda_gl_interop.h) are removed.
Note that cuda runtime APIs have prefix "cuda". Since 1.16 release with
Windows support, only "cuda.h" and "cudaGL.h" dependent symbols have
been used except for some defined types. However, those types could be
replaced with other types which were defined by "cuda.h".
* dynamic library loading
CUDA library will be opened with g_module_open() instead of build-time linking.
On Windows, nvcuda.dll is installed to system path by CUDA Toolkit
installer, and on *nix, user should ensure that libcuda.so.1 can be
loadable (i.e., via LD_LIBRARY_PATH or default dlopen path)
Therefore, NVIDIA_VIDEO_CODEC_SDK_PATH env build time dependency for Windows
is removed.
2019-05-17 13:27:50 +00:00
|
|
|
]
|
|
|
|
|
2022-03-04 17:30:24 +00:00
|
|
|
nvmm_sources = [
|
|
|
|
'gstcudanvmm.c',
|
|
|
|
]
|
|
|
|
|
2019-07-23 00:40:24 +00:00
|
|
|
if get_option('nvcodec').disabled()
|
nvdec,nvenc: Port to dynamic library loading
... and put them into new nvcodec plugin.
* nvcodec plugin
Now each nvenc and nvdec element is moved to be a part of nvcodec plugin
for better interoperability.
Additionally, cuda runtime API header dependencies
(i.e., cuda_runtime_api.h and cuda_gl_interop.h) are removed.
Note that cuda runtime APIs have prefix "cuda". Since 1.16 release with
Windows support, only "cuda.h" and "cudaGL.h" dependent symbols have
been used except for some defined types. However, those types could be
replaced with other types which were defined by "cuda.h".
* dynamic library loading
CUDA library will be opened with g_module_open() instead of build-time linking.
On Windows, nvcuda.dll is installed to system path by CUDA Toolkit
installer, and on *nix, user should ensure that libcuda.so.1 can be
loadable (i.e., via LD_LIBRARY_PATH or default dlopen path)
Therefore, NVIDIA_VIDEO_CODEC_SDK_PATH env build time dependency for Windows
is removed.
2019-05-17 13:27:50 +00:00
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
2019-07-23 00:40:24 +00:00
|
|
|
plugin_incdirs = [configinc, include_directories('./stub')]
|
2020-04-16 14:27:31 +00:00
|
|
|
extra_c_args = ['-DGST_USE_UNSTABLE_API']
|
nvdec,nvenc: Port to dynamic library loading
... and put them into new nvcodec plugin.
* nvcodec plugin
Now each nvenc and nvdec element is moved to be a part of nvcodec plugin
for better interoperability.
Additionally, cuda runtime API header dependencies
(i.e., cuda_runtime_api.h and cuda_gl_interop.h) are removed.
Note that cuda runtime APIs have prefix "cuda". Since 1.16 release with
Windows support, only "cuda.h" and "cudaGL.h" dependent symbols have
been used except for some defined types. However, those types could be
replaced with other types which were defined by "cuda.h".
* dynamic library loading
CUDA library will be opened with g_module_open() instead of build-time linking.
On Windows, nvcuda.dll is installed to system path by CUDA Toolkit
installer, and on *nix, user should ensure that libcuda.so.1 can be
loadable (i.e., via LD_LIBRARY_PATH or default dlopen path)
Therefore, NVIDIA_VIDEO_CODEC_SDK_PATH env build time dependency for Windows
is removed.
2019-05-17 13:27:50 +00:00
|
|
|
|
|
|
|
if gstgl_dep.found()
|
|
|
|
extra_c_args += ['-DHAVE_NVCODEC_GST_GL=1']
|
|
|
|
endif
|
|
|
|
|
2022-03-04 17:30:24 +00:00
|
|
|
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_c_args += ['-DHAVE_NVCODEC_NVMM']
|
|
|
|
nvcodec_sources += nvmm_sources
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
nvdec,nvenc: Port to dynamic library loading
... and put them into new nvcodec plugin.
* nvcodec plugin
Now each nvenc and nvdec element is moved to be a part of nvcodec plugin
for better interoperability.
Additionally, cuda runtime API header dependencies
(i.e., cuda_runtime_api.h and cuda_gl_interop.h) are removed.
Note that cuda runtime APIs have prefix "cuda". Since 1.16 release with
Windows support, only "cuda.h" and "cudaGL.h" dependent symbols have
been used except for some defined types. However, those types could be
replaced with other types which were defined by "cuda.h".
* dynamic library loading
CUDA library will be opened with g_module_open() instead of build-time linking.
On Windows, nvcuda.dll is installed to system path by CUDA Toolkit
installer, and on *nix, user should ensure that libcuda.so.1 can be
loadable (i.e., via LD_LIBRARY_PATH or default dlopen path)
Therefore, NVIDIA_VIDEO_CODEC_SDK_PATH env build time dependency for Windows
is removed.
2019-05-17 13:27:50 +00:00
|
|
|
gstnvcodec = library('gstnvcodec',
|
|
|
|
nvcodec_sources,
|
|
|
|
c_args : gst_plugins_bad_args + extra_c_args,
|
2019-07-23 00:40:24 +00:00
|
|
|
include_directories : plugin_incdirs,
|
2020-07-24 07:31:36 +00:00
|
|
|
dependencies : [gstbase_dep, gstvideo_dep, gstpbutils_dep, gstgl_dep, gstglproto_dep, gmodule_dep, gstcodecs_dep],
|
nvdec,nvenc: Port to dynamic library loading
... and put them into new nvcodec plugin.
* nvcodec plugin
Now each nvenc and nvdec element is moved to be a part of nvcodec plugin
for better interoperability.
Additionally, cuda runtime API header dependencies
(i.e., cuda_runtime_api.h and cuda_gl_interop.h) are removed.
Note that cuda runtime APIs have prefix "cuda". Since 1.16 release with
Windows support, only "cuda.h" and "cudaGL.h" dependent symbols have
been used except for some defined types. However, those types could be
replaced with other types which were defined by "cuda.h".
* dynamic library loading
CUDA library will be opened with g_module_open() instead of build-time linking.
On Windows, nvcuda.dll is installed to system path by CUDA Toolkit
installer, and on *nix, user should ensure that libcuda.so.1 can be
loadable (i.e., via LD_LIBRARY_PATH or default dlopen path)
Therefore, NVIDIA_VIDEO_CODEC_SDK_PATH env build time dependency for Windows
is removed.
2019-05-17 13:27:50 +00:00
|
|
|
install : true,
|
|
|
|
install_dir : plugins_install_dir,
|
|
|
|
)
|
|
|
|
pkgconfig.generate(gstnvcodec, install_dir : plugins_pkgconfig_install_dir)
|
|
|
|
plugins += [gstnvcodec]
|
|
|
|
|