[Mplayer-cvslog] CVS: main/libvo vo_fbdev.c,1.58,1.59 vo_vesa.c,1.59,1.60 vo_xvidix.c,1.14,1.15 vosub_vidix.h,1.7,1.8 vosub_vidix.c,1.22,1.23

Nick Kurshev nick at mplayer.dev.hu
Thu Jan 31 11:23:42 CET 2002


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

Modified Files:
	vo_fbdev.c vo_vesa.c vo_xvidix.c vosub_vidix.h vosub_vidix.c 
Log Message:
Use new tune info

Index: vo_fbdev.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_fbdev.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- vo_fbdev.c	31 Jan 2002 09:52:45 -0000	1.58
+++ vo_fbdev.c	31 Jan 2002 10:23:39 -0000	1.59
@@ -1102,7 +1102,7 @@
 		else y_offset = 0;
 		if(vidix_init(width,height,x_offset,y_offset,image_width,
 			    image_height,format,fb_bpp,
-			    fb_xres,fb_yres) != 0)
+			    fb_xres,fb_yres,info) != 0)
 		{
 		    printf(FBDEV "Can't initialize VIDIX driver\n");
 		    vidix_name = NULL;

Index: vo_vesa.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_vesa.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- vo_vesa.c	31 Jan 2002 09:52:45 -0000	1.59
+++ vo_vesa.c	31 Jan 2002 10:23:39 -0000	1.60
@@ -897,7 +897,7 @@
 		{
 		  if(vidix_init(width,height,x_offset,y_offset,image_width,
 				image_height,format,video_mode_info.BitsPerPixel,
-				video_mode_info.XResolution,video_mode_info.YResolution) != 0)
+				video_mode_info.XResolution,video_mode_info.YResolution,info) != 0)
 		  {
 		    printf("vo_vesa: Can't initialize VIDIX driver\n");
 		    vidix_name = NULL;

Index: vo_xvidix.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xvidix.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- vo_xvidix.c	31 Jan 2002 09:52:45 -0000	1.14
+++ vo_xvidix.c	31 Jan 2002 10:23:39 -0000	1.15
@@ -57,6 +57,7 @@
 
 /* VIDIX related */
 static char *vidix_name;
+static vo_tune_info_t vtune;
 
 /* Image parameters */
 static uint32_t image_width;
@@ -73,7 +74,7 @@
 static uint32_t drwX, drwY, drwWidth, drwHeight, drwBorderWidth,
     drwDepth, drwcX, drwcY, dwidth, dheight, mFullscreen;
 
-static void set_window(int force_update)
+static void set_window(int force_update,const vo_tune_info_t *info)
 {
 #ifdef HAVE_NEW_GUI
     if (vo_window != None)
@@ -154,7 +155,8 @@
 	/* FIXME: implement runtime resize/move if possible, this way is very ugly! */
 	vidix_stop();
 	if (vidix_init(image_width, image_height, window_x, window_y,
-	    window_width, window_height, image_format, vo_depthonscreen, vo_screenwidth, vo_screenheight) != 0)
+	    window_width, window_height, image_format, vo_depthonscreen,
+	    vo_screenwidth, vo_screenheight,info) != 0)
         {
 	    mp_msg(MSGT_VO, MSGL_FATAL, "Can't initialize VIDIX driver: %s: %s\n",
 		vidix_name, strerror(errno));
@@ -363,8 +365,9 @@
 	vidix_grkey_set(&gr_key);
     }
 
-    set_window(1);
-
+    set_window(1,info);
+    if(info) memcpy(&vtune,info,sizeof(vo_tune_info_t));
+    else     memset(&vtune,0,sizeof(vo_tune_info_t));
 #ifdef HAVE_NEW_GUI
     if (vo_window == None)
 #endif
@@ -388,7 +391,7 @@
     const int event = vo_x11_check_events(mDisplay);
 
     if ((event & VO_EVENT_RESIZE) || (event & VO_EVENT_EXPOSE))
-	set_window(0);
+	set_window(0,&vtune);
 
     return;
 }

Index: vosub_vidix.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vosub_vidix.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- vosub_vidix.h	26 Jan 2002 16:01:26 -0000	1.7
+++ vosub_vidix.h	31 Jan 2002 10:23:39 -0000	1.8
@@ -17,7 +17,7 @@
 int      vidix_init(unsigned src_width,unsigned src_height,
 		    unsigned dest_x,unsigned dest_y,unsigned dst_width,
 		    unsigned dst_height,unsigned format,unsigned dest_bpp,
-		    unsigned vid_w,unsigned vid_h);
+		    unsigned vid_w,unsigned vid_h,const void *info);
 int	 vidix_start(void);
 int	 vidix_stop(void);
 void     vidix_term( void );

Index: vosub_vidix.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vosub_vidix.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- vosub_vidix.c	31 Jan 2002 08:53:58 -0000	1.22
+++ vosub_vidix.c	31 Jan 2002 10:23:39 -0000	1.23
@@ -100,7 +100,7 @@
 int      vidix_init(unsigned src_width,unsigned src_height,
 		   unsigned x_org,unsigned y_org,unsigned dst_width,
 		   unsigned dst_height,unsigned format,unsigned dest_bpp,
-		   unsigned vid_w,unsigned vid_h)
+		   unsigned vid_w,unsigned vid_h,const void *info)
 {
   size_t i,awidth;
   int err;
@@ -166,6 +166,49 @@
 	vidix_play.dest.w = dst_width;
 	vidix_play.dest.h = dst_height;
 	vidix_play.num_frames=NUM_FRAMES;
+	vidix_play.src.pitch.y = vidix_play.src.pitch.u = vidix_play.src.pitch.v = 0;
+	if(info)
+	{
+	switch(((const vo_tune_info_t *)info)->pitch[0])
+	{
+	    case 2:
+	    case 4:
+	    case 8:
+	    case 16:
+	    case 32:
+	    case 64:
+	    case 128:
+	    case 256: vidix_play.src.pitch.y = ((const vo_tune_info_t *)info)->pitch[0];
+		      break;
+	    default: break;
+	}
+	switch(((const vo_tune_info_t *)info)->pitch[1])
+	{
+	    case 2:
+	    case 4:
+	    case 8:
+	    case 16:
+	    case 32:
+	    case 64:
+	    case 128:
+	    case 256: vidix_play.src.pitch.u = ((const vo_tune_info_t *)info)->pitch[1];
+		      break;
+	    default: break;
+	}
+	switch(((const vo_tune_info_t *)info)->pitch[2])
+	{
+	    case 2:
+	    case 4:
+	    case 8:
+	    case 16:
+	    case 32:
+	    case 64:
+	    case 128:
+	    case 256: vidix_play.src.pitch.v = ((const vo_tune_info_t *)info)->pitch[2];
+		      break;
+	    default: break;
+	}
+	}
 	if((err=vdlConfigPlayback(vidix_handler,&vidix_play))!=0)
 	{
 		printf("vosub_vidix: Can't configure playback: %s\n",strerror(err));




More information about the MPlayer-cvslog mailing list