[Mplayer-cvslog] CVS: main/libvo vo_aa.c,1.1,1.2

Folke Ashberg folke at mplayer.dev.hu
Tue Aug 14 20:58:42 CEST 2001


Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv29565/libvo

Modified Files:
	vo_aa.c 
Log Message:
vo_aa: configurable now

Index: vo_aa.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_aa.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vo_aa.c	14 Aug 2001 12:30:56 -0000	1.1
+++ vo_aa.c	14 Aug 2001 18:58:39 -0000	1.2
@@ -75,10 +75,18 @@
 double accum;
 
 /* our version of the playmodes :) */
-static char * osdmodes[] ={ ">", "\"", "#", "-" , "+" };
+static char * osdmodes[] ={ "|>", "||", ">>", "[]" , ">>" };
 
 extern void mplayer_put_key(int code);
 
+/* to disable stdout outputs when curses/linux mode */
+extern int quiet;
+
+/* config options */
+int aaopt_extended = 0;
+int aaopt_eight = 0;
+int aaopt_osdcolor = AA_SPECIAL;
+char *aaopt_driver = NULL;
 
 void
 resize(void){
@@ -199,8 +207,15 @@
     aa_recommendhidisplay("curses");
     aa_recommendhidisplay("X11");
     aa_recommendlowdisplay("linux");
+    
+    /* options ? */
+    if (aaopt_eight) aa_defparams.supported|=AA_EIGHT;
+    if (aaopt_extended && !aaopt_eight) aa_defparams.supported|=AA_EXTENDED;
+    if (aaopt_driver!=NULL){
+	aa_recommendhidisplay(aaopt_driver);
+    }
 
-
+    
     c = aa_autoinit(&aa_defparams);
     aa_resizehandler(c, (void *)resize);
 
@@ -223,8 +238,10 @@
     aa_hidecursor(c);
     p = aa_getrenderparams();
 
-    if ((strstr(c->driver->name,"curses")) || (strstr(c->driver->name,"libux"))) 
+    if ((strstr(c->driver->name,"curses")) || (strstr(c->driver->name,"linux"))){
 	freopen("/dev/null", "w", stderr);
+	quiet=1; /* disable mplayer outputs */
+    }
     
     image_height = height;
     image_width = width;
@@ -246,7 +263,12 @@
 
     printf(
 		"\n"
-		"\tAA-MPlayer Keys:\n"
+		"Options\n"
+		"\t-aaosdfont   0=normal, 1=dark, 2=bold, 3-boldfont, 4=reverse, 5=special\n"
+		"\t-aaextended  use use all 256 characters\n"
+		"\t-aaeight     use eight bit ascii\n"
+		"\n"
+		"AA-MPlayer Keys:\n"
 		"\t1 : fast rendering\n"
 		"\t2 : dithering\n"
 		"\t3 : invert image\n"
@@ -329,10 +351,10 @@
      */
     if (vo_osd_text){
 	if (vo_osd_text[0]-1<=5)
-	  aa_puts(c, 0,0, AA_BOLDFONT, osdmodes[vo_osd_text[0]-1]);
-	else aa_puts(c, 0,0, AA_BOLDFONT, "?");
-	aa_puts(c,1,0, AA_BOLDFONT, vo_osd_text+1);
-	aa_puts(c,strlen(vo_osd_text),0, AA_BOLDFONT, " ");
+	  aa_puts(c, 0,0, aaopt_osdcolor, osdmodes[vo_osd_text[0]-1]);
+	else aa_puts(c, 0,0, aaopt_osdcolor, "?");
+	aa_puts(c,2,0, aaopt_osdcolor, vo_osd_text+1);
+	aa_puts(c,strlen(vo_osd_text)+1,0, aaopt_osdcolor, " ");
     }
 }
 
@@ -505,8 +527,10 @@
     free(stx);
     free(sty);
     if (convertbuf!=NULL) free(convertbuf);
-    if (strstr(c->driver->name,"curses") || strstr(c->driver->name,"libux")) 
+    if (strstr(c->driver->name,"curses") || strstr(c->driver->name,"libux")){
 	freopen("/dev/tty", "w", stderr);
+	quiet=0; /* enable mplayer outputs */
+    }
 }
 
 static void




More information about the MPlayer-cvslog mailing list