NVIDIA DeepStream SDK API Reference

9.2 Release
sources/libs/gst-nvdstensor/gstnvdstensor.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2020-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef __GSTNVDSTENSOR_H__
19 #define __GSTNVDSTENSOR_H__
20 
21 #include <cuda_runtime_api.h>
22 #include <gst/gst.h>
23 #include <vector>
24 #include "nvdstensor.h"
25 
33 #if defined(__cplusplus)
34 extern "C" {
35 #endif
36 
40 typedef struct
41 {
44  std::vector<void *> tensor_memory_ptrs;
46 
48 {
50  guint batch;
52  guint width;
54  guint height;
56  guint channels;
58  guint array_size;
59 
64 
66  guint gpu_id;
68 
78 
87 
88 #if defined(__cplusplus)
89 }
90 #endif
91 
92 #endif
_GstNvDsTensorAllocatorParams::format
NvDsTensorFormat format
Definition: sources/libs/gst-nvdstensor/gstnvdstensor.h:61
_GstNvDsTensorAllocatorParams::gpu_id
guint gpu_id
Definition: sources/libs/gst-nvdstensor/gstnvdstensor.h:66
NvDsTensorFormat
NvDsTensorFormat
Definition: sources/libs/gst-nvdstensor/nvdstensor.h:59
nvdstensor.h
GstNvDsTensorMemory
This file describes the custom memory allocator for the Gstreamer TensorRT plugin.
Definition: sources/libs/gst-nvdstensor/gstnvdstensor.h:40
gst_nvdstensor_allocator_new
GstAllocator * gst_nvdstensor_allocator_new(GstNvDsTensorAllocatorParams *params)
Create a new GstNvDsTensorAllocator with the given parameters.
_GstNvDsTensorAllocatorParams::height
guint height
Definition: sources/libs/gst-nvdstensor/gstnvdstensor.h:54
NvDsTensorPrecision
NvDsTensorPrecision
Definition: sources/libs/gst-nvdstensor/nvdstensor.h:80
GstNvDsTensorAllocatorParams
struct _GstNvDsTensorAllocatorParams GstNvDsTensorAllocatorParams
_GstNvDsTensorAllocatorParams::precision
NvDsTensorPrecision precision
Definition: sources/libs/gst-nvdstensor/gstnvdstensor.h:63
GstBuffer
struct _GstBuffer GstBuffer
Definition: includes/ds3d/common/idatatype.h:24
_GstNvDsTensorAllocatorParams::channels
guint channels
Definition: sources/libs/gst-nvdstensor/gstnvdstensor.h:56
_GstNvDsTensorAllocatorParams::array_size
guint array_size
Definition: sources/libs/gst-nvdstensor/gstnvdstensor.h:58
GstNvDsTensorMemory::tensor_memory_ptrs
std::vector< void * > tensor_memory_ptrs
Vector of pointer to individual tensor memories in the batch memory.
Definition: sources/libs/gst-nvdstensor/gstnvdstensor.h:44
_GstNvDsTensorAllocatorParams::batch
guint batch
Definition: sources/libs/gst-nvdstensor/gstnvdstensor.h:50
GstNvDsTensorMemory::tensors
NvDsTensorArray * tensors
Definition: sources/libs/gst-nvdstensor/gstnvdstensor.h:42
gst_nvdstensor_buffer_get_memory
GstNvDsTensorMemory * gst_nvdstensor_buffer_get_memory(GstBuffer *buffer)
Get GstNvDsTensorMemory structure associated with buffer allocated using GstNvDsTensorAllocator.
_GstNvDsTensorAllocatorParams::width
guint width
Definition: sources/libs/gst-nvdstensor/gstnvdstensor.h:52
NvDsTensorArray
Holds information about batched buffers.
Definition: sources/libs/gst-nvdstensor/nvdstensor.h:140
_GstNvDsTensorAllocatorParams
Definition: sources/libs/gst-nvdstensor/gstnvdstensor.h:47