GstCUDA Wrapper

From RidgeRun Developer Wiki

Follow Us On Twitter LinkedIn Email Share this page



Previous: Example - opencvfilter Index Next: GstCUDA Wrapper - Introduction





Overview

The GstCUDA Wrapper is an abstraction layer that allows RidgeRun products and custom GStreamer elements originally built on RidgeRun’s proprietary GstCUDA (GstCUDA-RR) to run seamlessly on top of the open-source GStreamer CUDA API.

Its main goal is to leverage a software abstraction layer to decouple RidgeRun products from RidgeRun GstCUDA while preserving existing APIs, class hierarchies, and development workflows.

GstCUDA Wrapper Overview
GstCUDA Wrapper Overview

Why is the GstCUDA Wrapper Needed?

RidgeRun developed GstCUDA several years ago to enable:

  • CUDA-accelerated GStreamer elements
  • Zero-copy pipelines
  • Tight integration with NVIDIA Jetson platforms and NVMM memory

In recent versions (>= 1.24), the GStreamer community has integrated better support for managing CUDA-accelerated elements, including NVMM support for NVIDIA Jetson platforms.

In this case, to maintain compatibility with Jetpack < 7.0, we propose using the RidgeRun GstCUDA Wrapper to make GStreamer CUDA-accelerated elements compatible with the RidgeRun GstCuda and the GStreamer CUDA Framework, making the porting process seamless. According to the Jetpack version, the GstCuda Wrapper uses as a backend:

  • Jetpack < 7: RidgeRun GstCuda
  • Jetpack >= 7.x: GStreamer CUDA library

Purpose of the GstCUDA Wrapper

The wrapper re-implements RidgeRun GstCUDA classes and interfaces using the GStreamer CUDA API, preserving:

  • Class names
  • Method signatures
  • Data structures

An example: transition from gst_rr_cuda_ to gst_rr_cuda_wrapper_

This allows existing products to compile and run with minimal or no source changes.

The wrapper bridges the gap between:

  • RidgeRun GstCUDA concepts (NVMM and CUDA memory)
  • GStreamer CUDA concepts (CudaMemory, cudaupload/cudadownload, GstCudaBaseTransform)

This isolates transition complexity from product code. Also, by targeting open-source GStreamer CUDA, the wrapper aligns RidgeRun products with:

  • NVIDIA-supported APIs
  • Community-maintained high-quality code
  • Cross-platform GPU support (Jetson and x86 GPUs)

Future CUDA and GStreamer updates are easier to absorb with the RidgeRun GstCUDA Wrapper


Previous: Example - opencvfilter Index Next: GstCUDA Wrapper - Introduction