Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 May 2003 14:00:32 -0500
From:      Matthew Reimer <mreimer@vpop.net>
To:        ports@freebsd.org
Subject:   Re: ffmpeg w/bktr no sound
Message-ID:  <3EC29250.7020508@vpop.net>

next in thread | raw e-mail | index | archive | help
Audio recording wasn't working for me, so I started poking around and
finally came up with a hack that made audio recording work. Apparently
the audio wasn't getting initialized properly; the fix seems to be to
issue TVTUNER_SETTYPE and a TVTUNER_SETCHNL ioctls like the pseudo-patch
below. Of course the channel set shouldn't be hard-coded.

Hopefully this will work for you Pete.

Matt

--- grab_bsdbktr.c  Thu Feb 27 11:43:18 2003
+++ grab_bsdbktr.c  Thu Feb 27 14:08:51 2003
@@ -139,6 +140,17 @@
                 perror ("METEORSINPUT");
                 return -EIO;
         }
+
+/* HACK */
+{
+  int d;
+
+  ioctl(s->tuner_fd, TVTUNER_GETCHNL, &d);
+
+  c = CHNLSET_NABCST;
+  ioctl(s->tuner_fd, TVTUNER_SETTYPE, &c);
+
+  ioctl(s->tuner_fd, TVTUNER_SETCHNL, &d);
+}
+
         video_buf = mmap((caddr_t)0, width*height*3, PROT_READ, MAP_SHARED,
                          video_fd, (off_t) 0);
         if (video_buf == MAP_FAILED) {




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3EC29250.7020508>