comparison 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
comparison
equal deleted inserted replaced
33300:c7ebb0b711a6 33301:899d817e56fc
27 #include <stdlib.h> 27 #include <stdlib.h>
28 #include <errno.h> 28 #include <errno.h>
29 #include "config.h" 29 #include "config.h"
30 #include "video_out.h" 30 #include "video_out.h"
31 #include "video_out_internal.h" 31 #include "video_out_internal.h"
32 #include "libmpcodecs/vf.h"
32 #include "fastmemcpy.h" 33 #include "fastmemcpy.h"
33 #include "input/input.h" 34 #include "input/input.h"
34 #include "libmpcodecs/vd.h" 35 #include "libmpcodecs/vd.h"
35 #include "osdep/keycodes.h" 36 #include "osdep/keycodes.h"
36 #include "input/mouse.h" 37 #include "input/mouse.h"
1564 break; 1565 break;
1565 } 1566 }
1566 return VO_TRUE; 1567 return VO_TRUE;
1567 } 1568 }
1568 case VOCTRL_SET_EQUALIZER: { 1569 case VOCTRL_SET_EQUALIZER: {
1569 va_list ap; 1570 vf_equalizer_t *eq=data;
1570 int value; 1571 return color_ctrl_set(eq->item, eq->value);
1571
1572 va_start(ap, data);
1573 value = va_arg(ap, int);
1574 va_end(ap);
1575 return color_ctrl_set(data, value);
1576 } 1572 }
1577 case VOCTRL_GET_EQUALIZER: { 1573 case VOCTRL_GET_EQUALIZER: {
1578 va_list ap; 1574 vf_equalizer_t *eq=data;
1579 int *value; 1575 return color_ctrl_get(eq->item, &eq->value);
1580
1581 va_start(ap, data);
1582 value = va_arg(ap, int*);
1583 va_end(ap);
1584 return color_ctrl_get(data, value);
1585 } 1576 }
1586 case VOCTRL_UPDATE_SCREENINFO: 1577 case VOCTRL_UPDATE_SCREENINFO:
1587 if (vidmode) { 1578 if (vidmode) {
1588 vo_screenwidth = vm_width; 1579 vo_screenwidth = vm_width;
1589 vo_screenheight = vm_height; 1580 vo_screenheight = vm_height;