123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325 |
- #ifndef __NVOSD_DEFS__
- #define __NVOSD_DEFS__
- #ifdef __cplusplus
- extern "C"
- {
- #endif
- #define NVOSD_MAX_NUM_RECTS 128
- #define MAX_BG_CLR 20
- typedef struct _NvOSD_ColorParams {
- double red;
- double green;
- double blue;
- double alpha;
- }NvOSD_ColorParams;
- typedef struct _NvOSD_FontParams {
- char * font_name;
- unsigned int font_size;
- NvOSD_ColorParams font_color;
- }NvOSD_FontParams;
- typedef struct _NvOSD_TextParams {
- char * display_text;
- unsigned int x_offset;
- unsigned int y_offset;
- NvOSD_FontParams font_params;
- int set_bg_clr;
- NvOSD_ColorParams text_bg_clr;
- }NvOSD_TextParams;
- typedef struct _NvOSD_Color_info {
- int id;
- NvOSD_ColorParams color;
- }NvOSD_Color_info;
- typedef struct _NvOSD_RectParams {
- unsigned int left;
- unsigned int top;
- unsigned int width;
- unsigned int height;
- unsigned int border_width;
- NvOSD_ColorParams border_color;
- unsigned int has_bg_color;
- unsigned int reserved;
- NvOSD_ColorParams bg_color;
- int has_color_info;
- int color_id;
- }NvOSD_RectParams;
- typedef struct _NvOSD_LineParams {
- unsigned int x1;
- unsigned int y1;
- unsigned int x2;
- unsigned int y2;
- unsigned int line_width;
- NvOSD_ColorParams line_color;
- } NvOSD_LineParams;
- typedef struct _NvOSD_ArrowParams {
- unsigned int x1;
- unsigned int y1;
- unsigned int x2;
- unsigned int y2;
- unsigned int arrow_width;
- unsigned int start_arrow_head;
- NvOSD_ColorParams arrow_color;
- unsigned int reserved;
- }NvOSD_ArrowParams;
- typedef struct _NvOSD_CircleParams {
- unsigned int xc;
- unsigned int yc;
- unsigned int radius;
- NvOSD_ColorParams circle_color;
- unsigned int reserved;
- }NvOSD_CircleParams;
- typedef enum{
- MODE_CPU,
- MODE_GPU,
- MODE_HW
- } NvOSD_Mode;
- void *nvosd_create_context(void);
- void nvosd_destroy_context(void *nvosd_ctx);
- void nvosd_set_clock_params(void *nvosd_ctx, NvOSD_TextParams *clk_params);
- int nvosd_put_text(void *nvosd_ctx, NvOSD_Mode mode, int fd, int num_strings,
- NvOSD_TextParams *text_params_list);
- int nvosd_draw_rectangles(void *nvosd_ctx, NvOSD_Mode mode, int fd,
- int num_rects, NvOSD_RectParams *rect_params_list);
- int nvosd_init_colors_for_hw_blend(void *nvosd_ctx, NvOSD_Color_info * color_info,
- int num_classes);
- int nvosd_draw_arrows(void *nvosd_ctx, NvOSD_Mode mode, int fd,
- int num_arrows, NvOSD_ArrowParams *arrow_params_list);
- int nvosd_draw_circles(void *nvosd_ctx, NvOSD_Mode mode, int fd,
- int num_circles, NvOSD_CircleParams *circle_params_list);
- int nvosd_draw_lines(void *nvosd_ctx, NvOSD_Mode mode, int fd,
- int num_lines, NvOSD_LineParams *line_params_list);
- int nvosd_gpu_apply(void *nvosd_ctx, int fd);
- #ifdef __cplusplus
- }
- #endif
- #endif
|