NVIDIA DeepStream SDK API Reference

9.0 Release
9.0/sources/gst-plugins/gst-nvinfer/gstnvinfer_allocator.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2018-2020 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
13 #ifndef __GSTNVINFERALLOCATOR_H__
14 #define __GSTNVINFERALLOCATOR_H__
15 
16 #include <cuda_runtime_api.h>
17 #include <gst/gst.h>
18 #include <vector>
19 #include "cudaEGL.h"
20 #include "nvbufsurface.h"
21 
32 typedef struct
33 {
34  NvBufSurface *surf;
36  std::vector<CUgraphicsResource> cuda_resources;
38  std::vector<CUeglFrame> egl_frames;
40  void *dev_memory_ptr;
42  std::vector<void *> frame_memory_ptrs;
44 
54 
66 GstAllocator *gst_nvinfer_allocator_new (guint width, guint height,
67  NvBufSurfaceColorFormat color_format, guint batch_size, guint gpu_id);
68 
69 #endif
NvBufSurface
Holds information about batched buffers.
Definition: sources/includes/nvbufsurface.h:597
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.
GstNvInferMemory
This file describes the custom memory allocator for the Gstreamer TensorRT plugin.
Definition: sources/gst-plugins/gst-nvinfer/gstnvinfer_allocator.h:32
gst_nvinfer_buffer_get_memory
GstNvInferMemory * gst_nvinfer_buffer_get_memory(GstBuffer *buffer)
Get GstNvInferMemory structure associated with buffer allocated using GstNvInferAllocator.
NvBufSurfaceColorFormat
NvBufSurfaceColorFormat
Defines color formats for NvBufSurface.
Definition: sources/includes/nvbufsurface.h:105
GstBuffer
struct _GstBuffer GstBuffer
Definition: sources/includes/ds3d/common/idatatype.h:19