Mercurial > mplayer.hg
annotate libvo/sub.c @ 5453:0e63c2f19ba6
twos audio fixed
author | arpi |
---|---|
date | Mon, 01 Apr 2002 15:25:50 +0000 |
parents | 4e64fca268e9 |
children | a531a579f005 |
rev | line source |
---|---|
218 | 1 |
4088 | 2 #include "config.h" |
3 #include "video_out.h" | |
5294 | 4 #include "font_load.h" |
218 | 5 #include "sub.h" |
202 | 6 |
4088 | 7 #include <stdlib.h> |
2498 | 8 |
9 char * __sub_osd_names[]={ | |
10 "Seekbar", | |
11 "Play", | |
12 "Pause", | |
13 "Stop", | |
14 "Rewind", | |
15 "Forward", | |
16 "Clock", | |
17 "Contrast", | |
18 "Saturation", | |
19 "Volume", | |
20 "Brightness", | |
21 "Hue" | |
22 }; | |
23 char * __sub_osd_names_short[] ={ "", "|>", "||", "[]", "<<" , ">>", "", "", "", "", "", ""}; | |
24 | |
213 | 25 //static int vo_font_loaded=-1; |
26 font_desc_t* vo_font=NULL; | |
202 | 27 |
1991
dee4b2ea5e5b
add gui support to config scripts, and fixed some warning.
pontscho
parents:
1878
diff
changeset
|
28 unsigned char* vo_osd_text=NULL; |
803
b25a887b6054
sub splitting patch applied by Vlada V.Dubsky@sh.cvut.cz
arpi_esp
parents:
726
diff
changeset
|
29 int sub_unicode=0; |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
30 int sub_utf8=0; |
4773 | 31 int sub_pos=100; |
213 | 32 |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
33 inline static 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)){ |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
34 unsigned char *cp=vo_osd_text; |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
35 int c; |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
36 int font; |
213 | 37 int y=10; |
38 int x=20; | |
202 | 39 |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
40 while (*cp){ |
1549 | 41 c=*cp++; |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
42 if ((font=vo_font->font[c])>=0) |
213 | 43 draw_alpha(x,y, |
44 vo_font->width[c], | |
45 vo_font->pic_a[font]->h, | |
46 vo_font->pic_b[font]->bmp+vo_font->start[c], | |
47 vo_font->pic_a[font]->bmp+vo_font->start[c], | |
48 vo_font->pic_a[font]->w); | |
49 x+=vo_font->width[c]+vo_font->charspace; | |
50 } | |
218 | 51 |
52 } | |
53 | |
54 int vo_osd_progbar_type=-1; | |
1726 | 55 int vo_osd_progbar_value=100; // 0..256 |
56 | |
57 // if we have n=256 bars then OSD progbar looks like below | |
58 // | |
1878 | 59 // 0 1 2 3 ... 256 <= vo_osd_progbar_value |
60 // | | | | | | |
1726 | 61 // [ === === === ... === ] |
62 // | |
63 // the above schema is rescalled to n=elems bars | |
218 | 64 |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
65 inline static 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)){ |
1602 | 66 unsigned char *s; |
67 unsigned char *sa; | |
1726 | 68 int i,w,h,st,mark; |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
69 int y=(dys-vo_font->height)/2; |
218 | 70 int c,font; |
1548
eee7951a23af
changes according to proper subfont bar positioning and char spaceing - sub.c
atlka
parents:
1524
diff
changeset
|
71 int delimw=vo_font->width[OSD_PB_START] |
1549 | 72 +vo_font->width[OSD_PB_END] |
73 +vo_font->charspace; | |
1548
eee7951a23af
changes according to proper subfont bar positioning and char spaceing - sub.c
atlka
parents:
1524
diff
changeset
|
74 int width=(2*dxs-3*delimw)/3; |
1549 | 75 int charw=vo_font->width[OSD_PB_0]+vo_font->charspace; |
1548
eee7951a23af
changes according to proper subfont bar positioning and char spaceing - sub.c
atlka
parents:
1524
diff
changeset
|
76 int elems=width/charw; |
1549 | 77 int x=(dxs-elems*charw-delimw)/2; |
1548
eee7951a23af
changes according to proper subfont bar positioning and char spaceing - sub.c
atlka
parents:
1524
diff
changeset
|
78 |
1726 | 79 if (vo_osd_progbar_value<=0) |
80 mark=0; | |
1878 | 81 else { |
82 int ev=vo_osd_progbar_value*elems; | |
83 mark=ev>>8; | |
84 if (ev & 0xFF) mark++; | |
85 if (mark>elems) mark=elems; | |
86 } | |
87 | |
1727 | 88 |
218 | 89 // printf("osd.progbar width=%d xpos=%d\n",width,x); |
90 | |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
91 c=vo_osd_progbar_type; |
1569
fcbfc99cf8e6
skip lines with negative y position if there is too many lines to display
atlka
parents:
1549
diff
changeset
|
92 if(vo_osd_progbar_type>0 && (font=vo_font->font[c])>=0) { |
fcbfc99cf8e6
skip lines with negative y position if there is too many lines to display
atlka
parents:
1549
diff
changeset
|
93 int xp=x-vo_font->width[c]-vo_font->spacewidth; |
fcbfc99cf8e6
skip lines with negative y position if there is too many lines to display
atlka
parents:
1549
diff
changeset
|
94 draw_alpha((xp<0?0:xp),y, |
218 | 95 vo_font->width[c], |
96 vo_font->pic_a[font]->h, | |
97 vo_font->pic_b[font]->bmp+vo_font->start[c], | |
98 vo_font->pic_a[font]->bmp+vo_font->start[c], | |
99 vo_font->pic_a[font]->w); | |
1569
fcbfc99cf8e6
skip lines with negative y position if there is too many lines to display
atlka
parents:
1549
diff
changeset
|
100 } |
fcbfc99cf8e6
skip lines with negative y position if there is too many lines to display
atlka
parents:
1549
diff
changeset
|
101 |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
102 c=OSD_PB_START; |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
103 if ((font=vo_font->font[c])>=0) |
218 | 104 draw_alpha(x,y, |
105 vo_font->width[c], | |
106 vo_font->pic_a[font]->h, | |
107 vo_font->pic_b[font]->bmp+vo_font->start[c], | |
108 vo_font->pic_a[font]->bmp+vo_font->start[c], | |
109 vo_font->pic_a[font]->w); | |
1548
eee7951a23af
changes according to proper subfont bar positioning and char spaceing - sub.c
atlka
parents:
1524
diff
changeset
|
110 x+=vo_font->width[c]+vo_font->charspace; |
218 | 111 |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
112 c=OSD_PB_0; |
1602 | 113 if ((font=vo_font->font[c])>=0){ |
114 w=vo_font->width[c]; | |
115 h=vo_font->pic_a[font]->h; | |
116 s=vo_font->pic_b[font]->bmp+vo_font->start[c]; | |
117 sa=vo_font->pic_a[font]->bmp+vo_font->start[c]; | |
118 st=vo_font->pic_a[font]->w; | |
2204 | 119 if ((i=mark)) do { |
1602 | 120 draw_alpha(x,y,w,h,s,sa,st); |
1548
eee7951a23af
changes according to proper subfont bar positioning and char spaceing - sub.c
atlka
parents:
1524
diff
changeset
|
121 x+=charw; |
2204 | 122 } while(--i); |
1602 | 123 } |
202 | 124 |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
125 c=OSD_PB_1; |
1602 | 126 if ((font=vo_font->font[c])>=0){ |
127 w=vo_font->width[c]; | |
128 h=vo_font->pic_a[font]->h; | |
129 s =vo_font->pic_b[font]->bmp+vo_font->start[c]; | |
130 sa=vo_font->pic_a[font]->bmp+vo_font->start[c]; | |
131 st=vo_font->pic_a[font]->w; | |
2204 | 132 if ((i=elems-mark)) do { |
1602 | 133 draw_alpha(x,y,w,h,s,sa,st); |
1548
eee7951a23af
changes according to proper subfont bar positioning and char spaceing - sub.c
atlka
parents:
1524
diff
changeset
|
134 x+=charw; |
2204 | 135 } while(--i); |
1602 | 136 } |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
137 |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
138 c=OSD_PB_END; |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
139 if ((font=vo_font->font[c])>=0) |
218 | 140 draw_alpha(x,y, |
141 vo_font->width[c], | |
142 vo_font->pic_a[font]->h, | |
143 vo_font->pic_b[font]->bmp+vo_font->start[c], | |
144 vo_font->pic_a[font]->bmp+vo_font->start[c], | |
145 vo_font->pic_a[font]->w); | |
1548
eee7951a23af
changes according to proper subfont bar positioning and char spaceing - sub.c
atlka
parents:
1524
diff
changeset
|
146 // x+=vo_font->width[c]+vo_font->charspace; |
803
b25a887b6054
sub splitting patch applied by Vlada V.Dubsky@sh.cvut.cz
arpi_esp
parents:
726
diff
changeset
|
147 |
218 | 148 |
149 // vo_osd_progbar_value=(vo_osd_progbar_value+1)&0xFF; | |
150 | |
151 } | |
152 | |
254 | 153 subtitle* vo_sub=NULL; |
218 | 154 |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
155 #define MAX_UCS 1600 |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
156 #define MAX_UCSLINES 16 |
218 | 157 |
1591 | 158 |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
159 inline static 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)){ |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
160 static int utbl[MAX_UCS+1]; |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
161 static int xtbl[MAX_UCSLINES]; |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
162 static int lines; |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
163 static subtitle *memsub=NULL; |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
164 static int memy; |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
165 static int memdxs; |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
166 static int memdys; |
1591 | 167 |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
168 unsigned char *t; |
1591 | 169 int c,i,j,l,x,y,font; |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
170 int len; |
1591 | 171 int k,lastk; |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
172 int lastStripPosition; |
1591 | 173 int xsize,lastxsize; |
174 int h,lasth; | |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
175 |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
176 if ((memsub!=vo_sub)||(memdxs!=dxs)||(memdys!=dys)){ |
1591 | 177 |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
178 memsub=vo_sub; |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
179 memdxs=dxs; |
1591 | 180 memdys=memy=dys; |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
181 |
1602 | 182 // too long lines divide into a smaller ones |
1591 | 183 i=k=lines=lasth=0; |
184 h=vo_font->height; | |
185 xsize=-vo_font->charspace; | |
186 lastStripPosition=-1; | |
187 l=vo_sub->lines; | |
188 | |
2204 | 189 while (l) { |
190 l--; | |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
191 t=vo_sub->text[i++]; |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
192 len=strlen(t)-1; |
1824 | 193 |
1852 | 194 // printf("sub(%d) '%s'\n",len,t); |
1824 | 195 // if(len<0) memy -=h; // according to max of vo_font->pic_a[font]->h |
196 // else | |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
197 for (j=0;j<=len;j++){ |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
198 if ((c=t[j])>=0x80){ |
2176 | 199 if (sub_utf8){ |
200 if ((c & 0xe0) == 0xc0) /* 2 bytes U+00080..U+0007FF*/ | |
201 c = (c & 0x1f)<<6 | (t[++j] & 0x3f); | |
202 else if((c & 0xf0) == 0xe0)/* 3 bytes U+00800..U+00FFFF*/ | |
203 c = ((c & 0x0f)<<6 | | |
204 (t[++j] & 0x3f))<<6 | (t[++j] & 0x3f); | |
205 } else if (sub_unicode) | |
206 c = (c<<8) + t[++j]; | |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
207 } |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
208 if (k==MAX_UCS){ |
2204 | 209 len=j; // end here |
2205 | 210 printf ("\nMAX_UCS exceeded!\n"); |
1591 | 211 } |
2204 | 212 if (!c) c++; // avoid UCS 0 |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
213 if (c==' '){ |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
214 lastk=k; |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
215 lastStripPosition=j; |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
216 lastxsize=xsize; |
2204 | 217 } else if ((font=vo_font->font[c])>=0){ |
1591 | 218 if (vo_font->pic_a[font]->h > h){ |
219 h=vo_font->pic_a[font]->h; | |
220 } | |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
221 } |
2204 | 222 utbl[k++]=c; |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
223 xsize+=vo_font->width[c]+vo_font->charspace; |
1591 | 224 if (dxs<xsize){ |
225 if (lastStripPosition>0){ | |
226 j=lastStripPosition; | |
227 xsize=lastxsize; | |
228 k=lastk; | |
229 } else { | |
230 xsize -=vo_font->width[c]+vo_font->charspace; // go back | |
231 k--; // cut line here | |
232 while (t[j] && t[j]!=' ') j++; // jump to the nearest space | |
233 } | |
234 } else if (j<len) | |
235 continue; | |
236 if (h>memy){ // out of the screen so end parsing | |
2205 | 237 memy -= lasth - vo_font->height; // correct the y position |
2204 | 238 l=0; |
239 break; | |
1591 | 240 } |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
241 utbl[k++]=0; |
1591 | 242 xtbl[lines++]=(dxs-xsize)/2; |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
243 if (lines==MAX_UCSLINES||k>MAX_UCS){ |
2204 | 244 l=0; len=j; // end parsing |
1602 | 245 } else if(l || j<len){ // not the last line or not the last char |
1591 | 246 lastStripPosition=-1; |
247 xsize=-vo_font->charspace; | |
248 lasth=h; | |
249 h=vo_font->height; | |
250 } | |
2176 | 251 // printf("h: %d -> %d \n",vo_font->height,h); |
1591 | 252 memy -=h; // according to max of vo_font->pic_a[font]->h |
253 } | |
1573
c394d04d6b30
changes according to max of vo_font->pic_a[font]->h for the last line of subs
atlka
parents:
1569
diff
changeset
|
254 } |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
255 } |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
256 |
4773 | 257 if (memy < (dys * sub_pos / 100)) { y = memy; } else { y = dys * sub_pos /100;}; |
1824 | 258 |
259 // printf("lines=%d y=%d\n",lines,y); | |
202 | 260 |
2204 | 261 i=j=0; |
262 if ((l=lines)) for (;;) { | |
263 x=xtbl[i++]; | |
1591 | 264 while ((c=utbl[j++])){ |
2176 | 265 if ((font=vo_font->font[c])>=0) |
1569
fcbfc99cf8e6
skip lines with negative y position if there is too many lines to display
atlka
parents:
1549
diff
changeset
|
266 draw_alpha(x,y, |
fcbfc99cf8e6
skip lines with negative y position if there is too many lines to display
atlka
parents:
1549
diff
changeset
|
267 vo_font->width[c], |
1824 | 268 vo_font->pic_a[font]->h+y<dys ? vo_font->pic_a[font]->h : dys-y, |
1569
fcbfc99cf8e6
skip lines with negative y position if there is too many lines to display
atlka
parents:
1549
diff
changeset
|
269 vo_font->pic_b[font]->bmp+vo_font->start[c], |
fcbfc99cf8e6
skip lines with negative y position if there is too many lines to display
atlka
parents:
1549
diff
changeset
|
270 vo_font->pic_a[font]->bmp+vo_font->start[c], |
fcbfc99cf8e6
skip lines with negative y position if there is too many lines to display
atlka
parents:
1549
diff
changeset
|
271 vo_font->pic_a[font]->w); |
2204 | 272 x+=vo_font->width[c]+vo_font->charspace; |
1569
fcbfc99cf8e6
skip lines with negative y position if there is too many lines to display
atlka
parents:
1549
diff
changeset
|
273 } |
2204 | 274 if (!--l) |
275 return; | |
1591 | 276 y+=vo_font->height; |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1109
diff
changeset
|
277 } |
218 | 278 } |
279 | |
3034
24d3dca4e813
DVD sub patch by Kim Minh Kaplan <kmkaplan@selfoffice.com>
arpi
parents:
2498
diff
changeset
|
280 void *vo_spudec=NULL; |
4081
9e581ab5e54b
Add vobsub support, suppress conditionnal on USE_DVDREAD.
kmkaplan
parents:
3180
diff
changeset
|
281 void *vo_vobsub=NULL; |
3034
24d3dca4e813
DVD sub patch by Kim Minh Kaplan <kmkaplan@selfoffice.com>
arpi
parents:
2498
diff
changeset
|
282 inline static void vo_draw_spudec(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)){ |
4087 | 283 spudec_draw_scaled(vo_spudec, dxs, dys, draw_alpha); |
3034
24d3dca4e813
DVD sub patch by Kim Minh Kaplan <kmkaplan@selfoffice.com>
arpi
parents:
2498
diff
changeset
|
284 } |
4081
9e581ab5e54b
Add vobsub support, suppress conditionnal on USE_DVDREAD.
kmkaplan
parents:
3180
diff
changeset
|
285 inline static void vo_draw_vobsub(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)){ |
9e581ab5e54b
Add vobsub support, suppress conditionnal on USE_DVDREAD.
kmkaplan
parents:
3180
diff
changeset
|
286 vobsub_draw(vo_vobsub, dxs, dys, draw_alpha); |
9e581ab5e54b
Add vobsub support, suppress conditionnal on USE_DVDREAD.
kmkaplan
parents:
3180
diff
changeset
|
287 } |
3034
24d3dca4e813
DVD sub patch by Kim Minh Kaplan <kmkaplan@selfoffice.com>
arpi
parents:
2498
diff
changeset
|
288 |
947
76fd9463b9d3
FAST_OSD option to disable font outline antialiasing
arpi_esp
parents:
865
diff
changeset
|
289 static int draw_alpha_init_flag=0; |
218 | 290 |
1109 | 291 extern void vo_draw_alpha_init(); |
292 | |
218 | 293 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)){ |
294 | |
4081
9e581ab5e54b
Add vobsub support, suppress conditionnal on USE_DVDREAD.
kmkaplan
parents:
3180
diff
changeset
|
295 if(vo_spudec){ |
9e581ab5e54b
Add vobsub support, suppress conditionnal on USE_DVDREAD.
kmkaplan
parents:
3180
diff
changeset
|
296 vo_draw_spudec(dxs,dys,draw_alpha); |
9e581ab5e54b
Add vobsub support, suppress conditionnal on USE_DVDREAD.
kmkaplan
parents:
3180
diff
changeset
|
297 } |
9e581ab5e54b
Add vobsub support, suppress conditionnal on USE_DVDREAD.
kmkaplan
parents:
3180
diff
changeset
|
298 |
9e581ab5e54b
Add vobsub support, suppress conditionnal on USE_DVDREAD.
kmkaplan
parents:
3180
diff
changeset
|
299 if(vo_vobsub){ |
9e581ab5e54b
Add vobsub support, suppress conditionnal on USE_DVDREAD.
kmkaplan
parents:
3180
diff
changeset
|
300 vo_draw_vobsub(dxs,dys,draw_alpha); |
9e581ab5e54b
Add vobsub support, suppress conditionnal on USE_DVDREAD.
kmkaplan
parents:
3180
diff
changeset
|
301 } |
9e581ab5e54b
Add vobsub support, suppress conditionnal on USE_DVDREAD.
kmkaplan
parents:
3180
diff
changeset
|
302 |
218 | 303 if(!vo_font) return; // no font |
304 | |
947
76fd9463b9d3
FAST_OSD option to disable font outline antialiasing
arpi_esp
parents:
865
diff
changeset
|
305 if(!draw_alpha_init_flag){ |
76fd9463b9d3
FAST_OSD option to disable font outline antialiasing
arpi_esp
parents:
865
diff
changeset
|
306 draw_alpha_init_flag=1; |
76fd9463b9d3
FAST_OSD option to disable font outline antialiasing
arpi_esp
parents:
865
diff
changeset
|
307 vo_draw_alpha_init(); |
76fd9463b9d3
FAST_OSD option to disable font outline antialiasing
arpi_esp
parents:
865
diff
changeset
|
308 } |
76fd9463b9d3
FAST_OSD option to disable font outline antialiasing
arpi_esp
parents:
865
diff
changeset
|
309 |
218 | 310 if(vo_osd_text){ |
311 vo_draw_text_osd(dxs,dys,draw_alpha); | |
312 } | |
313 | |
254 | 314 if(vo_sub){ |
218 | 315 vo_draw_text_sub(dxs,dys,draw_alpha); |
316 } | |
317 | |
1822 | 318 if(vo_osd_progbar_type>=0 && vo_font->font[OSD_PB_0]>=0){ |
218 | 319 vo_draw_text_progbar(dxs,dys,draw_alpha); |
320 } | |
3034
24d3dca4e813
DVD sub patch by Kim Minh Kaplan <kmkaplan@selfoffice.com>
arpi
parents:
2498
diff
changeset
|
321 |
202 | 322 } |
1726 | 323 |
4807
156482788caf
osd outside movie support for vo_sdl, patch by Fredrik Kuivinen
atmos4
parents:
4773
diff
changeset
|
324 static int vo_osd_changed_status = 0; |
156482788caf
osd outside movie support for vo_sdl, patch by Fredrik Kuivinen
atmos4
parents:
4773
diff
changeset
|
325 |
156482788caf
osd outside movie support for vo_sdl, patch by Fredrik Kuivinen
atmos4
parents:
4773
diff
changeset
|
326 int vo_osd_changed(int new_value) |
156482788caf
osd outside movie support for vo_sdl, patch by Fredrik Kuivinen
atmos4
parents:
4773
diff
changeset
|
327 { |
156482788caf
osd outside movie support for vo_sdl, patch by Fredrik Kuivinen
atmos4
parents:
4773
diff
changeset
|
328 int ret = vo_osd_changed_status; |
156482788caf
osd outside movie support for vo_sdl, patch by Fredrik Kuivinen
atmos4
parents:
4773
diff
changeset
|
329 vo_osd_changed_status = new_value; |
156482788caf
osd outside movie support for vo_sdl, patch by Fredrik Kuivinen
atmos4
parents:
4773
diff
changeset
|
330 return ret; |
156482788caf
osd outside movie support for vo_sdl, patch by Fredrik Kuivinen
atmos4
parents:
4773
diff
changeset
|
331 } |