diff options
author | voroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-08-23 16:09:30 +0000 |
---|---|---|
committer | voroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-08-23 16:09:30 +0000 |
commit | f1fbca4bdd35b7ceb636dac0b979fa1acca9e609 (patch) | |
tree | c04e7a27a93c5e0600527963875dc00590c177e3 /stream/tvi_v4l.c | |
parent | ffac6ce7eba3dea5878f3eb482a11e9ab7606455 (diff) | |
download | mpv-f1fbca4bdd35b7ceb636dac0b979fa1acca9e609.tar.bz2 mpv-f1fbca4bdd35b7ceb636dac0b979fa1acca9e609.tar.xz |
Automatic TV channels scanning ability for MPlayer.
Code is based on patch from Otvos Attila oattila at chello dot hu
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24125 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/tvi_v4l.c')
-rw-r--r-- | stream/tvi_v4l.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/stream/tvi_v4l.c b/stream/tvi_v4l.c index bfcf62d916..adbdf927c7 100644 --- a/stream/tvi_v4l.c +++ b/stream/tvi_v4l.c @@ -1441,6 +1441,16 @@ static int control(priv_t *priv, int cmd, void *arg) return(TVI_CONTROL_TRUE); } + case TVI_CONTROL_TUN_GET_SIGNAL: + { + if (ioctl(priv->video_fd, VIDIOCGTUNER, &priv->tuner) == -1) + { + mp_msg(MSGT_TV, MSGL_ERR, "ioctl get tuner failed: %s\n", strerror(errno)); + return(TVI_CONTROL_FALSE); + } + *(int*)arg=100*(priv->tuner.signal>>8)/255; + return(TVI_CONTROL_TRUE); + } /* ========== AUDIO controls =========== */ case TVI_CONTROL_AUD_GET_FORMAT: |