NVIDIA DeepStream SDK API Reference

5.0 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvll_osd_api.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2020, 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_API_DEFS__
47 #define __NVLL_OSD_API_DEFS__
48 
49 #include "nvll_osd_struct.h"
50 #include "nvbufsurface.h"
51 
52 #define NVOSD_PRINT_E(f_, ...) \
53  printf("libnvosd (%d):(ERROR) : " f_, __LINE__, ##__VA_ARGS__)
54 
55 #define MAX_IN_BUF 16
56 #define MAX_BORDER_WIDTH 32
57 
58 #ifdef __cplusplus
59 extern "C"
60 {
61 #endif
62 
63 typedef void * NvOSDCtxHandle;
67 typedef struct _NvOSD_FrameTextParams
68 {
78 
80 typedef struct _NvOSD_FrameRectParams
81 {
87  int num_rects;
91 
93 typedef struct _NvOSD_FrameLineParams
94 {
104 
107 {
117 
120 {
130 
136 NvOSDCtxHandle nvll_osd_create_context(void);
137 
143 void nvll_osd_destroy_context(NvOSDCtxHandle nvosd_ctx);
144 
156 void nvll_osd_set_clock_params(NvOSDCtxHandle nvosd_ctx, NvOSD_TextParams *clk_params);
157 
158 
175 int nvll_osd_put_text(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameTextParams *frame_text_params);
176 
202 int nvll_osd_draw_rectangles(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameRectParams *frame_rect_params);
203 
219 int nvll_osd_draw_lines(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameLineParams *frame_line_params);
220 
235 int nvll_osd_draw_arrows(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameArrowParams *frame_arrow_params);
236 
250 int nvll_osd_draw_circles(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameCircleParams *frame_circle_params);
251 
261 void *nvll_osd_set_params (NvOSDCtxHandle nvosd_ctx, int width, int height);
262 
275 int nvll_osd_init_colors_for_hw_blend(void *nvosd_ctx, NvOSD_Color_info * color_info, int num_classes);
276 
277 #ifdef __cplusplus
278 }
279 #endif
280 
281 #endif
struct _NvOSD_FrameCircleParams NvOSD_FrameCircleParams
Holds information about the circles in a frame.
NvBufSurfaceParams * buf_ptr
Holds a pointer to the buffer containing the frame.
Definition: nvll_osd_api.h:109
NvOSD_CircleParams * circle_params_list
Holds the parameters of the circles.
Definition: nvll_osd_api.h:128
NvBufSurface Interface
NvOSD_LineParams * line_params_list
Holds the lines' parameters.
Definition: nvll_osd_api.h:102
NvBufSurfaceParams * buf_ptr
Holds a pointer to the buffer containing the frame.
Definition: nvll_osd_api.h:83
NvBufSurfaceParams * buf_ptr
Holds a pointer to a buffer containing a frame.
Definition: nvll_osd_api.h:70
int nvll_osd_draw_rectangles(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameRectParams *frame_rect_params)
Overlays boxes at a given location in a buffer.
struct _NvOSD_FrameTextParams NvOSD_FrameTextParams
Holds information about the text in a frame.
void * NvOSDCtxHandle
Definition: nvll_osd_api.h:63
int num_circles
Holds the number of circles.
Definition: nvll_osd_api.h:126
NvOSD_Mode mode
Holds the OSD mode to be used for processing.
Definition: nvll_osd_api.h:111
NvOSD_ArrowParams * arrow_params_list
Holds the parameters of the arrows.
Definition: nvll_osd_api.h:115
Holds information about the arrows in a frame.
Definition: nvll_osd_api.h:106
NvOSDCtxHandle nvll_osd_create_context(void)
Creates an NvOSD context.
Holds the box parameters of the box to be overlayed.
Holds information about a single buffer in a batch.
Definition: nvbufsurface.h:247
void nvll_osd_destroy_context(NvOSDCtxHandle nvosd_ctx)
Destroys an NvOSD context.
Holds circle parameters to be overlayed.
NvOSD_Mode mode
Holds the OSD mode to be used for processing.
Definition: nvll_osd_api.h:72
Holds information about the text in a frame.
Definition: nvll_osd_api.h:67
Holds arrow parameters to be overlaid.
int num_strings
Holds the number of strings.
Definition: nvll_osd_api.h:74
int nvll_osd_draw_lines(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameLineParams *frame_line_params)
Overlays lines on the buffer.
NvOSD_Mode
Defines modes used to overlay boxes and text.
struct _NvOSD_FrameRectParams NvOSD_FrameRectParams
Holds information about the rectangles in a frame.
NvOSD_Mode mode
Holds the OSD mode to be used for processing.
Definition: nvll_osd_api.h:124
int num_arrows
Holds the number of arrows.
Definition: nvll_osd_api.h:113
Holds information about the lines in a frame.
Definition: nvll_osd_api.h:93
NvOSD_TextParams * text_params_list
Holds the strings' text parameters.
Definition: nvll_osd_api.h:76
struct _NvOSD_FrameArrowParams NvOSD_FrameArrowParams
Holds information about the arrows in a frame.
int nvll_osd_init_colors_for_hw_blend(void *nvosd_ctx, NvOSD_Color_info *color_info, int num_classes)
Initializes colors for HW based blending.
Holds the box parameters of a line to be overlayed.
Holds information about the circles in a frame.
Definition: nvll_osd_api.h:119
int nvll_osd_put_text(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameTextParams *frame_text_params)
/brief Overlays clock and given text at a given location in a buffer.
NVIDIA Multimedia Utilities: On-Screen Display Manager
Holds parameters of text to be overlayed.
Holds information about the rectangles in a frame.
Definition: nvll_osd_api.h:80
void * nvll_osd_set_params(NvOSDCtxHandle nvosd_ctx, int width, int height)
Sets the resolution of the frames on which the NvOSDContext is to operate.
NvOSD_RectParams * rect_params_list
Holds the rectangles' parameters.
Definition: nvll_osd_api.h:89
NvBufSurfaceParams * buf_ptr
Holds a pointer to the buffer containing the frame.
Definition: nvll_osd_api.h:122
struct _NvOSD_FrameLineParams NvOSD_FrameLineParams
Holds information about the lines in a frame.
NvOSD_Mode mode
Holds the OSD mode to be used for processing.
Definition: nvll_osd_api.h:98
NvBufSurfaceParams * buf_ptr
Holds a pointer to the buffer containing the frame.
Definition: nvll_osd_api.h:96
void nvll_osd_set_clock_params(NvOSDCtxHandle nvosd_ctx, NvOSD_TextParams *clk_params)
Sets clock parameters for a given context.
int num_lines
Holds the number of lines.
Definition: nvll_osd_api.h:100
int num_rects
Holds the number of rectangles.
Definition: nvll_osd_api.h:87
int nvll_osd_draw_circles(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameCircleParams *frame_circle_params)
Overlays circles on the buffer.
NvOSD_Mode mode
Holds the OSD mode to be used for processing.
Definition: nvll_osd_api.h:85
int nvll_osd_draw_arrows(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameArrowParams *frame_arrow_params)
Overlays arrows on the buffer.