comparison libmpcodecs/dec_video.c @ 6832:54578e5a8050

... removed from vf's control(), sing struct for equalizer. based on patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
author arpi
date Sun, 28 Jul 2002 21:30:09 +0000
parents 6ad5d182153c
children 66427e850216
comparison
equal deleted inserted replaced
6831:f628e5dca5b9 6832:54578e5a8050
75 } 75 }
76 76
77 int set_video_colors(sh_video_t *sh_video,char *item,int value) 77 int set_video_colors(sh_video_t *sh_video,char *item,int value)
78 { 78 {
79 vf_instance_t* vf=sh_video->vfilter; 79 vf_instance_t* vf=sh_video->vfilter;
80 vf_equalizer_t data;
81
82 data.item = item;
83 data.value = value;
80 84
81 mp_dbg(MSGT_DECVIDEO,MSGL_V,"set video colors %s=%d \n", item, value); 85 mp_dbg(MSGT_DECVIDEO,MSGL_V,"set video colors %s=%d \n", item, value);
82 if (vf) 86 if (vf)
83 { 87 {
84 int ret = vf->control(vf, VFCTRL_SET_EQUALIZER, item, (int *)value); 88 int ret = vf->control(vf, VFCTRL_SET_EQUALIZER, &data);
85 if (ret == CONTROL_TRUE) 89 if (ret == CONTROL_TRUE)
86 return(1); 90 return(1);
87 } 91 }
88 /* try software control */ 92 /* try software control */
89 if(mpvdec) 93 if(mpvdec)
94 } 98 }
95 99
96 int get_video_colors(sh_video_t *sh_video,char *item,int *value) 100 int get_video_colors(sh_video_t *sh_video,char *item,int *value)
97 { 101 {
98 vf_instance_t* vf=sh_video->vfilter; 102 vf_instance_t* vf=sh_video->vfilter;
103 vf_equalizer_t data;
104
105 data.item = item;
99 106
100 mp_dbg(MSGT_DECVIDEO,MSGL_V,"get video colors %s \n", item); 107 mp_dbg(MSGT_DECVIDEO,MSGL_V,"get video colors %s \n", item);
101 if (vf) 108 if (vf)
102 { 109 {
103 int ret = vf->control(vf, VFCTRL_GET_EQUALIZER, item, value); 110 int ret = vf->control(vf, VFCTRL_GET_EQUALIZER, &data);
104 if (ret == CONTROL_TRUE) 111 if (ret == CONTROL_TRUE){
112 *value = data.value;
105 return(1); 113 return(1);
114 }
106 } 115 }
107 /* try software control */ 116 /* try software control */
108 if(mpvdec) return mpvdec->control(sh_video,VDCTRL_GET_EQUALIZER, item, value); 117 if(mpvdec) return mpvdec->control(sh_video,VDCTRL_GET_EQUALIZER, item, value);
109 return 0; 118 return 0;
110 } 119 }