NVIDIA DeepStream SDK API Reference

9.1 Release
sources/includes/gst-nvcommon.h File Reference

Detailed Description

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 sources/includes/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 36 of file sources/includes/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 67 of file sources/includes/gst-nvcommon.h.

◆ GET_DEFAULT_MEM_TYPE

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

Definition at line 39 of file sources/includes/gst-nvcommon.h.

◆ GST_TYPE_COMPUTE_HW

#define GST_TYPE_COMPUTE_HW   (gst_compute_hw_get_type ())

Definition at line 89 of file sources/includes/gst-nvcommon.h.

◆ GST_TYPE_INTERPOLATION_METHOD

#define GST_TYPE_INTERPOLATION_METHOD   (gst_video_interpolation_method_get_type ())

Definition at line 92 of file sources/includes/gst-nvcommon.h.

◆ GST_TYPE_NVBUF_MEMORY_TYPE

#define GST_TYPE_NVBUF_MEMORY_TYPE   (gst_nvbuf_memory_get_type ())

Definition at line 86 of file sources/includes/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 119 of file sources/includes/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 129 of file sources/includes/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 108 of file sources/includes/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 98 of file sources/includes/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  )
GST_TYPE_INTERPOLATION_METHOD
#define GST_TYPE_INTERPOLATION_METHOD
Definition: sources/includes/gst-nvcommon.h:92
PROP_GPU_DEVICE_ID
@ PROP_GPU_DEVICE_ID
Definition: sources/gst-plugins/gst-nvinfer/gstnvinfer.h:78
NVBUF_MEM_CUDA_DEVICE
@ NVBUF_MEM_CUDA_DEVICE
Specifies CUDA Device memory type.
Definition: sources/includes/nvbufsurface.h:359
NVBUF_MEM_DEFAULT
@ NVBUF_MEM_DEFAULT
Specifies the default memory type, i.e.
Definition: sources/includes/nvbufsurface.h:355
NVBUF_MEM_SYSTEM
@ NVBUF_MEM_SYSTEM
Specifies memory allocated by malloc().
Definition: sources/includes/nvbufsurface.h:367
GST_TYPE_COMPUTE_HW
#define GST_TYPE_COMPUTE_HW
Definition: sources/includes/gst-nvcommon.h:89
GST_TYPE_NVBUF_MEMORY_TYPE
#define GST_TYPE_NVBUF_MEMORY_TYPE
Definition: sources/includes/gst-nvcommon.h:86
NvBufSurfTransformCompute_Default
@ NvBufSurfTransformCompute_Default
Specifies VIC as a compute device for Jetson or dGPU for an x86_64 system.
Definition: sources/includes/nvbufsurftransform.h:50
PROP_INTERPOLATION_METHOD
@ PROP_INTERPOLATION_METHOD
Definition: sources/gst-plugins/gst-nvmultiurisrcbin/gstdsnvmultiurisrcbin.h:90
PROP_COMPUTE_HW
@ PROP_COMPUTE_HW
Definition: sources/gst-plugins/gst-nvmultiurisrcbin/gstdsnvmultiurisrcbin.h:89
NvBufSurfTransformInter_Default
@ NvBufSurfTransformInter_Default
Specifies GPU-Nearest, VIC-Nearest interpolation.
Definition: sources/includes/nvbufsurftransform.h:100
PROP_NVBUF_MEMORY_TYPE
@ PROP_NVBUF_MEMORY_TYPE
Definition: sources/gst-plugins/gst-nvmultiurisrcbin/gstdsnvmultiurisrcbin.h:88