5 typedef struct mp_osd_bbox_s
{
10 #define OSDTYPE_SUBTITLE 2
11 #define OSDTYPE_PROGBAR 3
13 #define OSDTYPE_DVDNAV 5
14 #define OSDTYPE_TELETEXT 6
16 #define OSDFLAG_VISIBLE 1
17 #define OSDFLAG_CHANGED 2
18 #define OSDFLAG_BBOX 4
19 #define OSDFLAG_OLD_BBOX 8
20 #define OSDFLAG_FORCE_UPDATE 16
23 #define MAX_UCSLINES 16
25 typedef struct mp_osd_obj_s
{
26 struct mp_osd_obj_s
* next
;
28 unsigned char alignment
; // 2 bits: x;y percentages, 2 bits: x;y relative to parent; 2 bits: alignment left/right/center
32 mp_osd_bbox_t bbox
; // bounding box
33 mp_osd_bbox_t old_bbox
; // the renderer will save bbox here
36 void* sub
; // value of vo_sub at last update
37 int utbl
[MAX_UCS
+1]; // subtitle text
38 int xtbl
[MAX_UCSLINES
]; // x positions
39 int lines
; // no. of lines
48 unsigned char *alpha_buffer
;
49 unsigned char *bitmap_buffer
;
56 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
)){
61 #include "subreader.h"
63 extern sub_data
* subdata
; //currently used subtitles
64 extern subtitle
* vo_sub
;
66 extern unsigned char* vo_osd_text
;
68 #ifdef HAVE_TV_TELETEXT
69 extern void* vo_osd_teletext_page
;
70 extern int vo_osd_teletext_half
;
71 extern int vo_osd_teletext_mode
;
72 extern int vo_osd_teletext_format
;
75 extern int vo_osd_progbar_type
;
76 extern int vo_osd_progbar_value
; // 0..255
78 extern void* vo_spudec
;
79 extern void* vo_vobsub
;
82 #define OSD_PAUSE 0x02
86 #define OSD_CLOCK 0x06
87 #define OSD_CONTRAST 0x07
88 #define OSD_SATURATION 0x08
89 #define OSD_VOLUME 0x09
90 #define OSD_BRIGHTNESS 0x0A
92 #define OSD_BALANCE 0x0C
93 #define OSD_PANSCAN 0x50
95 #define OSD_PB_START 0x10
97 #define OSD_PB_END 0x12
100 /* now in textform */
101 extern char * sub_osd_names
[];
102 extern char * sub_osd_names_short
[];
104 extern int sub_unicode
;
111 extern int sub_width_p
;
112 extern int sub_alignment
;
113 extern int sub_visibility
;
114 extern int sub_bg_color
; /* subtitles background color */
115 extern int sub_bg_alpha
;
116 extern int spu_alignment
;
117 extern int spu_aamode
;
118 extern float spu_gaussvar
;
120 //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));
121 //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));
122 //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));
123 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
));
124 extern void vo_remove_text(int dxs
,int dys
,void (*remove
)(int x0
,int y0
, int w
,int h
));
126 void vo_init_osd(void);
127 int vo_update_osd(int dxs
,int dys
);
128 int vo_osd_changed(int new_value
);
129 int vo_osd_check_range_update(int,int,int,int);
130 void free_osd_list(void);
132 extern int vo_osd_changed_flag
;
134 unsigned utf8_get_char(const char **str
);
137 #include <inttypes.h>
138 void osd_set_nav_box (uint16_t sx
, uint16_t sy
, uint16_t ex
, uint16_t ey
);
143 #endif /* MPLAYER_SUB_H */