NVIDIA DeepStream SDK API Reference

7.0 Release
gstnvdsosd.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2016-2022 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_NVDSOSD_H__
14 #define __GST_NVDSOSD_H__
15 
16 #include <gst/gst.h>
17 #include <gst/video/video.h>
18 #include <gst/video/gstvideofilter.h>
19 #include <stdlib.h>
20 #include "nvll_osd_api.h"
21 #include "gstnvdsmeta.h"
22 
23 #define MAX_BG_CLR 20
24 
25 G_BEGIN_DECLS
26 /* Standard GStreamer boilerplate */
27 #define GST_TYPE_NVDSOSD \
28  (gst_nvds_osd_get_type())
29 #define GST_NVDSOSD(obj) \
30  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_NVDSOSD,GstNvDsOsd))
31 #define GST_NVDSOSD_CLASS(klass) \
32  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_NVDSOSD,GstNvDsOsdClass))
33 #define GST_IS_NVDSOSD(obj) \
34  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_NVDSOSD))
35 #define GST_IS_NVDSOSD_CLASS(klass) \
36  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_NVDSOSD))
37 /* Version number of package */
38 #define VERSION "1.8.2"
39 #define PACKAGE_DESCRIPTION "Gstreamer plugin to draw rectangles and text"
40 /* Define under which licence the package has been released */
41 #define PACKAGE_LICENSE "Proprietary"
42 #define PACKAGE_NAME "GStreamer nvosd Plugin"
43 /* Define to the home page for this package. */
44 #define PACKAGE_URL "http://nvidia.com/"
45 #define GST_CAPS_FEATURE_MEMORY_NVMM "memory:NVMM"
46 typedef struct _GstNvDsOsd GstNvDsOsd;
48 
53 {
55  GstBaseTransform parent_instance;
56 
57  /* Width of buffer. */
58  gint width;
59  /* Height of buffer. */
60  gint height;
61 
67 
69  gboolean show_clock;
72 
87 
89  guint num_rect;
91  guint num_segments;
93  guint num_strings;
95  guint num_lines;
97  guint num_arrows;
99  guint num_circles;
100 
113 
115  gchar *font;
117  guint clock_color;
123  guint frame_num;
125  gboolean draw_text;
127  gboolean draw_bbox;
129  gboolean draw_mask;
132 
136  guint gpu_id;
138  void *conv_buf;
139 };
140 
141 /* GStreamer boilerplate. */
143 {
144  GstBaseTransformClass parent_class;
145 };
146 
147 GType gst_nvds_osd_get_type (void);
148 
149 G_END_DECLS
150 #endif /* __GST_NVDSOSD_H__ */
_NvOSD_LineParams
Holds the box parameters of a line to be overlayed.
Definition: nvll_osd_struct.h:181
_GstNvDsOsd::num_lines
guint num_lines
Number of lines to be drawn for a frame.
Definition: gstnvdsosd.h:95
_GstNvDsOsd::draw_bbox
gboolean draw_bbox
Boolean indicating whether bounding is to be drawn.
Definition: gstnvdsosd.h:127
_NvOSD_RectParams
Holds the box parameters of the box to be overlayed.
Definition: nvll_osd_struct.h:140
_NvOSD_MaskParams
Holds the mask parameters of the segment to be overlayed.
Definition: nvll_osd_struct.h:170
_NvOSD_Color_info
Definition: nvll_osd_struct.h:132
_GstNvDsOsd::num_rect
guint num_rect
Number of rectangles to be drawn for a frame.
Definition: gstnvdsosd.h:89
_GstNvDsOsd::show_clock
gboolean show_clock
Boolean value indicating whether clock is enabled.
Definition: gstnvdsosd.h:69
_GstNvDsOsd::num_strings
guint num_strings
Number of strings to be drawn for a frame.
Definition: gstnvdsosd.h:93
_GstNvDsOsd::frame_num
guint frame_num
Integer indicating the frame number.
Definition: gstnvdsosd.h:123
nvll_osd_api.h
_GstNvDsOsd::parent_instance
GstBaseTransform parent_instance
Should be the first member when extending from GstBaseTransform.
Definition: gstnvdsosd.h:55
_GstNvDsOsdClass::parent_class
GstBaseTransformClass parent_class
Definition: gstnvdsosd.h:144
MAX_BG_CLR
#define MAX_BG_CLR
Definition: gstnvdsosd.h:23
_GstNvDsOsd::border_width
guint border_width
Border width of object.
Definition: gstnvdsosd.h:121
_NvOSD_CircleParams
Holds circle parameters to be overlayed.
Definition: nvll_osd_struct.h:224
_GstNvDsOsd::frame_line_params
NvOSD_FrameLineParams * frame_line_params
Structure containing details of lines to be drawn for a frame.
Definition: gstnvdsosd.h:108
_NvOSD_FrameRectParams
Holds information about the rectangles in a frame.
Definition: nvll_osd_api.h:71
_GstNvDsOsd::rect_params
NvOSD_RectParams * rect_params
List of rectangles to be drawn.
Definition: gstnvdsosd.h:76
_GstNvDsOsd::clock_text_params
NvOSD_TextParams clock_text_params
Structure containing text params for clock.
Definition: gstnvdsosd.h:71
_GstNvDsOsd::num_circles
guint num_circles
Number of circles to be drawn for a frame.
Definition: gstnvdsosd.h:99
_GstNvDsOsd::frame_mask_params
NvOSD_FrameSegmentMaskParams * frame_mask_params
Structure containing details of segment masks to be drawn for a frame.
Definition: gstnvdsosd.h:104
_NvOSD_ArrowParams
Holds arrow parameters to be overlaid.
Definition: nvll_osd_struct.h:200
_GstNvDsOsd::color_info
NvOSD_Color_info color_info[MAX_BG_CLR]
Array containing color info for blending.
Definition: gstnvdsosd.h:131
gst_nvds_osd_get_type
GType gst_nvds_osd_get_type(void)
_GstNvDsOsd::nvdsosd_context
void * nvdsosd_context
Pointer to the nvdsosd context.
Definition: gstnvdsosd.h:63
_GstNvDsOsd::gpu_id
guint gpu_id
Integer indicating gpu id to be used.
Definition: gstnvdsosd.h:136
gstnvdsmeta.h
_GstNvDsOsd::frame_text_params
NvOSD_FrameTextParams * frame_text_params
Structure containing details of text to be overlayed for a frame.
Definition: gstnvdsosd.h:106
_GstNvDsOsd::mask_rect_params
NvOSD_RectParams * mask_rect_params
List of rectangles for segment masks to be drawn.
Definition: gstnvdsosd.h:78
_GstNvDsOsd
GstNvDsOsd element structure.
Definition: gstnvdsosd.h:52
_NvOSD_FrameCircleParams
Holds information about the circles in a frame.
Definition: nvll_osd_api.h:137
NvOSD_Mode
NvOSD_Mode
Defines modes used to overlay boxes and text.
Definition: nvll_osd_struct.h:42
_GstNvDsOsd::num_arrows
guint num_arrows
Number of arrows to be drawn for a frame.
Definition: gstnvdsosd.h:97
_GstNvDsOsd::height
gint height
Definition: gstnvdsosd.h:60
_GstNvDsOsd::conv_buf
void * conv_buf
Pointer to the converted buffer.
Definition: gstnvdsosd.h:138
_GstNvDsOsd::nvdsosd_mode
NvOSD_Mode nvdsosd_mode
Enum indicating how the objects are drawn, i.e., CPU, GPU or VIC (for Jetson only).
Definition: gstnvdsosd.h:66
_NvOSD_FrameTextParams
Holds information about the text in a frame.
Definition: nvll_osd_api.h:55
_GstNvDsOsd::frame_rect_params
NvOSD_FrameRectParams * frame_rect_params
Structure containing details of rectangles to be drawn for a frame.
Definition: gstnvdsosd.h:102
_NvOSD_FrameArrowParams
Holds information about the arrows in a frame.
Definition: nvll_osd_api.h:121
_GstNvDsOsdClass
Definition: gstnvdsosd.h:142
_GstNvDsOsd::num_class_entries
int num_class_entries
Integer indicating number of detected classes.
Definition: gstnvdsosd.h:134
_NvOSD_FrameSegmentMaskParams
Holds information about the rectangles in a frame.
Definition: nvll_osd_api.h:87
_GstNvDsOsd::frame_circle_params
NvOSD_FrameCircleParams * frame_circle_params
Structure containing details of circles to be drawn for a frame.
Definition: gstnvdsosd.h:112
_NvOSD_TextParams
Holds parameters of text to be overlayed.
Definition: nvll_osd_struct.h:115
_GstNvDsOsd::font
gchar * font
Font of the text to be displayed.
Definition: gstnvdsosd.h:115
_GstNvDsOsd::frame_arrow_params
NvOSD_FrameArrowParams * frame_arrow_params
Structure containing details of arrows to be drawn for a frame.
Definition: gstnvdsosd.h:110
_GstNvDsOsd::circle_params
NvOSD_CircleParams * circle_params
List of circles to be drawn.
Definition: gstnvdsosd.h:86
_GstNvDsOsd::num_segments
guint num_segments
Number of segment masks to be drawn for a frame.
Definition: gstnvdsosd.h:91
_GstNvDsOsd::mask_params
NvOSD_MaskParams * mask_params
List of segment masks to be drawn.
Definition: gstnvdsosd.h:80
_GstNvDsOsd::arrow_params
NvOSD_ArrowParams * arrow_params
List of arrows to be drawn.
Definition: gstnvdsosd.h:84
_GstNvDsOsd::draw_mask
gboolean draw_mask
Boolean indicating whether instance mask is to be drawn.
Definition: gstnvdsosd.h:129
_GstNvDsOsd::draw_text
gboolean draw_text
Boolean indicating whether text is to be drawn.
Definition: gstnvdsosd.h:125
_GstNvDsOsd::width
gint width
Definition: gstnvdsosd.h:58
_GstNvDsOsd::clock_color
guint clock_color
Color of the clock, if enabled.
Definition: gstnvdsosd.h:117
_NvOSD_FrameLineParams
Holds information about the lines in a frame.
Definition: nvll_osd_api.h:105
_GstNvDsOsd::text_params
NvOSD_TextParams * text_params
List of strings to be drawn.
Definition: gstnvdsosd.h:74
_GstNvDsOsd::line_params
NvOSD_LineParams * line_params
List of lines to be drawn.
Definition: gstnvdsosd.h:82
_GstNvDsOsd::clock_font_size
guint clock_font_size
Font size of the clock, if enabled.
Definition: gstnvdsosd.h:119