Mercurial > mplayer.hg
comparison libvo/vo_aa.c @ 1575:2766b0d3863d
osd problem with YV12 fixed
author | folke |
---|---|
date | Fri, 17 Aug 2001 14:31:03 +0000 |
parents | 25c2ee4de8b1 |
children | 2dff06ebfbb4 |
comparison
equal
deleted
inserted
replaced
1574:4190a9e73e35 | 1575:2766b0d3863d |
---|---|
238 bppmul=bpp/8; | 238 bppmul=bpp/8; |
239 | 239 |
240 | 240 |
241 /* initializing of aalib */ | 241 /* initializing of aalib */ |
242 | 242 |
243 hidis=aa_getfirst(&aa_displayrecommended); | 243 /* why removes get after getting it the gotten value out of the list? :( */ |
244 if ( hidis==NULL || strcasecmp(hidis, "linux")){ | 244 //hidis=aa_getfirst(&aa_displayrecommended); |
245 if (aa_displayrecommended!=NULL) | |
246 hidis=aa_displayrecommended->text; | |
247 if ( hidis==NULL ){ | |
245 /* check /dev/vcsa<vt> */ | 248 /* check /dev/vcsa<vt> */ |
246 /* check only, if driver linux not explicit set */ | 249 /* check only, if no driver is explicit set */ |
247 fd = dup (fileno (stderr)); | 250 fd = dup (fileno (stderr)); |
248 fstat (fd, &sbuf); | 251 fstat (fd, &sbuf); |
249 major = sbuf.st_rdev >> 8; | 252 major = sbuf.st_rdev >> 8; |
250 vt = minor = sbuf.st_rdev & 0xff; | 253 vt = minor = sbuf.st_rdev & 0xff; |
251 close (fd); | 254 close (fd); |
252 sprintf (fname, "/dev/vcsa%i", vt); | 255 sprintf (fname, "/dev/vcsa%i", vt); |
253 fp = fopen (fname, "w+"); | 256 fp = fopen (fname, "w+"); |
254 fprintf(stderr,"X\n"); | |
255 if (fp==NULL){ | 257 if (fp==NULL){ |
256 fprintf(stderr,"VO: [aa] cannot open %s for writing, so we'll not use linux driver\n", fname); | 258 fprintf(stderr,"VO: [aa] cannot open %s for writing, so we'll not use linux driver\n", fname); |
257 aa_recommendhidisplay("curses"); | 259 aa_recommendlowdisplay("linux"); |
258 aa_recommendhidisplay("X11"); | |
259 }else fclose(fp); | 260 }else fclose(fp); |
260 } | 261 } |
261 c = aa_autoinit(&aa_defparams); | 262 c = aa_autoinit(&aa_defparams); |
262 aa_resizehandler(c, (void *)resize); | 263 aa_resizehandler(c, (void *)resize); |
263 | 264 |
627 * the subtiles are written into a own osdbuffer | 628 * the subtiles are written into a own osdbuffer |
628 * because draw_osd is called after show_image/flip_page | 629 * because draw_osd is called after show_image/flip_page |
629 * the osdbuffer is written the next show_image/flip_page | 630 * the osdbuffer is written the next show_image/flip_page |
630 * into aatextbuf | 631 * into aatextbuf |
631 */ | 632 */ |
633 char * vo_osd_text_save; | |
634 int vo_osd_progbar_type_save; | |
635 | |
632 memset(osdbuffer,0,aa_scrwidth(c)*aa_scrheight(c)); | 636 memset(osdbuffer,0,aa_scrwidth(c)*aa_scrheight(c)); |
633 printosdprogbar(); | 637 printosdprogbar(); |
634 /* let vo_draw_text only write subtitle */ | 638 /* let vo_draw_text only write subtitle */ |
635 vo_osd_text=0; | 639 vo_osd_text_save=vo_osd_text; /* we have to save the osd_text */ |
640 vo_osd_text=NULL; | |
641 vo_osd_progbar_type_save=vo_osd_progbar_type; | |
636 vo_osd_progbar_type=-1; | 642 vo_osd_progbar_type=-1; |
637 vo_draw_text(aa_scrwidth(c), aa_scrheight(c), draw_alpha); | 643 vo_draw_text(aa_scrwidth(c), aa_scrheight(c), draw_alpha); |
644 vo_osd_text=vo_osd_text_save; | |
645 vo_osd_progbar_type=vo_osd_progbar_type_save; | |
638 #endif | 646 #endif |
639 } | 647 } |
640 | 648 |
641 int | 649 int |
642 getcolor(char * s){ | 650 getcolor(char * s){ |