From fdb78c2bea9e2e3bb2b5e01c6c3564dadbf83aba Mon Sep 17 00:00:00 2001 From: voroshil Date: Tue, 18 Sep 2007 16:28:39 +0000 Subject: Implement setting gain control for video devices (usually webcams) in v4l2 tv:// driver. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24573 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/tv.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'stream/tv.c') diff --git a/stream/tv.c b/stream/tv.c index be06149b1e..3315905930 100644 --- a/stream/tv.c +++ b/stream/tv.c @@ -759,6 +759,10 @@ no_audio: tv_set_color_options(tvh, TV_COLOR_SATURATION, tvh->tv_param->saturation); tv_set_color_options(tvh, TV_COLOR_CONTRAST, tvh->tv_param->contrast); + if(tvh->tv_param->gain!=-1) + if(funcs->control(tvh->priv,TVI_CONTROL_VID_SET_GAIN,&tvh->tv_param->gain)!=TVI_CONTROL_TRUE) + mp_msg(MSGT_TV,MSGL_WARN,"Unable to set gain control!\n"); + funcs->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param); return demuxer; -- cgit v1.2.3