[Mplayer-cvslog] CVS: main/libvo vesa_lvo.c,1.13,1.14 vosub_vidix.c,1.19,1.20

Nick Kurshev nick at mplayer.dev.hu
Sun Jan 27 09:06:07 CET 2002


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

Modified Files:
	vesa_lvo.c vosub_vidix.c 
Log Message:
improvements

Index: vesa_lvo.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vesa_lvo.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- vesa_lvo.c	2 Dec 2001 12:21:13 -0000	1.13
+++ vesa_lvo.c	27 Jan 2002 08:05:56 -0000	1.14
@@ -61,6 +61,7 @@
 	video_out_vesa.draw_frame=vlvo_draw_frame;
 	video_out_vesa.flip_page=vlvo_flip_page;
 	video_out_vesa.draw_osd=vlvo_draw_osd;
+	video_out_vesa.query_format=vlvo_query_info;
 	return 0;
 }
 

Index: vosub_vidix.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vosub_vidix.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- vosub_vidix.c	26 Jan 2002 19:12:49 -0000	1.19
+++ vosub_vidix.c	27 Jan 2002 08:05:56 -0000	1.20
@@ -20,6 +20,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <errno.h>
 
 #include "config.h"
 
@@ -37,11 +38,20 @@
 static uint8_t next_frame;
 static unsigned image_bpp,image_height,image_width,src_format;
 extern int verbose;
+static int video_on=0;
 
 static vidix_capability_t vidix_cap;
 static vidix_playback_t   vidix_play;
 static vidix_fourcc_t	  vidix_fourcc;
 
+static int  vidix_get_bes_da(bes_da_t *);
+
+static void vidix_query_vaa(vo_vaa_t *vaa)
+{
+  memset(vaa,0,sizeof(vo_vaa_t));
+  vaa->query_bes_da=vidix_get_bes_da;
+}
+
 int vidix_preinit(const char *drvname,void *server)
 {
   int err;
@@ -72,6 +82,7 @@
 	((vo_functions_t *)server)->flip_page=vidix_flip_page;
 	((vo_functions_t *)server)->draw_osd=vidix_draw_osd;
 	((vo_functions_t *)server)->query_format=vidix_query_fourcc;
+	((vo_functions_t *)server)->query_vaa=vidix_query_vaa;
 	return 0;
 }
 
@@ -215,6 +226,7 @@
 		vdlPlaybackSetEq(vidix_handler,&vid_eq);
 	}
     }
+    video_on=1;
     return 0;
 }
 
@@ -226,6 +238,7 @@
 	printf("vosub_vidix: Can't stop playback: %s\n",strerror(err));
 	return -1;
     }
+    video_on=0;
     return 0;
 }
 
@@ -398,8 +411,7 @@
   if(verbose > 1) printf("vosub_vidix: query_format was called: %x (%s)\n",format,vo_format_name(format));
   vidix_fourcc.fourcc = format;
   vdlQueryFourcc(vidix_handler,&vidix_fourcc);
-  if (vidix_fourcc.depth == VID_DEPTH_NONE)
-    return(0);
+  if (vidix_fourcc.depth == VID_DEPTH_NONE) return(0);
   return(0x2); /* hw support without conversion */
 }
 
@@ -416,4 +428,23 @@
 int vidix_grkey_set(const vidix_grkey_t *gr_key)
 {
     return(vdlSetGrKeys(vidix_handler, gr_key));
+}
+
+static int  vidix_get_bes_da(bes_da_t *info)
+{
+  if(!video_on) return EPERM;
+  info->dest.x = vidix_play.src.x;
+  info->dest.y = vidix_play.src.y;
+  info->dest.w = vidix_play.src.w;
+  info->dest.h = vidix_play.src.h;
+  info->dest.pitch.y = vidix_play.dest.pitch.y;
+  info->dest.pitch.u = vidix_play.dest.pitch.u;
+  info->dest.pitch.v = vidix_play.dest.pitch.v;
+  info->flags = vidix_play.flags;
+  info->frame_size = vidix_play.frame_size;
+  info->num_frames = vidix_play.num_frames;
+  memcpy(info->offsets,vidix_play.offsets,sizeof(unsigned)*vidix_play.num_frames);
+  memcpy(&info->offset,&vidix_play.offset,sizeof(vidix_yuv_t));
+  info->dga_addr = vidix_play.dga_addr;
+  return 0;
 }




More information about the MPlayer-cvslog mailing list