# Allow scantv(1) to use different (not Television only) card input.
#
# Derived from the Debian patch:
# 14_scantv_input_override.dpatch
# (which was written by Adrian Phillips <adrianp@broadpark.no>
# plus add required changes in the manual
#
diff -Nrbu xawtv-3.95/console/scantv.c xawtv-3.95-OK/console/scantv.c
--- xawtv-3.95/console/scantv.c 2005-09-30 14:07:02.000000000 +0400
+++ xawtv-3.95-OK/console/scantv.c 2008-08-26 19:03:30.000000000 +0400
@@ -116,6 +116,7 @@
"options:\n"
" -h print this text\n"
" -o outfile set output file. [%s]\n"
+ " -i input set input.\n"
" -n norm set tv norm.\n"
" -f table set frequency table.\n"
" -c device set video device file. [%s]\n"
@@ -137,6 +138,7 @@
unsigned int f,f1,f2,fc;
char *name,dummy[32];
char *tvnorm = NULL;
+ char *tvinput = NULL;
char *freqtab = NULL;
char *outfile = NULL;
FILE *conf = stdout;
@@ -144,7 +146,7 @@
/* parse options */
ng_init();
for (;;) {
- if (-1 == (c = getopt(argc, argv, "hsadn:f:o:c:C:")))
+ if (-1 == (c = getopt(argc, argv, "hsadi:n:f:o:c:C:")))
break;
switch (c) {
case 'd':
@@ -156,6 +158,9 @@
case 'a':
fullscan=1;
break;
+ case 'i':
+ tvinput = optarg;
+ break;
case 'n':
tvnorm = optarg;
break;
@@ -203,12 +208,15 @@
attr = ng_attr_byid(attrs,ATTR_ID_NORM);
i = menu("please select your TV norm",attr->choices,tvnorm);
j = menu("please select a frequency table",chanlist_names,freqtab);
+ if (tvinput == NULL) {
+ tvinput = "Television";
+ }
fprintf(conf,"[global]\n");
fprintf(conf,"freqtab = %s\n",chanlist_names[j].str);
fprintf(conf,"\n");
fprintf(conf,"[defaults]\n");
- fprintf(conf,"input = Television\n");
+ fprintf(conf,"input = %s\n", tvinput);
fprintf(conf,"norm = %s\n",ng_attr_getstr(attr,i));
fprintf(conf,"\n");
fflush(conf);
@@ -220,7 +228,7 @@
exit(0);
}
set_defaults();
- do_va_cmd(2,"setinput","television");
+ do_va_cmd(2,"setinput",tvinput);
do_va_cmd(2,"setnorm",ng_attr_getstr(attr,i));
do_va_cmd(2,"setfreqtab",chanlist_names[j].str);
diff -Nrbu xawtv-3.95/man/scantv.1 xawtv-3.95-OK/man/scantv.1
--- xawtv-3.95/man/scantv.1 2008-08-26 19:01:50.000000000 +0400
+++ xawtv-3.95-OK/man/scantv.1 2008-08-26 19:12:58.000000000 +0400
@@ -9,6 +9,11 @@
xawtv/fbtv config file.
.SH OPTIONS
.TP
+.B -i input
+set tv \fBi\fPnput (Television/Composite1/S-video and so on).
+Default is Television. (Currently it is a distro-specific option
+added by Fedora and Debian).
+.TP
.B -n norm
set tv \fBn\fPorm. scantv will ask interactively if
none is given.