nvencoder: Add support for dynamic GPU device selection
authorSeungha Yang <seungha@centricular.com>
Wed, 22 Jun 2022 16:10:38 +0000 (01:10 +0900)
committerSeungha Yang <seungha@centricular.com>
Thu, 30 Jun 2022 12:38:08 +0000 (12:38 +0000)
commit30c8dbe0328cbff029de5856fc428e3f20ed9fbf
tree4e3c5ae5849a4aaf7e4856a08e919cebb073afc3
parentbcacfc7ced8451d09b65d1c266c0d8a4fc541a5c
nvencoder: Add support for dynamic GPU device selection

Adding nvautogpu{h264,h265}enc class which will accept upstream logical
GPU device object (GstCudaContext or GstD3D11Device) instead of
using pre-assigned GPU instance.

If upstream logical GPU device object is not NVENC compatible
(e.g., D3D11 device of non-NVIDIA GPU) or it's system memory,
then user specified "cuda-device-id" or "adapter-luid" property
will be used for GPU device selection.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2666>
subprojects/gst-plugins-bad/sys/nvcodec/gstnvencoder.cpp
subprojects/gst-plugins-bad/sys/nvcodec/gstnvencoder.h
subprojects/gst-plugins-bad/sys/nvcodec/gstnvh264encoder.cpp
subprojects/gst-plugins-bad/sys/nvcodec/gstnvh264encoder.h
subprojects/gst-plugins-bad/sys/nvcodec/gstnvh265encoder.cpp
subprojects/gst-plugins-bad/sys/nvcodec/gstnvh265encoder.h
subprojects/gst-plugins-bad/sys/nvcodec/plugin.c