GstCUDA - libGstCUDA API: Difference between revisions
No edit summary |
No edit summary |
||
Line 15: | Line 15: | ||
====GstCudaBuffer==== | ====GstCudaBuffer==== | ||
<syntaxhighlight lang='C'> | |||
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==== | ||
<syntaxhighlight lang='C'> | |||
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==== | ||
<syntaxhighlight lang='C'> | |||
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==== | ||
<syntaxhighlight lang='C'> | |||
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
← |
⌂ Home |
→ |
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.
← |
⌂ Home |
→ |