#!/usr/bin/perl use strict ; use Pod::Usage ; use Getopt::Long qw/:config no_ignore_case/ ; ++$! ; use Linux::DVB::DVBT ; my ($help, $man, $DEBUG, $VERBOSE) ; GetOptions('v|verbose=s' => \$VERBOSE, 'debug=s' => \$DEBUG, 'h|help' => \$help, 'man' => \$man, ) or pod2usage(2) ; pod2usage(1) if $help; pod2usage(-verbose => 2) if $man; pod2usage("$0: No files given.") if (@ARGV == 0) ; Linux::DVB::DVBT->debug($DEBUG) ; Linux::DVB::DVBT->verbose(1) ; ## Create dvb (use first found adapter). ## NOTE: With default object settings, the application will ## die on *any* error, so there is no error checking in this script ## my $dvb = Linux::DVB::DVBT->new() ; ## Do the scan $dvb->scan_from_file($ARGV[0]) ; #================================================================================= # END #================================================================================= __END__ =head1 NAME dvbt-scan - Initialise DVBT channels =head1 SYNOPSIS dvbt-scan [options] frequency_file Options: -debug level set debug level -verbose level set verbosity level -help brief help message -man full documentation =head1 OPTIONS =over 8 =item B<-help> Print a brief help message and exits. =item B<-man> Prints the manual page and exits. =item B<-verbose> Set verbosity level. Higher values show more information. =item B<-debug> Set debug level. Higher levels show more debugging information (only really of any interest to developers!) =back =head1 DESCRIPTION Script that uses the perl Linux::DVB::DVBT package to provide DVB-T adapter functions. Runs the frequency scanning function to search for Freeview channels. Stores the channel information into configuration files. If this program is run as root then the configuration files are stored under B and are available for any user. Otherwise they are stored in B<$HOME/.tv> for just the user. The frequency file is usually something like: B The file contents should be something like: # Oxford # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy T 578000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE NOTE: Frequency files are provided by the 'dvb' rpm package available for most distros For full details of the DVBT functions, please see: perldoc Linux::DVB::DVBT =cut