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
;
53 #include "subreader.h"
55 extern sub_data
* subdata
; //currently used subtitles
56 extern subtitle
* vo_sub
;
58 extern unsigned char* vo_osd_text
;
60 extern void* vo_osd_teletext_page
;
61 extern int vo_osd_teletext_half
;
62 extern int vo_osd_teletext_mode
;
63 extern int vo_osd_teletext_format
;
65 extern int vo_osd_progbar_type
;
66 extern int vo_osd_progbar_value
; // 0..255
68 extern void* vo_spudec
;
69 extern void* vo_vobsub
;
72 #define OSD_PAUSE 0x02
76 #define OSD_CLOCK 0x06
77 #define OSD_CONTRAST 0x07
78 #define OSD_SATURATION 0x08
79 #define OSD_VOLUME 0x09
80 #define OSD_BRIGHTNESS 0x0A
82 #define OSD_BALANCE 0x0C
83 #define OSD_PANSCAN 0x50
85 #define OSD_PB_START 0x10
87 #define OSD_PB_END 0x12
91 extern char * sub_osd_names
[];
92 extern char * sub_osd_names_short
[];
94 extern int sub_unicode
;
99 extern int sub_width_p
;
100 extern int sub_alignment
;
101 extern int sub_visibility
;
102 extern int sub_bg_color
; /* subtitles background color */
103 extern int sub_bg_alpha
;
104 extern int spu_alignment
;
105 extern int spu_aamode
;
106 extern float spu_gaussvar
;
108 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
));
109 void vo_draw_text_ext(int dxs
, int dys
, int left_border
, int top_border
,
110 int right_border
, int bottom_border
, int orig_w
, int orig_h
,
111 void (*draw_alpha
)(int x0
, int y0
, int w
,int h
, unsigned char* src
, unsigned char *srca
, int stride
));
112 void vo_remove_text(int dxs
,int dys
,void (*remove
)(int x0
,int y0
, int w
,int h
));
114 void vo_init_osd(void);
115 int vo_update_osd(int dxs
,int dys
);
116 int vo_osd_changed(int new_value
);
117 int vo_osd_check_range_update(int,int,int,int);
118 void free_osd_list(void);
120 extern int vo_osd_changed_flag
;
122 unsigned utf8_get_char(const char **str
);
125 #include <inttypes.h>
126 void osd_set_nav_box (uint16_t sx
, uint16_t sy
, uint16_t ex
, uint16_t ey
);
129 #endif /* MPLAYER_SUB_H */