NVIDIA DeepStream SDK API Reference

7.0 Release
gst-nvcommon.h File Reference

Detailed Description

SPDX-FileCopyrightText: Copyright (c) 2020-2023 NVIDIA CORPORATION & AFFILIATES.

All rights reserved. SPDX-License-Identifier: LicenseRef-NvidiaProprietary

NVIDIA CORPORATION, its affiliates and licensors retain all intellectual property and proprietary rights in and to this material, related documentation and any modifications thereto. Any use, reproduction, disclosure or distribution of this material and related documentation without an express license agreement from NVIDIA CORPORATION or its affiliates is strictly prohibited.

NVIDIA GStreamer DeepStream: Common Properties

Description: This file specifies the NVIDIA DeepStream GStreamer common properties functions, useful for reuse by multiple components

Definition in file gst-nvcommon.h.

Go to the source code of this file.

Macros

#define CHECK_DEFAULT_MEM(memType1, memType2)
 
#define GET_DEFAULT_MEM_TYPE(mem_type)   {mem_type=NVBUF_MEM_CUDA_DEVICE;}
 
#define CHECK_NVDS_MEMORY_AND_GPUID(object, surface)
 
#define GST_TYPE_NVBUF_MEMORY_TYPE   (gst_nvbuf_memory_get_type ())
 
#define GST_TYPE_COMPUTE_HW   (gst_compute_hw_get_type ())
 
#define GST_TYPE_INTERPOLATION_METHOD   (gst_video_interpolation_method_get_type ())
 
#define PROP_NVDS_GPU_ID_INSTALL(gobject_class)
 
#define PROP_NVBUF_MEMORY_TYPE_INSTALL(gobject_class)
 
#define PROP_COMPUTE_HW_INSTALL(gobject_class)
 
#define PROP_INTERPOLATION_METHOD_INSTALL(gobject_class)
 

Functions

GType gst_nvbuf_memory_get_type (void)
 
GType gst_compute_hw_get_type (void)
 
GType gst_video_interpolation_method_get_type (void)
 
const char * gst_nvbuf_memory_get_name (int mem_type)
 
int gst_nvbuf_memory_get_value (const char *mem_type_string)
 

Macro Definition Documentation

◆ CHECK_DEFAULT_MEM

#define CHECK_DEFAULT_MEM (   memType1,
  memType2 
)
Value:
((memType1 == NVBUF_MEM_DEFAULT && memType2 == NVBUF_MEM_CUDA_DEVICE) || \
(memType1 == NVBUF_MEM_CUDA_DEVICE && memType2 == NVBUF_MEM_DEFAULT))

Definition at line 31 of file gst-nvcommon.h.

◆ CHECK_NVDS_MEMORY_AND_GPUID

#define CHECK_NVDS_MEMORY_AND_GPUID (   object,
  surface 
)
Value:
({ int _errtype=0;\
do { \
if (((surface->memType == NVBUF_MEM_DEFAULT || surface->memType == NVBUF_MEM_CUDA_DEVICE) && \
((int)surface->gpuId != (int)object->gpu_id)) || \
(((int)surface->gpuId == (int)object->gpu_id) && (surface->memType == NVBUF_MEM_SYSTEM))) { \
GST_ELEMENT_ERROR (object, RESOURCE, FAILED, \
("Memory Compatibility Error:Input surface gpu-id doesnt match with configured gpu-id for element," \
" please allocate input using unified memory, or use same gpu-ids OR,"\
" if same gpu-ids are used ensure appropriate Cuda memories are used"),\
("surface-gpu-id=%d,%s-gpu-id=%d",surface->gpuId,GST_ELEMENT_NAME(object),\
object->gpu_id)); \
_errtype = 1;\
} \
} while(0); \
_errtype; \
})

Definition at line 48 of file gst-nvcommon.h.

◆ GET_DEFAULT_MEM_TYPE

#define GET_DEFAULT_MEM_TYPE (   mem_type)    {mem_type=NVBUF_MEM_CUDA_DEVICE;}

Definition at line 34 of file gst-nvcommon.h.

◆ GST_TYPE_COMPUTE_HW

#define GST_TYPE_COMPUTE_HW   (gst_compute_hw_get_type ())

Definition at line 70 of file gst-nvcommon.h.

◆ GST_TYPE_INTERPOLATION_METHOD

#define GST_TYPE_INTERPOLATION_METHOD   (gst_video_interpolation_method_get_type ())

Definition at line 73 of file gst-nvcommon.h.

◆ GST_TYPE_NVBUF_MEMORY_TYPE

#define GST_TYPE_NVBUF_MEMORY_TYPE   (gst_nvbuf_memory_get_type ())

Definition at line 67 of file gst-nvcommon.h.

◆ PROP_COMPUTE_HW_INSTALL

#define PROP_COMPUTE_HW_INSTALL (   gobject_class)
Value:
do { \
g_object_class_install_property (gobject_class, PROP_COMPUTE_HW, \
g_param_spec_enum ("compute-hw", "compute-hw", \
"Compute Scaling HW", \
(GParamFlags)(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | \
GST_PARAM_CONTROLLABLE | G_PARAM_CONSTRUCT))); \
}while(0)

Definition at line 100 of file gst-nvcommon.h.

◆ PROP_INTERPOLATION_METHOD_INSTALL

#define PROP_INTERPOLATION_METHOD_INSTALL (   gobject_class)
Value:
do { \
g_object_class_install_property (gobject_class, PROP_INTERPOLATION_METHOD, \
g_param_spec_enum ("interpolation-method", "Interpolation-method", \
"Set interpolation methods", \
(GParamFlags)(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | \
GST_PARAM_CONTROLLABLE | G_PARAM_CONSTRUCT))); \
}while(0)

Definition at line 110 of file gst-nvcommon.h.

◆ PROP_NVBUF_MEMORY_TYPE_INSTALL

#define PROP_NVBUF_MEMORY_TYPE_INSTALL (   gobject_class)
Value:
do { \
g_object_class_install_property (gobject_class, PROP_NVBUF_MEMORY_TYPE, \
g_param_spec_enum ("nvbuf-memory-type", "Type of NvBufSurface memory allocated", \
"Type of NvBufSurface Memory to be allocated for output buffers", \
(GParamFlags)(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | \
GST_PARAM_MUTABLE_READY))); \
}while(0)

Definition at line 89 of file gst-nvcommon.h.

◆ PROP_NVDS_GPU_ID_INSTALL

#define PROP_NVDS_GPU_ID_INSTALL (   gobject_class)
Value:
do { \
g_object_class_install_property (gobject_class, PROP_GPU_DEVICE_ID, \
g_param_spec_uint ("gpu-id", "Set GPU Device ID for operation", \
"Set GPU Device ID for operation", \
0, G_MAXUINT, 0, \
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | \
GST_PARAM_MUTABLE_READY))); \
}while(0)

Definition at line 79 of file gst-nvcommon.h.

Function Documentation

◆ gst_compute_hw_get_type()

GType gst_compute_hw_get_type ( void  )

◆ gst_nvbuf_memory_get_name()

const char* gst_nvbuf_memory_get_name ( int  mem_type)

◆ gst_nvbuf_memory_get_type()

GType gst_nvbuf_memory_get_type ( void  )

◆ gst_nvbuf_memory_get_value()

int gst_nvbuf_memory_get_value ( const char *  mem_type_string)

◆ gst_video_interpolation_method_get_type()

GType gst_video_interpolation_method_get_type ( void  )
PROP_NVBUF_MEMORY_TYPE
@ PROP_NVBUF_MEMORY_TYPE
Definition: gstdsnvmultiurisrcbin.h:69
PROP_COMPUTE_HW
@ PROP_COMPUTE_HW
Definition: gstdsnvmultiurisrcbin.h:70
NVBUF_MEM_CUDA_DEVICE
@ NVBUF_MEM_CUDA_DEVICE
Specifies CUDA Device memory type.
Definition: nvbufsurface.h:315
NVBUF_MEM_DEFAULT
@ NVBUF_MEM_DEFAULT
Specifies the default memory type, i.e.
Definition: nvbufsurface.h:311
NVBUF_MEM_SYSTEM
@ NVBUF_MEM_SYSTEM
Specifies memory allocated by malloc().
Definition: nvbufsurface.h:323
PROP_INTERPOLATION_METHOD
@ PROP_INTERPOLATION_METHOD
Definition: gstdsnvmultiurisrcbin.h:71
GST_TYPE_COMPUTE_HW
#define GST_TYPE_COMPUTE_HW
Definition: gst-nvcommon.h:70
PROP_GPU_DEVICE_ID
@ PROP_GPU_DEVICE_ID
Definition: gstdsnvurisrcbin.h:27
NvBufSurfTransformCompute_Default
@ NvBufSurfTransformCompute_Default
Specifies VIC as a compute device for Jetson or dGPU for an x86_64 system.
Definition: nvbufsurftransform.h:49
GST_TYPE_NVBUF_MEMORY_TYPE
#define GST_TYPE_NVBUF_MEMORY_TYPE
Definition: gst-nvcommon.h:67
GST_TYPE_INTERPOLATION_METHOD
#define GST_TYPE_INTERPOLATION_METHOD
Definition: gst-nvcommon.h:73
NvBufSurfTransformInter_Default
@ NvBufSurfTransformInter_Default
Specifies GPU-Nearest, VIC-Nearest interpolation.
Definition: nvbufsurftransform.h:99