[MPlayer-users] [PATCH] reworked video capture - testers

Jindrich Makovicka makovick at KMLinux.fjfi.cvut.cz
Thu Aug 15 19:41:01 CEST 2002


On Wed, Aug 14, 2002 at 11:43:24PM +0200, WK wrote:
> I going send this message as separated thread cause I am not sure where is the 
> metter of problem - Is that by mencoder or my own system configuration.
> I use last cvs (14.08) with applied tv.patch.
> Tv screen looks ok (I have not to force color space and vc for input).
> Problem is about audio input.
> Even with tv.patch both - mencoder and mplayer sets and reads only mono mode
> as older mplayer versions with buggy audio enabled. I tied it for Line-in and 
> Cd switches.
> Messages out of mplayer is attached.
>  Xawtv reads and plays sound in stereo mode.

Actually there is no stereo support yet, as I have a mono-only card and
cannot test it.

However, you can try out this patch, if it changes something (please grab a
newest v4l patch from mplayer-dev).

-- 
Jindrich Makovicka
-------------- next part --------------
--- tvi_v4l.orig	Wed Aug 14 12:11:13 2002
+++ tvi_v4l.c	Thu Aug 15 19:18:19 2002
@@ -313,6 +313,16 @@
 	    mp_msg(MSGT_TV, MSGL_ERR, "ioctl get audio failed: %s\n", strerror(errno));
 	    break;
 	}
+	
+	// try setting stereo
+	priv->audio[i].mode = VIDEO_SOUND_STEREO;
+        ioctl(priv->video_fd, VIDIOCSAUDIO, &priv->audio[priv->audio_id]);
+
+	if (ioctl(priv->video_fd, VIDIOCGAUDIO, &priv->audio[i]) == -1)
+	{
+	    mp_msg(MSGT_TV, MSGL_ERR, "ioctl get audio failed: %s\n", strerror(errno));
+	    break;
+	}
 	    
 	switch(priv->audio[i].mode)
 	{
@@ -922,9 +932,9 @@
     priv->first = 1;
 
     /* enable audio */
-    if (priv->audio[i].volume <= 0)
-	priv->audio[i].volume = 100;
-    priv->audio[i].flags &= ~VIDEO_AUDIO_MUTE;
+    if (priv->audio[priv->audio_id].volume <= 0)
+	priv->audio[priv->audio_id].volume = 100;
+    priv->audio[priv->audio_id].flags &= ~VIDEO_AUDIO_MUTE;
     ioctl(priv->video_fd, VIDIOCSAUDIO, &priv->audio[i]);
 	    
     /* launch capture threads */


More information about the MPlayer-users mailing list