GstCuda Wrapper Introduction
Architecture Overview
High-Level Design
The wrapper mirrors the RidgeRun GstCUDA architecture while internally delegating work to GStreamer CUDA.
Design principles:
- API similarity of at least 90%
- Same conceptual elements (SISO and MISO filters)
- Same lifecycle: initialization → processing → deinitialization
Memory Model Abstraction
| RidgeRun GstCUDA | GStreamer CUDA | Wrapper Strategy |
|---|---|---|
| Unified Memory | CudaMemory + transfers | Abstract caps and allocation |
| NVMM + system memory | CudaMemory only | Conditional macros |
| Implicit zero-copy | Explicit upload/download | Hidden behind wrapper |
Additionally, the transition from RidgeRun GstCUDA to the GstCUDA wrapper is accompanied by the sandwich approach proposed by GStreamer:
- In RidgeRun GstCuda:
gst-launch-1.0 nvarguscamerasrc ! rrcudaawb ! ... - In RidgeRun GstCuda Wrapper:
gst-launch-1.0 nvarguscamerasrc ! cudaupload ! rrcudaawb ! cudadownload ! ...
Naming Conventions
To avoid symbol conflicts when multiple implementations are present:
- GST_RR_CUDA_* – RidgeRun GstCUDA
- GST_CUDA_* – GStreamer CUDA
- GST_RR_CUDA_WRAPPER_* – GstCUDA Wrapper
This naming rule applies to classes, macros, and caps definitions.
Current Limitations
The GstCUDA Wrapper has some limitations at this moment:
- No MISO class: only SISO is supported
- No .so loader equivalent: cudafilter has not been ported yet
- Planar formats are partially supported
Products that meet the GstCUDA Wrapper
- CUDA ISP: GStreamer elements