NVIDIA DeepStream SDK API Reference

4.0 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
nvll_osd_struct.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in
11  * the documentation and/or other materials provided with the
12  * distribution.
13  * 3. The names of its contributors may not be used to endorse or promote
14  * products derived from this software without specific prior written
15  * permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
23  * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
24  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28  */
29 
46 #ifndef __NVLL_OSD_STRUCT_DEFS__
47 #define __NVLL_OSD_STRUCT_DEFS__
48 
49 #ifdef __cplusplus
50 extern "C"
51 {
52 #endif
53 
54 #define NVOSD_MAX_NUM_RECTS 128
55 #define MAX_BG_CLR 20
56 
60 typedef enum {
69 } NvOSD_Mode;
70 
74 typedef struct _NvOSD_ColorParams {
75  double red;
78  double green;
81  double blue;
84  double alpha;
87 
91 typedef struct _NvOSD_FontParams {
92  char * font_name;
97 // char font_name[64]; /**< Holds pointer to the string containing
98 // font name. */
99 
100  unsigned int font_size;
104 
105 
110 typedef struct _NvOSD_TextParams {
111  char * display_text;
113  unsigned int x_offset;
115  unsigned int y_offset;
125 
126 typedef struct _NvOSD_Color_info {
127  int id;
130 
134 typedef struct _NvOSD_RectParams {
135  unsigned int left;
137  unsigned int top;
139  unsigned int width;
141  unsigned int height;
143  unsigned int border_width;
148  unsigned int has_bg_color;
151  unsigned int reserved;
157  int color_id;
159 
163 typedef struct _NvOSD_LineParams {
164  unsigned int x1;
166  unsigned int y1;
168  unsigned int x2;
170  unsigned int y2;
172  unsigned int line_width;
177 
178 #ifdef __cplusplus
179 }
180 #endif
181 
182 #endif
unsigned int x2
Holds width of the box in pixels.
struct _NvOSD_RectParams NvOSD_RectParams
Holds the box parameters of the box to be overlayed.
unsigned int y_offset
Holds vertical offset w.r.t top left pixel of the frame.
unsigned int y2
Holds height of the box in pixels.
Selects GPU for OSD processing.
unsigned int line_width
Holds border_width of the box in pixels.
Holds the font parameters of the text to be overlayed.
struct _NvOSD_ColorParams NvOSD_ColorParams
Holds the color parameters of the box or text to be overlayed.
Holds the box parameters of the box to be overlayed.
struct _NvOSD_TextParams NvOSD_TextParams
Holds the text parameters of the text to be overlayed.
NvOSD_Mode
List modes used to overlay boxes and text.
unsigned int x1
Holds left coordinate of the box in pixels.
unsigned int top
Holds top coordinate of the box in pixels.
struct _NvOSD_Color_info NvOSD_Color_info
unsigned int height
Holds height of the box in pixels.
struct _NvOSD_LineParams NvOSD_LineParams
Holds the box parameters of the line to be overlayed.
NvOSD_ColorParams border_color
Holds color params of the border of the box.
unsigned int reserved
Reserved field for future usage.
unsigned int x_offset
Holds horizontal offset w.r.t top left pixel of the frame.
char * display_text
Holds the text to be overlayed.
unsigned int left
Holds left coordinate of the box in pixels.
double alpha
Holds alpha component of color.
Selects CPU for OSD processing.
Holds the box parameters of the line to be overlayed.
char * font_name
Holds pointer to the string containing font name.
NvOSD_ColorParams font_color
Holds font color.
int set_bg_clr
Boolean to indicate text has background color.
NvOSD_ColorParams text_bg_clr
Background color for text.
Holds the text parameters of the text to be overlayed.
struct _NvOSD_FontParams NvOSD_FontParams
Holds the font parameters of the text to be overlayed.
unsigned int width
Holds width of the box in pixels.
NvOSD_ColorParams color
Holds the color parameters of the box or text to be overlayed.
unsigned int has_bg_color
Holds boolean value indicating whether box has background color.
unsigned int y1
Holds top coordinate of the box in pixels.
unsigned int border_width
Holds border_width of the box in pixels.
double blue
Holds blue component of color.
double red
Holds red component of color.
unsigned int font_size
Holds size of the font.
Selects NV HW engine for rectangle draw and mask.
NvOSD_FontParams font_params
font_params.
double green
Holds green component of color.
NvOSD_ColorParams line_color
Holds color params of the border of the box.
NvOSD_ColorParams bg_color
Holds background color of the box.