diff -ur vanilla/libmpcodecs/ad_a52.c mod/libmpcodecs/ad_a52.c --- vanilla/libmpcodecs/ad_a52.c Mon Apr 1 19:57:51 2002 +++ mod/libmpcodecs/ad_a52.c Sat Jul 27 18:05:12 2002 @@ -157,7 +157,7 @@ { } -static int control(sh_audio_t *sh,int cmd,void* arg, ...) +static int control(sh_audio_t *sh,int cmd,void* arg) { switch(cmd) { diff -ur vanilla/libmpcodecs/ad_acm.c mod/libmpcodecs/ad_acm.c --- vanilla/libmpcodecs/ad_acm.c Mon Apr 1 15:26:03 2002 +++ mod/libmpcodecs/ad_acm.c Sat Jul 27 18:05:08 2002 @@ -55,7 +55,7 @@ close_acm_audio_codec(sh); } -static int control(sh_audio_t *sh_audio,int cmd,void* arg, ...) +static int control(sh_audio_t *sh_audio,int cmd,void* arg) { int skip; switch(cmd) diff -ur vanilla/libmpcodecs/ad_alaw.c mod/libmpcodecs/ad_alaw.c --- vanilla/libmpcodecs/ad_alaw.c Mon Mar 25 22:06:01 2002 +++ mod/libmpcodecs/ad_alaw.c Sat Jul 27 18:05:33 2002 @@ -39,7 +39,7 @@ { } -static int control(sh_audio_t *sh,int cmd,void* arg, ...) +static int control(sh_audio_t *sh,int cmd,void* arg) { int skip; switch(cmd) diff -ur vanilla/libmpcodecs/ad_dk3adpcm.c mod/libmpcodecs/ad_dk3adpcm.c --- vanilla/libmpcodecs/ad_dk3adpcm.c Wed Apr 3 23:37:26 2002 +++ mod/libmpcodecs/ad_dk3adpcm.c Sat Jul 27 18:04:27 2002 @@ -89,7 +89,7 @@ { } -static int control(sh_audio_t *sh_audio,int cmd,void* arg, ...) +static int control(sh_audio_t *sh_audio,int cmd,void* arg) { if(cmd==ADCTRL_SKIP_FRAME){ demux_read_data(sh_audio->ds, sh_audio->a_in_buffer,sh_audio->ds->ss_mul); diff -ur vanilla/libmpcodecs/ad_dshow.c mod/libmpcodecs/ad_dshow.c --- vanilla/libmpcodecs/ad_dshow.c Mon Apr 1 19:57:51 2002 +++ mod/libmpcodecs/ad_dshow.c Sat Jul 27 18:05:21 2002 @@ -54,7 +54,7 @@ DS_AudioDecoder_Destroy(ds_adec); } -static int control(sh_audio_t *sh_audio,int cmd,void* arg, ...) +static int control(sh_audio_t *sh_audio,int cmd,void* arg) { int skip; switch(cmd) diff -ur vanilla/libmpcodecs/ad_dvdpcm.c mod/libmpcodecs/ad_dvdpcm.c --- vanilla/libmpcodecs/ad_dvdpcm.c Thu Apr 25 13:03:33 2002 +++ mod/libmpcodecs/ad_dvdpcm.c Sat Jul 27 18:04:58 2002 @@ -37,7 +37,7 @@ { } -static int control(sh_audio_t *sh,int cmd,void* arg, ...) +static int control(sh_audio_t *sh,int cmd,void* arg) { int skip; switch(cmd) diff -ur vanilla/libmpcodecs/ad_faad.c mod/libmpcodecs/ad_faad.c --- vanilla/libmpcodecs/ad_faad.c Mon Apr 1 19:57:51 2002 +++ mod/libmpcodecs/ad_faad.c Sat Jul 27 18:05:30 2002 @@ -123,7 +123,7 @@ faacDecClose(faac_hdec); } -static int control(sh_audio_t *sh,int cmd,void* arg, ...) +static int control(sh_audio_t *sh,int cmd,void* arg) { switch(cmd) { diff -ur vanilla/libmpcodecs/ad_ffmpeg.c mod/libmpcodecs/ad_ffmpeg.c --- vanilla/libmpcodecs/ad_ffmpeg.c Wed Apr 3 23:01:15 2002 +++ mod/libmpcodecs/ad_ffmpeg.c Sat Jul 27 18:05:15 2002 @@ -93,7 +93,7 @@ free(sh->context); } -static int control(sh_audio_t *sh,int cmd,void* arg, ...) +static int control(sh_audio_t *sh,int cmd,void* arg) { // TODO ??? return CONTROL_UNKNOWN; diff -ur vanilla/libmpcodecs/ad_hwac3.c mod/libmpcodecs/ad_hwac3.c --- vanilla/libmpcodecs/ad_hwac3.c Tue Apr 23 00:34:37 2002 +++ mod/libmpcodecs/ad_hwac3.c Sat Jul 27 18:05:44 2002 @@ -68,7 +68,7 @@ { } -static int control(sh_audio_t *sh,int cmd,void* arg, ...) +static int control(sh_audio_t *sh,int cmd,void* arg) { switch(cmd) { diff -ur vanilla/libmpcodecs/ad_imaadpcm.c mod/libmpcodecs/ad_imaadpcm.c --- vanilla/libmpcodecs/ad_imaadpcm.c Wed Apr 3 23:37:26 2002 +++ mod/libmpcodecs/ad_imaadpcm.c Sat Jul 27 18:05:36 2002 @@ -118,7 +118,7 @@ { } -static int control(sh_audio_t *sh_audio,int cmd,void* arg, ...) +static int control(sh_audio_t *sh_audio,int cmd,void* arg) { if(cmd==ADCTRL_SKIP_FRAME){ demux_read_data(sh_audio->ds, sh_audio->a_in_buffer,sh_audio->ds->ss_mul); diff -ur vanilla/libmpcodecs/ad_internal.h mod/libmpcodecs/ad_internal.h --- vanilla/libmpcodecs/ad_internal.h Mon Mar 25 22:06:01 2002 +++ mod/libmpcodecs/ad_internal.h Sat Jul 27 18:04:32 2002 @@ -11,7 +11,7 @@ static int init(sh_audio_t *sh); static int preinit(sh_audio_t *sh); static void uninit(sh_audio_t *sh); -static int control(sh_audio_t *sh,int cmd,void* arg, ...); +static int control(sh_audio_t *sh,int cmd,void* arg); static int decode_audio(sh_audio_t *sh,unsigned char *buffer,int minlen,int maxlen); #define LIBAD_EXTERN(x) ad_functions_t mpcodecs_ad_##x = {\ diff -ur vanilla/libmpcodecs/ad_libmad.c mod/libmpcodecs/ad_libmad.c --- vanilla/libmpcodecs/ad_libmad.c Sun May 12 02:44:32 2002 +++ mod/libmpcodecs/ad_libmad.c Sat Jul 27 18:05:28 2002 @@ -155,7 +155,7 @@ return len?len:-1; } -static int control(sh_audio_t *sh,int cmd,void* arg, ...){ +static int control(sh_audio_t *sh,int cmd,void* arg){ mad_decoder_t *this = (mad_decoder_t *) sh->context; // various optional functions you MAY implement: switch(cmd){ diff -ur vanilla/libmpcodecs/ad_mp3.c mod/libmpcodecs/ad_mp3.c --- vanilla/libmpcodecs/ad_mp3.c Mon May 20 05:25:23 2002 +++ mod/libmpcodecs/ad_mp3.c Sat Jul 27 18:04:54 2002 @@ -58,7 +58,7 @@ { } -static int control(sh_audio_t *sh,int cmd,void* arg, ...) +static int control(sh_audio_t *sh,int cmd,void* arg) { switch(cmd) { diff -ur vanilla/libmpcodecs/ad_msadpcm.c mod/libmpcodecs/ad_msadpcm.c --- vanilla/libmpcodecs/ad_msadpcm.c Sun Jun 30 00:10:18 2002 +++ mod/libmpcodecs/ad_msadpcm.c Sat Jul 27 18:05:41 2002 @@ -85,7 +85,7 @@ { } -static int control(sh_audio_t *sh_audio,int cmd,void* arg, ...) +static int control(sh_audio_t *sh_audio,int cmd,void* arg) { if(cmd==ADCTRL_SKIP_FRAME){ demux_read_data(sh_audio->ds, sh_audio->a_in_buffer,sh_audio->ds->ss_mul); diff -ur vanilla/libmpcodecs/ad_msgsm.c mod/libmpcodecs/ad_msgsm.c --- vanilla/libmpcodecs/ad_msgsm.c Sat Apr 13 20:04:24 2002 +++ mod/libmpcodecs/ad_msgsm.c Sat Jul 27 18:04:37 2002 @@ -43,7 +43,7 @@ { } -static int control(sh_audio_t *sh,int cmd,void* arg, ...) +static int control(sh_audio_t *sh,int cmd,void* arg) { return CONTROL_UNKNOWN; } diff -ur vanilla/libmpcodecs/ad_pcm.c mod/libmpcodecs/ad_pcm.c --- vanilla/libmpcodecs/ad_pcm.c Thu May 30 02:40:55 2002 +++ mod/libmpcodecs/ad_pcm.c Sat Jul 27 18:04:50 2002 @@ -48,7 +48,7 @@ { } -static int control(sh_audio_t *sh,int cmd,void* arg, ...) +static int control(sh_audio_t *sh,int cmd,void* arg) { int skip; switch(cmd) diff -ur vanilla/libmpcodecs/ad_real.c mod/libmpcodecs/ad_real.c --- vanilla/libmpcodecs/ad_real.c Thu Jul 18 01:28:37 2002 +++ mod/libmpcodecs/ad_real.c Sat Jul 27 18:05:02 2002 @@ -191,7 +191,7 @@ // or -1 for EOF (or uncorrectable error) } -static int control(sh_audio_t *sh,int cmd,void* arg, ...){ +static int control(sh_audio_t *sh,int cmd,void* arg){ // various optional functions you MAY implement: switch(cmd){ case ADCTRL_RESYNC_STREAM: diff -ur vanilla/libmpcodecs/ad_roqaudio.c mod/libmpcodecs/ad_roqaudio.c --- vanilla/libmpcodecs/ad_roqaudio.c Sat Apr 13 20:04:24 2002 +++ mod/libmpcodecs/ad_roqaudio.c Sat Jul 27 18:05:18 2002 @@ -39,7 +39,7 @@ { } -static int control(sh_audio_t *sh,int cmd,void* arg, ...) +static int control(sh_audio_t *sh,int cmd,void* arg) { // TODO!!! return CONTROL_UNKNOWN; diff -ur vanilla/libmpcodecs/ad_sample.c mod/libmpcodecs/ad_sample.c --- vanilla/libmpcodecs/ad_sample.c Sun May 12 02:44:32 2002 +++ mod/libmpcodecs/ad_sample.c Sat Jul 27 18:04:46 2002 @@ -108,7 +108,7 @@ // or -1 for EOF (or uncorrectable error) } -static int control(sh_audio_t *sh,int cmd,void* arg, ...){ +static int control(sh_audio_t *sh,int cmd,void* arg){ // various optional functions you MAY implement: switch(cmd){ case ADCTRL_RESYNC_STREAM: diff -ur vanilla/libmpcodecs/ad_vorbis.c mod/libmpcodecs/ad_vorbis.c --- vanilla/libmpcodecs/ad_vorbis.c Fri Jun 28 18:40:02 2002 +++ mod/libmpcodecs/ad_vorbis.c Sat Jul 27 18:05:05 2002 @@ -108,7 +108,7 @@ free(ov); } -static int control(sh_audio_t *sh,int cmd,void* arg, ...) +static int control(sh_audio_t *sh,int cmd,void* arg) { switch(cmd) { diff -ur vanilla/libmpcodecs/dec_video.c mod/libmpcodecs/dec_video.c --- vanilla/libmpcodecs/dec_video.c Fri Jul 26 18:20:43 2002 +++ mod/libmpcodecs/dec_video.c Sat Jul 27 17:51:37 2002 @@ -77,17 +77,21 @@ int set_video_colors(sh_video_t *sh_video,char *item,int value) { vf_instance_t* vf=sh_video->vfilter; + vf_seteq_t data; + + data.item = item; + data.value = value; mp_dbg(MSGT_DECVIDEO,MSGL_V,"set video colors %s=%d \n", item, value); if (vf) { - int ret = vf->control(vf, VFCTRL_SET_EQUALIZER, item, (int *)value); + int ret = vf->control(vf, VFCTRL_SET_EQUALIZER, &data); if (ret == CONTROL_TRUE) return(1); } /* try software control */ if(mpvdec) - if( mpvdec->control(sh_video,VDCTRL_SET_EQUALIZER, item, (int *)value) + if( mpvdec->control(sh_video,VDCTRL_SET_EQUALIZER, &data) == CONTROL_OK) return 1; mp_msg(MSGT_DECVIDEO,MSGL_INFO,"Video attribute '%s' isn't supported by selected vo & vd! \n",item); return 0; @@ -96,16 +100,20 @@ int get_video_colors(sh_video_t *sh_video,char *item,int *value) { vf_instance_t* vf=sh_video->vfilter; + vf_geteq_t data; + + data.item = item; + data.value = value; mp_dbg(MSGT_DECVIDEO,MSGL_V,"get video colors %s \n", item); if (vf) { - int ret = vf->control(vf, VFCTRL_GET_EQUALIZER, item, value); + int ret = vf->control(vf, VFCTRL_GET_EQUALIZER, &data); if (ret == CONTROL_TRUE) return(1); } /* try software control */ - if(mpvdec) return mpvdec->control(sh_video,VDCTRL_GET_EQUALIZER, item, value); + if(mpvdec) return mpvdec->control(sh_video,VDCTRL_GET_EQUALIZER, &data); return 0; } diff -ur vanilla/libmpcodecs/vd.h mod/libmpcodecs/vd.h --- vanilla/libmpcodecs/vd.h Fri Jul 26 18:20:43 2002 +++ mod/libmpcodecs/vd.h Sat Jul 27 18:03:39 2002 @@ -8,7 +8,7 @@ vd_info_t *info; int (*init)(sh_video_t *sh); void (*uninit)(sh_video_t *sh); - int (*control)(sh_video_t *sh,int cmd,void* arg, ...); + int (*control)(sh_video_t *sh,int cmd,void* arg); mp_image_t* (*decode)(sh_video_t *sh,void* data,int len,int flags); } vd_functions_t; @@ -16,6 +16,18 @@ extern vd_functions_t* mpcodecs_vd_drivers[]; extern int vd_use_slices; + +typedef struct vd_seteq_s +{ + char *item; + int value; +} vd_seteq_t; + +typedef struct vd_geteq_s +{ + char *item; + int *value; +} vd_geteq_t; #define VDCTRL_QUERY_FORMAT 3 /* test for availabilty of a format */ #define VDCTRL_QUERY_MAX_PP_LEVEL 4 /* test for postprocessing support (max level) */ diff -ur vanilla/libmpcodecs/vd_cinepak.c mod/libmpcodecs/vd_cinepak.c --- vanilla/libmpcodecs/vd_cinepak.c Sat Mar 16 02:10:31 2002 +++ mod/libmpcodecs/vd_cinepak.c Sat Jul 27 17:21:06 2002 @@ -18,7 +18,7 @@ LIBVD_EXTERN(cinepak) // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ return CONTROL_UNKNOWN; } diff -ur vanilla/libmpcodecs/vd_cyuv.c mod/libmpcodecs/vd_cyuv.c --- vanilla/libmpcodecs/vd_cyuv.c Tue Mar 26 06:03:10 2002 +++ mod/libmpcodecs/vd_cyuv.c Sat Jul 27 17:45:54 2002 @@ -18,7 +18,7 @@ LIBVD_EXTERN(cyuv) // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ return CONTROL_UNKNOWN; } diff -ur vanilla/libmpcodecs/vd_divx4.c mod/libmpcodecs/vd_divx4.c --- vanilla/libmpcodecs/vd_divx4.c Fri Jul 26 18:20:43 2002 +++ mod/libmpcodecs/vd_divx4.c Sat Jul 27 19:19:31 2002 @@ -1,6 +1,5 @@ #include #include -#include #include #include "config.h" @@ -36,7 +35,7 @@ #define USE_DIVX_BUILTIN_PP // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ switch(cmd){ #ifdef USE_DIVX_BUILTIN_PP case VDCTRL_QUERY_MAX_PP_LEVEL: @@ -53,19 +52,15 @@ #ifdef DECORE_VERSION #if DECORE_VERSION >= 20011010 case VDCTRL_SET_EQUALIZER: { - va_list ap; - int value; - int option; - va_start(ap, arg); - value=va_arg(ap, int); - va_end(ap); - - if(!strcasecmp(arg,"Brightness")) option=DEC_GAMMA_BRIGHTNESS; - else if(!strcasecmp(arg, "Contrast")) option=DEC_GAMMA_CONTRAST; - else if(!strcasecmp(arg,"Saturation")) option=DEC_GAMMA_SATURATION; + int option; + char *item = ((vd_seteq_t*)arg)->item; + int value = (((vd_seteq_t*)arg)->value * 128)/100; + + if(!strcasecmp(item,"Brightness")) option=DEC_GAMMA_BRIGHTNESS; + else if(!strcasecmp(item, "Contrast")) option=DEC_GAMMA_CONTRAST; + else if(!strcasecmp(item,"Saturation")) option=DEC_GAMMA_SATURATION; else return CONTROL_FALSE; - value = (value * 128) / 100; decore(0x123, DEC_OPT_GAMMA, (void *)option, (void *) value); return CONTROL_OK; } diff -ur vanilla/libmpcodecs/vd_dshow.c mod/libmpcodecs/vd_dshow.c --- vanilla/libmpcodecs/vd_dshow.c Fri Jul 26 18:20:43 2002 +++ mod/libmpcodecs/vd_dshow.c Sat Jul 27 19:19:43 2002 @@ -1,6 +1,5 @@ #include #include -#include #include "config.h" #ifdef USE_DIRECTSHOW @@ -24,7 +23,7 @@ LIBVD_EXTERN(dshow) // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ switch(cmd){ case VDCTRL_QUERY_MAX_PP_LEVEL: return 4; @@ -34,12 +33,7 @@ return CONTROL_OK; case VDCTRL_SET_EQUALIZER: { - va_list ap; - int value; - va_start(ap, arg); - value=va_arg(ap, int); - va_end(ap); - if(DS_VideoDecoder_SetValue(sh->context,arg,50+value/2)==0) + if(DS_VideoDecoder_SetValue(sh->context,((vd_seteq_t*)arg)->item,50+((vd_seteq_t*)arg)->value/2)==0) return CONTROL_OK; return CONTROL_FALSE; } diff -ur vanilla/libmpcodecs/vd_ffmpeg.c mod/libmpcodecs/vd_ffmpeg.c --- vanilla/libmpcodecs/vd_ffmpeg.c Fri Jul 26 18:20:45 2002 +++ mod/libmpcodecs/vd_ffmpeg.c Sat Jul 27 17:21:33 2002 @@ -75,7 +75,7 @@ }; // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ vd_ffmpeg_ctx *ctx = sh->context; switch(cmd){ case VDCTRL_QUERY_FORMAT: diff -ur vanilla/libmpcodecs/vd_fli.c mod/libmpcodecs/vd_fli.c --- vanilla/libmpcodecs/vd_fli.c Sat Mar 16 02:10:31 2002 +++ mod/libmpcodecs/vd_fli.c Sat Jul 27 17:45:18 2002 @@ -18,7 +18,7 @@ LIBVD_EXTERN(fli) // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ return CONTROL_UNKNOWN; } diff -ur vanilla/libmpcodecs/vd_huffyuv.c mod/libmpcodecs/vd_huffyuv.c --- vanilla/libmpcodecs/vd_huffyuv.c Sun Jun 23 03:30:47 2002 +++ mod/libmpcodecs/vd_huffyuv.c Sat Jul 27 17:46:34 2002 @@ -163,7 +163,7 @@ // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...) +static int control(sh_video_t *sh,int cmd,void* arg) { switch(cmd) { case VDCTRL_QUERY_FORMAT: diff -ur vanilla/libmpcodecs/vd_ijpg.c mod/libmpcodecs/vd_ijpg.c --- vanilla/libmpcodecs/vd_ijpg.c Wed May 15 14:53:00 2002 +++ mod/libmpcodecs/vd_ijpg.c Sat Jul 27 17:47:34 2002 @@ -32,7 +32,7 @@ static int last_h=-1; // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ return CONTROL_UNKNOWN; } diff -ur vanilla/libmpcodecs/vd_internal.h mod/libmpcodecs/vd_internal.h --- vanilla/libmpcodecs/vd_internal.h Sat Apr 13 21:14:31 2002 +++ mod/libmpcodecs/vd_internal.h Sat Jul 27 17:19:50 2002 @@ -12,7 +12,7 @@ // prototypes: //static vd_info_t info; -static int control(sh_video_t *sh,int cmd,void* arg,...); +static int control(sh_video_t *sh,int cmd,void* arg); static int init(sh_video_t *sh); static void uninit(sh_video_t *sh); static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags); diff -ur vanilla/libmpcodecs/vd_libmpeg2.c mod/libmpcodecs/vd_libmpeg2.c --- vanilla/libmpcodecs/vd_libmpeg2.c Thu Apr 18 17:03:08 2002 +++ mod/libmpcodecs/vd_libmpeg2.c Sat Jul 27 17:46:12 2002 @@ -41,7 +41,7 @@ static int table_init_state=0; // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ return CONTROL_UNKNOWN; } diff -ur vanilla/libmpcodecs/vd_mpegpes.c mod/libmpcodecs/vd_mpegpes.c --- vanilla/libmpcodecs/vd_mpegpes.c Wed Apr 3 20:22:31 2002 +++ mod/libmpcodecs/vd_mpegpes.c Sat Jul 27 17:46:59 2002 @@ -23,7 +23,7 @@ #include "libvo/video_out.h" // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ return CONTROL_UNKNOWN; } diff -ur vanilla/libmpcodecs/vd_mpng.c mod/libmpcodecs/vd_mpng.c --- vanilla/libmpcodecs/vd_mpng.c Sat Mar 16 02:10:31 2002 +++ mod/libmpcodecs/vd_mpng.c Sat Jul 27 17:47:22 2002 @@ -32,7 +32,7 @@ static int last_c=-1; // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ return CONTROL_UNKNOWN; } diff -ur vanilla/libmpcodecs/vd_msrle.c mod/libmpcodecs/vd_msrle.c --- vanilla/libmpcodecs/vd_msrle.c Sun Mar 31 17:33:32 2002 +++ mod/libmpcodecs/vd_msrle.c Sat Jul 27 17:46:23 2002 @@ -18,7 +18,7 @@ LIBVD_EXTERN(msrle) // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ return CONTROL_UNKNOWN; } diff -ur vanilla/libmpcodecs/vd_msvidc.c mod/libmpcodecs/vd_msvidc.c --- vanilla/libmpcodecs/vd_msvidc.c Sat Mar 16 02:10:31 2002 +++ mod/libmpcodecs/vd_msvidc.c Sat Jul 27 17:45:09 2002 @@ -18,7 +18,7 @@ LIBVD_EXTERN(msvidc) // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ return CONTROL_UNKNOWN; } diff -ur vanilla/libmpcodecs/vd_null.c mod/libmpcodecs/vd_null.c --- vanilla/libmpcodecs/vd_null.c Mon Mar 18 01:55:58 2002 +++ mod/libmpcodecs/vd_null.c Sat Jul 27 17:20:03 2002 @@ -19,7 +19,7 @@ LIBVD_EXTERN(null) // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ return CONTROL_UNKNOWN; } diff -ur vanilla/libmpcodecs/vd_nuv.c mod/libmpcodecs/vd_nuv.c --- vanilla/libmpcodecs/vd_nuv.c Sat Mar 16 02:10:31 2002 +++ mod/libmpcodecs/vd_nuv.c Sat Jul 27 17:46:03 2002 @@ -18,7 +18,7 @@ LIBVD_EXTERN(nuv) // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ return CONTROL_UNKNOWN; } diff -ur vanilla/libmpcodecs/vd_odivx.c mod/libmpcodecs/vd_odivx.c --- vanilla/libmpcodecs/vd_odivx.c Wed Jul 10 22:56:57 2002 +++ mod/libmpcodecs/vd_odivx.c Sat Jul 27 17:23:08 2002 @@ -70,7 +70,7 @@ // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ switch(cmd){ case VDCTRL_QUERY_MAX_PP_LEVEL: #ifdef NEW_DECORE diff -ur vanilla/libmpcodecs/vd_qtrle.c mod/libmpcodecs/vd_qtrle.c --- vanilla/libmpcodecs/vd_qtrle.c Fri Jul 12 19:49:04 2002 +++ mod/libmpcodecs/vd_qtrle.c Sat Jul 27 17:45:28 2002 @@ -23,7 +23,7 @@ } vd_qtrle_ctx; // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ vd_qtrle_ctx *ctx = sh->context; switch(cmd) { diff -ur vanilla/libmpcodecs/vd_qtrpza.c mod/libmpcodecs/vd_qtrpza.c --- vanilla/libmpcodecs/vd_qtrpza.c Sat Mar 16 02:10:31 2002 +++ mod/libmpcodecs/vd_qtrpza.c Sat Jul 27 17:21:15 2002 @@ -18,7 +18,7 @@ LIBVD_EXTERN(qtrpza) // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ return CONTROL_UNKNOWN; } diff -ur vanilla/libmpcodecs/vd_qtsmc.c mod/libmpcodecs/vd_qtsmc.c --- vanilla/libmpcodecs/vd_qtsmc.c Sat Mar 16 02:10:31 2002 +++ mod/libmpcodecs/vd_qtsmc.c Sat Jul 27 17:45:37 2002 @@ -18,7 +18,7 @@ LIBVD_EXTERN(qtsmc) // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ return CONTROL_UNKNOWN; } diff -ur vanilla/libmpcodecs/vd_raw.c mod/libmpcodecs/vd_raw.c --- vanilla/libmpcodecs/vd_raw.c Sun Jul 7 18:25:36 2002 +++ mod/libmpcodecs/vd_raw.c Sat Jul 27 17:44:52 2002 @@ -18,7 +18,7 @@ LIBVD_EXTERN(raw) // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ switch(cmd){ case VDCTRL_QUERY_FORMAT: if( (*((int*)arg)) == (sh->bih ? sh->bih->biCompression : sh->format) ) return CONTROL_TRUE; diff -ur vanilla/libmpcodecs/vd_real.c mod/libmpcodecs/vd_real.c --- vanilla/libmpcodecs/vd_real.c Thu Jul 18 01:28:37 2002 +++ mod/libmpcodecs/vd_real.c Sat Jul 27 17:20:17 2002 @@ -52,7 +52,7 @@ #endif // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ // switch(cmd){ // case VDCTRL_QUERY_MAX_PP_LEVEL: // return 9; diff -ur vanilla/libmpcodecs/vd_rle.c mod/libmpcodecs/vd_rle.c --- vanilla/libmpcodecs/vd_rle.c Sun Mar 31 12:11:49 2002 +++ mod/libmpcodecs/vd_rle.c Sat Jul 27 18:05:39 2002 @@ -18,7 +18,7 @@ LIBVD_EXTERN(msrle) // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ return CONTROL_UNKNOWN; } diff -ur vanilla/libmpcodecs/vd_roqvideo.c mod/libmpcodecs/vd_roqvideo.c --- vanilla/libmpcodecs/vd_roqvideo.c Sat Mar 16 02:10:31 2002 +++ mod/libmpcodecs/vd_roqvideo.c Sat Jul 27 17:45:46 2002 @@ -20,7 +20,7 @@ #include "roqav.h" // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ return CONTROL_UNKNOWN; } diff -ur vanilla/libmpcodecs/vd_svq1.c mod/libmpcodecs/vd_svq1.c --- vanilla/libmpcodecs/vd_svq1.c Sun Jun 23 13:34:54 2002 +++ mod/libmpcodecs/vd_svq1.c Sat Jul 27 17:47:08 2002 @@ -20,7 +20,7 @@ #include "native/svq1.h" // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ return CONTROL_UNKNOWN; } diff -ur vanilla/libmpcodecs/vd_vfw.c mod/libmpcodecs/vd_vfw.c --- vanilla/libmpcodecs/vd_vfw.c Thu May 30 02:26:23 2002 +++ mod/libmpcodecs/vd_vfw.c Sat Jul 27 17:22:53 2002 @@ -38,7 +38,7 @@ #undef info // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ switch(cmd){ case VDCTRL_QUERY_MAX_PP_LEVEL: return 9; diff -ur vanilla/libmpcodecs/vd_xanim.c mod/libmpcodecs/vd_xanim.c --- vanilla/libmpcodecs/vd_xanim.c Sun Jun 23 17:15:31 2002 +++ mod/libmpcodecs/vd_xanim.c Sat Jul 27 18:05:23 2002 @@ -22,7 +22,7 @@ #include "xacodec.h" // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ return CONTROL_UNKNOWN; } diff -ur vanilla/libmpcodecs/vd_xvid.c mod/libmpcodecs/vd_xvid.c --- vanilla/libmpcodecs/vd_xvid.c Fri Jul 26 18:20:45 2002 +++ mod/libmpcodecs/vd_xvid.c Sat Jul 27 18:04:41 2002 @@ -40,7 +40,7 @@ }; // to set/get/query special features/parameters -static int control(sh_video_t *sh,int cmd,void* arg,...){ +static int control(sh_video_t *sh,int cmd,void* arg){ return CONTROL_UNKNOWN; } diff -ur vanilla/libmpcodecs/vd_zlib.c mod/libmpcodecs/vd_zlib.c --- vanilla/libmpcodecs/vd_zlib.c Sat Jun 8 00:43:26 2002 +++ mod/libmpcodecs/vd_zlib.c Sat Jul 27 17:46:51 2002 @@ -29,7 +29,7 @@ } vd_zlib_ctx; // to set/get/query special features/parameters -static int control(sh_video_t *sh, int cmd, void *arg, ...) +static int control(sh_video_t *sh, int cmd, void *arg) { vd_zlib_ctx *ctx = sh->context; switch(cmd) diff -ur vanilla/libmpcodecs/vf.h mod/libmpcodecs/vf.h --- vanilla/libmpcodecs/vf.h Fri Jul 26 18:20:45 2002 +++ mod/libmpcodecs/vf.h Sat Jul 27 18:04:00 2002 @@ -24,7 +24,7 @@ int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt); int (*control)(struct vf_instance_s* vf, - int request, void* data, ...); + int request, void* data); int (*query_format)(struct vf_instance_s* vf, unsigned int fmt); void (*get_image)(struct vf_instance_s* vf, @@ -45,6 +45,18 @@ // control codes: #include "mpc_info.h" + +typedef struct vf_seteq_s +{ + char *item; + int value; +} vf_seteq_t; + +typedef struct vf_geteq_s +{ + char *item; + int *value; +} vf_geteq_t; #define VFCTRL_QUERY_MAX_PP_LEVEL 4 /* test for postprocessing support (max level) */ #define VFCTRL_SET_PP_LEVEL 5 /* set postprocessing level */ diff -ur vanilla/libmpcodecs/vf_vo.c mod/libmpcodecs/vf_vo.c --- vanilla/libmpcodecs/vf_vo.c Fri Jul 26 18:20:46 2002 +++ mod/libmpcodecs/vf_vo.c Sat Jul 27 19:19:39 2002 @@ -1,7 +1,6 @@ #include #include #include -#include #include "../config.h" #include "../mp_msg.h" @@ -47,7 +46,7 @@ return 1; } -static int control(struct vf_instance_s* vf, int request, void* data, ...) +static int control(struct vf_instance_s* vf, int request, void* data) { switch(request){ #ifdef USE_OSD @@ -58,25 +57,13 @@ #endif case VFCTRL_SET_EQUALIZER: { - va_list ap; - int value; - if(!vo_config_count) return CONTROL_FALSE; // vo not configured? - va_start(ap, data); - value = va_arg(ap, int); - va_end(ap); - return((video_out->control(VOCTRL_SET_EQUALIZER, data, (int *)value) == VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE); + return((video_out->control(VOCTRL_SET_EQUALIZER, data) == VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE); } case VFCTRL_GET_EQUALIZER: { - va_list ap; - int *value; - if(!vo_config_count) return CONTROL_FALSE; // vo not configured? - va_start(ap, data); - value = va_arg(ap, int); - va_end(ap); - return((video_out->control(VOCTRL_GET_EQUALIZER, data, value) == VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE); + return((video_out->control(VOCTRL_GET_EQUALIZER, data) == VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE); } } // return video_out->control(request,data); diff -ur vanilla/libvo/mga_common.c mod/libvo/mga_common.c --- vanilla/libvo/mga_common.c Fri Jul 26 18:20:57 2002 +++ mod/libvo/mga_common.c Sat Jul 27 18:13:42 2002 @@ -218,7 +218,7 @@ printf( "Error in mga_vid_config ioctl (wrong mga_vid.o version?)" ); } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_QUERY_FORMAT: @@ -227,11 +227,10 @@ return get_image(data); case VOCTRL_SET_EQUALIZER: { - va_list ap; - short value; + vo_seteq_t* eq = ((vo_seteq_t*)data); uint32_t luma,prev; - if ( strcmp( data,"brightness" ) && strcmp( data,"contrast" ) ) return VO_FALSE; + if ( strcmp( eq->item,"brightness" ) && strcmp( eq->item,"contrast" ) ) return VO_FALSE; if (ioctl(f,MGA_VID_GET_LUMA,&prev)) { perror("Error in mga_vid_config ioctl()"); @@ -241,18 +240,14 @@ // printf("GET: 0x%4X 0x%4X \n",(prev>>16),(prev&0xffff)); - va_start(ap, data); - value = va_arg(ap, int); - va_end(ap); - -// printf("value: %d -> ",value); - value=((value+100)*255)/200-128; // maps -100=>-128 and +100=>127 -// printf("%d \n",value); +// printf("value: %d -> ",eq->value); + value=((eq->value+100)*255)/200-128; // maps -100=>-128 and +100=>127 +// printf("%d \n",eq->value); - if(!strcmp(data,"contrast")) - luma = (prev&0xFFFF0000)|(value&0xFFFF); + if(!strcmp(eq->item,"contrast")) + luma = (prev&0xFFFF0000)|(eq->value&0xFFFF); else - luma = (prev&0xFFFF)|(value<<16); + luma = (prev&0xFFFF)|(eq->value<<16); if (ioctl(f,MGA_VID_SET_LUMA,luma)) { perror("Error in mga_vid_config ioctl()"); @@ -265,12 +260,11 @@ case VOCTRL_GET_EQUALIZER: { - va_list ap; - int * value; + vo_geteq_t* eq = ((vo_geteq_t*)data); short val; uint32_t luma; - if ( strcmp( data,"brightness" ) && strcmp( data,"contrast" ) ) return VO_FALSE; + if ( strcmp( eq->item,"brightness" ) && strcmp( eq->item,"contrast" ) ) return VO_FALSE; if (ioctl(f,MGA_VID_GET_LUMA,&luma)) { perror("Error in mga_vid_config ioctl()"); @@ -278,16 +272,12 @@ return VO_FALSE; } - if ( !strcmp( data,"contrast" ) ) + if ( !strcmp( eq->item,"contrast" ) ) val=(luma & 0xFFFF); else val=(luma >> 16); - va_start(ap, data); - value = va_arg(ap, int*); - va_end(ap); - - *value = (val*200)/255; + *eq->value = (val*200)/255; return VO_TRUE; } diff -ur vanilla/libvo/vesa_lvo.c mod/libvo/vesa_lvo.c --- vanilla/libvo/vesa_lvo.c Fri Jul 26 18:20:58 2002 +++ mod/libvo/vesa_lvo.c Sat Jul 27 18:07:47 2002 @@ -40,7 +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, ...); +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) ) @@ -292,7 +292,7 @@ return 1; } -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 -ur vanilla/libvo/video_out.h mod/libvo/video_out.h --- vanilla/libvo/video_out.h Fri Jul 26 18:21:00 2002 +++ mod/libvo/video_out.h Sat Jul 27 18:07:07 2002 @@ -61,6 +61,18 @@ #define VOFLAG_SWSCALE 0x04 #define VOFLAG_FLIPPING 0x08 +typedef struct vo_seteq_s +{ + char *item; + int value; +} vo_seteq_t; + +typedef struct vo_geteq_s +{ + char *item; + int *value; +} vo_geteq_t; + typedef struct vo_info_s { /* driver name ("Matrox Millennium G200/G400" */ @@ -141,7 +153,7 @@ /* * Control interface */ - uint32_t (*control)(uint32_t request, void *data, ...); + uint32_t (*control)(uint32_t request, void *data); /* * Return driver information. diff -ur vanilla/libvo/video_out_internal.h mod/libvo/video_out_internal.h --- vanilla/libvo/video_out_internal.h Sat Apr 13 21:14:33 2002 +++ mod/libvo/video_out_internal.h Sat Jul 27 17:29:17 2002 @@ -24,7 +24,7 @@ #include "../libmpcodecs/vfcap.h" #include "../libmpcodecs/mp_image.h" -static uint32_t control(uint32_t request, void *data, ...); +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 *); diff -ur vanilla/libvo/vo_3dfx.c mod/libvo/vo_3dfx.c --- vanilla/libvo/vo_3dfx.c Mon May 27 19:18:06 2002 +++ mod/libvo/vo_3dfx.c Sat Jul 27 17:30:22 2002 @@ -499,7 +499,7 @@ return 0; } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_QUERY_FORMAT: diff -ur vanilla/libvo/vo_aa.c mod/libvo/vo_aa.c --- vanilla/libvo/vo_aa.c Fri Jul 26 18:21:03 2002 +++ mod/libvo/vo_aa.c Sat Jul 27 17:38:00 2002 @@ -738,37 +738,26 @@ return 0; } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { 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; + vo_seteq_t* eq = ((vo_seteq_t*)data); + + if(strcmp(eq->item,"contrast") == 0) + p->contrast = ( eq->value+ 100 ) * 64 / 100; + else if(strcmp(eq->item,"brightness") == 0) + p->bright = ( eq->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); - - 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; + vo_geteq_t* eq = ((vo_geteq_t*)data); + if(strcmp(eq->item,"contrast") == 0) + *eq->value = (p->contrast - 64) * 100 / 64; + else if(strcmp(eq->item,"brightness") == 0) + *eq->value = (p->bright - 128) * 100 / 128; return VO_TRUE; } diff -ur vanilla/libvo/vo_dga.c mod/libvo/vo_dga.c --- vanilla/libvo/vo_dga.c Mon May 27 19:14:13 2002 +++ mod/libvo/vo_dga.c Sat Jul 27 17:34:39 2002 @@ -1175,7 +1175,7 @@ return 0; } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_QUERY_FORMAT: diff -ur vanilla/libvo/vo_directfb.c mod/libvo/vo_directfb.c --- vanilla/libvo/vo_directfb.c Fri Jul 12 12:27:08 2002 +++ mod/libvo/vo_directfb.c Sat Jul 27 18:08:01 2002 @@ -1792,7 +1792,7 @@ } #endif -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_QUERY_VAA: diff -ur vanilla/libvo/vo_dxr2.c mod/libvo/vo_dxr2.c --- vanilla/libvo/vo_dxr2.c Fri Jul 26 18:21:06 2002 +++ mod/libvo/vo_dxr2.c Sat Jul 27 18:08:17 2002 @@ -961,7 +961,7 @@ return 0; } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_QUERY_FORMAT: diff -ur vanilla/libvo/vo_dxr3.c mod/libvo/vo_dxr3.c --- vanilla/libvo/vo_dxr3.c Fri Jul 26 18:21:08 2002 +++ mod/libvo/vo_dxr3.c Sat Jul 27 18:14:13 2002 @@ -140,7 +140,7 @@ static int get_video_eq(vidix_video_eq_t *info); static int set_video_eq(vidix_video_eq_t *info); -uint32_t control(uint32_t request, void *data, ...) +uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_RESUME: @@ -183,21 +183,17 @@ } case VOCTRL_SET_EQUALIZER: { - va_list ap; - int value; + char *item = ((vo_seteq_t*)data)->item; + int value = ((vo_seteq_t*)data)->value; em8300_bcs_t bcs; - - 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")) + if (!strcasecmp(item, "brightness")) bcs.brightness = value; - else if (!strcasecmp(data, "contrast")) + else if (!strcasecmp(item, "contrast")) bcs.contrast = value; - else if (!strcasecmp(data, "saturation")) + else if (!strcasecmp(item, "saturation")) bcs.saturation = value; if (ioctl(fd_control, EM8300_IOCTL_SETBCS, &bcs) < 0) @@ -206,22 +202,18 @@ } case VOCTRL_GET_EQUALIZER: { - va_list ap; - int *value; + char *item = ((vo_geteq_t*)data)->item; + int* value = ((vo_geteq_t*)data)->value; em8300_bcs_t bcs; - 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")) + if (!strcasecmp(item, "brightness")) *value = bcs.brightness; - else if (!strcasecmp(data, "contrast")) + else if (!strcasecmp(item, "contrast")) *value = bcs.contrast; - else if (!strcasecmp(data, "saturation")) + else if (!strcasecmp(item, "saturation")) *value = bcs.saturation; return VO_TRUE; } diff -ur vanilla/libvo/vo_fbdev.c mod/libvo/vo_fbdev.c --- vanilla/libvo/vo_fbdev.c Mon May 27 19:54:46 2002 +++ mod/libvo/vo_fbdev.c Sat Jul 27 17:30:02 2002 @@ -1350,7 +1350,7 @@ return(-1); } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_QUERY_FORMAT: diff -ur vanilla/libvo/vo_fsdga.c mod/libvo/vo_fsdga.c --- vanilla/libvo/vo_fsdga.c Mon May 27 19:56:52 2002 +++ mod/libvo/vo_fsdga.c Sat Jul 27 17:30:26 2002 @@ -466,7 +466,7 @@ return 0; } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_QUERY_FORMAT: diff -ur vanilla/libvo/vo_ggi.c mod/libvo/vo_ggi.c --- vanilla/libvo/vo_ggi.c Fri Jul 26 18:21:09 2002 +++ mod/libvo/vo_ggi.c Sat Jul 27 18:07:34 2002 @@ -525,7 +525,7 @@ ggiExit(); } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch(request) { diff -ur vanilla/libvo/vo_gif89a.c mod/libvo/vo_gif89a.c --- vanilla/libvo/vo_gif89a.c Mon May 27 19:44:32 2002 +++ mod/libvo/vo_gif89a.c Sat Jul 27 17:30:38 2002 @@ -304,7 +304,7 @@ return 0; } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_QUERY_FORMAT: diff -ur vanilla/libvo/vo_gl.c mod/libvo/vo_gl.c --- vanilla/libvo/vo_gl.c Mon May 27 19:47:10 2002 +++ mod/libvo/vo_gl.c Sat Jul 27 17:34:47 2002 @@ -481,7 +481,7 @@ return 0; } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_QUERY_FORMAT: diff -ur vanilla/libvo/vo_gl2.c mod/libvo/vo_gl2.c --- vanilla/libvo/vo_gl2.c Mon May 27 19:48:54 2002 +++ mod/libvo/vo_gl2.c Sat Jul 27 17:34:58 2002 @@ -1108,7 +1108,7 @@ return 0; } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_QUERY_FORMAT: diff -ur vanilla/libvo/vo_jpeg.c mod/libvo/vo_jpeg.c --- vanilla/libvo/vo_jpeg.c Fri Jul 19 00:44:31 2002 +++ mod/libvo/vo_jpeg.c Sat Jul 27 17:38:49 2002 @@ -254,7 +254,7 @@ return 0; } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { diff -ur vanilla/libvo/vo_md5.c mod/libvo/vo_md5.c --- vanilla/libvo/vo_md5.c Sun Feb 17 09:24:43 2002 +++ mod/libvo/vo_md5.c Sat Jul 27 17:33:16 2002 @@ -114,7 +114,7 @@ return 0; } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_QUERY_FORMAT: diff -ur vanilla/libvo/vo_mpegpes.c mod/libvo/vo_mpegpes.c --- vanilla/libvo/vo_mpegpes.c Sun Jun 2 23:00:38 2002 +++ mod/libvo/vo_mpegpes.c Sat Jul 27 17:33:26 2002 @@ -341,7 +341,7 @@ { } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_QUERY_FORMAT: diff -ur vanilla/libvo/vo_null.c mod/libvo/vo_null.c --- vanilla/libvo/vo_null.c Sat Apr 13 21:14:33 2002 +++ mod/libvo/vo_null.c Sat Jul 27 17:29:30 2002 @@ -103,7 +103,7 @@ return 0; } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_QUERY_FORMAT: diff -ur vanilla/libvo/vo_odivx.c mod/libvo/vo_odivx.c --- vanilla/libvo/vo_odivx.c Sun Feb 17 09:24:43 2002 +++ mod/libvo/vo_odivx.c Sat Jul 27 17:30:30 2002 @@ -276,7 +276,7 @@ return 0; } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_QUERY_FORMAT: diff -ur vanilla/libvo/vo_pgm.c mod/libvo/vo_pgm.c --- vanilla/libvo/vo_pgm.c Sun Feb 17 09:24:43 2002 +++ mod/libvo/vo_pgm.c Sat Jul 27 17:29:43 2002 @@ -146,7 +146,7 @@ return 0; } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_QUERY_FORMAT: diff -ur vanilla/libvo/vo_png.c mod/libvo/vo_png.c --- vanilla/libvo/vo_png.c Mon May 20 02:25:44 2002 +++ mod/libvo/vo_png.c Sat Jul 27 17:38:41 2002 @@ -303,7 +303,7 @@ return 0; } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_QUERY_FORMAT: diff -ur vanilla/libvo/vo_sdl.c mod/libvo/vo_sdl.c --- vanilla/libvo/vo_sdl.c Sun Jun 16 04:01:53 2002 +++ mod/libvo/vo_sdl.c Sat Jul 27 17:39:00 2002 @@ -1682,7 +1682,7 @@ return VO_FALSE; } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { struct sdl_priv_s *priv = &sdl_priv; switch (request) { diff -ur vanilla/libvo/vo_svga.c mod/libvo/vo_svga.c --- vanilla/libvo/vo_svga.c Thu Jun 27 20:09:32 2002 +++ mod/libvo/vo_svga.c Sat Jul 27 17:30:06 2002 @@ -97,7 +97,7 @@ return 0; } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_QUERY_FORMAT: diff -ur vanilla/libvo/vo_syncfb.c mod/libvo/vo_syncfb.c --- vanilla/libvo/vo_syncfb.c Sun Feb 17 09:24:43 2002 +++ mod/libvo/vo_syncfb.c Sat Jul 27 17:30:17 2002 @@ -459,7 +459,7 @@ return 0; } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_QUERY_FORMAT: diff -ur vanilla/libvo/vo_tdfxfb.c mod/libvo/vo_tdfxfb.c --- vanilla/libvo/vo_tdfxfb.c Sat Apr 13 21:14:33 2002 +++ mod/libvo/vo_tdfxfb.c Sat Jul 27 17:31:18 2002 @@ -451,7 +451,7 @@ return VO_TRUE; } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch(request) { case VOCTRL_GET_IMAGE: diff -ur vanilla/libvo/vo_vesa.c mod/libvo/vo_vesa.c --- vanilla/libvo/vo_vesa.c Mon May 27 17:45:02 2002 +++ mod/libvo/vo_vesa.c Sat Jul 27 17:30:12 2002 @@ -946,7 +946,7 @@ return pre_init_err; } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_QUERY_FORMAT: diff -ur vanilla/libvo/vo_x11.c mod/libvo/vo_x11.c --- vanilla/libvo/vo_x11.c Thu Jul 11 18:14:55 2002 +++ mod/libvo/vo_x11.c Sat Jul 27 17:33:37 2002 @@ -632,7 +632,7 @@ return 0; } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_QUERY_FORMAT: diff -ur vanilla/libvo/vo_xv.c mod/libvo/vo_xv.c --- vanilla/libvo/vo_xv.c Fri Jul 26 18:21:16 2002 +++ mod/libvo/vo_xv.c Sat Jul 27 17:34:08 2002 @@ -830,7 +830,7 @@ return 0; } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_QUERY_FORMAT: @@ -862,25 +862,11 @@ 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(xv_set_eq(data, value)); + return(xv_set_eq(((vo_seteq_t*)data)->item, ((vo_seteq_t*)data)->value)); } case VOCTRL_GET_EQUALIZER: { - va_list ap; - int *value; - - va_start(ap, data); - value = va_arg(ap, int*); - va_end(ap); - - return(xv_get_eq(data, value)); + return(xv_get_eq(((vo_geteq_t*)data)->item, ((vo_geteq_t*)data)->value)); } } return VO_NOTIMPL; diff -ur vanilla/libvo/vo_xvidix.c mod/libvo/vo_xvidix.c --- vanilla/libvo/vo_xvidix.c Fri Jul 26 18:21:18 2002 +++ mod/libvo/vo_xvidix.c Sat Jul 27 17:39:58 2002 @@ -429,7 +429,7 @@ return(0); } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_QUERY_FORMAT: @@ -450,25 +450,11 @@ 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, (int *)value); + return vidix_control(request, ((vo_seteq_t*)data)->item, ((vo_seteq_t*)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, ((vo_geteq_t*)data)->item, ((vo_geteq_t*)data)->value); } } return vidix_control(request, data); diff -ur vanilla/libvo/vo_yuv4mpeg.c mod/libvo/vo_yuv4mpeg.c --- vanilla/libvo/vo_yuv4mpeg.c Sat Jul 6 17:20:34 2002 +++ mod/libvo/vo_yuv4mpeg.c Sat Jul 27 17:30:34 2002 @@ -454,7 +454,7 @@ return 0; } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_QUERY_FORMAT: diff -ur vanilla/libvo/vo_zr.c mod/libvo/vo_zr.c --- vanilla/libvo/vo_zr.c Thu May 30 13:20:58 2002 +++ mod/libvo/vo_zr.c Sat Jul 27 18:07:54 2002 @@ -702,7 +702,7 @@ return 0; } -static uint32_t control(uint32_t request, void *data, ...) +static uint32_t control(uint32_t request, void *data) { switch (request) { case VOCTRL_QUERY_FORMAT: diff -ur vanilla/libvo/vosub_vidix.c mod/libvo/vosub_vidix.c --- vanilla/libvo/vosub_vidix.c Fri Jul 26 18:21:19 2002 +++ mod/libvo/vosub_vidix.c Sat Jul 27 17:43:11 2002 @@ -668,7 +668,7 @@ 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: @@ -686,36 +686,32 @@ return VO_TRUE; case VOCTRL_SET_EQUALIZER: { - va_list ap; - int value; + vo_seteq_t *eq = (vo_seteq_t*)data; 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); +// printf("vidix seteq %s -> %d \n",eq->item,eq->value); /* vidix eq ranges are -1000..1000 */ - if (!strcasecmp(data, "brightness")) + if (!strcasecmp(eq->item, "brightness")) { - info.brightness = value*10; + info.brightness = eq->value*10; info.cap = VEQ_CAP_BRIGHTNESS; } - else if (!strcasecmp(data, "contrast")) + else if (!strcasecmp(eq->item, "contrast")) { - info.contrast = value*10; + info.contrast = eq->value*10; info.cap = VEQ_CAP_CONTRAST; } - else if (!strcasecmp(data, "saturation")) + else if (!strcasecmp(eq->item, "saturation")) { - info.saturation = value*10; + info.saturation = eq->value*10; info.cap = VEQ_CAP_SATURATION; } - else if (!strcasecmp(data, "hue")) + else if (!strcasecmp(eq->item, "hue")) { - info.hue = value*10; + info.hue = eq->value*10; info.cap = VEQ_CAP_HUE; } @@ -725,38 +721,33 @@ } case VOCTRL_GET_EQUALIZER: { - va_list ap; - int *value; + vo_geteq_t *eq = (vo_geteq_t*)data; 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); /* vidix eq ranges are -1000..1000 */ - if (!strcasecmp(data, "brightness")) + if (!strcasecmp(eq->item, "brightness")) { if (info.cap & VEQ_CAP_BRIGHTNESS) - *value = info.brightness/10; + *eq->value = info.brightness/10; } - else if (!strcasecmp(data, "contrast")) + else if (!strcasecmp(eq->item, "contrast")) { if (info.cap & VEQ_CAP_CONTRAST) - *value = info.contrast/10; + *eq->value = info.contrast/10; } - else if (!strcasecmp(data, "saturation")) + else if (!strcasecmp(eq->item, "saturation")) { if (info.cap & VEQ_CAP_SATURATION) - *value = info.saturation/10; + *eq->value = info.saturation/10; } - else if (!strcasecmp(data, "hue")) + else if (!strcasecmp(eq->item, "hue")) { if (info.cap & VEQ_CAP_HUE) - *value = info.hue/10; + *eq->value = info.hue/10; } return VO_TRUE;