Date: Wed, 05 Mar 2003 09:20:54 -0600 From: Matthew Reimer <mreimer@vpop.net> To: ports@freebsd.org Subject: PATCH: fix ffmpeg NTSC audio recording Message-ID: <3E6615D6.4030603@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 something like this will fix the problem for others as well. 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) { To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E6615D6.4030603>