NVIDIA DeepStream SDK API Reference

7.1 Release
gstnvdspostprocess.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: MIT
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in
13  * all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21  * DEALINGS IN THE SOFTWARE.
22  */
23 
24 #ifndef __GST_NVDSPOSTPROCESS_H__
25 #define __GST_NVDSPOSTPROCESS_H__
26 
27 #include <gst/base/gstbasetransform.h>
28 #include <gst/video/video.h>
29 #include <glib-object.h>
30 #include <vector>
31 
32 #include <cuda_runtime.h>
33 #include "gstnvdsmeta.h"
34 #include "nvtx3/nvToolsExt.h"
35 
38 #include "nvbufsurftransform.h"
39 
40 /* Package and library details required for plugin_init */
41 #define PACKAGE "nvdspostprocess"
42 #define VERSION "1.0"
43 #define LICENSE "Proprietary"
44 #define DESCRIPTION "NVIDIA nvdspostprocess plugin for parsing inference output from nvdsinfer/nvdsinferserver with DeepStream on DGPU/Jetson"
45 #define BINARY_PACKAGE "NVIDIA DeepStream Post Processing Plugin"
46 #define URL "http://nvidia.com/"
47 
48 G_BEGIN_DECLS
49 /* Standard boilerplate stuff */
52 
53 /* Standard boilerplate stuff */
54 #define GST_TYPE_NVDSPOSTPROCESS (gst_nvdspostprocess_get_type())
55 #define GST_NVDSPOSTPROCESS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_NVDSPOSTPROCESS,GstNvDsPostProcess))
56 #define GST_NVDSPOSTPROCESS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_NVDSPOSTPROCESS,GstNvDsPostProcessClass))
57 #define GST_NVDSPOSTPROCESS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_NVDSPOSTPROCESS, GstNvDsPostProcessClass))
58 #define GST_IS_NVDSPOSTPROCESS(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_NVDSPOSTPROCESS))
59 #define GST_IS_NVDSPOSTPROCESS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_NVDSPOSTPROCESS))
60 #define GST_NVDSPOSTPROCESS_CAST(obj) ((GstNvDsPostProcess *)(obj))
61 
63 {
64  GstBaseTransform base_trans;
65 
69 
72 
75 
76  /* Store postprocess lib property values */
77  std::vector<Property> *vecProp;
79 
81  gboolean stop;
82 
84  GstVideoInfo in_video_info;
85  GstVideoInfo out_video_info;
86 
88  guint gpu_id;
89 
91  nvtxDomainHandle_t nvtx_domain;
92 
93  GstCaps *sinkcaps;
94  GstCaps *srccaps;
96  gint compute_hw;
100 };
101 
102 
105 {
106  GstBaseTransformClass parent_class;
107 };
108 
109 GType gst_nvdspostprocess_get_type (void);
110 
111 G_END_DECLS
112 #endif /* __GST_NVDSPOSTPROCESS_H__ */
_GstNvDsPostProcess::stop
gboolean stop
Boolean to signal output thread to stop.
Definition: gstnvdspostprocess.h:81
_GstNvDsPostProcess::cu_nbstream
cudaStream_t cu_nbstream
Definition: gstnvdspostprocess.h:97
IDSPostProcessLibrary
Definition: nvdspostprocesslib_interface.hpp:54
_GstNvDsPostProcess::srccaps
GstCaps * srccaps
Definition: gstnvdspostprocess.h:94
_GstNvDsPostProcess::out_video_info
GstVideoInfo out_video_info
Definition: gstnvdspostprocess.h:85
_GstNvDsPostProcess::algo_ctx
IDSPostProcessLibrary * algo_ctx
Definition: gstnvdspostprocess.h:68
_GstNvDsPostProcess::base_trans
GstBaseTransform base_trans
Definition: gstnvdspostprocess.h:64
_GstNvDsPostProcess::gpu_id
guint gpu_id
GPU ID on which we expect to execute the task.
Definition: gstnvdspostprocess.h:88
_GstNvDsPostProcess::preprocessor_support
gboolean preprocessor_support
Boolean to indicate whether postprocessor support for preprocesor should be enabled.
Definition: gstnvdspostprocess.h:99
_GstNvDsPostProcess::algo_factory
DSPostProcessLibrary_Factory * algo_factory
Custom Library Factory and Interface.
Definition: gstnvdspostprocess.h:67
_GstNvDsPostProcess::config_params
NvBufSurfTransformConfigParams config_params
Definition: gstnvdspostprocess.h:95
_GstNvDsPostProcess::postprocess_lib_config_file
gchar * postprocess_lib_config_file
Custom Library config file path.
Definition: gstnvdspostprocess.h:74
_NvBufSurfTransformConfigParams
Holds configuration parameters for a transform/composite session.
Definition: nvbufsurftransform.h:172
_GstNvDsPostProcess::postprocess_prop_string
gchar * postprocess_prop_string
Definition: gstnvdspostprocess.h:78
_GstNvDsPostProcess::postprocess_lib_name
gchar * postprocess_lib_name
Custom Library Name and output caps string.
Definition: gstnvdspostprocess.h:71
_GstNvDsPostProcess
Definition: gstnvdspostprocess.h:62
cudaStream_t
struct CUstream_st * cudaStream_t
Forward declaration of cudaStream_t.
Definition: nvbufsurftransform.h:34
nvdspostprocesslib_factory.hpp
gstnvdsmeta.h
GstNvDsPostProcess
typedefG_BEGIN_DECLS struct _GstNvDsPostProcess GstNvDsPostProcess
Definition: gstnvdspostprocess.h:50
_GstNvDsPostProcessClass
Boiler plate stuff.
Definition: gstnvdspostprocess.h:104
DSPostProcessLibrary_Factory
Definition: nvdspostprocesslib_factory.hpp:40
_GstNvDsPostProcess::in_video_info
GstVideoInfo in_video_info
Input and Output video info (resolution, color format, framerate, etc)
Definition: gstnvdspostprocess.h:84
nvdspostprocesslib_interface.hpp
gst_nvdspostprocess_get_type
GType gst_nvdspostprocess_get_type(void)
_GstNvDsPostProcess::nvtx_domain
nvtxDomainHandle_t nvtx_domain
NVTX Domain.
Definition: gstnvdspostprocess.h:91
_GstNvDsPostProcessClass::parent_class
GstBaseTransformClass parent_class
Definition: gstnvdspostprocess.h:106
nvbufsurftransform.h
_GstNvDsPostProcess::compute_hw
gint compute_hw
Definition: gstnvdspostprocess.h:96
_GstNvDsPostProcess::vecProp
std::vector< Property > * vecProp
Definition: gstnvdspostprocess.h:77
_GstNvDsPostProcess::sinkcaps
GstCaps * sinkcaps
Definition: gstnvdspostprocess.h:93