diff options
Diffstat (limited to 'libvo/sub.h')
-rw-r--r-- | libvo/sub.h | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/libvo/sub.h b/libvo/sub.h index d0cd9e1360..a1e7acd3c4 100644 --- a/libvo/sub.h +++ b/libvo/sub.h @@ -49,22 +49,16 @@ typedef struct mp_osd_obj_s { unsigned char *bitmap_buffer; } mp_osd_obj_t; - -#if 0 - -// disable subtitles: -static inline void vo_draw_text_osd(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)){ -} - -#else +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; @@ -96,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; @@ -116,14 +110,19 @@ extern float spu_gaussvar; //extern void vo_draw_text_osd(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)); //extern void vo_draw_text_progbar(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)); //extern void vo_draw_text_sub(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)); -extern 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)); -extern void vo_remove_text(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); +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)); + +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; @@ -134,6 +133,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 -#endif /* 0 */ + +#ifdef IS_OLD_VO +#define vo_remove_text(...) osd_remove_text(global_osd, __VA_ARGS__) +#endif #endif /* MPLAYER_SUB_H */ |