From owner-freebsd-ports Wed Mar 5 7:20:33 2003 Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE03037B406 for ; Wed, 5 Mar 2003 07:20:29 -0800 (PST) Received: from boromir.vpop.net (dns1.vpop.net [207.178.248.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CC1343F3F for ; Wed, 5 Mar 2003 07:20:29 -0800 (PST) (envelope-from mreimer@vpop.net) Received: from vpop.net (bilbo.vpop.net [65.103.33.41]) by boromir.vpop.net (Postfix) with ESMTP id 8A2683A5E46 for ; Wed, 5 Mar 2003 07:20:26 -0800 (PST) Message-ID: <3E6615D6.4030603@vpop.net> Date: Wed, 05 Mar 2003 09:20:54 -0600 From: Matthew Reimer Organization: VPOP Technologies, Inc. User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3b) Gecko/20030220 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ports@freebsd.org Subject: PATCH: fix ffmpeg NTSC audio recording Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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