From owner-freebsd-multimedia Fri Feb 15 20:15:38 2002 Delivered-To: freebsd-multimedia@freebsd.org Received: from Mail6.nc.rr.com (fe6.southeast.rr.com [24.93.67.53]) by hub.freebsd.org (Postfix) with ESMTP id 01C5137B41A for ; Fri, 15 Feb 2002 20:15:32 -0800 (PST) Received: from stealth.cary.dummynet ([66.26.231.240]) by Mail6.nc.rr.com with Microsoft SMTPSVC(5.5.1877.687.68); Fri, 15 Feb 2002 22:35:08 -0500 Received: (from rhh@localhost) by stealth.cary.dummynet (8.11.4/8.11.4) id g1G3ZoT03615 for multimedia@freebsd.org; Fri, 15 Feb 2002 22:35:50 -0500 (EST) (envelope-from aa8vb@nc.rr.com) X-Authentication-Warning: stealth.cary.dummynet: rhh set sender to aa8vb@nc.rr.com using -f Date: Fri, 15 Feb 2002 22:35:50 -0500 From: Randall Hopper To: multimedia@freebsd.org Subject: Re: Msg for "Teardrop Sky" (Fwd: Re: fxtv remote (shell) controller) Message-ID: <20020215223550.A3589@nc.rr.com> References: <20020215223427.A3488@nc.rr.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="d6Gm4EdcadzBjdND" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020215223427.A3488@nc.rr.com>; from aa8vb@nc.rr.com on Fri, Feb 15, 2002 at 10:34:27PM -0500 Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --d6Gm4EdcadzBjdND Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Randall Hopper: | Hopefully he monitors this list (he mailed me for fxtv help with what |seems to be a bogus e-mail address...) ... |Randall Hopper: |> Compile the attached program (cc -o setchannel setchannel.c) and then just |> provide a channel number on the command line (e.g. setchannel 40). Darn. Deleted the attachment before mailing. Here it is. Randall -- Randall Hopper aa8vb@nc.rr.com --d6Gm4EdcadzBjdND Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="setchannel.c" #include #include #include #include /****************************************************************************/ /* setchannel.c - Set the channel of the bktr tuner card. */ /* */ /* COMPILE WITH: cc -o setchannel setchannel.c */ /****************************************************************************/ int main( int argc, char *argv[] ) { int tfd; long channel; if ( argc != 2 ) { fprintf( stderr, "Must specify channel number on command line\n" ); exit(1); } channel = atoi( argv[1] ); tfd = open( "/dev/tuner0", O_RDONLY ); if ( tfd < 0 ) { perror( "open() of /dev/tuner0 failed." ); exit(1); } if ( ioctl( tfd, TVTUNER_SETCHNL, &channel ) < 0 ) { perror( "ioctl( tfd, TVTUNER_SETCHNL ) failed." ); return; } close( tfd ); } --d6Gm4EdcadzBjdND-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message