NVIDIA DeepStream SDK API Reference

4.0.2 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 
30 
47 #ifndef __NVLL_OSD_STRUCT_DEFS__
48 #define __NVLL_OSD_STRUCT_DEFS__
49 
50 #ifdef __cplusplus
51 extern "C"
52 {
53 #endif
54 
55 #define NVOSD_MAX_NUM_RECTS 128
56 #define MAX_BG_CLR 20
57 
61 typedef enum {
70 } NvOSD_Mode;
71 
75 typedef struct _NvOSD_ColorParams {
76  double red;
79  double green;
82  double blue;
85  double alpha;
88 
92 typedef struct _NvOSD_FontParams {
93  char * font_name;
98 // char font_name[64]; /**< Holds pointer to the string containing
99 // font name. */
100 
101  unsigned int font_size;
105 
106 
111 typedef struct _NvOSD_TextParams {
112  char * display_text;
114  unsigned int x_offset;
116  unsigned int y_offset;
126 
127 typedef struct _NvOSD_Color_info {
128  int id;
131 
135 typedef struct _NvOSD_RectParams {
136  unsigned int left;
138  unsigned int top;
140  unsigned int width;
142  unsigned int height;
144  unsigned int border_width;
149  unsigned int has_bg_color;
152  unsigned int reserved;
158  int color_id;
160 
164 typedef struct _NvOSD_LineParams {
165  unsigned int x1;
167  unsigned int y1;
169  unsigned int x2;
171  unsigned int y2;
173  unsigned int line_width;
178 
179 #ifdef __cplusplus
180 }
181 #endif
182 
183 #endif
unsigned int x2
Holds width of the box in pixels.
struct _NvOSD_Color_info NvOSD_Color_info
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.
unsigned int line_width
Holds border_width of the box in pixels.
Holds the font parameters of the text to be overlayed.
Holds the box parameters of the box to be overlayed.
unsigned int x1
Holds left coordinate of the box in pixels.
struct _NvOSD_FontParams NvOSD_FontParams
Holds the font parameters of the text to be overlayed.
unsigned int top
Holds top coordinate of the box in pixels.
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.
NvOSD_Mode
List modes used to overlay boxes and text.
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.
struct _NvOSD_ColorParams NvOSD_ColorParams
Holds the color parameters of the box or text to be overlayed.
unsigned int left
Holds left coordinate of the box in pixels.
double alpha
Holds alpha component of color.
Holds the box parameters of the line to be overlayed.
Selects NV HW engine for rectangle draw and mask.
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.
Selects CPU for OSD processing.
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.
struct _NvOSD_RectParams NvOSD_RectParams
Holds the box parameters of the box 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.
struct _NvOSD_TextParams NvOSD_TextParams
Holds the text parameters of the text to be overlayed.
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.
NvOSD_FontParams font_params
font_params.
double green
Holds green component of color.
Selects GPU for OSD processing.
NvOSD_ColorParams line_color
Holds color params of the border of the box.
NvOSD_ColorParams bg_color
Holds background color of the box.