nvcodec: Refactor GstCudaMemory abstraction
authorSeungha Yang <seungha@centricular.com>
Wed, 2 Mar 2022 18:25:47 +0000 (03:25 +0900)
committerSeungha Yang <seungha@centricular.com>
Sun, 6 Mar 2022 15:39:04 +0000 (15:39 +0000)
commit111b2c3f5373e4142809bf97d36e90fdf9d587bb
treedc28dc1047c571e2241cdd556b31d80ae713c0b3
parentad0e7fca142ddb50c81a172e2639ad5806cf12e8
nvcodec: Refactor GstCudaMemory abstraction

* Hide GstCudaMemory member variables
* Make GstCudaAllocator object GstCudaContext independent
* Set offset/stride of memory correctly via video meta
* Drop GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT support.
  This implementation actually does not support custom alignment
  because we allocate device memory via cuMemAllocPitch
  of which alignment is almost uncontrollable

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1834>
12 files changed:
subprojects/gst-plugins-bad/sys/nvcodec/cuda-converter.c
subprojects/gst-plugins-bad/sys/nvcodec/cuda-converter.h
subprojects/gst-plugins-bad/sys/nvcodec/gstcudabasefilter.c
subprojects/gst-plugins-bad/sys/nvcodec/gstcudabufferpool.c
subprojects/gst-plugins-bad/sys/nvcodec/gstcudadownload.c
subprojects/gst-plugins-bad/sys/nvcodec/gstcudamemory.c
subprojects/gst-plugins-bad/sys/nvcodec/gstcudamemory.h
subprojects/gst-plugins-bad/sys/nvcodec/gstcudaupload.c
subprojects/gst-plugins-bad/sys/nvcodec/gstnvbaseenc.c
subprojects/gst-plugins-bad/sys/nvcodec/gstnvdec.c
subprojects/gst-plugins-bad/sys/nvcodec/gstnvdecoder.c
subprojects/gst-plugins-bad/sys/nvcodec/plugin.c