Mercurial > mplayer.hg
diff libvo/vo_gl2.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_gl2.c Fri May 06 10:12:54 2011 +0000 +++ b/libvo/vo_gl2.c Fri May 06 10:32:46 2011 +0000 @@ -29,6 +29,7 @@ #include "subopt-helper.h" #include "video_out.h" #include "video_out_internal.h" +#include "libmpcodecs/vf.h" #include "sub/sub.h" #include "gl_common.h" @@ -915,23 +916,13 @@ #ifdef CONFIG_GL_X11 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); + vf_equalizer_t *eq=data; + return vo_x11_set_equalizer(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 vo_x11_get_equalizer(data, value); + vf_equalizer_t *eq=data; + return vo_x11_get_equalizer(eq->item, &eq->value); } #endif case VOCTRL_UPDATE_SCREENINFO: