NVIDIA DeepStream SDK API Reference

4.0.1 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
nvll_osd_api.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_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 struct _NvOSD_FrameTextParams
64 {
74 
75 typedef struct _NvOSD_FrameRectParams
76 {
82  int num_rects;
86 
87 typedef struct _NvOSD_FrameLineParams
88 {
94  int num_lines;
98 
104 void *nvll_osd_create_context(void);
105 
112 void nvll_osd_destroy_context(void *nvosd_ctx);
113 
125 void nvll_osd_set_clock_params(void *nvosd_ctx, NvOSD_TextParams *clk_params);
126 
127 
145 int nvll_osd_put_text(void *nvosd_ctx, NvOSD_FrameTextParams *frame_text_params);
146 
172 int nvll_osd_draw_rectangles(void *nvosd_ctx, NvOSD_FrameRectParams *frame_rect_params);
173 
189 int nvll_osd_draw_lines(void *nvosd_ctx, NvOSD_FrameLineParams *frame_line_params);
190 
200 void *nvll_osd_set_params (void *nvosd_ctx, int width, int height);
201 
202 #ifdef __cplusplus
203 }
204 #endif
205 
206 #endif
NvBufSurface Interface
NvOSD_LineParams * line_params_list
Holds params of Lines.
Definition: nvll_osd_api.h:96
NvBufSurfaceParams * buf_ptr
Holds pointer to the buffer containing frame.
Definition: nvll_osd_api.h:78
NvBufSurfaceParams * buf_ptr
Holds pointer to the buffer containing frame.
Definition: nvll_osd_api.h:66
struct _NvOSD_FrameTextParams NvOSD_FrameTextParams
int nvll_osd_draw_lines(void *nvosd_ctx, NvOSD_FrameLineParams *frame_line_params)
Overlays lines on the buffer.
void nvll_osd_destroy_context(void *nvosd_ctx)
Destroys an NvOSD context.
Holds the box parameters of the box to be overlayed.
NvOSD_Mode
List modes used to overlay boxes and text.
Holds information about a single buffer in a batch.
Definition: nvbufsurface.h:252
void * nvll_osd_create_context(void)
Creates an NvOSD context.
NvOSD_Mode mode
Holds OSD Mode to be used for processing.
Definition: nvll_osd_api.h:68
void * nvll_osd_set_params(void *nvosd_ctx, int width, int height)
Sets the resolution of the frames on which the NvOSDContext will operate.
int num_strings
Holds number of strings.
Definition: nvll_osd_api.h:70
struct _NvOSD_FrameRectParams NvOSD_FrameRectParams
int nvll_osd_put_text(void *nvosd_ctx, NvOSD_FrameTextParams *frame_text_params)
Overlays clock and given text at given location on a buffer.
NvOSD_TextParams * text_params_list
Holds text params of string.
Definition: nvll_osd_api.h:72
Holds the box parameters of the line to be overlayed.
NVIDIA Multimedia Utilities: On-Screen Display Structure
Holds the text parameters of the text to be overlayed.
NvOSD_RectParams * rect_params_list
Holds params of Rectangles.
Definition: nvll_osd_api.h:84
struct _NvOSD_FrameLineParams NvOSD_FrameLineParams
NvOSD_Mode mode
Holds OSD Mode to be used for processing.
Definition: nvll_osd_api.h:92
NvBufSurfaceParams * buf_ptr
Holds pointer to the buffer containing frame.
Definition: nvll_osd_api.h:90
int num_lines
Holds number of Lines.
Definition: nvll_osd_api.h:94
int num_rects
Holds number of Rectangles.
Definition: nvll_osd_api.h:82
void nvll_osd_set_clock_params(void *nvosd_ctx, NvOSD_TextParams *clk_params)
Sets clock parameters for the given context.
int nvll_osd_draw_rectangles(void *nvosd_ctx, NvOSD_FrameRectParams *frame_rect_params)
Overlays boxes at given location on a buffer.
NvOSD_Mode mode
Holds OSD Mode to be used for processing.
Definition: nvll_osd_api.h:80