NVIDIA DeepStream SDK API Reference

9.2 Release
sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2020-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_DS_NVOSD_BIN_H__
19 #define __GST_DS_NVOSD_BIN_H__
20 
21 #include <gst/video/video.h>
22 #include "nvll_osd_struct.h"
23 
24 #include <unordered_map>
25 #include <string>
26 
27 G_BEGIN_DECLS
28 
29 enum
30 {
42 };
43 
44 /* Standard GStreamer boilerplate */
45 typedef struct _GstDsNvOSDBin
46 {
47  GstBin bin;
48 
49  GstElement *queue;
50  GstElement *nvvidconv;
51  GstElement *conv_queue;
52  GstElement *nvosd;
53 
55 
56  gchar *font;
57  guint text_size;
60  std::unordered_map<std::string, NvOSD_ColorParams> *class_border_color_map;
61  std::unordered_map<std::string, NvOSD_ColorParams> *class_bg_color_map;
62 
65 
66  guint border_width;
68 
69 typedef struct _GstDsNvOSDBinClass
70 {
71  GstBinClass parent_class;
72 
73  void (*set_display_text_enabled) (GstDsNvOSDBin *, gboolean);
75 
76 /* Standard GStreamer boilerplate */
77 #define GST_TYPE_DS_NVOSD_BIN (gst_ds_nvosd_bin_get_type())
78 #define GST_DS_NVOSD_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DS_NVOSD_BIN,GstDsNvOSDBin))
79 #define GST_DS_NVOSD_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DS_NVOSD_BIN,GstDsNvOSDBinClass))
80 #define GST_DS_NVOSD_BIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_DS_NVOSD_BIN, GstDsNvOSDBinClass))
81 #define GST_IS_DS_NVOSD_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DS_NVOSD_BIN))
82 #define GST_IS_DS_NVOSD_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DS_NVOSD_BIN))
83 #define GST_DS_NVOSD_BIN_CAST(obj) ((GstDsNvOSDBin *)(obj))
84 
85 GType gst_ds_nvosd_bin_get_type (void);
86 
87 G_END_DECLS
88 #endif /* __GST_DS_NVOSD_BIN_H__ */
PROP_OSD_REFORMAT_OBJECT_LABELS
@ PROP_OSD_REFORMAT_OBJECT_LABELS
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:40
PROP_OSD_BBOX_BORDER_COLORS
@ PROP_OSD_BBOX_BORDER_COLORS
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:36
GstDsNvOSDBinClass
struct _GstDsNvOSDBinClass GstDsNvOSDBinClass
_GstDsNvOSDBin::text_color
NvOSD_ColorParams text_color
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:58
PROP_OSD_TEXT_COLOR
@ PROP_OSD_TEXT_COLOR
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:34
PROP_OSD_BBOX_BG_COLORS
@ PROP_OSD_BBOX_BG_COLORS
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:37
_GstDsNvOSDBin::prop_set
gboolean prop_set[PROP_OSD_LAST]
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:54
_GstDsNvOSDBinClass::parent_class
GstBinClass parent_class
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:71
_GstDsNvOSDBin::conv_queue
GstElement * conv_queue
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:51
_GstDsNvOSDBin::queue
GstElement * queue
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:49
_GstDsNvOSDBin::font
gchar * font
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:56
_GstDsNvOSDBin::class_border_color_map
std::unordered_map< std::string, NvOSD_ColorParams > * class_border_color_map
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:60
PROP_OSD_0
@ PROP_OSD_0
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:31
PROP_OSD_BORDER_WIDTH
@ PROP_OSD_BORDER_WIDTH
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:38
_GstDsNvOSDBinClass::set_display_text_enabled
void(* set_display_text_enabled)(GstDsNvOSDBin *, gboolean)
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:73
_GstDsNvOSDBin::text_size
guint text_size
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:57
PROP_OSD_TEXT_BG_COLOR
@ PROP_OSD_TEXT_BG_COLOR
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:35
gst_ds_nvosd_bin_get_type
GType gst_ds_nvosd_bin_get_type(void)
_GstDsNvOSDBin::reformat_object_labels
gboolean reformat_object_labels
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:64
_GstDsNvOSDBin::border_width
guint border_width
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:66
_GstDsNvOSDBinClass
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:69
_GstDsNvOSDBin::text_bg_color
NvOSD_ColorParams text_bg_color
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:59
_GstDsNvOSDBin::nvosd
GstElement * nvosd
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:52
_GstDsNvOSDBin::nvvidconv
GstElement * nvvidconv
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:50
_GstDsNvOSDBin::bin
GstBin bin
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:47
PROP_OSD_TEXT_SIZE
@ PROP_OSD_TEXT_SIZE
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:33
_NvOSD_ColorParams
Holds the color parameters of the box or text to be overlayed.
Definition: includes/nvll_osd_struct.h:86
_GstDsNvOSDBin::class_bg_color_map
std::unordered_map< std::string, NvOSD_ColorParams > * class_bg_color_map
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:61
PROP_OSD_FONT
@ PROP_OSD_FONT
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:32
_GstDsNvOSDBin
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:45
_GstDsNvOSDBin::display_tracking_id
gboolean display_tracking_id
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:63
GstDsNvOSDBin
struct _GstDsNvOSDBin GstDsNvOSDBin
PROP_OSD_DISPLAY_TRACKING_ID
@ PROP_OSD_DISPLAY_TRACKING_ID
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:39
PROP_OSD_LAST
@ PROP_OSD_LAST
Definition: sources/gst-plugins/gst-nvdsbins/gstdsnvosdbin.h:41