NVIDIA DeepStream SDK API Reference

6.4 Release
gstnvinfer_allocator.h
Go to the documentation of this file.
1 
12 #ifndef __GSTNVINFERALLOCATOR_H__
13 #define __GSTNVINFERALLOCATOR_H__
14 
15 #include <cuda_runtime_api.h>
16 #include <gst/gst.h>
17 #include <vector>
18 #include "cudaEGL.h"
19 #include "nvbufsurface.h"
20 
31 typedef struct
32 {
35  std::vector<CUgraphicsResource> cuda_resources;
37  std::vector<CUeglFrame> egl_frames;
41  std::vector<void *> frame_memory_ptrs;
43 
53 
65 GstAllocator *gst_nvinfer_allocator_new (guint width, guint height,
66  NvBufSurfaceColorFormat color_format, guint batch_size, guint gpu_id);
67 
68 #endif
GstNvInferMemory::dev_memory_ptr
void * dev_memory_ptr
Pointer to the memory allocated for the batch of frames (DGPU).
Definition: gstnvinfer_allocator.h:39
GstNvInferMemory::cuda_resources
std::vector< CUgraphicsResource > cuda_resources
Vector of cuda resources created by registering the above egl images in CUDA.
Definition: gstnvinfer_allocator.h:35
GstNvInferMemory::egl_frames
std::vector< CUeglFrame > egl_frames
Vector of CUDA eglFrames created by mapping the above cuda resources.
Definition: gstnvinfer_allocator.h:37
NvBufSurface
Holds information about batched buffers.
Definition: nvbufsurface.h:503
GstNvInferMemory::surf
NvBufSurface * surf
Definition: gstnvinfer_allocator.h:33
GstNvInferMemory
Copyright (c) 2018-2020, NVIDIA CORPORATION.
Definition: gstnvinfer_allocator.h:31
GstNvInferMemory::frame_memory_ptrs
std::vector< void * > frame_memory_ptrs
Vector of pointer to individual frame memories in the batch memory.
Definition: gstnvinfer_allocator.h:41
GstBuffer
struct _GstBuffer GstBuffer
Definition: idatatype.h:19
gst_nvinfer_buffer_get_memory
GstNvInferMemory * gst_nvinfer_buffer_get_memory(GstBuffer *buffer)
Get GstNvInferMemory structure associated with buffer allocated using GstNvInferAllocator.
nvbufsurface.h
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.
NvBufSurfaceColorFormat
NvBufSurfaceColorFormat
Defines color formats for NvBufSurface.
Definition: nvbufsurface.h:103