[Mplayer-cvslog] CVS: main/libmpdemux ai_alsa.c,1.1,1.2 audio_in.c,1.1,1.2 tvi_v4l.c,1.25,1.26
Arpi of Ize
arpi at mplayerhq.hu
Fri Aug 23 01:06:01 CEST 2002
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv9698/libmpdemux
Modified Files:
ai_alsa.c audio_in.c tvi_v4l.c
Log Message:
v4l capture update by Jindrich Makovicka <makovick at kmlinux.fjfi.cvut.cz>
some silly bugs slipped through.. here is the fix
Index: ai_alsa.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/ai_alsa.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ai_alsa.c 21 Aug 2002 22:50:40 -0000 1.1
+++ ai_alsa.c 22 Aug 2002 23:05:58 -0000 1.2
@@ -105,7 +105,7 @@
err = snd_pcm_open(&ai->alsa.handle, ai->alsa.device, SND_PCM_STREAM_CAPTURE, 0);
if (err < 0) {
- mp_msg(MSGT_TV, MSGL_ERR, "Error opening audio");
+ mp_msg(MSGT_TV, MSGL_ERR, "Error opening audio: %s\n", snd_strerror(err));
return -1;
}
Index: audio_in.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/audio_in.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- audio_in.c 21 Aug 2002 22:50:40 -0000 1.1
+++ audio_in.c 22 Aug 2002 23:05:58 -0000 1.2
@@ -106,7 +106,7 @@
ai->alsa.device = strdup(device);
/* mplayer cannot handle colons in arguments */
for (i = 0; i < strlen(ai->alsa.device); i++) {
- if (ai->alsa.device[i] == ',') ai->alsa.device[i] = ':';
+ if (ai->alsa.device[i] == '.') ai->alsa.device[i] = ':';
}
return 0;
#endif
Index: tvi_v4l.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/tvi_v4l.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- tvi_v4l.c 21 Aug 2002 21:31:20 -0000 1.25
+++ tvi_v4l.c 22 Aug 2002 23:05:58 -0000 1.26
@@ -298,7 +298,6 @@
ioctl(priv->video_fd, VIDIOCSAUDIO, &priv->audio[i]);
}
- priv->audio[i].audio = i;
if (ioctl(priv->video_fd, VIDIOCGAUDIO, &priv->audio[i]) == -1)
{
mp_msg(MSGT_TV, MSGL_ERR, "ioctl get audio failed: %s\n", strerror(errno));
@@ -338,13 +337,6 @@
if (tv_param_immediate == 1)
tv_param_noaudio = 1;
- if (!tv_param_noaudio) {
- }
-
- if (priv->audio_device) {
- audio_in_set_device(&priv->audio_in, priv->audio_device);
- }
-
priv->video_ringbuffer = NULL;
priv->video_timebuffer = NULL;
priv->audio_ringbuffer = NULL;
@@ -477,6 +469,10 @@
audio_in_init(&priv->audio_in, AUDIO_IN_OSS);
#endif
+ if (priv->audio_device) {
+ audio_in_set_device(&priv->audio_in, priv->audio_device);
+ }
+
if (tv_param_audio_id < priv->capability.audios)
priv->audio_id = tv_param_audio_id;
else
@@ -704,6 +700,12 @@
if (priv->audio[priv->audio_id].volume <= 0)
priv->audio[priv->audio_id].volume = 100;
priv->audio[priv->audio_id].flags &= ~VIDEO_AUDIO_MUTE;
+ mp_msg(MSGT_TV, MSGL_V, "Starting audio capture\n");
+ mp_msg(MSGT_TV, MSGL_V, "id=%d volume=%d bass=%d treble=%d balance=%d mode=%s\n",
+ priv->audio_id,
+ priv->audio[priv->audio_id].volume, priv->audio[priv->audio_id].bass, priv->audio[priv->audio_id].treble,
+ priv->audio[priv->audio_id].balance, audio_mode2name[priv->audio[priv->audio_id].mode]);
+ mp_msg(MSGT_TV, MSGL_V, " channels: %d\n", priv->audio_channels[priv->audio_id]);
ioctl(priv->video_fd, VIDIOCSAUDIO, &priv->audio[priv->audio_id]);
/* launch capture threads */
More information about the MPlayer-cvslog
mailing list