GstCUDA - libGstCUDA API: Difference between revisions

From RidgeRun Developer Wiki
No edit summary
No edit summary
Line 15: Line 15:


====GstCudaBuffer====
====GstCudaBuffer====
Code
<syntaxhighlight lang='C'>
typedef struct <i>_GstCudaBuffer GstCudaBuffer</i>
typedef struct _GstCudaBuffer GstCudaBuffer
</syntaxhighlight>  


An opaque structure representing a data buffer.
An opaque structure representing a data buffer.
Line 23: Line 24:


====GstCudaMapper====
====GstCudaMapper====
Code
<syntaxhighlight lang='C'>
typedef struct <i>_GstCudaMapper GstCudaMapper</i>
typedef struct _GstCudaMapper GstCudaMapper
</syntaxhighlight>  


An opaque structure representing a mapper to convert GstBuffer to GstCudaBuffer.
An opaque structure representing a mapper to convert GstBuffer to GstCudaBuffer.
Line 31: Line 33:


====GstCudaChannel====
====GstCudaChannel====
Code
<syntaxhighlight lang='C'>
typedef struct <i>_GstCudaChannel GstCudaChannel</i>
typedef struct _GstCudaChannel GstCudaChannel
</syntaxhighlight>  


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


====GstCudaData====
====GstCudaData====
Code
<syntaxhighlight lang='C'>
typedef struct <i>_GstCudaData GstCudaData</i>
typedef struct _GstCudaData GstCudaData
</syntaxhighlight>


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.
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.

Revision as of 00:56, 5 October 2017


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

typedef struct _GstCudaBuffer GstCudaBuffer

An opaque structure representing a data buffer.



GstCudaMapper

typedef struct _GstCudaMapper GstCudaMapper

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



GstCudaChannel

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

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