[Mplayer-cvslog] CVS: main/libvo vesa_lvo.c,1.15,1.16 video_out.h,1.15,1.16 video_out_internal.h,1.8,1.9 vo_3dfx.c,1.10,1.11 vo_aa.c,1.19,1.20 vo_dga.c,1.39,1.40 vo_directfb.c,1.9,1.10 vo_dxr3.c,1.44,1.45 vo_fbdev.c,1.59,1.60 vo_fsdga.c,1.8,1.9 vo_ggi.c,1.13,1.14 vo_gl.c,1.20,1.21 vo_gl2.c,1.13,1.14 vo_md5.c,1.9,1.10 vo_mga.c,1.22,1.23 vo_mpegpes.c,1.18,1.19 vo_null.c,1.5,1.6 vo_odivx.c,1.9,1.10 vo_pgm.c,1.9,1.10 vo_png.c,1.11,1.12 vo_sdl.c,1.65,1.66 vo_svga.c,1.41,1.42 vo_syncfb.c,1.9,1.10 vo_tdfxfb.c,1.5,1.6 vo_vesa.c,1.65,1.66 vo_x11.c,1.58,1.59 vo_xmga.c,1.43,1.44 vo_xv.c,1.51,1.52 vo_xvidix.c,1.18,1.19 vo_zr.c,1.7,1.8 vosub_vidix.c,1.26,1.27

Arpi of Ize arpi at mplayer.dev.hu
Sat Feb 9 01:47:34 CET 2002


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

Modified Files:
	vesa_lvo.c video_out.h video_out_internal.h vo_3dfx.c vo_aa.c 
	vo_dga.c vo_directfb.c vo_dxr3.c vo_fbdev.c vo_fsdga.c 
	vo_ggi.c vo_gl.c vo_gl2.c vo_md5.c vo_mga.c vo_mpegpes.c 
	vo_null.c vo_odivx.c vo_pgm.c vo_png.c vo_sdl.c vo_svga.c 
	vo_syncfb.c vo_tdfxfb.c vo_vesa.c vo_x11.c vo_xmga.c vo_xv.c 
	vo_xvidix.c vo_zr.c vosub_vidix.c 
Log Message:
query_ stuff replaced by new control() - patch by David Holm

Index: vesa_lvo.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vesa_lvo.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- vesa_lvo.c	3 Feb 2002 09:12:32 -0000	1.15
+++ vesa_lvo.c	9 Feb 2002 00:47:26 -0000	1.16
@@ -40,6 +40,7 @@
 static mga_vid_config_t mga_vid_config;
 static unsigned image_bpp,image_height,image_width,src_format;
 extern int verbose;
+uint32_t vlvo_control(uint32_t request, void *data, ...);
 
 #define PIXEL_SIZE() ((video_mode_info.BitsPerPixel+7)/8)
 #define SCREEN_LINE_SIZE(pixel_size) (video_mode_info.XResolution*(pixel_size) )
@@ -69,8 +70,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;
-	video_out_vesa.query_vaa=vlvo_query_vaa;
+  video_out_vesa.control=vlvo_control;
 	return 0;
 }
 
@@ -295,4 +295,16 @@
 {
   if(verbose > 1) printf("vesa_lvo: query_format was called: %x (%s)\n",format,vo_format_name(format));
   return 1;
+}
+
+uint32_t vlvo_control(uint32_t request, void *data, ...)
+{
+  switch (request) {
+  case VOCTRL_QUERY_VAA:
+    vlvo_query_vaa((vo_vaa_t*)data);
+    return VO_TRUE;
+  case VOCTRL_QUERY_FORMAT:
+    return vlvo_query_info(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }

Index: video_out.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/video_out.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- video_out.h	31 Jan 2002 09:52:45 -0000	1.15
+++ video_out.h	9 Feb 2002 00:47:26 -0000	1.16
@@ -7,6 +7,7 @@
  */
 
 #include <inttypes.h>
+#include <stdarg.h>
 
 #include "font_load.h"
 #include "img_format.h"
@@ -16,6 +17,19 @@
 #define VO_EVENT_RESIZE 2
 #define VO_EVENT_KEYPRESS 4
 
+/* takes a pointer to a vo_vaa_s struct */
+#define VOCTRL_QUERY_VAA 1
+/* takes a pointer to uint32_t fourcc */
+#define VOCTRL_QUERY_FORMAT 2
+/* signal a device reset (seek/paus) */
+#define VOCTRL_RESET 3
+
+#define VO_TRUE		1
+#define VO_FALSE	0
+#define VO_ERROR	-1
+#define VO_NOTAVAIL	-2
+#define VO_NOTIMPL	-3
+
 typedef struct vo_info_s
 {
         /* driver name ("Matrox Millennium G200/G400" */
@@ -93,13 +107,10 @@
 			 uint32_t d_height, uint32_t fullscreen, char *title,
 			 uint32_t format,const vo_tune_info_t *);
 
-        /*
-         * Query that given pixel format is supported or not.
-	 * params:
-	 *   format: fourcc of pixel format
-         * returns : 1 if supported, 0 if unsupported
-         */
-        uint32_t (*query_format)(uint32_t format);
+	/*
+	 * Control interface
+	 */
+	uint32_t (*control)(uint32_t request, void *data, ...);
 
         /*
          * Return driver information.
@@ -144,14 +155,6 @@
          * Closes driver. Should restore the original state of the system.
          */
         void (*uninit)(void);
-
-	/*
-	 * Query Video Accelerated Architecture information.
-	 * params:
-	 *   vaa: address of struct to be filled.
-	 *  (Note: driver should memset it to ZERO if it doesn't support vaa.)
-	 */
-	void (*query_vaa)(vo_vaa_t *vaa);
 
 } vo_functions_t;
 

Index: video_out_internal.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/video_out_internal.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- video_out_internal.h	31 Jan 2002 09:52:45 -0000	1.8
+++ video_out_internal.h	9 Feb 2002 00:47:26 -0000	1.9
@@ -21,6 +21,7 @@
  *
  */
 
+static uint32_t control(uint32_t request, void *data, ...);
 static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width,
 		     uint32_t d_height, uint32_t fullscreen, char *title,
 		     uint32_t format,const vo_tune_info_t *);
@@ -39,15 +40,14 @@
 {\
 	preinit,\
 	config,\
-        query_format,\
+	control,\
 	get_info,\
 	draw_frame,\
 	draw_slice,\
      	draw_osd,\
 	flip_page,\
 	check_events,\
-	uninit,\
-	query_vaa\
+	uninit\
 };
 
 #include "osd.h"

Index: vo_3dfx.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_3dfx.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- vo_3dfx.c	31 Jan 2002 09:52:45 -0000	1.10
+++ vo_3dfx.c	9 Feb 2002 00:47:26 -0000	1.11
@@ -493,8 +493,11 @@
   return 0;
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }
-

Index: vo_aa.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_aa.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- vo_aa.c	31 Jan 2002 09:52:45 -0000	1.19
+++ vo_aa.c	9 Feb 2002 00:47:26 -0000	1.20
@@ -757,7 +757,11 @@
   return 0;
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }

Index: vo_dga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_dga.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- vo_dga.c	31 Jan 2002 11:45:25 -0000	1.39
+++ vo_dga.c	9 Feb 2002 00:47:26 -0000	1.40
@@ -23,6 +23,9 @@
  * - works only on x86 architectures
  *
  * $Log$
+ * Revision 1.40  2002/02/09 00:47:26  arpi
+ * query_ stuff replaced by new control() - patch by David Holm
+ *
  * Revision 1.39  2002/01/31 11:45:25  alex
  * removed obsoleted Terminate_Display_Process
  *
@@ -1176,9 +1179,13 @@
   return 0;
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }
 
 //---------------------------------------------------------

Index: vo_directfb.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_directfb.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- vo_directfb.c	31 Jan 2002 09:52:45 -0000	1.9
+++ vo_directfb.c	9 Feb 2002 00:47:26 -0000	1.10
@@ -888,7 +888,11 @@
 
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }

Index: vo_dxr3.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_dxr3.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- vo_dxr3.c	3 Feb 2002 23:13:56 -0000	1.44
+++ vo_dxr3.c	9 Feb 2002 00:47:26 -0000	1.45
@@ -92,6 +92,39 @@
 	""
 };
 
+uint32_t control(uint32_t request, void *data, ...)
+{
+	uint32_t flag = 0;
+	switch (request) {
+	case VOCTRL_RESET:
+		fsync(fd_video);
+		return VO_TRUE;
+	case VOCTRL_QUERY_FORMAT:
+		switch (*((uint32_t*)data)) {	
+		case IMGFMT_MPEGPES:
+			/* Hardware accelerated | Hardware supports subpics */
+			flag = 0x2 | 0x8;
+			break;
+#ifdef USE_LIBAVCODEC
+		case IMGFMT_YV12:
+		case IMGFMT_YUY2:
+		case IMGFMT_RGB24:
+		case IMGFMT_BGR24:
+			/* Conversion needed | OSD Supported */
+			flag = 0x1 | 0x4;
+			break;
+		default:
+			printf("VO: [dxr3] Format unsupported, mail dholm at iname.com\n");
+#else
+		default:
+			printf("VO: [dxr3] You have enable libavcodec support (Read DOCS/codecs.html)!\n");
+#endif
+		}
+		return flag;
+	}
+	return VO_NOTIMPL;
+}
+
 static uint32_t config(uint32_t scr_width, uint32_t scr_height, uint32_t width, uint32_t height, uint32_t fullscreen, char *title, uint32_t format,const vo_tune_info_t *info)
 {
 	int tmp1, tmp2;
@@ -288,13 +321,6 @@
 static void flip_page(void)
 {
 	/* Flush the device if a seek occured */
-	if (!vo_pts) {
-		/* Flush video */
-		/*ioval = EM8300_SUBDEVICE_VIDEO;
-		ioctl(fd_control, EM8300_IOCTL_FLUSH, &ioval);
-		*/
-		fsync(fd_video);
-	}
 #ifdef USE_LIBAVCODEC
 	if (img_format == IMGFMT_YV12) {
 		int out_size = avcodec_encode_video(avc_context, avc_outbuf, avc_outbuf_size, &avc_picture);
@@ -352,36 +378,6 @@
 	return -1;
 }
 
-static uint32_t query_format(uint32_t format)
-{
-	uint32_t flag = 0;
-	
-	if (format == IMGFMT_MPEGPES) {
-		/* Hardware accelerated | Hardware supports subpics */
-		flag = 0x2 | 0x8;
-#ifdef USE_LIBAVCODEC
-	} else if (format == IMGFMT_YV12) {
-		/* Conversion needed | OSD Supported */
-		flag = 0x1 | 0x4;
-	} else if (format == IMGFMT_YUY2) {
-		/* Conversion needed | OSD Supported */
-		flag = 0x1 | 0x4;
-	} else if (format == IMGFMT_RGB24) {
-		/* Conversion needed | OSD Supported */
-		flag = 0x1 | 0x4;
-	} else if (format == IMGFMT_BGR24) {
-		/* Conversion needed | OSD Supported */
-		flag = 0x1 | 0x4;
-	} else {
-		printf("VO: [dxr3] Format unsupported, mail dholm at iname.com\n");
-#else
-	} else {
-		printf("VO: [dxr3] You have enable libavcodec support (Read DOCS/codecs.html)!\n");
-#endif
-	}
-	return flag;
-}
-
 static void uninit(void)
 {
 	printf("VO: [dxr3] Uninitializing\n");
@@ -483,9 +479,4 @@
 #endif
 	
 	return 0;
-}
-
-static void query_vaa(vo_vaa_t *vaa)
-{
-	memset(vaa, 0, sizeof(vo_vaa_t));
 }

Index: vo_fbdev.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_fbdev.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- vo_fbdev.c	31 Jan 2002 10:23:39 -0000	1.59
+++ vo_fbdev.c	9 Feb 2002 00:47:26 -0000	1.60
@@ -1339,7 +1339,11 @@
     if(!pre_init_err) return (pre_init_err=(fb_preinit()?0:-1));
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }

Index: vo_fsdga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_fsdga.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- vo_fsdga.c	31 Jan 2002 11:45:25 -0000	1.8
+++ vo_fsdga.c	9 Feb 2002 00:47:26 -0000	1.9
@@ -461,7 +461,11 @@
   return 0;
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }

Index: vo_ggi.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_ggi.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- vo_ggi.c	31 Jan 2002 09:52:45 -0000	1.13
+++ vo_ggi.c	9 Feb 2002 00:47:26 -0000	1.14
@@ -771,7 +771,11 @@
   return 0;
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }

Index: vo_gl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_gl.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- vo_gl.c	1 Feb 2002 02:49:04 -0000	1.20
+++ vo_gl.c	9 Feb 2002 00:47:26 -0000	1.21
@@ -474,7 +474,11 @@
   return 0;
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }

Index: vo_gl2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_gl2.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- vo_gl2.c	31 Jan 2002 11:46:46 -0000	1.13
+++ vo_gl2.c	9 Feb 2002 00:47:26 -0000	1.14
@@ -1101,7 +1101,11 @@
   return 0;
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }

Index: vo_md5.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_md5.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- vo_md5.c	1 Feb 2002 02:49:04 -0000	1.9
+++ vo_md5.c	9 Feb 2002 00:47:26 -0000	1.10
@@ -87,7 +87,7 @@
 static uint32_t
 query_format(uint32_t format)
 {
-    return video_out_pgm.query_format(format);
+    return video_out_pgm.control(VOCTRL_QUERY_FORMAT, &format);
 }
 
 
@@ -108,7 +108,11 @@
   return 0;
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }

Index: vo_mga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_mga.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- vo_mga.c	1 Feb 2002 02:43:01 -0000	1.22
+++ vo_mga.c	9 Feb 2002 00:47:26 -0000	1.23
@@ -151,7 +151,11 @@
   return 0;
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }

Index: vo_mpegpes.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_mpegpes.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- vo_mpegpes.c	31 Jan 2002 09:52:45 -0000	1.18
+++ vo_mpegpes.c	9 Feb 2002 00:47:26 -0000	1.19
@@ -516,7 +516,11 @@
   return 0;
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }

Index: vo_null.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_null.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- vo_null.c	31 Jan 2002 09:52:45 -0000	1.5
+++ vo_null.c	9 Feb 2002 00:47:26 -0000	1.6
@@ -95,7 +95,11 @@
   return 0;
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }

Index: vo_odivx.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_odivx.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- vo_odivx.c	31 Jan 2002 09:52:45 -0000	1.9
+++ vo_odivx.c	9 Feb 2002 00:47:26 -0000	1.10
@@ -270,7 +270,11 @@
   return 0;
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }

Index: vo_pgm.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_pgm.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- vo_pgm.c	31 Jan 2002 09:52:45 -0000	1.9
+++ vo_pgm.c	9 Feb 2002 00:47:26 -0000	1.10
@@ -140,7 +140,11 @@
   return 0;
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }

Index: vo_png.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_png.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- vo_png.c	31 Jan 2002 09:52:45 -0000	1.11
+++ vo_png.c	9 Feb 2002 00:47:26 -0000	1.12
@@ -330,7 +330,11 @@
   return 0;
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }

Index: vo_sdl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_sdl.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- vo_sdl.c	8 Feb 2002 20:03:36 -0000	1.65
+++ vo_sdl.c	9 Feb 2002 00:47:26 -0000	1.66
@@ -1326,7 +1326,11 @@
   return 0;
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }

Index: vo_svga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_svga.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- vo_svga.c	31 Jan 2002 09:52:45 -0000	1.41
+++ vo_svga.c	9 Feb 2002 00:47:26 -0000	1.42
@@ -575,7 +575,11 @@
   return 0;
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }

Index: vo_syncfb.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_syncfb.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- vo_syncfb.c	31 Jan 2002 09:52:45 -0000	1.9
+++ vo_syncfb.c	9 Feb 2002 00:47:26 -0000	1.10
@@ -453,7 +453,11 @@
   return 0;
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }

Index: vo_tdfxfb.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_tdfxfb.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- vo_tdfxfb.c	31 Jan 2002 09:52:45 -0000	1.5
+++ vo_tdfxfb.c	9 Feb 2002 00:47:26 -0000	1.6
@@ -828,7 +828,11 @@
   return 0;
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }

Index: vo_vesa.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_vesa.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- vo_vesa.c	7 Feb 2002 19:37:09 -0000	1.65
+++ vo_vesa.c	9 Feb 2002 00:47:26 -0000	1.66
@@ -944,7 +944,11 @@
   return pre_init_err;
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }

Index: vo_x11.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_x11.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- vo_x11.c	6 Feb 2002 20:52:14 -0000	1.58
+++ vo_x11.c	9 Feb 2002 00:47:26 -0000	1.59
@@ -624,8 +624,11 @@
   return 0;
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }
-

Index: vo_xmga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xmga.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- vo_xmga.c	7 Feb 2002 16:15:08 -0000	1.43
+++ vo_xmga.c	9 Feb 2002 00:47:26 -0000	1.44
@@ -400,7 +400,11 @@
   return 0;
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }

Index: vo_xv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- vo_xv.c	31 Jan 2002 09:52:45 -0000	1.51
+++ vo_xv.c	9 Feb 2002 00:47:26 -0000	1.52
@@ -769,3 +769,15 @@
   vaa->get_video_eq = xv_get_video_eq;
   vaa->set_video_eq = xv_set_video_eq;
 }
+
+uint32_t control(uint32_t request, void *data, ...)
+{
+  switch (request) {
+  case VOCTRL_QUERY_VAA:
+    query_vaa((vo_vaa_t*)data);
+    return VO_TRUE;
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
+}

Index: vo_xvidix.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xvidix.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- vo_xvidix.c	7 Feb 2002 17:42:37 -0000	1.18
+++ vo_xvidix.c	9 Feb 2002 00:47:26 -0000	1.19
@@ -463,7 +463,11 @@
     return(0);
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }

Index: vo_zr.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_zr.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- vo_zr.c	31 Jan 2002 09:52:45 -0000	1.7
+++ vo_zr.c	9 Feb 2002 00:47:26 -0000	1.8
@@ -634,7 +634,11 @@
   return 0;
 }
 
-static void query_vaa(vo_vaa_t *vaa)
+uint32_t control(uint32_t request, void *data, ...)
 {
-  memset(vaa,0,sizeof(vo_vaa_t));
+  switch (request) {
+  case VOCTRL_QUERY_FORMAT:
+    return query_format(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
 }

Index: vosub_vidix.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vosub_vidix.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- vosub_vidix.c	5 Feb 2002 18:54:41 -0000	1.26
+++ vosub_vidix.c	9 Feb 2002 00:47:26 -0000	1.27
@@ -627,6 +627,18 @@
 	return 0;
 }
 
+uint32_t vidix_control(uint32_t request, void *data, ...)
+{
+  switch (request) {
+  case VOCTRL_QUERY_VAA:
+    vidix_query_vaa((vo_vaa_t*)data);
+    return VO_TRUE;
+  case VOCTRL_QUERY_FORMAT:
+    return vidix_query_fourcc(*((uint32_t*)data));
+  }
+  return VO_NOTIMPL;
+}
+
 int vidix_preinit(const char *drvname,void *server)
 {
   int err;
@@ -656,8 +668,7 @@
 	((vo_functions_t *)server)->draw_frame=vidix_draw_frame;
 	((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;
+	((vo_functions_t *)server)->control=vidix_control;
 	vo_server = server;
 	return 0;
 }




More information about the MPlayer-cvslog mailing list