Mercurial > mplayer.hg
diff libvo/vo_directx.c @ 33301:899d817e56fc
Implement control() VOCTRL_SET/GET_EQUALIZER using a vf_equalize struct,
instead of employing vaarg. Do the same for vidix_control() too.
Simplifies a lot of code. Allows direct passing of the struct
from video filter system. Makes possible the complete removal
of vaarg from libvo.
Patch inspired by old work of uau.
author | iive |
---|---|
date | Fri, 06 May 2011 10:32:46 +0000 |
parents | 8fa2f43cb760 |
children | ddb45e9443ec |
line wrap: on
line diff
--- a/libvo/vo_directx.c Fri May 06 10:12:54 2011 +0000 +++ b/libvo/vo_directx.c Fri May 06 10:32:46 2011 +0000 @@ -29,6 +29,7 @@ #include "config.h" #include "video_out.h" #include "video_out_internal.h" +#include "libmpcodecs/vf.h" #include "fastmemcpy.h" #include "input/input.h" #include "libmpcodecs/vd.h" @@ -1566,22 +1567,12 @@ 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); + vf_equalizer_t *eq=data; + return color_ctrl_set(eq->item, eq->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); + vf_equalizer_t *eq=data; + return color_ctrl_get(eq->item, &eq->value); } case VOCTRL_UPDATE_SCREENINFO: if (vidmode) {