gstreamer/subprojects/gst-plugins-bad/gst-libs/gst/cuda
Seungha Yang 30d06e03c2 cudamemory: Make GstCudaStream-aware
This will be used for CUDA stream sharing.

* Adding GstCudaPoolAllocator object. The pool allocator will
  control synchronization of allocated memory objects.
* Modify gst_cuda_allocator_alloc() API so that caller can specify/set
  GstCudaStream object for the newly allocated memory.
* GST_CUDA_MEMORY_TRANSFER_NEED_SYNC flag is added in addition to
  existing GST_CUDA_MEMORY_TRANSFER_NEED_{UPLOAD,DOWNLOAD}.
  The flag indicates that any GPU command queued in the CUDA stream
  may not be finished yet, and caller should take care of the
  synchronization.
  The flag is controlled by GstCudaMemory object if the memory holds
  GstCudaStream. (Otherwise, GstCudaMemory will do synchronization
  as before this commit). Specifically, GstCudaMemory object will set
  the new flag automatically when memory is mapped with
  (GST_MAP_CUDA | GST_MAP_WRITE) flags. Caller will need to unset
  the flag via GST_MEMORY_FLAG_UNSET() if it's already synchronized
  by client code.
* gst_cuda_memory_sync() helper function is added to perform synchronization
* Why not use CUevent object to keep track of synchronization status?
  CUDA provides fence-like interface already via CUevent object,
  but cuEventRecord/cuEventQuery APIs are not zero-cost operations.
  Instead, in this version, the status is tracked by using map and
  object flags.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629>
2023-02-03 15:27:42 +00:00
..
stub cuda: Remove GST_CUDA_HAS_D3D define from header 2022-09-13 16:40:51 +00:00
cuda-gst.h cuda: Provide single header include entry point 2023-02-03 15:27:42 +00:00
cuda-prelude.h cuda: Factor out a public GstCUDA library 2022-04-19 16:39:43 +00:00
gstcuda-private.h cuda: Provide single header include entry point 2023-02-03 15:27:42 +00:00
gstcuda.h cuda: Add GstCudaStream object 2023-02-03 15:27:42 +00:00
gstcudabufferpool.c cudamemory: Make GstCudaStream-aware 2023-02-03 15:27:42 +00:00
gstcudabufferpool.h cuda: Provide single header include entry point 2023-02-03 15:27:42 +00:00
gstcudacontext.c cudamemory: Allow nullptr allocator object 2023-02-03 15:27:42 +00:00
gstcudacontext.h cuda: Provide single header include entry point 2023-02-03 15:27:42 +00:00
gstcudaloader.c cuda: Remove GST_CUDA_HAS_D3D define from header 2022-09-13 16:40:51 +00:00
gstcudaloader.h cuda: Provide single header include entry point 2023-02-03 15:27:42 +00:00
gstcudamemory.c cudamemory: Make GstCudaStream-aware 2023-02-03 15:27:42 +00:00
gstcudamemory.h cudamemory: Make GstCudaStream-aware 2023-02-03 15:27:42 +00:00
gstcudanvrtc.c cuda: Fix runtime compiler library loading on Windows 2022-12-09 19:24:08 +09:00
gstcudanvrtc.h cuda: Provide single header include entry point 2023-02-03 15:27:42 +00:00
gstcudastream.c cuda: Add GstCudaStream object 2023-02-03 15:27:42 +00:00
gstcudastream.h cuda: Add GstCudaStream object 2023-02-03 15:27:42 +00:00
gstcudautils.c cuda: Hide memory copy util function 2022-12-08 19:52:23 +00:00
gstcudautils.h cuda: Provide single header include entry point 2023-02-03 15:27:42 +00:00
meson.build cuda: Add GstCudaStream object 2023-02-03 15:27:42 +00:00