nvdec,nvenc: Port to dynamic library loading
authorSeungha Yang <seungha.yang@navercorp.com>
Fri, 17 May 2019 13:27:50 +0000 (22:27 +0900)
committerSeungha Yang <seungha.yang@navercorp.com>
Mon, 8 Jul 2019 10:37:46 +0000 (10:37 +0000)
commitc18fda03d9f40e4bca726a9d18d6289c810bedfd
tree8d014a622b06b760bffd8f9b8cd1a0f01602b36f
parent5c3879ace6b45cbf75e0289e7bea0ab152222007
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.
32 files changed:
configure.ac
meson_options.txt
sys/Makefile.am
sys/meson.build
sys/nvcodec/Makefile.am [new file with mode: 0644]
sys/nvcodec/cuviddec.h [moved from sys/nvdec/cuviddec.h with 100% similarity]
sys/nvcodec/gstcudaloader.c [new file with mode: 0644]
sys/nvcodec/gstcudaloader.h [new file with mode: 0644]
sys/nvcodec/gstcuvidloader.c [new file with mode: 0644]
sys/nvcodec/gstcuvidloader.h [new file with mode: 0644]
sys/nvcodec/gstnvbaseenc.c [moved from sys/nvenc/gstnvbaseenc.c with 97% similarity]
sys/nvcodec/gstnvbaseenc.h [moved from sys/nvenc/gstnvbaseenc.h with 100% similarity]
sys/nvcodec/gstnvdec.c [moved from sys/nvdec/gstnvdec.c with 94% similarity]
sys/nvcodec/gstnvdec.h [moved from sys/nvdec/gstnvdec.h with 98% similarity]
sys/nvcodec/gstnvenc.c [moved from sys/nvenc/gstnvenc.c with 92% similarity]
sys/nvcodec/gstnvenc.h [moved from sys/nvenc/gstnvenc.h with 93% similarity]
sys/nvcodec/gstnvh264enc.c [moved from sys/nvenc/gstnvh264enc.c with 99% similarity]
sys/nvcodec/gstnvh264enc.h [moved from sys/nvenc/gstnvh264enc.h with 100% similarity]
sys/nvcodec/gstnvh265enc.c [moved from sys/nvenc/gstnvh265enc.c with 98% similarity]
sys/nvcodec/gstnvh265enc.h [moved from sys/nvenc/gstnvh265enc.h with 100% similarity]
sys/nvcodec/meson.build [new file with mode: 0644]
sys/nvcodec/nvEncodeAPI.h [moved from sys/nvenc/nvEncodeAPI.h with 100% similarity]
sys/nvcodec/nvcuvid.h [moved from sys/nvdec/nvcuvid.h with 100% similarity]
sys/nvcodec/plugin.c [moved from sys/nvdec/plugin.c with 74% similarity]
sys/nvdec/Makefile.am [deleted file]
sys/nvdec/meson.build [deleted file]
sys/nvenc/Makefile.am [deleted file]
sys/nvenc/README [deleted file]
sys/nvenc/TODO [deleted file]
sys/nvenc/meson.build [deleted file]
tests/check/Makefile.am
tests/check/meson.build