NVIDIA DeepStream SDK API Reference

6.4 Release
gstnvinfer_allocator.h File Reference

Go to the source code of this file.

Data Structures

struct  GstNvInferMemory
 Copyright (c) 2018-2020, NVIDIA CORPORATION. More...
 

Functions

GstNvInferMemorygst_nvinfer_buffer_get_memory (GstBuffer *buffer)
 Get GstNvInferMemory structure associated with buffer allocated using GstNvInferAllocator. More...
 
GstAllocator * gst_nvinfer_allocator_new (guint width, guint height, NvBufSurfaceColorFormat color_format, guint batch_size, guint gpu_id)
 Create a new GstNvInferAllocator with the given parameters. More...
 

Function Documentation

◆ gst_nvinfer_allocator_new()

GstAllocator* gst_nvinfer_allocator_new ( guint  width,
guint  height,
NvBufSurfaceColorFormat  color_format,
guint  batch_size,
guint  gpu_id 
)

Create a new GstNvInferAllocator with the given parameters.

Parameters
widthWidth of the network input, in pixels.
heightHeight of the network input, in pixels.
color_formatColor format of the buffers in the pool.
batch_sizeMax size of batch that will be inferred.
gpu_idID of the gpu where the batch memory will be allocated.
Returns
Pointer to the GstNvInferAllocator structure cast as GstAllocator

◆ gst_nvinfer_buffer_get_memory()

GstNvInferMemory* gst_nvinfer_buffer_get_memory ( GstBuffer buffer)

Get GstNvInferMemory structure associated with buffer allocated using GstNvInferAllocator.

Parameters
bufferGstBuffer allocated by this allocator.
Returns
Pointer to the associated GstNvInferMemory structure