NVIDIA DeepStream SDK API Reference

9.0 Release
sources/gst-plugins/gst-nvreplay/gstnvreplay.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
13 #ifndef __GST_NVREPLAY_H__
14 #define __GST_NVREPLAY_H__
15 
16 #include <vector>
17 
18 #include "nvbufsurftransform.h"
19 #include "gstnvdsmeta.h"
20 #include "gstnvreplay_lib.h"
21 
22 /* Package and library details required for plugin_init */
23 #define PACKAGE "nvreplay"
24 #define VERSION "1.0.0"
25 #define LICENSE "Proprietary"
26 #define DESCRIPTION "Gstreamer plugin to load ground truth labels for evaluation"
27 #define BINARY_PACKAGE "Gstreamer nvreplay plugin"
28 #define URL "http://nvidia.com/"
29 
30 
31 G_BEGIN_DECLS
32 /* Standard boilerplate stuff */
33 typedef struct _GstNvReplay GstNvReplay;
35 typedef std::vector<float> Bbox;
36 /* Standard boilerplate stuff */
37 #define GST_TYPE_NVREPLAY (gst_nvreplay_get_type())
38 #define GST_NVREPLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_NVREPLAY,GstNvReplay))
39 #define GST_NVREPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_NVREPLAY,GstNvReplayClass))
40 #define GST_NVREPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_NVREPLAY, GstNvReplayClass))
41 #define GST_IS_NVREPLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_NVREPLAY))
42 #define GST_IS_NVREPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_NVREPLAY))
43 #define GST_NVREPLAY_CAST(obj) ((GstNvReplay *)(obj))
44 
46 {
47  GstBaseTransform base_trans;
48 
49  // Unique ID of the element. The labels generated by the element will be
50  // updated at index `unique_id` of attr_info array in NvDsObjectParams.
51  guint unique_id;
52 
53  // Max frame number of each stream
54  std::vector<guint64> max_frame_nums;
56 
57  // Input video info (resolution, color format, framerate, etc)
58  GstVideoInfo video_info;
59 
60  // Resolution at which frames/objects should be processed
61  guint label_width;
62  guint label_height;
63 
64  // Amount of objects processed in single call to algorithm
65  guint batch_size;
66 
67  // The directory of all the ground truth files
68  char* label_dir;
69 
70  // The ground truth file names
71  char* file_names;
72 
73  // Number of batches to skip for adding labels to meta data
74  guint interval;
75 
76  // Counter for number of batches
78 
79  // Ground truth bboxes
80  // <stream0< frame0<bbox0, bbox1>, frame1<bbox0, bbox1> ... >. stream1<> ... >
81  std::vector<std::vector<std::vector<Bbox>>> label_bboxes;
82 };
83 
84 // Boiler plate stuff
86 {
87  GstBaseTransformClass parent_class;
88 };
89 
90 GType gst_nvreplay_get_type (void);
91 
92 G_END_DECLS
93 #endif /* __GST_NVREPLAY_H__ */
_GstNvReplay::interval_counter
guint interval_counter
Definition: sources/gst-plugins/gst-nvreplay/gstnvreplay.h:77
_GstNvReplay::max_frame_nums_str
char * max_frame_nums_str
Definition: sources/gst-plugins/gst-nvreplay/gstnvreplay.h:55
_GstNvReplayClass
Definition: sources/gst-plugins/gst-nvreplay/gstnvreplay.h:85
_GstNvReplay::file_names
char * file_names
Definition: sources/gst-plugins/gst-nvreplay/gstnvreplay.h:71
gst_nvreplay_get_type
GType gst_nvreplay_get_type(void)
GstNvReplay
typedefG_BEGIN_DECLS struct _GstNvReplay GstNvReplay
Definition: sources/gst-plugins/gst-nvreplay/gstnvreplay.h:33
gstnvreplay_lib.h
_GstNvReplay
Definition: sources/gst-plugins/gst-nvreplay/gstnvreplay.h:45
_GstNvReplay::batch_size
guint batch_size
Definition: sources/gst-plugins/gst-nvreplay/gstnvreplay.h:65
_GstNvReplay::unique_id
guint unique_id
Definition: sources/gst-plugins/gst-nvreplay/gstnvreplay.h:51
_GstNvReplay::video_info
GstVideoInfo video_info
Definition: sources/gst-plugins/gst-nvreplay/gstnvreplay.h:58
_GstNvReplay::interval
guint interval
Definition: sources/gst-plugins/gst-nvreplay/gstnvreplay.h:74
_GstNvReplay::label_height
guint label_height
Definition: sources/gst-plugins/gst-nvreplay/gstnvreplay.h:62
Bbox
std::vector< float > Bbox
Definition: sources/gst-plugins/gst-nvreplay/gstnvreplay.h:35
_GstNvReplay::label_width
guint label_width
Definition: sources/gst-plugins/gst-nvreplay/gstnvreplay.h:61
_GstNvReplayClass::parent_class
GstBaseTransformClass parent_class
Definition: sources/gst-plugins/gst-nvreplay/gstnvreplay.h:87
_GstNvReplay::label_dir
char * label_dir
Definition: sources/gst-plugins/gst-nvreplay/gstnvreplay.h:68
_GstNvReplay::base_trans
GstBaseTransform base_trans
Definition: sources/gst-plugins/gst-nvreplay/gstnvreplay.h:47
_GstNvReplay::label_bboxes
std::vector< std::vector< std::vector< Bbox > > > label_bboxes
Definition: sources/gst-plugins/gst-nvreplay/gstnvreplay.h:81
_GstNvReplay::max_frame_nums
std::vector< guint64 > max_frame_nums
Definition: sources/gst-plugins/gst-nvreplay/gstnvreplay.h:54