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