[MPlayer-dev-eng] libvo changes
- Date: Wed, 02 Apr 2008 20:22:42 +0300
- From: Uoti Urpala <uoti.urpala@xxxxxxxxxxx>
- Subject: [MPlayer-dev-eng] libvo changes
These patches remove variable arguments from VO control() functions. I
haven't tested most of the changes as I don't compile those VOs, but
hopefully there aren't too many bugs.
I created these in preparation of creating a data struct for VOs, but
that isn't complete yet and I thought I'd post these first.
Subject: [PATCH] Change VOCTRL_[GET|SET]_EQUALIZER argument passing
These were the only voctrl types with more than one argument. The
second argument was passed using variable arguments. Change them to
use a single argument (address of a struct containing both old
arguments). This makes forwarding the arguments to other functions
easier and allows simplifying code.
---
libmpcodecs/vf_vo.c | 4 +-
libvo/mga_common.c | 25 ++++++----------
libvo/video_out.h | 10 ++++++
libvo/vo_aa.c | 31 ++++++--------------
libvo/vo_cvidix.c | 18 ------------
libvo/vo_dfbmga.c | 20 ++----------
libvo/vo_directfb2.c | 20 ++----------
libvo/vo_directx.c | 18 ++---------
libvo/vo_dxr3.c | 38 +++++++++----------------
libvo/vo_fbdev.c | 21 +-------------
libvo/vo_gl.c | 76 ++++++++++++++++++++++---------------------------
libvo/vo_gl2.c | 18 ++---------
libvo/vo_svga.c | 27 +-----------------
libvo/vo_vesa.c | 27 +-----------------
libvo/vo_winvidix.c | 22 --------------
libvo/vo_x11.c | 20 ++----------
libvo/vo_xv.c | 22 ++------------
libvo/vo_xvidix.c | 24 ----------------
libvo/vo_xvmc.c | 20 ++----------
libvo/vosub_vidix.c | 47 ++++++++++++------------------
20 files changed, 130 insertions(+), 378 deletions(-)
diff --git a/libmpcodecs/vf_vo.c b/libmpcodecs/vf_vo.c
index f0daa59..63306f7 100644
--- a/libmpcodecs/vf_vo.c
+++ b/libmpcodecs/vf_vo.c
@@ -103,13 +103,13 @@ static int control(struct vf_instance_s* vf, int request, void* data)
{
vf_equalizer_t *eq=data;
if(!vo_config_count) return CONTROL_FALSE; // vo not configured?
- return((video_out->control(VOCTRL_SET_EQUALIZER, eq->item, eq->value) == VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE);
+ return((video_out->control(VOCTRL_SET_EQUALIZER, VOCTRL_SET_EQUALIZER_ARGS(eq->item, eq->value)) == VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE);
}
case VFCTRL_GET_EQUALIZER:
{
vf_equalizer_t *eq=data;
if(!vo_config_count) return CONTROL_FALSE; // vo not configured?
- return((video_out->control(VOCTRL_GET_EQUALIZER, eq->item, &eq->value) == VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE);
+ return((video_out->control(VOCTRL_GET_EQUALIZER, VOCTRL_GET_EQUALIZER_ARGS(eq->item, &eq->value)) == VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE);
}
#ifdef USE_ASS
case VFCTRL_INIT_EOSD:
diff --git a/libvo/mga_common.c b/libvo/mga_common.c
index b150b18..600e4e7 100644
--- a/libvo/mga_common.c
+++ b/libvo/mga_common.c
@@ -240,11 +240,12 @@ static int control(uint32_t request, void *data, ...)
return draw_image(data);
case VOCTRL_SET_EQUALIZER:
{
- va_list ap;
short value;
uint32_t luma,prev;
+ struct voctrl_get_equalizer_args *args = data;
- if ( strcmp( data,"brightness" ) && strcmp( data,"contrast" ) ) return VO_FALSE;
+ if (strcmp(args->name, "brightness") && strcmp(args->name, "contrast"))
+ return VO_FALSE;
if (ioctl(f,MGA_VID_GET_LUMA,&prev)) {
perror("Error in mga_vid_config ioctl()");
@@ -254,15 +255,13 @@ static int control(uint32_t request, void *data, ...)
// printf("GET: 0x%4X 0x%4X \n",(prev>>16),(prev&0xffff));
- va_start(ap, data);
- value = va_arg(ap, int);
- va_end(ap);
+ value = args->value;
// printf("value: %d -> ",value);
value=((value+100)*255)/200-128; // maps -100=>-128 and +100=>127
// printf("%d \n",value);
- if(!strcmp(data,"contrast"))
+ if (!strcmp(args->name, "contrast"))
luma = (prev&0xFFFF0000)|(value&0xFFFF);
else
luma = (prev&0xFFFF)|(value<<16);
@@ -278,12 +277,12 @@ static int control(uint32_t request, void *data, ...)
case VOCTRL_GET_EQUALIZER:
{
- va_list ap;
- int * value;
short val;
uint32_t luma;
+ struct voctrl_get_equalizer_args *args = data;
- if ( strcmp( data,"brightness" ) && strcmp( data,"contrast" ) ) return VO_FALSE;
+ if (strcmp(args->name, "brightness") && strcmp(args->name, "contrast"))
+ return VO_FALSE;
if (ioctl(f,MGA_VID_GET_LUMA,&luma)) {
perror("Error in mga_vid_config ioctl()");
@@ -291,16 +290,12 @@ static int control(uint32_t request, void *data, ...)
return VO_FALSE;
}
- if ( !strcmp( data,"contrast" ) )
+ if (!strcmp(args->name, "contrast"))
val=(luma & 0xFFFF);
else
val=(luma >> 16);
- va_start(ap, data);
- value = va_arg(ap, int*);
- va_end(ap);
-
- *value = (val*200)/255;
+ *args->valueptr = (val*200)/255;
return VO_TRUE;
}
diff --git a/libvo/video_out.h b/libvo/video_out.h
index 48799c4..893046a 100644
--- a/libvo/video_out.h
+++ b/libvo/video_out.h
@@ -47,7 +47,17 @@
#define VOCTRL_SET_PANSCAN 16
/* equalizer controls */
#define VOCTRL_SET_EQUALIZER 17
+struct voctrl_set_equalizer_args {
+ const char *name;
+ int value;
+};
+#define VOCTRL_SET_EQUALIZER_ARGS(x, y) &(struct voctrl_set_equalizer_args){(x), (y)}
#define VOCTRL_GET_EQUALIZER 18
+struct voctrl_get_equalizer_args {
+ const char *name;
+ int *valueptr;
+};
+#define VOCTRL_GET_EQUALIZER_ARGS(x, y) &(struct voctrl_get_equalizer_args){(x), (y)}
//#define VOCTRL_GUI_NOWINDOW 19
/* Frame duplication */
#define VOCTRL_DUPLICATE_FRAME 20
diff --git a/libvo/vo_aa.c b/libvo/vo_aa.c
index 77c545b..8ba01d6 100644
--- a/libvo/vo_aa.c
+++ b/libvo/vo_aa.c
@@ -724,31 +724,20 @@ static int control(uint32_t request, void *data, ...)
case VOCTRL_QUERY_FORMAT:
return query_format(*((uint32_t*)data));
case VOCTRL_SET_EQUALIZER: {
- va_list ap;
- int val;
-
- va_start(ap, data);
- val = va_arg(ap, int);
- va_end(ap);
-
- if(strcmp((char*)data,"contrast") == 0)
- p->contrast = ( val + 100 ) * 64 / 100;
- else if(strcmp((char*)data,"brightness") == 0)
- p->bright = ( val + 100) * 128 / 100;
+ struct voctrl_set_equalizer_args *args = data;
+ if (strcmp(args->name, "contrast") == 0)
+ p->contrast = (args->value + 100) * 64 / 100;
+ else if (strcmp(args->name, "brightness") == 0)
+ p->bright = (args->value + 100) * 128 / 100;
return VO_TRUE;
}
case VOCTRL_GET_EQUALIZER: {
- va_list ap;
- int* val;
-
- va_start(ap, data);
- val = va_arg(ap, int*);
- va_end(ap);
+ struct voctrl_get_equalizer_args *args = data;
- if(strcmp((char*)data,"contrast") == 0)
- *val = (p->contrast - 64) * 100 / 64;
- else if(strcmp((char*)data,"brightness") == 0)
- *val = (p->bright - 128) * 100 / 128;
+ if (strcmp(args->name, "contrast") == 0)
+ *args->valueptr = (p->contrast - 64) * 100 / 64;
+ else if (strcmp(args->name, "brightness") == 0)
+ *args->valueptr = (p->bright - 128) * 100 / 128;
return VO_TRUE;
}
diff --git a/libvo/vo_cvidix.c b/libvo/vo_cvidix.c
index 7dd74ee..9b6c593 100644
--- a/libvo/vo_cvidix.c
+++ b/libvo/vo_cvidix.c
@@ -165,24 +165,6 @@ static int control(uint32_t request, void *data, ...){
else vo_fs=1;
setup_vidix();
return VO_TRUE;
- case VOCTRL_SET_EQUALIZER:
- {
- va_list ap;
- int value;
- va_start(ap, data);
- value = va_arg(ap, int);
- va_end(ap);
- return vidix_control(request, data, value);
- }
- case VOCTRL_GET_EQUALIZER:
- {
- va_list ap;
- int *value;
- va_start(ap, data);
- value = va_arg(ap, int *);
- va_end(ap);
- return vidix_control(request, data, value);
- }
}
return vidix_control(request, data);
}
diff --git a/libvo/vo_dfbmga.c b/libvo/vo_dfbmga.c
index ee381d0..ee3bf74 100644
--- a/libvo/vo_dfbmga.c
+++ b/libvo/vo_dfbmga.c
@@ -1399,25 +1399,13 @@ control( uint32_t request, void *data, ... )
case VOCTRL_SET_EQUALIZER:
{
- va_list ap;
- int value;
-
- va_start( ap, data );
- value = va_arg( ap, int );
- va_end( ap );
-
- return set_equalizer( data, value );
+ struct voctrl_set_equalizer_args *args = data;
+ return set_equalizer(args->name, args->value);
}
case VOCTRL_GET_EQUALIZER:
{
- va_list ap;
- int *value;
-
- va_start( ap, data );
- value = va_arg( ap, int* );
- va_end( ap );
-
- return get_equalizer( data, value );
+ struct voctrl_get_equalizer_args *args = data;
+ return get_equalizer(args->name, args->valueptr);
}
}
diff --git a/libvo/vo_directfb2.c b/libvo/vo_directfb2.c
index a211cad..a9bc40c 100644
--- a/libvo/vo_directfb2.c
+++ b/libvo/vo_directfb2.c
@@ -1422,25 +1422,13 @@ static int control(uint32_t request, void *data, ...)
return put_image(data);
case VOCTRL_SET_EQUALIZER:
{
- va_list ap;
- int value;
-
- va_start(ap, data);
- value = va_arg(ap, int);
- va_end(ap);
-
- return(directfb_set_video_eq(data, value));
+ struct voctrl_set_equalizer_args *args = data;
+ return directfb_set_video_eq(args->name, args->value);
}
case VOCTRL_GET_EQUALIZER:
{
- va_list ap;
- int *value;
-
- va_start(ap, data);
- value = va_arg(ap, int*);
- va_end(ap);
-
- return(directfb_get_video_eq(data, value));
+ struct voctrl_get_equalizer_args *args = data;
+ return directfb_get_video_eq(args->name, args->valueptr);
}
};
return VO_NOTIMPL;
diff --git a/libvo/vo_directx.c b/libvo/vo_directx.c
index 356304c..a110c48 100644
--- a/libvo/vo_directx.c
+++ b/libvo/vo_directx.c
@@ -1564,22 +1564,12 @@ static int control(uint32_t request, void *data, ...)
return VO_TRUE;
}
case VOCTRL_SET_EQUALIZER: {
- va_list ap;
- int value;
-
- va_start(ap, data);
- value = va_arg(ap, int);
- va_end(ap);
- return color_ctrl_set(data, value);
+ struct voctrl_set_equalizer_args *args = data;
+ return color_ctrl_set(args->name, args->value);
}
case VOCTRL_GET_EQUALIZER: {
- va_list ap;
- int *value;
-
- va_start(ap, data);
- value = va_arg(ap, int*);
- va_end(ap);
- return color_ctrl_get(data, value);
+ struct voctrl_get_equalizer_args *args = data;
+ return color_ctrl_get(args->name, args->valueptr);
}
case VOCTRL_UPDATE_SCREENINFO:
if (vidmode) {
diff --git a/libvo/vo_dxr3.c b/libvo/vo_dxr3.c
index 288a7a7..a48c7be 100644
--- a/libvo/vo_dxr3.c
+++ b/libvo/vo_dxr3.c
@@ -240,22 +240,17 @@ static int control(uint32_t request, void *data, ...)
}
case VOCTRL_SET_EQUALIZER:
{
- va_list ap;
- int value;
em8300_bcs_t bcs;
-
- va_start(ap, data);
- value = va_arg(ap, int);
- va_end(ap);
+ struct voctrl_set_equalizer_args *args = data;
if (ioctl(fd_control, EM8300_IOCTL_GETBCS, &bcs) < 0)
return VO_FALSE;
- if (!strcasecmp(data, "brightness"))
- bcs.brightness = (value+100)*5;
- else if (!strcasecmp(data, "contrast"))
- bcs.contrast = (value+100)*5;
- else if (!strcasecmp(data, "saturation"))
- bcs.saturation = (value+100)*5;
+ if (!strcasecmp(args->name, "brightness"))
+ bcs.brightness = (args->value+100)*5;
+ else if (!strcasecmp(args->name, "contrast"))
+ bcs.contrast = (args->value+100)*5;
+ else if (!strcasecmp(args->name, "saturation"))
+ bcs.saturation = (args->value+100)*5;
else return VO_FALSE;
if (ioctl(fd_control, EM8300_IOCTL_SETBCS, &bcs) < 0)
@@ -264,23 +259,18 @@ static int control(uint32_t request, void *data, ...)
}
case VOCTRL_GET_EQUALIZER:
{
- va_list ap;
- int *value;
em8300_bcs_t bcs;
+ struct voctrl_get_equalizer_args *args = data;
- va_start(ap, data);
- value = va_arg(ap, int*);
- va_end(ap);
-
if (ioctl(fd_control, EM8300_IOCTL_GETBCS, &bcs) < 0)
return VO_FALSE;
- if (!strcasecmp(data, "brightness"))
- *value = (bcs.brightness/5)-100;
- else if (!strcasecmp(data, "contrast"))
- *value = (bcs.contrast/5)-100;
- else if (!strcasecmp(data, "saturation"))
- *value = (bcs.saturation/5)-100;
+ if (!strcasecmp(args->name, "brightness"))
+ *args->valueptr = (bcs.brightness/5)-100;
+ else if (!strcasecmp(args->name, "contrast"))
+ *args->valueptr = (bcs.contrast/5)-100;
+ else if (!strcasecmp(args->name, "saturation"))
+ *args->valueptr = (bcs.saturation/5)-100;
else return VO_FALSE;
return VO_TRUE;
diff --git a/libvo/vo_fbdev.c b/libvo/vo_fbdev.c
index 82e6344..12f48fd 100644
--- a/libvo/vo_fbdev.c
+++ b/libvo/vo_fbdev.c
@@ -1176,27 +1176,8 @@ static int control(uint32_t request, void *data, ...)
if (vidix_name) {
switch (request) {
case VOCTRL_SET_EQUALIZER:
- {
- va_list ap;
- int value;
-
- va_start(ap, data);
- value = va_arg(ap, int);
- va_end(ap);
-
- return vidix_control(request, data, value);
- }
case VOCTRL_GET_EQUALIZER:
- {
- va_list ap;
- int *value;
-
- va_start(ap, data);
- value = va_arg(ap, int*);
- va_end(ap);
-
- return vidix_control(request, data, value);
- }
+ return vidix_control(request, data);
}
}
#endif
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index 500bb0d..36fbff4 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -941,35 +941,31 @@ static int control(uint32_t request, void *data, ...)
return VO_TRUE;
case VOCTRL_GET_EQUALIZER:
if (image_format == IMGFMT_YV12) {
- va_list va;
- int *value;
- va_start(va, data);
- value = va_arg(va, int *);
- va_end(va);
- if (strcasecmp(data, "brightness") == 0) {
- *value = eq_bri;
+ struct voctrl_get_equalizer_args *args = data;
+ if (strcasecmp(args->name, "brightness") == 0) {
+ *args->valueptr = eq_bri;
if (use_yuv == YUV_CONVERSION_COMBINERS) break; // not supported
- } else if (strcasecmp(data, "contrast") == 0) {
- *value = eq_cont;
+ } else if (strcasecmp(args->name, "contrast") == 0) {
+ *args->valueptr = eq_cont;
if (use_yuv == YUV_CONVERSION_COMBINERS) break; // not supported
- } else if (strcasecmp(data, "saturation") == 0) {
- *value = eq_sat;
- } else if (strcasecmp(data, "hue") == 0) {
- *value = eq_hue;
- } else if (strcasecmp(data, "gamma") == 0) {
- *value = eq_rgamma;
+ } else if (strcasecmp(args->name, "saturation") == 0) {
+ *args->valueptr = eq_sat;
+ } else if (strcasecmp(args->name, "hue") == 0) {
+ *args->valueptr = eq_hue;
+ } else if (strcasecmp(args->name, "gamma") == 0) {
+ *args->valueptr = eq_rgamma;
if (use_yuv == YUV_CONVERSION_COMBINERS ||
use_yuv == YUV_CONVERSION_FRAGMENT) break; // not supported
- } else if (strcasecmp(data, "red_gamma") == 0) {
- *value = eq_rgamma;
+ } else if (strcasecmp(args->name, "red_gamma") == 0) {
+ *args->valueptr = eq_rgamma;
if (use_yuv == YUV_CONVERSION_COMBINERS ||
use_yuv == YUV_CONVERSION_FRAGMENT) break; // not supported
- } else if (strcasecmp(data, "green_gamma") == 0) {
- *value = eq_ggamma;
+ } else if (strcasecmp(args->name, "green_gamma") == 0) {
+ *args->valueptr = eq_ggamma;
if (use_yuv == YUV_CONVERSION_COMBINERS ||
use_yuv == YUV_CONVERSION_FRAGMENT) break; // not supported
- } else if (strcasecmp(data, "blue_gamma") == 0) {
- *value = eq_bgamma;
+ } else if (strcasecmp(args->name, "blue_gamma") == 0) {
+ *args->valueptr = eq_bgamma;
if (use_yuv == YUV_CONVERSION_COMBINERS ||
use_yuv == YUV_CONVERSION_FRAGMENT) break; // not supported
}
@@ -978,35 +974,31 @@ static int control(uint32_t request, void *data, ...)
break;
case VOCTRL_SET_EQUALIZER:
if (image_format == IMGFMT_YV12) {
- va_list va;
- int value;
- va_start(va, data);
- value = va_arg(va, int);
- va_end(va);
- if (strcasecmp(data, "brightness") == 0) {
- eq_bri = value;
+ struct voctrl_set_equalizer_args *args = data;
+ if (strcasecmp(args->name, "brightness") == 0) {
+ eq_bri = args->value;
if (use_yuv == YUV_CONVERSION_COMBINERS) break; // not supported
- } else if (strcasecmp(data, "contrast") == 0) {
- eq_cont = value;
+ } else if (strcasecmp(args->name, "contrast") == 0) {
+ eq_cont = args->value;
if (use_yuv == YUV_CONVERSION_COMBINERS) break; // not supported
- } else if (strcasecmp(data, "saturation") == 0) {
- eq_sat = value;
- } else if (strcasecmp(data, "hue") == 0) {
- eq_hue = value;
- } else if (strcasecmp(data, "gamma") == 0) {
- eq_rgamma = eq_ggamma = eq_bgamma = value;
+ } else if (strcasecmp(args->name, "saturation") == 0) {
+ eq_sat = args->value;
+ } else if (strcasecmp(args->name, "hue") == 0) {
+ eq_hue = args->value;
+ } else if (strcasecmp(args->name, "gamma") == 0) {
+ eq_rgamma = eq_ggamma = eq_bgamma = args->value;
if (use_yuv == YUV_CONVERSION_COMBINERS ||
use_yuv == YUV_CONVERSION_FRAGMENT) break; // not supported
- } else if (strcasecmp(data, "red_gamma") == 0) {
- eq_rgamma = value;
+ } else if (strcasecmp(args->name, "red_gamma") == 0) {
+ eq_rgamma = args->value;
if (use_yuv == YUV_CONVERSION_COMBINERS ||
use_yuv == YUV_CONVERSION_FRAGMENT) break; // not supported
- } else if (strcasecmp(data, "green_gamma") == 0) {
- eq_ggamma = value;
+ } else if (strcasecmp(args->name, "green_gamma") == 0) {
+ eq_ggamma = args->value;
if (use_yuv == YUV_CONVERSION_COMBINERS ||
use_yuv == YUV_CONVERSION_FRAGMENT) break; // not supported
- } else if (strcasecmp(data, "blue_gamma") == 0) {
- eq_bgamma = value;
+ } else if (strcasecmp(args->name, "blue_gamma") == 0) {
+ eq_bgamma = args->value;
if (use_yuv == YUV_CONVERSION_COMBINERS ||
use_yuv == YUV_CONVERSION_FRAGMENT) break; // not supported
}
diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c
index aa198cd..d83c5a3 100644
--- a/libvo/vo_gl2.c
+++ b/libvo/vo_gl2.c
@@ -898,23 +898,13 @@ static int control(uint32_t request, void *data, ...)
#ifndef GL_WIN32
case VOCTRL_SET_EQUALIZER:
{
- va_list ap;
- int value;
-
- va_start(ap, data);
- value = va_arg(ap, int);
- va_end(ap);
- return vo_x11_set_equalizer(data, value);
+ struct voctrl_set_equalizer_args *args = data;
+ return vo_x11_set_equalizer(args->name, args->value);
}
case VOCTRL_GET_EQUALIZER:
{
- va_list ap;
- int *value;
-
- va_start(ap, data);
- value = va_arg(ap, int *);
- va_end(ap);
- return vo_x11_get_equalizer(data, value);
+ struct voctrl_get_equalizer_args *args = data;
+ return vo_x11_get_equalizer(args->name, args->valueptr);
}
#endif
case VOCTRL_UPDATE_SCREENINFO:
diff --git a/libvo/vo_svga.c b/libvo/vo_svga.c
index e68dbf3..9d38c8d 100644
--- a/libvo/vo_svga.c
+++ b/libvo/vo_svga.c
@@ -362,33 +362,8 @@ static int control(uint32_t request, void *data, ...)
}
#ifdef CONFIG_VIDIX
- if (vidix_name[0]) {
- switch (request) {
- case VOCTRL_SET_EQUALIZER:
- {
- va_list ap;
- int value;
-
- va_start(ap, data);
- value = va_arg(ap, int);
- va_end(ap);
-
- return vidix_control(request, data, value);
- }
- case VOCTRL_GET_EQUALIZER:
- {
- va_list ap;
- int *value;
-
- va_start(ap, data);
- value = va_arg(ap, int*);
- va_end(ap);
-
- return vidix_control(request, data, value);
- }
- }
+ if (vidix_name[0])
return vidix_control(request, data);
- }
#endif
return VO_NOTIMPL;
diff --git a/libvo/vo_vesa.c b/libvo/vo_vesa.c
index 0eaa47b..f5eb0e1 100644
--- a/libvo/vo_vesa.c
+++ b/libvo/vo_vesa.c
@@ -1098,33 +1098,8 @@ static int control(uint32_t request, void *data, ...)
}
#ifdef CONFIG_VIDIX
- if (vidix_name) {
- switch (request) {
- case VOCTRL_SET_EQUALIZER:
- {
- va_list ap;
- int value;
-
- va_start(ap, data);
- value = va_arg(ap, int);
- va_end(ap);
-
- return vidix_control(request, data, (int *)value);
- }
- case VOCTRL_GET_EQUALIZER:
- {
- va_list ap;
- int *value;
-
- va_start(ap, data);
- value = va_arg(ap, int*);
- va_end(ap);
-
- return vidix_control(request, data, value);
- }
- }
+ if (vidix_name)
return vidix_control(request, data);
- }
#endif
return VO_NOTIMPL;
diff --git a/libvo/vo_winvidix.c b/libvo/vo_winvidix.c
index e471696..97ff41d 100644
--- a/libvo/vo_winvidix.c
+++ b/libvo/vo_winvidix.c
@@ -337,28 +337,6 @@ static int control(uint32_t request, void *data, ...){
break;
case VOCTRL_QUERY_FORMAT:
return query_format(*((uint32_t*)data));
- case VOCTRL_SET_EQUALIZER:
- {
- va_list ap;
- int value;
-
- va_start(ap, data);
- value = va_arg(ap, int);
- va_end(ap);
-
- return vidix_control(request, data, (int *)value);
- }
- case VOCTRL_GET_EQUALIZER:
- {
- va_list ap;
- int *value;
-
- va_start(ap, data);
- value = va_arg(ap, int*);
- va_end(ap);
-
- return vidix_control(request, data, value);
- }
}
return vidix_control(request, data);
// return VO_NOTIMPL;
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c
index ca79dab..2b56ee4 100644
--- a/libvo/vo_x11.c
+++ b/libvo/vo_x11.c
@@ -764,25 +764,13 @@ static int control(uint32_t request, void *data, ...)
return get_image(data);
case VOCTRL_SET_EQUALIZER:
{
- va_list ap;
- int value;
-
- va_start(ap, data);
- value = va_arg(ap, int);
-
- va_end(ap);
- return vo_x11_set_equalizer(data, value);
+ struct voctrl_set_equalizer_args *args = data;
+ return vo_x11_set_equalizer(args->name, args->value);
}
case VOCTRL_GET_EQUALIZER:
{
- va_list ap;
- int *value;
-
- va_start(ap, data);
- value = va_arg(ap, int *);
-
- va_end(ap);
- return vo_x11_get_equalizer(data, value);
+ struct voctrl_get_equalizer_args *args = data;
+ return vo_x11_get_equalizer(args->name, args->valueptr);
}
case VOCTRL_ONTOP:
vo_x11_ontop();
diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c
index 2a38988..36d4d67 100644
--- a/libvo/vo_xv.c
+++ b/libvo/vo_xv.c
@@ -886,27 +886,13 @@ static int control(uint32_t request, void *data, ...)
return VO_TRUE;
case VOCTRL_SET_EQUALIZER:
{
- va_list ap;
- int value;
-
- va_start(ap, data);
- value = va_arg(ap, int);
-
- va_end(ap);
-
- return (vo_xv_set_eq(xv_port, data, value));
+ struct voctrl_set_equalizer_args *args = data;
+ return vo_xv_set_eq(xv_port, args->name, args->value);
}
case VOCTRL_GET_EQUALIZER:
{
- va_list ap;
- int *value;
-
- va_start(ap, data);
- value = va_arg(ap, int *);
-
- va_end(ap);
-
- return (vo_xv_get_eq(xv_port, data, value));
+ struct voctrl_get_equalizer_args *args = data;
+ return vo_xv_get_eq(xv_port, args->name, args->valueptr);
}
case VOCTRL_ONTOP:
vo_x11_ontop();
diff --git a/libvo/vo_xvidix.c b/libvo/vo_xvidix.c
index 7a455dd..fdd82d8 100644
--- a/libvo/vo_xvidix.c
+++ b/libvo/vo_xvidix.c
@@ -494,30 +494,6 @@ static int control(uint32_t request, void *data, ...)
set_window(0);
}
return VO_TRUE;
- case VOCTRL_SET_EQUALIZER:
- {
- va_list ap;
- int value;
-
- va_start(ap, data);
- value = va_arg(ap, int);
-
- va_end(ap);
-
- return vidix_control(request, data, value);
- }
- case VOCTRL_GET_EQUALIZER:
- {
- va_list ap;
- int *value;
-
- va_start(ap, data);
- value = va_arg(ap, int *);
-
- va_end(ap);
-
- return vidix_control(request, data, value);
- }
case VOCTRL_UPDATE_SCREENINFO:
aspect_save_screenres(vo_screenwidth, vo_screenheight);
return VO_TRUE;
diff --git a/libvo/vo_xvmc.c b/libvo/vo_xvmc.c
index e04fbd1..efa4e5d 100644
--- a/libvo/vo_xvmc.c
+++ b/libvo/vo_xvmc.c
@@ -1397,26 +1397,14 @@ static int control(uint32_t request, void *data, ... )
return VO_TRUE;
case VOCTRL_SET_EQUALIZER:
{
- va_list ap;
- int value;
-
- va_start(ap, data);
- value = va_arg(ap, int);
- va_end(ap);
-
- return(vo_xv_set_eq(xv_port, data, value));
+ struct voctrl_set_equalizer_args *args = data;
+ return vo_xv_set_eq(xv_port, args->name, args->value);
}
case VOCTRL_GET_EQUALIZER:
{
- va_list ap;
- int *value;
-
- va_start(ap, data);
- value = va_arg(ap, int*);
- va_end(ap);
-
- return(vo_xv_get_eq(xv_port, data, value));
+ struct voctrl_get_equalizer_args *args = data;
+ return vo_xv_get_eq(xv_port, args->name, args->valueptr);
}
case VOCTRL_UPDATE_SCREENINFO:
update_xinerama_info();
diff --git a/libvo/vosub_vidix.c b/libvo/vosub_vidix.c
index 0357fe3..83a7fcc 100644
--- a/libvo/vosub_vidix.c
+++ b/libvo/vosub_vidix.c
@@ -553,36 +553,31 @@ uint32_t vidix_control(uint32_t request, void *data, ...)
return VO_TRUE;
case VOCTRL_SET_EQUALIZER:
{
- va_list ap;
- int value;
vidix_video_eq_t info;
if(!video_on) return VO_FALSE;
- va_start(ap, data);
- value = va_arg(ap, int);
- va_end(ap);
-
-// printf("vidix seteq %s -> %d \n",data,value);
+
+ struct voctrl_set_equalizer_args *args = data;
/* vidix eq ranges are -1000..1000 */
- if (!strcasecmp(data, "brightness"))
+ if (!strcasecmp(args->name, "brightness"))
{
- info.brightness = value*10;
+ info.brightness = args->value*10;
info.cap = VEQ_CAP_BRIGHTNESS;
}
- else if (!strcasecmp(data, "contrast"))
+ else if (!strcasecmp(args->name, "contrast"))
{
- info.contrast = value*10;
+ info.contrast = args->value*10;
info.cap = VEQ_CAP_CONTRAST;
}
- else if (!strcasecmp(data, "saturation"))
+ else if (!strcasecmp(args->name, "saturation"))
{
- info.saturation = value*10;
+ info.saturation = args->value*10;
info.cap = VEQ_CAP_SATURATION;
}
- else if (!strcasecmp(data, "hue"))
+ else if (!strcasecmp(args->name, "hue"))
{
- info.hue = value*10;
+ info.hue = args->value*10;
info.cap = VEQ_CAP_HUE;
}
@@ -592,38 +587,34 @@ uint32_t vidix_control(uint32_t request, void *data, ...)
}
case VOCTRL_GET_EQUALIZER:
{
- va_list ap;
- int *value;
vidix_video_eq_t info;
if(!video_on) return VO_FALSE;
if (vdlPlaybackGetEq(vidix_handler, &info) != 0)
return VO_FALSE;
- va_start(ap, data);
- value = va_arg(ap, int*);
- va_end(ap);
+ struct voctrl_get_equalizer_args *args = data;
/* vidix eq ranges are -1000..1000 */
- if (!strcasecmp(data, "brightness"))
+ if (!strcasecmp(args->name, "brightness"))
{
if (info.cap & VEQ_CAP_BRIGHTNESS)
- *value = info.brightness/10;
+ *args->valueptr = info.brightness/10;
}
- else if (!strcasecmp(data, "contrast"))
+ else if (!strcasecmp(args->name, "contrast"))
{
if (info.cap & VEQ_CAP_CONTRAST)
- *value = info.contrast/10;
+ *args->valueptr = info.contrast/10;
}
- else if (!strcasecmp(data, "saturation"))
+ else if (!strcasecmp(args->name, "saturation"))
{
if (info.cap & VEQ_CAP_SATURATION)
- *value = info.saturation/10;
+ *args->valueptr = info.saturation/10;
}
- else if (!strcasecmp(data, "hue"))
+ else if (!strcasecmp(args->name, "hue"))
{
if (info.cap & VEQ_CAP_HUE)
- *value = info.hue/10;
+ *args->valueptr = info.hue/10;
}
return VO_TRUE;
--
1.5.4.5
Subject: [PATCH] Remove variable arguments from vo control() functions
No voctrl uses them any more, and using them would not be a good idea
because it makes forwarding arguments to other functions harder.
diff --git a/libvo/mga_common.c b/libvo/mga_common.c
index 600e4e7..a95f690 100644
--- a/libvo/mga_common.c
+++ b/libvo/mga_common.c
@@ -229,7 +229,7 @@ static void mga_fullscreen()
}
#endif
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_QUERY_FORMAT:
diff --git a/libvo/vesa_lvo.c b/libvo/vesa_lvo.c
index ea5ecc9..cbb4e80 100644
--- a/libvo/vesa_lvo.c
+++ b/libvo/vesa_lvo.c
@@ -43,7 +43,7 @@ static uint8_t *lvo_mem = NULL;
static uint8_t next_frame;
static mga_vid_config_t mga_vid_config;
static unsigned image_bpp,image_height,image_width,src_format;
-uint32_t vlvo_control(uint32_t request, void *data, ...);
+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) )
@@ -303,7 +303,7 @@ uint32_t vlvo_query_info(uint32_t format)
return VFCAP_CSP_SUPPORTED;
}
-uint32_t vlvo_control(uint32_t request, void *data, ...)
+uint32_t vlvo_control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_QUERY_FORMAT:
diff --git a/libvo/video_out.h b/libvo/video_out.h
index 893046a..0bbc856 100644
--- a/libvo/video_out.h
+++ b/libvo/video_out.h
@@ -144,7 +144,7 @@ typedef struct vo_functions_s
/*
* Control interface
*/
- int (*control)(uint32_t request, void *data, ...);
+ int (*control)(uint32_t request, void *data);
/*
* Display a new RGB/BGR frame of the video to the screen.
diff --git a/libvo/video_out_internal.h b/libvo/video_out_internal.h
index 83f38d5..1bfb91d 100644
--- a/libvo/video_out_internal.h
+++ b/libvo/video_out_internal.h
@@ -30,7 +30,7 @@
#include "libmpcodecs/mp_image.h"
#include "geometry.h"
-static int control(uint32_t request, void *data, ...);
+static int control(uint32_t request, void *data);
static int config(uint32_t width, uint32_t height, uint32_t d_width,
uint32_t d_height, uint32_t fullscreen, char *title,
uint32_t format);
diff --git a/libvo/vo_3dfx.c b/libvo/vo_3dfx.c
index d4612e7..dcb58d3 100644
--- a/libvo/vo_3dfx.c
+++ b/libvo/vo_3dfx.c
@@ -497,7 +497,7 @@ static int preinit(const char *arg)
return 0;
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_QUERY_FORMAT:
diff --git a/libvo/vo_aa.c b/libvo/vo_aa.c
index 8ba01d6..f297e01 100644
--- a/libvo/vo_aa.c
+++ b/libvo/vo_aa.c
@@ -718,7 +718,7 @@ static int preinit(const char *arg)
return 0;
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_QUERY_FORMAT:
diff --git a/libvo/vo_bl.c b/libvo/vo_bl.c
index f99599f..1aaa5c8 100644
--- a/libvo/vo_bl.c
+++ b/libvo/vo_bl.c
@@ -465,7 +465,7 @@ static int preinit(const char *arg) {
return 0;
}
-static int control(uint32_t request, void *data, ...) {
+static int control(uint32_t request, void *data) {
switch (request) {
case VOCTRL_QUERY_FORMAT:
return query_format(*((uint32_t*)data));
diff --git a/libvo/vo_caca.c b/libvo/vo_caca.c
index 3fd1fcd..46dab1d 100644
--- a/libvo/vo_caca.c
+++ b/libvo/vo_caca.c
@@ -322,7 +322,7 @@ static int query_format(uint32_t format)
return 0;
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch(request)
{
diff --git a/libvo/vo_cvidix.c b/libvo/vo_cvidix.c
index 9b6c593..3e54616 100644
--- a/libvo/vo_cvidix.c
+++ b/libvo/vo_cvidix.c
@@ -156,7 +156,7 @@ static int preinit(const char *arg){
return 0;
}
-static int control(uint32_t request, void *data, ...){
+static int control(uint32_t request, void *data){
switch (request) {
case VOCTRL_QUERY_FORMAT:
return query_format(*((uint32_t*)data));
diff --git a/libvo/vo_dfbmga.c b/libvo/vo_dfbmga.c
index ee3bf74..d829dc2 100644
--- a/libvo/vo_dfbmga.c
+++ b/libvo/vo_dfbmga.c
@@ -1381,7 +1381,7 @@ get_equalizer( char *data, int *value )
}
static int
-control( uint32_t request, void *data, ... )
+control( uint32_t request, void *data)
{
switch (request) {
case VOCTRL_GUISUPPORT:
diff --git a/libvo/vo_dga.c b/libvo/vo_dga.c
index 1a2d510..b4e5483 100644
--- a/libvo/vo_dga.c
+++ b/libvo/vo_dga.c
@@ -973,7 +973,7 @@ static uint32_t get_image(mp_image_t * mpi)
return (VO_FALSE);
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request)
{
diff --git a/libvo/vo_directfb2.c b/libvo/vo_directfb2.c
index a9bc40c..b8acb74 100644
--- a/libvo/vo_directfb2.c
+++ b/libvo/vo_directfb2.c
@@ -1411,7 +1411,7 @@ static uint32_t put_image(mp_image_t *mpi){
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_QUERY_FORMAT:
diff --git a/libvo/vo_directx.c b/libvo/vo_directx.c
index a110c48..a241631 100644
--- a/libvo/vo_directx.c
+++ b/libvo/vo_directx.c
@@ -1472,7 +1472,7 @@ static uint32_t color_ctrl_get(char *what, int *value)
return r;
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
diff --git a/libvo/vo_dxr2.c b/libvo/vo_dxr2.c
index 93ad86f..4b0d473 100644
--- a/libvo/vo_dxr2.c
+++ b/libvo/vo_dxr2.c
@@ -906,7 +906,7 @@ static int preinit(const char *arg) {
return 0;
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_QUERY_FORMAT:
diff --git a/libvo/vo_dxr3.c b/libvo/vo_dxr3.c
index a48c7be..0a5e2b4 100644
--- a/libvo/vo_dxr3.c
+++ b/libvo/vo_dxr3.c
@@ -162,7 +162,7 @@ static overlay_t *overlay_data;
/* Functions for working with the em8300's internal clock */
/* End of internal clock functions */
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_GUISUPPORT:
diff --git a/libvo/vo_fbdev.c b/libvo/vo_fbdev.c
index 12f48fd..1f99ef0 100644
--- a/libvo/vo_fbdev.c
+++ b/libvo/vo_fbdev.c
@@ -1163,7 +1163,7 @@ static uint32_t get_image(mp_image_t *mpi)
return(VO_TRUE);
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_GET_IMAGE:
diff --git a/libvo/vo_fbdev2.c b/libvo/vo_fbdev2.c
index 30bbc35..0b6fda1 100644
--- a/libvo/vo_fbdev2.c
+++ b/libvo/vo_fbdev2.c
@@ -398,7 +398,7 @@ static void uninit(void)
fb_preinit(1); // so that later calls to preinit don't fail
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_QUERY_FORMAT:
diff --git a/libvo/vo_ggi.c b/libvo/vo_ggi.c
index ad28aeb..009c3c2 100644
--- a/libvo/vo_ggi.c
+++ b/libvo/vo_ggi.c
@@ -452,7 +452,7 @@ static void uninit(void)
ggiExit();
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_QUERY_FORMAT:
diff --git a/libvo/vo_gif89a.c b/libvo/vo_gif89a.c
index 6422ec7..58da54e 100644
--- a/libvo/vo_gif89a.c
+++ b/libvo/vo_gif89a.c
@@ -336,7 +336,7 @@ static int query_format(uint32_t format)
return 0;
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
if (request == VOCTRL_QUERY_FORMAT) {
return query_format(*((uint32_t*)data));
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index 36fbff4..036974c 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -887,7 +887,7 @@ static int preinit(const char *arg)
return 0;
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_PAUSE: return (int_pause=1);
diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c
index d83c5a3..735e291 100644
--- a/libvo/vo_gl2.c
+++ b/libvo/vo_gl2.c
@@ -867,7 +867,7 @@ static int preinit(const char *arg)
return 0;
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_PAUSE: return (int_pause=1);
diff --git a/libvo/vo_ivtv.c b/libvo/vo_ivtv.c
index 4396dc1..36efe18 100644
--- a/libvo/vo_ivtv.c
+++ b/libvo/vo_ivtv.c
@@ -282,7 +282,7 @@ query_format (uint32_t format)
}
static int
-control (uint32_t request, void *data, ...)
+control (uint32_t request, void *data)
{
switch (request)
{
diff --git a/libvo/vo_jpeg.c b/libvo/vo_jpeg.c
index e8ac699..e103f87 100644
--- a/libvo/vo_jpeg.c
+++ b/libvo/vo_jpeg.c
@@ -405,7 +405,7 @@ static int preinit(const char *arg)
/* ------------------------------------------------------------------------- */
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_QUERY_FORMAT:
diff --git a/libvo/vo_md5sum.c b/libvo/vo_md5sum.c
index 29f54a9..8c4aca2 100644
--- a/libvo/vo_md5sum.c
+++ b/libvo/vo_md5sum.c
@@ -263,7 +263,7 @@ static int query_format(uint32_t format)
/* ------------------------------------------------------------------------- */
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_QUERY_FORMAT:
diff --git a/libvo/vo_mpegpes.c b/libvo/vo_mpegpes.c
index d251ff7..27f002e 100644
--- a/libvo/vo_mpegpes.c
+++ b/libvo/vo_mpegpes.c
@@ -255,7 +255,7 @@ static void check_events(void)
{
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_QUERY_FORMAT:
diff --git a/libvo/vo_null.c b/libvo/vo_null.c
index c56a265..6f45af0 100644
--- a/libvo/vo_null.c
+++ b/libvo/vo_null.c
@@ -98,7 +98,7 @@ static int preinit(const char *arg)
return 0;
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_QUERY_FORMAT:
diff --git a/libvo/vo_png.c b/libvo/vo_png.c
index 791dfd5..3c5f109 100644
--- a/libvo/vo_png.c
+++ b/libvo/vo_png.c
@@ -223,7 +223,7 @@ static int preinit(const char *arg)
return 0;
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_DRAW_IMAGE:
diff --git a/libvo/vo_pnm.c b/libvo/vo_pnm.c
index df1a070..878f063 100644
--- a/libvo/vo_pnm.c
+++ b/libvo/vo_pnm.c
@@ -543,7 +543,7 @@ static int query_format(uint32_t format)
/* ------------------------------------------------------------------------- */
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_QUERY_FORMAT:
diff --git a/libvo/vo_quartz.c b/libvo/vo_quartz.c
index 240291b..40e7049 100644
--- a/libvo/vo_quartz.c
+++ b/libvo/vo_quartz.c
@@ -1232,7 +1232,7 @@ static uint32_t get_yuv_image(mp_image_t *mpi)
return VO_FALSE;
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request)
{
diff --git a/libvo/vo_s3fb.c b/libvo/vo_s3fb.c
index 778374e..e36348e 100644
--- a/libvo/vo_s3fb.c
+++ b/libvo/vo_s3fb.c
@@ -504,7 +504,7 @@ static uint32_t get_image(mp_image_t *mpi)
return VO_TRUE;
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch(request) {
case VOCTRL_GET_IMAGE:
diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c
index 5d4b157..ca05ba4 100644
--- a/libvo/vo_sdl.c
+++ b/libvo/vo_sdl.c
@@ -1660,7 +1660,7 @@ static uint32_t get_image(mp_image_t *mpi)
return VO_FALSE;
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
struct sdl_priv_s *priv = &sdl_priv;
switch (request) {
diff --git a/libvo/vo_svga.c b/libvo/vo_svga.c
index 9d38c8d..31b103f 100644
--- a/libvo/vo_svga.c
+++ b/libvo/vo_svga.c
@@ -350,7 +350,7 @@ static int find_best_svga_mode(int req_w,int req_h, int req_bpp){
return bestmode;
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_QUERY_FORMAT:
diff --git a/libvo/vo_tdfx_vid.c b/libvo/vo_tdfx_vid.c
index 522f5e9..501017f 100644
--- a/libvo/vo_tdfx_vid.c
+++ b/libvo/vo_tdfx_vid.c
@@ -646,7 +646,7 @@ static uint32_t set_colorkey(mp_colorkey_t* colork) {
return VO_TRUE;
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_QUERY_FORMAT:
diff --git a/libvo/vo_tdfxfb.c b/libvo/vo_tdfxfb.c
index 6cdb075..fb825c3 100644
--- a/libvo/vo_tdfxfb.c
+++ b/libvo/vo_tdfxfb.c
@@ -478,7 +478,7 @@ static uint32_t get_image(mp_image_t *mpi)
return VO_TRUE;
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch(request) {
case VOCTRL_GET_IMAGE:
diff --git a/libvo/vo_tga.c b/libvo/vo_tga.c
index 0977f91..3a1d1fb 100644
--- a/libvo/vo_tga.c
+++ b/libvo/vo_tga.c
@@ -242,7 +242,7 @@ static int preinit(const char *arg)
return 0;
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_DRAW_IMAGE:
diff --git a/libvo/vo_v4l2.c b/libvo/vo_v4l2.c
index cb09d3f..bce01f5 100644
--- a/libvo/vo_v4l2.c
+++ b/libvo/vo_v4l2.c
@@ -250,7 +250,7 @@ query_format (uint32_t format)
}
static int
-control (uint32_t request, void *data, ...)
+control (uint32_t request, void *data)
{
switch (request)
{
diff --git a/libvo/vo_vesa.c b/libvo/vo_vesa.c
index f5eb0e1..f5a40d2 100644
--- a/libvo/vo_vesa.c
+++ b/libvo/vo_vesa.c
@@ -1090,7 +1090,7 @@ static int preinit(const char *arg)
return pre_init_err;
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_QUERY_FORMAT:
diff --git a/libvo/vo_winvidix.c b/libvo/vo_winvidix.c
index 97ff41d..a66b062 100644
--- a/libvo/vo_winvidix.c
+++ b/libvo/vo_winvidix.c
@@ -329,7 +329,7 @@ static int preinit(const char *arg){
return(0);
}
-static int control(uint32_t request, void *data, ...){
+static int control(uint32_t request, void *data){
switch (request) {
case VOCTRL_FULLSCREEN:
if(!vo_fs){vo_fs=1;ShowWindow(hWndFS,SW_SHOW);SetForegroundWindow(hWndFS);}
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c
index 2b56ee4..cc9ca02 100644
--- a/libvo/vo_x11.c
+++ b/libvo/vo_x11.c
@@ -748,7 +748,7 @@ static int preinit(const char *arg)
return 0;
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request)
{
diff --git a/libvo/vo_xover.c b/libvo/vo_xover.c
index 46f8f83..77d8306 100644
--- a/libvo/vo_xover.c
+++ b/libvo/vo_xover.c
@@ -427,7 +427,7 @@ static int preinit(const char *arg)
return 0;
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
if(!sub_vo) return VO_ERROR;
switch (request) {
@@ -449,7 +449,6 @@ static int control(uint32_t request, void *data, ...)
}
return VO_TRUE;
default:
- // Safe atm bcs nothing use more than 1 arg
return sub_vo->control(request,data);
}
return VO_NOTIMPL;
diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c
index 36d4d67..bdb4d6b 100644
--- a/libvo/vo_xv.c
+++ b/libvo/vo_xv.c
@@ -839,7 +839,7 @@ static int preinit(const char *arg)
return 0;
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request)
{
diff --git a/libvo/vo_xvidix.c b/libvo/vo_xvidix.c
index fdd82d8..260cdc9 100644
--- a/libvo/vo_xvidix.c
+++ b/libvo/vo_xvidix.c
@@ -470,7 +470,7 @@ static int preinit(const char *arg)
return (0);
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request)
{
diff --git a/libvo/vo_xvmc.c b/libvo/vo_xvmc.c
index efa4e5d..d287510 100644
--- a/libvo/vo_xvmc.c
+++ b/libvo/vo_xvmc.c
@@ -1355,7 +1355,7 @@ assert(rndr->next_free_data_block_num == 0);
return VO_TRUE;
}
-static int control(uint32_t request, void *data, ... )
+static int control(uint32_t request, void *data)
{
switch (request){
case VOCTRL_GET_DEINTERLACE:
diff --git a/libvo/vo_xvr100.c b/libvo/vo_xvr100.c
index ff92018..a22a655 100644
--- a/libvo/vo_xvr100.c
+++ b/libvo/vo_xvr100.c
@@ -429,7 +429,7 @@ static int query_format(uint32_t format)
return 0;
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_GET_IMAGE:
diff --git a/libvo/vo_yuv4mpeg.c b/libvo/vo_yuv4mpeg.c
index 2858462..759f053 100644
--- a/libvo/vo_yuv4mpeg.c
+++ b/libvo/vo_yuv4mpeg.c
@@ -538,7 +538,7 @@ static int preinit(const char *arg)
return 0;
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_QUERY_FORMAT:
diff --git a/libvo/vo_zr.c b/libvo/vo_zr.c
index 26d868f..3f67d94 100644
--- a/libvo/vo_zr.c
+++ b/libvo/vo_zr.c
@@ -814,7 +814,7 @@ static int preinit(const char *arg)
return 0;
}
-static int control(uint32_t request, void *data, ...)
+static int control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_QUERY_FORMAT:
diff --git a/libvo/vo_zr2.c b/libvo/vo_zr2.c
index 362ae49..c50e95c 100644
--- a/libvo/vo_zr2.c
+++ b/libvo/vo_zr2.c
@@ -433,7 +433,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
return 0;
}
-static int control(uint32_t request, void *data, ...) {
+static int control(uint32_t request, void *data) {
switch (request) {
case VOCTRL_QUERY_FORMAT:
return query_format(*((uint32_t*)data));
diff --git a/libvo/vosub_vidix.c b/libvo/vosub_vidix.c
index 83a7fcc..2291814 100644
--- a/libvo/vosub_vidix.c
+++ b/libvo/vosub_vidix.c
@@ -533,7 +533,7 @@ static uint32_t vidix_get_image(mp_image_t *mpi)
return VO_FALSE;
}
-uint32_t vidix_control(uint32_t request, void *data, ...)
+uint32_t vidix_control(uint32_t request, void *data)
{
switch (request) {
case VOCTRL_QUERY_FORMAT:
diff --git a/libvo/vosub_vidix.h b/libvo/vosub_vidix.h
index c6427be..0c2e30d 100644
--- a/libvo/vosub_vidix.h
+++ b/libvo/vosub_vidix.h
@@ -24,7 +24,7 @@ int vidix_init(unsigned src_width,unsigned src_height,
int vidix_start(void);
int vidix_stop(void);
void vidix_term( void );
-uint32_t vidix_control(uint32_t request, void *data, ...);
+uint32_t vidix_control(uint32_t request, void *data);
uint32_t vidix_query_fourcc(uint32_t fourcc);
uint32_t vidix_draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y);
--
1.5.4.5
_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng