diff options
Diffstat (limited to 'libvo/sub.h')
-rw-r--r-- | libvo/sub.h | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/libvo/sub.h b/libvo/sub.h index 591a166692..879e81e33a 100644 --- a/libvo/sub.h +++ b/libvo/sub.h @@ -49,14 +49,16 @@ typedef struct mp_osd_obj_s { unsigned char *bitmap_buffer; } mp_osd_obj_t; +struct osd_state { + unsigned char osd_text[64]; + struct font_desc *sub_font; +}; #include "subreader.h" extern sub_data* subdata; //currently used subtitles extern subtitle* vo_sub; -extern unsigned char* vo_osd_text; - extern void* vo_osd_teletext_page; extern int vo_osd_teletext_half; extern int vo_osd_teletext_mode; @@ -88,8 +90,8 @@ extern void* vo_vobsub; #define OSD_PB_1 0x13 /* now in textform */ -extern char * sub_osd_names[]; -extern char * sub_osd_names_short[]; +extern char * const sub_osd_names[]; +extern char * const sub_osd_names_short[]; extern int sub_unicode; extern int sub_utf8; @@ -105,14 +107,19 @@ extern int spu_alignment; extern int spu_aamode; extern float spu_gaussvar; -void vo_draw_text(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)); -void vo_remove_text(int dxs,int dys,void (*remove)(int x0,int y0, int w,int h)); +void osd_draw_text(struct osd_state *osd, int dxs, int dys, + void (*draw_alpha)(void *ctx, int x0, int y0, int w, int h, + unsigned char* src, unsigned char *srca, + int stride), + void *ctx); +void osd_remove_text(struct osd_state *osd, int dxs, int dys, + void (*remove)(int x0, int y0, int w, int h)); -void vo_init_osd(void); -int vo_update_osd(int dxs,int dys); +struct osd_state *osd_create(void); +int osd_update(struct osd_state *osd, int dxs, int dys); int vo_osd_changed(int new_value); int vo_osd_check_range_update(int,int,int,int); -void free_osd_list(void); +void osd_free(struct osd_state *osd); extern int vo_osd_changed_flag; @@ -123,4 +130,9 @@ unsigned utf8_get_char(const char **str); void osd_set_nav_box (uint16_t sx, uint16_t sy, uint16_t ex, uint16_t ey); #endif + +#ifdef IS_OLD_VO +#define vo_remove_text(...) osd_remove_text(global_osd, __VA_ARGS__) +#endif + #endif /* MPLAYER_SUB_H */ |