NVIDIA DeepStream SDK API Reference

9.1 Release
sources/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2022-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 __GST_NVDSPOSTPROCESS_H__
19 #define __GST_NVDSPOSTPROCESS_H__
20 
21 #include <gst/base/gstbasetransform.h>
22 #include <gst/video/video.h>
23 #include <glib-object.h>
24 #include <vector>
25 
26 #include <cuda_runtime.h>
27 #include "gstnvdsmeta.h"
28 #include "nvtx3/nvToolsExt.h"
29 
30 #include "nvdspostprocesslib_factory.hpp"
31 #include "nvdspostprocesslib_interface.hpp"
32 #include "nvbufsurftransform.h"
33 
34 /* Package and library details required for plugin_init */
35 #define PACKAGE "nvdspostprocess"
36 #define VERSION "1.0"
37 #define LICENSE "Proprietary"
38 #define DESCRIPTION "NVIDIA nvdspostprocess plugin for parsing inference output from nvdsinfer/nvdsinferserver with DeepStream on DGPU/Jetson"
39 #define BINARY_PACKAGE "NVIDIA DeepStream Post Processing Plugin"
40 #define URL "http://nvidia.com/"
41 
42 G_BEGIN_DECLS
43 /* Standard boilerplate stuff */
46 
47 /* Standard boilerplate stuff */
48 #define GST_TYPE_NVDSPOSTPROCESS (gst_nvdspostprocess_get_type())
49 #define GST_NVDSPOSTPROCESS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_NVDSPOSTPROCESS,GstNvDsPostProcess))
50 #define GST_NVDSPOSTPROCESS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_NVDSPOSTPROCESS,GstNvDsPostProcessClass))
51 #define GST_NVDSPOSTPROCESS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_NVDSPOSTPROCESS, GstNvDsPostProcessClass))
52 #define GST_IS_NVDSPOSTPROCESS(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_NVDSPOSTPROCESS))
53 #define GST_IS_NVDSPOSTPROCESS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_NVDSPOSTPROCESS))
54 #define GST_NVDSPOSTPROCESS_CAST(obj) ((GstNvDsPostProcess *)(obj))
55 
57 {
58  GstBaseTransform base_trans;
59 
63 
66 
69 
70  /* Store postprocess lib property values */
71  std::vector<Property> *vecProp;
73 
75  gboolean stop;
76 
78  GstVideoInfo in_video_info;
79  GstVideoInfo out_video_info;
80 
82  guint gpu_id;
83 
85  nvtxDomainHandle_t nvtx_domain;
86 
87  GstCaps *sinkcaps;
88  GstCaps *srccaps;
90  gint compute_hw;
94 };
95 
96 
99 {
100  GstBaseTransformClass parent_class;
101 };
102 
103 GType gst_nvdspostprocess_get_type (void);
104 
105 G_END_DECLS
106 #endif /* __GST_NVDSPOSTPROCESS_H__ */
cudaStream_t
struct CUstream_st * cudaStream_t
Forward declaration of cudaStream_t.
Definition: sources/includes/nvbufsurftransform.h:35
_GstNvDsPostProcess::stop
gboolean stop
Boolean to signal output thread to stop.
Definition: sources/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.h:75
_GstNvDsPostProcess::cu_nbstream
cudaStream_t cu_nbstream
Definition: sources/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.h:91
IDSPostProcessLibrary
Definition: sources/gst-plugins/gst-nvdspostprocess/includes/nvdspostprocesslib_interface.hpp:48
_GstNvDsPostProcess::postprocess_lib_name
gchar * postprocess_lib_name
Custom Library Name and output caps string.
Definition: sources/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.h:65
_GstNvDsPostProcess::out_video_info
GstVideoInfo out_video_info
Definition: sources/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.h:79
_GstNvDsPostProcess::base_trans
GstBaseTransform base_trans
Definition: sources/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.h:58
_GstNvDsPostProcess::vecProp
std::vector< Property > * vecProp
Definition: sources/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.h:71
_GstNvDsPostProcess::sinkcaps
GstCaps * sinkcaps
Definition: sources/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.h:87
GstNvDsPostProcess
typedefG_BEGIN_DECLS struct _GstNvDsPostProcess GstNvDsPostProcess
Definition: sources/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.h:44
gst_nvdspostprocess_get_type
GType gst_nvdspostprocess_get_type(void)
_GstNvDsPostProcess::gpu_id
guint gpu_id
GPU ID on which we expect to execute the task.
Definition: sources/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.h:82
_GstNvDsPostProcess::preprocessor_support
gboolean preprocessor_support
Boolean to indicate whether postprocessor support for preprocesor should be enabled.
Definition: sources/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.h:93
_GstNvDsPostProcess::config_params
NvBufSurfTransformConfigParams config_params
Definition: sources/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.h:89
_GstNvDsPostProcess::algo_ctx
IDSPostProcessLibrary * algo_ctx
Definition: sources/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.h:62
_NvBufSurfTransformConfigParams
Holds configuration parameters for a transform/composite session.
Definition: sources/includes/nvbufsurftransform.h:175
_GstNvDsPostProcess
Definition: sources/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.h:56
_GstNvDsPostProcess::algo_factory
DSPostProcessLibrary_Factory * algo_factory
Custom Library Factory and Interface.
Definition: sources/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.h:61
_GstNvDsPostProcessClass
Boiler plate stuff.
Definition: sources/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.h:98
DSPostProcessLibrary_Factory
Definition: sources/gst-plugins/gst-nvdspostprocess/includes/nvdspostprocesslib_factory.hpp:34
_GstNvDsPostProcess::in_video_info
GstVideoInfo in_video_info
Input and Output video info (resolution, color format, framerate, etc)
Definition: sources/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.h:78
_GstNvDsPostProcess::postprocess_lib_config_file
gchar * postprocess_lib_config_file
Custom Library config file path.
Definition: sources/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.h:68
_GstNvDsPostProcess::nvtx_domain
nvtxDomainHandle_t nvtx_domain
NVTX Domain.
Definition: sources/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.h:85
_GstNvDsPostProcess::postprocess_prop_string
gchar * postprocess_prop_string
Definition: sources/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.h:72
_GstNvDsPostProcess::srccaps
GstCaps * srccaps
Definition: sources/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.h:88
_GstNvDsPostProcessClass::parent_class
GstBaseTransformClass parent_class
Definition: sources/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.h:100
_GstNvDsPostProcess::compute_hw
gint compute_hw
Definition: sources/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.h:90