NVIDIA DeepStream SDK API Reference

6.2 Release
nvll_osd_api.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA Corporation and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA Corporation is strictly prohibited.
9  *
10  */
11 
33 #ifndef __NVLL_OSD_API_DEFS__
34 #define __NVLL_OSD_API_DEFS__
35 
36 #include "nvll_osd_struct.h"
37 #include "nvbufsurface.h"
38 
39 #define NVOSD_PRINT_E(f_, ...) \
40  printf("libnvosd (%d):(ERROR) : " f_, __LINE__, ##__VA_ARGS__)
41 
42 #define MAX_IN_BUF 16
43 #define MAX_BORDER_WIDTH 32
44 
45 #ifdef __cplusplus
46 extern "C"
47 {
48 #endif
49 
50 typedef void * NvOSDCtxHandle;
54 typedef struct _NvOSD_FrameTextParams
55 {
65 
67 typedef struct _NvOSD_FrameRectParams
68 {
74  int num_rects;
78 
81 {
93 
95 typedef struct _NvOSD_FrameLineParams
96 {
106 
109 {
119 
122 {
132 
139 
146 
158 void nvll_osd_set_clock_params(NvOSDCtxHandle nvosd_ctx, NvOSD_TextParams *clk_params);
159 
160 
177 int nvll_osd_put_text(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameTextParams *frame_text_params);
178 
192 
218 int nvll_osd_draw_rectangles(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameRectParams *frame_rect_params);
219 
235 int nvll_osd_draw_lines(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameLineParams *frame_line_params);
236 
251 int nvll_osd_draw_arrows(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameArrowParams *frame_arrow_params);
252 
266 int nvll_osd_draw_circles(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameCircleParams *frame_circle_params);
267 
277 void *nvll_osd_set_params (NvOSDCtxHandle nvosd_ctx, int width, int height);
278 
291 int nvll_osd_init_colors_for_hw_blend(void *nvosd_ctx, NvOSD_Color_info * color_info, int num_classes);
292 
299 int nvll_osd_apply (NvOSDCtxHandle nvosd_ctx, NvBufSurfaceParams *buf_ptr);
300 
301 #ifdef __cplusplus
302 }
303 #endif
304 
305 #endif
_NvOSD_FrameRectParams::num_rects
int num_rects
Holds the number of rectangles.
Definition: nvll_osd_api.h:74
_NvOSD_LineParams
Holds the box parameters of a line to be overlayed.
Definition: nvll_osd_struct.h:180
_NvOSD_RectParams
Holds the box parameters of the box to be overlayed.
Definition: nvll_osd_struct.h:139
nvll_osd_draw_segment_masks
int nvll_osd_draw_segment_masks(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameSegmentMaskParams *frame_mask_params)
Overlays segment masks at a given location in a buffer.
_NvOSD_MaskParams
Holds the mask parameters of the segment to be overlayed.
Definition: nvll_osd_struct.h:169
NvOSD_FrameRectParams
struct _NvOSD_FrameRectParams NvOSD_FrameRectParams
Holds information about the rectangles in a frame.
_NvOSD_FrameLineParams::buf_ptr
NvBufSurfaceParams * buf_ptr
Holds a pointer to the buffer containing the frame.
Definition: nvll_osd_api.h:98
_NvOSD_Color_info
Definition: nvll_osd_struct.h:131
NvOSD_FrameCircleParams
struct _NvOSD_FrameCircleParams NvOSD_FrameCircleParams
Holds information about the circles in a frame.
nvll_osd_draw_circles
int nvll_osd_draw_circles(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameCircleParams *frame_circle_params)
Overlays circles on the buffer.
_NvOSD_FrameLineParams::num_lines
int num_lines
Holds the number of lines.
Definition: nvll_osd_api.h:102
_NvOSD_FrameTextParams::mode
NvOSD_Mode mode
Holds the OSD mode to be used for processing.
Definition: nvll_osd_api.h:59
nvll_osd_set_clock_params
void nvll_osd_set_clock_params(NvOSDCtxHandle nvosd_ctx, NvOSD_TextParams *clk_params)
Sets clock parameters for a given context.
_NvOSD_CircleParams
Holds circle parameters to be overlayed.
Definition: nvll_osd_struct.h:223
_NvOSD_FrameCircleParams::num_circles
int num_circles
Holds the number of circles.
Definition: nvll_osd_api.h:128
_NvOSD_FrameLineParams::mode
NvOSD_Mode mode
Holds the OSD mode to be used for processing.
Definition: nvll_osd_api.h:100
_NvOSD_FrameRectParams::mode
NvOSD_Mode mode
Holds the OSD mode to be used for processing.
Definition: nvll_osd_api.h:72
_NvOSD_FrameCircleParams::buf_ptr
NvBufSurfaceParams * buf_ptr
Holds a pointer to the buffer containing the frame.
Definition: nvll_osd_api.h:124
nvll_osd_draw_rectangles
int nvll_osd_draw_rectangles(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameRectParams *frame_rect_params)
Overlays boxes at a given location in a buffer.
NvOSD_FrameLineParams
struct _NvOSD_FrameLineParams NvOSD_FrameLineParams
Holds information about the lines in a frame.
NvOSDCtxHandle
void * NvOSDCtxHandle
Definition: nvll_osd_api.h:50
NvOSD_FrameSegmentMaskParams
struct _NvOSD_FrameSegmentMaskParams NvOSD_FrameSegmentMaskParams
Holds information about the rectangles in a frame.
_NvOSD_FrameRectParams::rect_params_list
NvOSD_RectParams * rect_params_list
Holds the rectangles' parameters.
Definition: nvll_osd_api.h:76
_NvOSD_FrameRectParams
Holds information about the rectangles in a frame.
Definition: nvll_osd_api.h:67
_NvOSD_FrameSegmentMaskParams::num_segments
int num_segments
Holds the number of rectangles.
Definition: nvll_osd_api.h:87
nvll_osd_apply
int nvll_osd_apply(NvOSDCtxHandle nvosd_ctx, NvBufSurfaceParams *buf_ptr)
Apply OSD to the video frame for GPU backend.
nvll_osd_draw_lines
int nvll_osd_draw_lines(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameLineParams *frame_line_params)
Overlays lines on the buffer.
_NvOSD_FrameArrowParams::mode
NvOSD_Mode mode
Holds the OSD mode to be used for processing.
Definition: nvll_osd_api.h:113
_NvOSD_ArrowParams
Holds arrow parameters to be overlaid.
Definition: nvll_osd_struct.h:199
nvll_osd_put_text
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.
nvll_osd_draw_arrows
int nvll_osd_draw_arrows(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameArrowParams *frame_arrow_params)
Overlays arrows on the buffer.
_NvOSD_FrameLineParams::line_params_list
NvOSD_LineParams * line_params_list
Holds the lines' parameters.
Definition: nvll_osd_api.h:104
NvBufSurfaceParams
Hold the information of single buffer in the batch.
Definition: nvbufsurface.h:427
_NvOSD_FrameCircleParams::mode
NvOSD_Mode mode
Holds the OSD mode to be used for processing.
Definition: nvll_osd_api.h:126
_NvOSD_FrameCircleParams::circle_params_list
NvOSD_CircleParams * circle_params_list
Holds the parameters of the circles.
Definition: nvll_osd_api.h:130
_NvOSD_FrameArrowParams::buf_ptr
NvBufSurfaceParams * buf_ptr
Holds a pointer to the buffer containing the frame.
Definition: nvll_osd_api.h:111
_NvOSD_FrameCircleParams
Holds information about the circles in a frame.
Definition: nvll_osd_api.h:121
NvOSD_Mode
NvOSD_Mode
Defines modes used to overlay boxes and text.
Definition: nvll_osd_struct.h:41
_NvOSD_FrameSegmentMaskParams::rect_params_list
NvOSD_RectParams * rect_params_list
Holds the rectangles' parameters.
Definition: nvll_osd_api.h:89
nvll_osd_create_context
NvOSDCtxHandle nvll_osd_create_context(void)
Creates an NvOSD context.
nvll_osd_destroy_context
void nvll_osd_destroy_context(NvOSDCtxHandle nvosd_ctx)
Destroys an NvOSD context.
nvll_osd_set_params
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_FrameArrowParams::arrow_params_list
NvOSD_ArrowParams * arrow_params_list
Holds the parameters of the arrows.
Definition: nvll_osd_api.h:117
_NvOSD_FrameTextParams::text_params_list
NvOSD_TextParams * text_params_list
Holds the strings' text parameters.
Definition: nvll_osd_api.h:63
_NvOSD_FrameArrowParams::num_arrows
int num_arrows
Holds the number of arrows.
Definition: nvll_osd_api.h:115
_NvOSD_FrameTextParams
Holds information about the text in a frame.
Definition: nvll_osd_api.h:54
_NvOSD_FrameArrowParams
Holds information about the arrows in a frame.
Definition: nvll_osd_api.h:108
_NvOSD_FrameSegmentMaskParams
Holds information about the rectangles in a frame.
Definition: nvll_osd_api.h:80
NvOSD_FrameArrowParams
struct _NvOSD_FrameArrowParams NvOSD_FrameArrowParams
Holds information about the arrows in a frame.
_NvOSD_TextParams
Holds parameters of text to be overlayed.
Definition: nvll_osd_struct.h:114
_NvOSD_FrameSegmentMaskParams::buf_ptr
NvBufSurfaceParams * buf_ptr
Holds a pointer to the buffer containing the frame.
Definition: nvll_osd_api.h:83
_NvOSD_FrameTextParams::num_strings
int num_strings
Holds the number of strings.
Definition: nvll_osd_api.h:61
_NvOSD_FrameSegmentMaskParams::mask_params_list
NvOSD_MaskParams * mask_params_list
Holds mask parameters.
Definition: nvll_osd_api.h:91
NvOSD_FrameTextParams
struct _NvOSD_FrameTextParams NvOSD_FrameTextParams
Holds information about the text in a frame.
nvll_osd_struct.h
_NvOSD_FrameRectParams::buf_ptr
NvBufSurfaceParams * buf_ptr
Holds a pointer to the buffer containing the frame.
Definition: nvll_osd_api.h:70
nvbufsurface.h
_NvOSD_FrameTextParams::buf_ptr
NvBufSurfaceParams * buf_ptr
Holds a pointer to a buffer containing a frame.
Definition: nvll_osd_api.h:57
_NvOSD_FrameSegmentMaskParams::mode
NvOSD_Mode mode
Holds the OSD mode to be used for processing.
Definition: nvll_osd_api.h:85
_NvOSD_FrameLineParams
Holds information about the lines in a frame.
Definition: nvll_osd_api.h:95
nvll_osd_init_colors_for_hw_blend
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.