NVIDIA DeepStream SDK API Reference

7.0 Release
nvll_osd_api.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2019-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
34 #ifndef __NVLL_OSD_API_DEFS__
35 #define __NVLL_OSD_API_DEFS__
36 
37 #include "nvll_osd_struct.h"
38 #include "nvbufsurface.h"
39 
40 #define NVOSD_PRINT_E(f_, ...) \
41  printf("libnvosd (%d):(ERROR) : " f_, __LINE__, ##__VA_ARGS__)
42 
43 #define MAX_IN_BUF 16
44 #define MAX_BORDER_WIDTH 32
45 
46 #ifdef __cplusplus
47 extern "C"
48 {
49 #endif
50 
51 typedef void * NvOSDCtxHandle;
55 typedef struct _NvOSD_FrameTextParams
56 {
69 
71 typedef struct _NvOSD_FrameRectParams
72 {
79  int num_rects;
85 
88 {
103 
106 {
119 
122 {
135 
138 {
151 
158 
165 
177 void nvll_osd_set_clock_params(NvOSDCtxHandle nvosd_ctx, NvOSD_TextParams *clk_params);
178 
179 
196 int nvll_osd_put_text(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameTextParams *frame_text_params);
197 
211 
237 int nvll_osd_draw_rectangles(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameRectParams *frame_rect_params);
238 
254 int nvll_osd_draw_lines(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameLineParams *frame_line_params);
255 
270 int nvll_osd_draw_arrows(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameArrowParams *frame_arrow_params);
271 
285 int nvll_osd_draw_circles(NvOSDCtxHandle nvosd_ctx, NvOSD_FrameCircleParams *frame_circle_params);
286 
296 void *nvll_osd_set_params (NvOSDCtxHandle nvosd_ctx, int width, int height);
297 
310 int nvll_osd_init_colors_for_hw_blend(void *nvosd_ctx, NvOSD_Color_info * color_info, int num_classes);
311 
320 int nvll_osd_apply (NvOSDCtxHandle nvosd_ctx, NvBufSurfaceParams *buf_ptr, NvBufSurface *surf);
321 
322 #ifdef __cplusplus
323 }
324 #endif
325 
326 #endif
_NvOSD_FrameRectParams::num_rects
int num_rects
Holds the number of rectangles.
Definition: nvll_osd_api.h:79
_NvOSD_LineParams
Holds the box parameters of a line to be overlayed.
Definition: nvll_osd_struct.h:181
_NvOSD_RectParams
Holds the box parameters of the box to be overlayed.
Definition: nvll_osd_struct.h:140
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:170
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:109
_NvOSD_Color_info
Definition: nvll_osd_struct.h:132
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:113
_NvOSD_FrameTextParams::mode
NvOSD_Mode mode
Holds the OSD mode to be used for processing.
Definition: nvll_osd_api.h:61
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:224
_NvOSD_FrameCircleParams::num_circles
int num_circles
Holds the number of circles.
Definition: nvll_osd_api.h:145
NvBufSurface
Holds information about batched buffers.
Definition: nvbufsurface.h:509
_NvOSD_FrameLineParams::mode
NvOSD_Mode mode
Holds the OSD mode to be used for processing.
Definition: nvll_osd_api.h:111
_NvOSD_FrameRectParams::mode
NvOSD_Mode mode
Holds the OSD mode to be used for processing.
Definition: nvll_osd_api.h:77
_NvOSD_FrameTextParams::surf
NvBufSurface * surf
Holds information about batched buffers.
Definition: nvll_osd_api.h:67
_NvOSD_FrameCircleParams::buf_ptr
NvBufSurfaceParams * buf_ptr
Holds a pointer to the buffer containing the frame.
Definition: nvll_osd_api.h:141
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:51
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:81
_NvOSD_FrameRectParams
Holds information about the rectangles in a frame.
Definition: nvll_osd_api.h:71
_NvOSD_FrameSegmentMaskParams::num_segments
int num_segments
Holds the number of rectangles.
Definition: nvll_osd_api.h:95
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:127
_NvOSD_ArrowParams
Holds arrow parameters to be overlaid.
Definition: nvll_osd_struct.h:200
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:115
NvBufSurfaceParams
Hold the information of single buffer in the batch.
Definition: nvbufsurface.h:476
_NvOSD_FrameCircleParams::mode
NvOSD_Mode mode
Holds the OSD mode to be used for processing.
Definition: nvll_osd_api.h:143
_NvOSD_FrameCircleParams::circle_params_list
NvOSD_CircleParams * circle_params_list
Holds the parameters of the circles.
Definition: nvll_osd_api.h:147
_NvOSD_FrameArrowParams::surf
NvBufSurface * surf
Holds information about batched buffers.
Definition: nvll_osd_api.h:133
_NvOSD_FrameArrowParams::buf_ptr
NvBufSurfaceParams * buf_ptr
Holds a pointer to the buffer containing the frame.
Definition: nvll_osd_api.h:125
nvll_osd_apply
int nvll_osd_apply(NvOSDCtxHandle nvosd_ctx, NvBufSurfaceParams *buf_ptr, NvBufSurface *surf)
Apply OSD to the video frame for GPU backend.
_NvOSD_FrameCircleParams
Holds information about the circles in a frame.
Definition: nvll_osd_api.h:137
NvOSD_Mode
NvOSD_Mode
Defines modes used to overlay boxes and text.
Definition: nvll_osd_struct.h:42
_NvOSD_FrameSegmentMaskParams::rect_params_list
NvOSD_RectParams * rect_params_list
Holds the rectangles' parameters.
Definition: nvll_osd_api.h:97
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:131
_NvOSD_FrameTextParams::text_params_list
NvOSD_TextParams * text_params_list
Holds the strings' text parameters.
Definition: nvll_osd_api.h:65
_NvOSD_FrameArrowParams::num_arrows
int num_arrows
Holds the number of arrows.
Definition: nvll_osd_api.h:129
_NvOSD_FrameTextParams
Holds information about the text in a frame.
Definition: nvll_osd_api.h:55
_NvOSD_FrameArrowParams
Holds information about the arrows in a frame.
Definition: nvll_osd_api.h:121
_NvOSD_FrameSegmentMaskParams
Holds information about the rectangles in a frame.
Definition: nvll_osd_api.h:87
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:115
_NvOSD_FrameSegmentMaskParams::surf
NvBufSurface * surf
Holds information about batched buffers.
Definition: nvll_osd_api.h:101
_NvOSD_FrameSegmentMaskParams::buf_ptr
NvBufSurfaceParams * buf_ptr
Holds a pointer to the buffer containing the frame.
Definition: nvll_osd_api.h:91
_NvOSD_FrameRectParams::surf
NvBufSurface * surf
Holds information about batched buffers.
Definition: nvll_osd_api.h:83
_NvOSD_FrameTextParams::num_strings
int num_strings
Holds the number of strings.
Definition: nvll_osd_api.h:63
_NvOSD_FrameCircleParams::surf
NvBufSurface * surf
Holds information about batched buffers.
Definition: nvll_osd_api.h:149
_NvOSD_FrameSegmentMaskParams::mask_params_list
NvOSD_MaskParams * mask_params_list
Holds mask parameters.
Definition: nvll_osd_api.h:99
_NvOSD_FrameLineParams::surf
NvBufSurface * surf
Holds information about batched buffers.
Definition: nvll_osd_api.h:117
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:75
nvbufsurface.h
_NvOSD_FrameTextParams::buf_ptr
NvBufSurfaceParams * buf_ptr
Holds a pointer to a buffer containing a frame.
Definition: nvll_osd_api.h:59
_NvOSD_FrameSegmentMaskParams::mode
NvOSD_Mode mode
Holds the OSD mode to be used for processing.
Definition: nvll_osd_api.h:93
_NvOSD_FrameLineParams
Holds information about the lines in a frame.
Definition: nvll_osd_api.h:105
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.