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