[Mplayer-cvslog] CVS: main/libvo mga_common.c,1.42,1.43 vo_mga.c,1.33,1.34 vo_xmga.c,1.78,1.79

Arpi of Ize arpi at mplayerhq.hu
Wed Oct 9 15:40:26 CEST 2002


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

Modified Files:
	mga_common.c vo_mga.c vo_xmga.c 
Log Message:
more cleanup, some -vo mga fullscreen fixes


Index: mga_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/mga_common.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- mga_common.c	9 Oct 2002 13:25:13 -0000	1.42
+++ mga_common.c	9 Oct 2002 13:40:23 -0000	1.43
@@ -31,6 +31,12 @@
     }
 }
 
+static void draw_osd(void)
+{
+    vo_draw_text(mga_vid_config.src_width,mga_vid_config.src_height,draw_alpha);
+}
+
+
 //static void
 //write_slice_g200(uint8_t *y,uint8_t *cr, uint8_t *cb,uint32_t slice_num)
 
@@ -200,13 +206,8 @@
 	}
 	mga_vid_config.dest_width = w;
 	mga_vid_config.dest_height= h;
-	if (vo_screenwidth && vo_screenheight) {
-		mga_vid_config.x_org=(vo_screenwidth-w)/2;
-		mga_vid_config.y_org=(vo_screenheight-h)/2;
-	} else {
-		mga_vid_config.x_org= 0;
-		mga_vid_config.y_org= 0;
-	}
+	mga_vid_config.x_org=(vo_screenwidth-w)/2;
+	mga_vid_config.y_org=(vo_screenheight-h)/2;
 	if ( ioctl( f,MGA_VID_CONFIG,&mga_vid_config ) )
 		printf( "Error in mga_vid_config ioctl (wrong mga_vid.o version?)" );
 }
@@ -287,7 +288,10 @@
 														       
 #ifndef VO_XMGA
   case VOCTRL_FULLSCREEN:
-    mga_fullscreen();
+    if (vo_screenwidth && vo_screenheight)
+	mga_fullscreen();
+    else
+	printf("Screen width/height unknown!\n");
     return VO_TRUE;
 #endif
 
@@ -344,9 +348,13 @@
 
 	mga_vid_config.src_width = width;
 	mga_vid_config.src_height= height;
-	mga_vid_config.dest_width = width;
-	mga_vid_config.dest_height= height;
+	if(!mga_vid_config.dest_width)
+	    mga_vid_config.dest_width = width;
+	if(!mga_vid_config.dest_height)
+	    mga_vid_config.dest_height= height;
 
+	mga_vid_config.colkey_on=0;
+	
 	mga_vid_config.num_frames=(vo_directrendering && !vo_doublebuffering)?1:3;
 	mga_vid_config.version=MGA_VID_VERSION;
 	if (ioctl(f,MGA_VID_CONFIG,&mga_vid_config))

Index: vo_mga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_mga.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- vo_mga.c	9 Oct 2002 13:25:13 -0000	1.33
+++ vo_mga.c	9 Oct 2002 13:40:23 -0000	1.34
@@ -71,8 +71,6 @@
 		printf("vo_mga aspect(): resized to %dx%d\n",d_width,d_height);
 	}
 
-        mga_vid_config.colkey_on=0;
-
 	mga_vid_config.dest_width = d_width;
 	mga_vid_config.dest_height= d_height;
 	mga_vid_config.x_org= 0; // (720-mga_vid_config.dest_width)/2;
@@ -94,11 +92,6 @@
 {
     printf("vo: uninit!\n");
     mga_uninit();
-}
-
-static void draw_osd(void)
-{
-    vo_draw_text(mga_vid_config.src_width,mga_vid_config.src_height,draw_alpha);
 }
 
 static void flip_page(void)

Index: vo_xmga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xmga.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- vo_xmga.c	9 Oct 2002 13:25:13 -0000	1.78
+++ vo_xmga.c	9 Oct 2002 13:40:23 -0000	1.79
@@ -2,26 +2,10 @@
 //#define SHOW_TIME
 
 /*
- *    video_out_xmga.c
+ *    vo_xmga.c
  *
  *      Copyright (C) Zoltan Ponekker - Jan 2001
  *
- *  This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
- *
- *  mpeg2dec is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2, or (at your option)
- *  any later version.
- *
- *  mpeg2dec is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with GNU Make; see the file COPYING.  If not, write to
- *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- *
  */
 
 #include <stdio.h>
@@ -67,7 +51,7 @@
 
 static vo_info_t vo_info =
 {
- "X11 (Matrox G200/G4x0/G550 overlay in window using /dev/mga_vid)",
+ "Matrox G200/G4x0/G550 overlay in X11 window (using /dev/mga_vid)",
  "xmga",
  "Zoltan Ponekker <pontscho at makacs.poliod.hu>",
  ""
@@ -185,9 +169,6 @@
  mDrawColorKey();
  if ( ioctl( f,MGA_VID_CONFIG,&mga_vid_config ) ) mp_msg(MSGT_VO,MSGL_WARN,"Error in mga_vid_config ioctl (wrong mga_vid.o version?)" );
 }
-
-static void draw_osd(void)
-{ vo_draw_text(mga_vid_config.src_width,mga_vid_config.src_height,draw_alpha);}
 
 static void flip_page(void){
 #ifdef SHOW_TIME




More information about the MPlayer-cvslog mailing list