nvcodec: Refactor plugin initialization
authorSeungha Yang <seungha.yang@navercorp.com>
Thu, 28 Nov 2019 09:54:31 +0000 (18:54 +0900)
committerSeungha Yang <seungha.yang@navercorp.com>
Tue, 24 Dec 2019 08:10:14 +0000 (08:10 +0000)
commit49bccf0433b2ce5387c824371a24a521175d034b
tree01c7d46d4097c2163a784b25908f97284f57a9ac
parent2a3205b294cb881bb1d60ad9bf7c9841031fb2f4
nvcodec: Refactor plugin initialization

Create CUDA context per device, instead of per codec and encoder/decoder.
Allocating CUDA context is heavy operation so we should reuse it
as much as possible.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1130
sys/nvcodec/gstcudaloader.c
sys/nvcodec/gstnvbaseenc.c
sys/nvcodec/gstnvdec.c
sys/nvcodec/gstnvdec.h
sys/nvcodec/gstnvenc.c
sys/nvcodec/gstnvenc.h
sys/nvcodec/plugin.c