Go to the source code of this file.
Classes | |
struct | _NvOSD_ColorParams |
Holds the color parameters of the box or text to be overlayed. More... | |
struct | _NvOSD_FontParams |
Holds the font parameters of the text to be overlayed. More... | |
struct | _NvOSD_TextParams |
Holds the text parameters of the text to be overlayed. More... | |
struct | _NvOSD_RectParams |
Holds the box parameters of the box to be overlayed. More... | |
Typedefs | |
typedef struct _NvOSD_ColorParams | NvOSD_ColorParams |
Holds the color parameters of the box or text to be overlayed. | |
typedef struct _NvOSD_FontParams | NvOSD_FontParams |
Holds the font parameters of the text to be overlayed. | |
typedef struct _NvOSD_TextParams | NvOSD_TextParams |
Holds the text parameters of the text to be overlayed. | |
typedef struct _NvOSD_RectParams | NvOSD_RectParams |
Holds the box parameters of the box to be overlayed. | |
Enumerations | |
enum | NvOSD_Mode { MODE_CPU, MODE_GPU, MODE_HW } |
List modes used to overlay boxes and text. More... | |
Functions | |
void * | nvosd_create_context (void) |
Create nvosd context. | |
void | nvosd_destroy_context (void *nvosd_ctx) |
Destroy nvosd context. | |
void | nvosd_set_clock_params (void *nvosd_ctx, NvOSD_TextParams *clk_params) |
Set clock parameters for the given context. | |
int | nvosd_put_text (void *nvosd_ctx, NvOSD_Mode mode, int fd, int num_strings, NvOSD_TextParams *text_params_list) |
Overlay clock and given text at given location on a buffer. | |
int | nvosd_draw_rectangles (void *nvosd_ctx, NvOSD_Mode mode, int fd, int num_rects, NvOSD_RectParams *rect_params_list) |
Overlay boxes at given location on a buffer. |
Definition in file nvosd.h.
typedef struct _NvOSD_ColorParams NvOSD_ColorParams |
Holds the color parameters of the box or text to be overlayed.
typedef struct _NvOSD_FontParams NvOSD_FontParams |
Holds the font parameters of the text to be overlayed.
typedef struct _NvOSD_RectParams NvOSD_RectParams |
Holds the box parameters of the box to be overlayed.
typedef struct _NvOSD_TextParams NvOSD_TextParams |
Holds the text parameters of the text to be overlayed.
enum NvOSD_Mode |
List modes used to overlay boxes and text.
void* nvosd_create_context | ( | void | ) |
Create nvosd context.
[in] | mode | Mode in which nvosd should process the data, one of NvOSD_Mode |
void nvosd_destroy_context | ( | void * | nvosd_ctx | ) |
Destroy nvosd context.
[in] | nvosd_ctx | A pointer to NvOSD context. |
int nvosd_draw_rectangles | ( | void * | nvosd_ctx, | |
NvOSD_Mode | mode, | |||
int | fd, | |||
int | num_rects, | |||
NvOSD_RectParams * | rect_params_list | |||
) |
Overlay boxes at given location on a buffer.
Boxes can be configured with a. only border To draw boxes with only border user needs to set border_width and set has_bg_color to 0 for the given box. b. border and background color To draw boxes with border and background color user needs to set border_width and set has_bg_color to 1 and specify background color parameters for the given box. c. Solid fill acting as mask region. To draw boxes with Solid fill acting as mask region user needs to set border_width to 0. has_bg_color to 1 for the given box.
User should ensure that the length of rect_params_list should be at least num_rects.
[in] | nvosd_ctx | A pointer to NvOSD context. |
[in] | mode | Mode selection to draw the boxes. |
[in] | fd | DMABUF FD of buffer on which boxes are to be overlayed. |
[in] | num_rects | Number of boxes to be overlayed. |
[in] | rect_params_list | A pointer to an array of NvOSD_TextParams structure for the clock and text to be overlayed. |
int nvosd_put_text | ( | void * | nvosd_ctx, | |
NvOSD_Mode | mode, | |||
int | fd, | |||
int | num_strings, | |||
NvOSD_TextParams * | text_params_list | |||
) |
Overlay clock and given text at given location on a buffer.
To overlay the clock user needs to set clock params using nvosd_set_clock_params(). User should ensure that the length of text_params_list should be at least num_strings.
[in] | nvosd_ctx | A pointer to NvOSD context. |
[in] | mode | Mode selection to draw the text. |
[in] | fd | DMABUF FD of buffer on which text is to be overlayed. |
[in] | num_strings | Number of strings to be overlayed. |
[in] | text_params_list | A pointer to an array of NvOSD_TextParams structure for the clock and text to be overlayed. |
void nvosd_set_clock_params | ( | void * | nvosd_ctx, | |
NvOSD_TextParams * | clk_params | |||
) |
Set clock parameters for the given context.
The clock is overlayed when nvosd_put_text() is called. If no other text is to be overlayed nvosd_put_text should be called with num_strings as 0 and text_params_list as NULL.
[in] | nvosd_ctx | A pointer to NvOSD context |
[in] | clk_params | A pointer to NvOSD_TextParams structure for the clock to be overlayed, NULL to disable the clock. |