GstCUDA - libGstCUDA API: Difference between revisions

From RidgeRun Developer Wiki
No edit summary
mNo edit summary
 
(15 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{GstCUDA Page |  
{{GstCUDA/Head|previous=GstCUDA Framework|next=GstCUDABaseFilter|keywords=GstCUDA base class, GstCUDA APIs, libGstCUDA, GstCUDA base class documentation, GstCUDA API documentation,libGstCUDA API, libGstCUDA API documentation, libGstCUDA base class}}
[[GstCUDA - GstCUDA Framework|GstCUDA Framework]]|
[[GstCUDA - GstCUDABaseFilter|GstCUDABaseFilter]]|


This page shows the libGstCUDA API documentation provided in the GstCUDA framework.
This page shows the libGstCUDA API documentation provided in the GstCUDA framework.
Line 8: Line 6:


==Description==
==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.
LibGstCUDA API consists of a library that exposes 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 optimal performance, due to the direct handling of NVMM memory type buffers and zero memory copy interface between GStreamer and CUDA.


==API Documentation==
==API Documentation==


===Structures===
[https://ridgerun.github.io/gst-cuda/libs/gst-cuda-libs-gstcuda.html '''libGstCUDA API documentation'''].


====GstCudaBuffer====
{{GstCUDA/Foot|previous=GstCUDA Framework|next=GstCUDABaseFilter}}
Code
typedef struct <i>_GstCudaBuffer GstCudaBuffer</i>
 
An opaque structure representing a data buffer.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 
 
====GstCudaMapper====
Code
typedef struct <i>_GstCudaMapper GstCudaMapper</i>
 
An opaque structure representing a mapper to convert GstBuffer to GstCudaBuffer.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 
 
====GstCudaChannel====
Code
typedef struct <i>_GstCudaChannel GstCudaChannel</i>
 
The image size and data information for a single image plane. I.e.; for I420 a plane could be either Y, U or V.
 
<b><i>Members</i></b>
:: 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 <i>_GstCudaData GstCudaData</i>
 
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.
 
<b><i>Members</i></b>
:: 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.
 
<b><i>Parameters</i></b>
:: name: name of the pipeline to create.
:: description: pipeline with gst-launch syntax.
 
<b><i>Returns</i></b>
:: a new code: 0 "success" , 2 "Bad pipeline description", 9 "Cannot update this resource", 10 "Bad command"
 
 
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 
}}

Latest revision as of 20:51, 11 September 2020


Previous: GstCUDA Framework Index Next: GstCUDABaseFilter




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

Description

LibGstCUDA API consists of a library that exposes 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 optimal performance, due to the direct handling of NVMM memory type buffers and zero memory copy interface between GStreamer and CUDA.

API Documentation

libGstCUDA API documentation.


Previous: GstCUDA Framework Index Next: GstCUDABaseFilter