summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libvo/vesa_lvo.c16
-rw-r--r--libvo/video_out.h33
-rw-r--r--libvo/video_out_internal.h6
-rw-r--r--libvo/vo_3dfx.c9
-rw-r--r--libvo/vo_aa.c8
-rw-r--r--libvo/vo_dga.c11
-rw-r--r--libvo/vo_directfb.c8
-rw-r--r--libvo/vo_dxr3.c75
-rw-r--r--libvo/vo_fbdev.c8
-rw-r--r--libvo/vo_fsdga.c8
-rw-r--r--libvo/vo_ggi.c8
-rw-r--r--libvo/vo_gl.c8
-rw-r--r--libvo/vo_gl2.c8
-rw-r--r--libvo/vo_md5.c10
-rw-r--r--libvo/vo_mga.c8
-rw-r--r--libvo/vo_mpegpes.c8
-rw-r--r--libvo/vo_null.c8
-rw-r--r--libvo/vo_odivx.c8
-rw-r--r--libvo/vo_pgm.c8
-rw-r--r--libvo/vo_png.c8
-rw-r--r--libvo/vo_sdl.c8
-rw-r--r--libvo/vo_svga.c8
-rw-r--r--libvo/vo_syncfb.c8
-rw-r--r--libvo/vo_tdfxfb.c8
-rw-r--r--libvo/vo_vesa.c8
-rw-r--r--libvo/vo_x11.c9
-rw-r--r--libvo/vo_xmga.c8
-rw-r--r--libvo/vo_xv.c12
-rw-r--r--libvo/vo_xvidix.c8
-rw-r--r--libvo/vo_zr.c8
-rw-r--r--libvo/vosub_vidix.c15
31 files changed, 247 insertions, 117 deletions
diff --git a/libvo/vesa_lvo.c b/libvo/vesa_lvo.c
index f477c09ea1..60f17ade4b 100644
--- a/libvo/vesa_lvo.c
+++ b/libvo/vesa_lvo.c
@@ -40,6 +40,7 @@ static uint8_t next_frame;
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 @@ int vlvo_preinit(const char *drvname)
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;
}
@@ -296,3 +296,15 @@ uint32_t vlvo_query_info(uint32_t format)
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;
+}
diff --git a/libvo/video_out.h b/libvo/video_out.h
index 88a99b2c7b..c7f00f8b25 100644
--- a/libvo/video_out.h
+++ b/libvo/video_out.h
@@ -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 @@ typedef struct vo_functions_s
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.
@@ -145,14 +156,6 @@ typedef struct vo_functions_s
*/
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;
char *vo_format_name(int format);
diff --git a/libvo/video_out_internal.h b/libvo/video_out_internal.h
index 3dbf41bf3c..84303b3d83 100644
--- a/libvo/video_out_internal.h
+++ b/libvo/video_out_internal.h
@@ -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 @@ static void query_vaa(vo_vaa_t *);
{\
preinit,\
config,\
- query_format,\
+ control,\
get_info,\
draw_frame,\
draw_slice,\
draw_osd,\
flip_page,\
check_events,\
- uninit,\
- query_vaa\
+ uninit\
};
#include "osd.h"
diff --git a/libvo/vo_3dfx.c b/libvo/vo_3dfx.c
index aa0ba7da24..994b47bca2 100644
--- a/libvo/vo_3dfx.c
+++ b/libvo/vo_3dfx.c
@@ -493,8 +493,11 @@ static uint32_t preinit(const char *arg)
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;
}
-
diff --git a/libvo/vo_aa.c b/libvo/vo_aa.c
index 9106c6301c..59f9d5b91f 100644
--- a/libvo/vo_aa.c
+++ b/libvo/vo_aa.c
@@ -757,7 +757,11 @@ static uint32_t preinit(const char *arg)
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;
}
diff --git a/libvo/vo_dga.c b/libvo/vo_dga.c
index b094b983c4..93fb9508a5 100644
--- a/libvo/vo_dga.c
+++ b/libvo/vo_dga.c
@@ -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 @@ static uint32_t preinit(const char *arg)
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;
}
//---------------------------------------------------------
diff --git a/libvo/vo_directfb.c b/libvo/vo_directfb.c
index 3f8ab4b997..043e4481d9 100644
--- a/libvo/vo_directfb.c
+++ b/libvo/vo_directfb.c
@@ -888,7 +888,11 @@ static void uninit(void)
}
-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;
}
diff --git a/libvo/vo_dxr3.c b/libvo/vo_dxr3.c
index 3dc56b32ca..ba171ade86 100644
--- a/libvo/vo_dxr3.c
+++ b/libvo/vo_dxr3.c
@@ -92,6 +92,39 @@ static vo_info_t vo_info =
""
};
+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@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 uint32_t draw_frame(uint8_t * src[])
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 @@ static uint32_t draw_slice(uint8_t *srcimg[], int stride[], int w, int h, int x0
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@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");
@@ -484,8 +480,3 @@ static uint32_t preinit(const char *arg)
return 0;
}
-
-static void query_vaa(vo_vaa_t *vaa)
-{
- memset(vaa, 0, sizeof(vo_vaa_t));
-}
diff --git a/libvo/vo_fbdev.c b/libvo/vo_fbdev.c
index c691d870ea..38d4352060 100644
--- a/libvo/vo_fbdev.c
+++ b/libvo/vo_fbdev.c
@@ -1339,7 +1339,11 @@ static uint32_t preinit(const char *arg)
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;
}
diff --git a/libvo/vo_fsdga.c b/libvo/vo_fsdga.c
index 44c69cbae2..4e49969887 100644
--- a/libvo/vo_fsdga.c
+++ b/libvo/vo_fsdga.c
@@ -461,7 +461,11 @@ static uint32_t preinit(const char *arg)
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;
}
diff --git a/libvo/vo_ggi.c b/libvo/vo_ggi.c
index 20692532c1..db58aa6584 100644
--- a/libvo/vo_ggi.c
+++ b/libvo/vo_ggi.c
@@ -771,7 +771,11 @@ static uint32_t preinit(const char *arg)
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;
}
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index 436606728c..44eabc751e 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -474,7 +474,11 @@ static uint32_t preinit(const char *arg)
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;
}
diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c
index 54fd975416..ae09f08e18 100644
--- a/libvo/vo_gl2.c
+++ b/libvo/vo_gl2.c
@@ -1101,7 +1101,11 @@ static uint32_t preinit(const char *arg)
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;
}
diff --git a/libvo/vo_md5.c b/libvo/vo_md5.c
index 2ef4eda4e2..e3514f6995 100644
--- a/libvo/vo_md5.c
+++ b/libvo/vo_md5.c
@@ -87,7 +87,7 @@ static uint32_t draw_frame(uint8_t * src[])
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 @@ static uint32_t preinit(const char *arg)
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;
}
diff --git a/libvo/vo_mga.c b/libvo/vo_mga.c
index 6085b09c23..a3836b1002 100644
--- a/libvo/vo_mga.c
+++ b/libvo/vo_mga.c
@@ -151,7 +151,11 @@ static uint32_t preinit(const char *arg)
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;
}
diff --git a/libvo/vo_mpegpes.c b/libvo/vo_mpegpes.c
index 8d2722335d..4fb3691c75 100644
--- a/libvo/vo_mpegpes.c
+++ b/libvo/vo_mpegpes.c
@@ -516,7 +516,11 @@ static uint32_t preinit(const char *arg)
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;
}
diff --git a/libvo/vo_null.c b/libvo/vo_null.c
index ae07f739c4..50e1f47b40 100644
--- a/libvo/vo_null.c
+++ b/libvo/vo_null.c
@@ -95,7 +95,11 @@ static uint32_t preinit(const char *arg)
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;
}
diff --git a/libvo/vo_odivx.c b/libvo/vo_odivx.c
index bbd647262e..bab4efdbfb 100644
--- a/libvo/vo_odivx.c
+++ b/libvo/vo_odivx.c
@@ -270,7 +270,11 @@ static uint32_t preinit(const char *arg)
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;
}
diff --git a/libvo/vo_pgm.c b/libvo/vo_pgm.c
index 2f82d39078..f191959efb 100644
--- a/libvo/vo_pgm.c
+++ b/libvo/vo_pgm.c
@@ -140,7 +140,11 @@ static uint32_t preinit(const char *arg)
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;
}
diff --git a/libvo/vo_png.c b/libvo/vo_png.c
index 078e34817b..9e7f1a7be1 100644
--- a/libvo/vo_png.c
+++ b/libvo/vo_png.c
@@ -330,7 +330,11 @@ static uint32_t preinit(const char *arg)
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;
}
diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c
index 44787f71b0..eb0abc5c7d 100644
--- a/libvo/vo_sdl.c
+++ b/libvo/vo_sdl.c
@@ -1326,7 +1326,11 @@ static uint32_t preinit(const char *arg)
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;
}
diff --git a/libvo/vo_svga.c b/libvo/vo_svga.c
index 8f2857594e..2cc890cede 100644
--- a/libvo/vo_svga.c
+++ b/libvo/vo_svga.c
@@ -575,7 +575,11 @@ static uint32_t preinit(const char *arg)
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;
}
diff --git a/libvo/vo_syncfb.c b/libvo/vo_syncfb.c
index 2f02d709db..0bcdfdf320 100644
--- a/libvo/vo_syncfb.c
+++ b/libvo/vo_syncfb.c
@@ -453,7 +453,11 @@ static uint32_t preinit(const char *arg)
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;
}
diff --git a/libvo/vo_tdfxfb.c b/libvo/vo_tdfxfb.c
index aa85421428..7f8154b98a 100644
--- a/libvo/vo_tdfxfb.c
+++ b/libvo/vo_tdfxfb.c
@@ -828,7 +828,11 @@ static uint32_t preinit(const char *arg)
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;
}
diff --git a/libvo/vo_vesa.c b/libvo/vo_vesa.c
index 6026e25254..d27a18b9f9 100644
--- a/libvo/vo_vesa.c
+++ b/libvo/vo_vesa.c
@@ -944,7 +944,11 @@ static uint32_t preinit(const char *arg)
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;
}
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c
index d9c7e963a7..ee0b1b2b46 100644
--- a/libvo/vo_x11.c
+++ b/libvo/vo_x11.c
@@ -624,8 +624,11 @@ static uint32_t preinit(const char *arg)
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;
}
-
diff --git a/libvo/vo_xmga.c b/libvo/vo_xmga.c
index 3dc2ab584b..2c919e9b44 100644
--- a/libvo/vo_xmga.c
+++ b/libvo/vo_xmga.c
@@ -400,7 +400,11 @@ static uint32_t preinit(const char *arg)
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;
}
diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c
index 6ae2b630f8..f634781952 100644
--- a/libvo/vo_xv.c
+++ b/libvo/vo_xv.c
@@ -770,3 +770,15 @@ static void query_vaa(vo_vaa_t *vaa)
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;
+}
diff --git a/libvo/vo_xvidix.c b/libvo/vo_xvidix.c
index f4315112fa..e19fab0a1b 100644
--- a/libvo/vo_xvidix.c
+++ b/libvo/vo_xvidix.c
@@ -463,7 +463,11 @@ static uint32_t preinit(const char *arg)
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;
}
diff --git a/libvo/vo_zr.c b/libvo/vo_zr.c
index 7496c1c1ee..c5042996ba 100644
--- a/libvo/vo_zr.c
+++ b/libvo/vo_zr.c
@@ -634,7 +634,11 @@ static uint32_t preinit(const char *arg)
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;
}
diff --git a/libvo/vosub_vidix.c b/libvo/vosub_vidix.c
index ccd5e800d8..cbcc6cc393 100644
--- a/libvo/vosub_vidix.c
+++ b/libvo/vosub_vidix.c
@@ -627,6 +627,18 @@ int vidix_init(unsigned src_width,unsigned src_height,
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 @@ int vidix_preinit(const char *drvname,void *server)
((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;
}