summaryrefslogtreecommitdiffstats
path: root/stream/tv.c
diff options
context:
space:
mode:
authorvoroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-09-18 16:28:39 +0000
committervoroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-09-18 16:28:39 +0000
commitfdb78c2bea9e2e3bb2b5e01c6c3564dadbf83aba (patch)
tree57cd668f17b6558892f2febd8a95b0fdc4afb53c /stream/tv.c
parent04586de1ddc3ddbb52165b97c2262b65c9e41813 (diff)
downloadmpv-fdb78c2bea9e2e3bb2b5e01c6c3564dadbf83aba.tar.bz2
mpv-fdb78c2bea9e2e3bb2b5e01c6c3564dadbf83aba.tar.xz
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
Diffstat (limited to 'stream/tv.c')
-rw-r--r--stream/tv.c4
1 files changed, 4 insertions, 0 deletions
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;