GstCUDA - libGstCUDA API

Revision as of 00:51, 5 October 2017 by Dgarbanzo (talk | contribs)

GstCUDA Framework


Home

GstCUDABaseFilter



This page shows the libGstCUDA API documentation provided in the GstCUDA framework.

Description

LibGstCUDA API consists in a library that expose special structures and functions that abstracts the complexity of: handle NVMM memory type buffers, extracts the data buffer to be processed and pass it to the GPU, and recover back the processed data from the GPU to the GStreamer element. The methods implemented in the libGstCUDA API ensures an optimal performance, due to direct handling of NVMM memory type buffers and zero memory copy interface between GStreamer and CUDA.

API Documentation

Structures

GstCudaBuffer

Code 
typedef struct _GstCudaBuffer GstCudaBuffer

An opaque structure representing a data buffer.



GstCudaMapper

Code 
typedef struct _GstCudaMapper GstCudaMapper

An opaque structure representing a mapper to convert GstBuffer to GstCudaBuffer.



GstCudaChannel

Code 
typedef struct _GstCudaChannel GstCudaChannel

The image size and data information for a single image plane. I.e.; for I420 a plane could be either Y, U or V.

Members

data: A pointer to the plane data. This data can be directly consumed by CUDA.
pitch: The width of the plane plus some HW dependent extra padding.
width: The width of the plane.
height: The height of the plane.


GstCudaData

Code 
typedef struct _GstCudaData GstCudaData

Data information as an array of channels. The meaning of each channel depends on the application's color space, i.e.: for I420 they will represent Y, U and V, respectively.

Members

channels: An array of planes specified as GstCudaChannel.


Functions

gst_cuda_mapper_new

Code 
GstCudaMapper *gst_cuda_mapper_new (void);

Create a newly allocated GstCudaMapper. Free with gst_cuda_mapper_free after usage.

Parameters

void: Do not has parameters.

Returns

GstCudaMapper: (transfer full): A newly allocated GstCudaMapper


gst_cuda_mapper_free

Code 
void gst_cuda_mapper_free (GstCudaMapper * mapper);

Free a previously allocated gst_cuda_mapper_free.

Parameters

mapper: (in) (transfer none): A GstCudaMapper object.

Returns

void: No return function.




GstCUDA Framework


Home

GstCUDABaseFilter