summaryrefslogtreecommitdiffstats
path: root/libmpdemux/tvi_v4l.c
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-11-11 15:45:23 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-11-11 15:45:23 +0000
commit9743ad6832946ce55fdac12a31b591dbfadf49aa (patch)
tree54bd05a09861c7914de507c7019f48ce1bb24d37 /libmpdemux/tvi_v4l.c
parentee898ac2f938393b8d8106db9780ebde2e267cb1 (diff)
downloadmpv-9743ad6832946ce55fdac12a31b591dbfadf49aa.tar.bz2
mpv-9743ad6832946ce55fdac12a31b591dbfadf49aa.tar.xz
tuning worx (can set frequency)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2838 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/tvi_v4l.c')
-rw-r--r--libmpdemux/tvi_v4l.c33
1 files changed, 26 insertions, 7 deletions
diff --git a/libmpdemux/tvi_v4l.c b/libmpdemux/tvi_v4l.c
index f88746c088..2d7fbda456 100644
--- a/libmpdemux/tvi_v4l.c
+++ b/libmpdemux/tvi_v4l.c
@@ -327,6 +327,7 @@ err:
static int uninit(priv_t *priv)
{
+ close(priv->fd);
#warning "Implement uninit!"
}
@@ -368,13 +369,31 @@ static int start(priv_t *priv)
priv->buf[i].height = priv->height;
mp_msg(MSGT_TV, MSGL_DBG2, "buffer: %d => %p\n", i, &priv->buf[i]);
}
-
+
+
+#if 0
+ {
+ struct video_window win;
+
+ win.x = 0;
+ win.y = 0;
+ win.width = priv->width;
+ win.height = priv->height;
+ win.chromakey = -1;
+ win.flags = 0;
+
+ ioctl(priv->fd, VIDIOCSWIN, &win);
+ }
+
/* start capture */
if (ioctl(priv->fd, VIDIOCCAPTURE, &one) == -1)
{
mp_msg(MSGT_TV, MSGL_ERR, "ioctl capture failed: %s\n", strerror(errno));
return(0);
}
+#endif
+
+ return(1);
}
static int control(priv_t *priv, int cmd, void *arg)
@@ -490,8 +509,8 @@ static int control(priv_t *priv, int cmd, void *arg)
}
/* tuner uses khz not mhz ! */
- if (priv->tuner.flags & VIDEO_TUNER_LOW)
- freq /= 1000;
+// if (priv->tuner.flags & VIDEO_TUNER_LOW)
+// freq /= 1000;
(unsigned long)*(void **)arg = freq;
return(TVI_CONTROL_TRUE);
}
@@ -500,12 +519,12 @@ static int control(priv_t *priv, int cmd, void *arg)
/* argument is in MHz ! */
unsigned long freq = (unsigned long)*(void **)arg;
- mp_msg(MSGT_TV, MSGL_V, "requested frequency: %lu MHz\n", (float)freq/16);
+ mp_msg(MSGT_TV, MSGL_V, "requested frequency: %.3f\n", (float)freq/16);
/* tuner uses khz not mhz ! */
- if (priv->tuner.flags & VIDEO_TUNER_LOW)
- freq *= 1000;
- mp_msg(MSGT_TV, MSGL_V, " requesting from driver: freq=%.3f\n", (float)freq/16);
+// if (priv->tuner.flags & VIDEO_TUNER_LOW)
+// freq *= 1000;
+// mp_msg(MSGT_TV, MSGL_V, " requesting from driver: freq=%.3f\n", (float)freq/16);
if (ioctl(priv->fd, VIDIOCSFREQ, &freq) == -1)
{
mp_msg(MSGT_TV, MSGL_ERR, "ioctl set freq failed: %s\n", strerror(errno));