Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Feb 1997 20:13:57 -0700
From:      Steve Passe <smp@csn.net>
To:        multimedia@freebsd.org
Cc:        Randall Hopper <rhh@ct.picker.com>
Subject:   Re: STB tuner 
Message-ID:  <199702280313.UAA00380@clem.systemsix.com>
In-Reply-To: Your message of "Thu, 27 Feb 1997 19:41:52 MST." <199702280241.TAA00216@clem.systemsix.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

opps, forgot to include chnl.c:

------------------------------------ cut -------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <sys/fcntl.h>
#include <unistd.h>
#include <errno.h>

#define TUNER
#include <machine/ioctl_meteor.h>


main(int ac, char **av)
{
	int x, ch;
        char s[ 128 ];
	int video;

	if ((video = open("/dev/bktr0", O_RDONLY)) < 0) {
		fprintf(stderr, "open failed: %s\n", strerror(errno));
		goto bybye;
	}

#if 0
	x = METEOR_INPUT_DEV1;
        if (ioctl(video, METEORSINPUT, &x) < 0) {
		fprintf(stderr, "ioctl failed: %s\n", strerror(errno));
		goto bybye;

	}
#endif

	while ( fgets( s, 100, stdin ) )
	{
		x = atoi( s );
	        if (ioctl(video, TVTUNER_SETCHNL, &x) < 0)
		{
			fprintf(stderr, "ioctl failed: %s\n", strerror(errno));
		}

        }

bybye:
	close(video);
	exit(0);
}
------------------------------------ cut -------------------------------------

--
Steve Passe	| powered by
smp@csn.net	|            FreeBSD




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