Hi Folks
I've been working on getting xawtv scantv console program working with
the ivtv video driver. scantv hard codes the input as "Television",
where as the ivtv driver uses "Tuner 0" for the tuner. This patch adds
a menu in the same way you can choose the norm and the frequency
table. This patch is for xawtv-3.94.
Thanks
Andrew
--- scantv.c.orig 2004-02-09 22:44:23.000000000 +0100
+++ scantv.c 2005-03-06 15:15:56.132924608 +0100
@@ -132,10 +132,12 @@
main(int argc, char **argv)
{
struct vbi_state *vbi;
- struct ng_attribute *attr;
- int c,fi,on,tuned,i,j,scan=1,fullscan=0;
+ struct ng_attribute *tvnorm_attr;
+ struct ng_attribute *input_attr;
+ int c,fi,on,tuned,i,j,k,scan=1,fullscan=0;
unsigned int f,f1,f2,fc;
char *name,dummy[32];
+ char *input = NULL;
char *tvnorm = NULL;
char *freqtab = NULL;
char *outfile = NULL;
@@ -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, "hsadn:f:o:c:C:i:")))
break;
switch (c) {
case 'd':
@@ -159,6 +161,9 @@
case 'n':
tvnorm = optarg;
break;
+ case 'i':
+ input = optarg;
+ break;
case 'f':
freqtab = optarg;
break;
@@ -200,16 +205,19 @@
freq_init();
/* ask the user some questions ... */
- attr = ng_attr_byid(attrs,ATTR_ID_NORM);
- i = menu("please select your TV norm",attr->choices,tvnorm);
+ tvnorm_attr = ng_attr_byid(attrs,ATTR_ID_NORM);
+ input_attr = ng_attr_byid(attrs,ATTR_ID_INPUT);
+
+ k = menu("please select your TV input",input_attr->choices,input);
+ i = menu("please select your TV norm",tvnorm_attr->choices,tvnorm);
j = menu("please select a frequency table",chanlist_names,freqtab);
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,"norm = %s\n",ng_attr_getstr(attr,i));
+ fprintf(conf,"input = %s\n", ng_attr_getstr(input_attr,k));
+ fprintf(conf,"norm = %s\n",ng_attr_getstr(tvnorm_attr,i));
fprintf(conf,"\n");
fflush(conf);
if (!scan)
@@ -220,8 +228,8 @@
exit(0);
}
set_defaults();
- do_va_cmd(2,"setinput","television");
- do_va_cmd(2,"setnorm",ng_attr_getstr(attr,i));
+ do_va_cmd(2,"setinput",ng_attr_getstr(input_attr,k));
+ do_va_cmd(2,"setnorm",ng_attr_getstr(tvnorm_attr,i));
do_va_cmd(2,"setfreqtab",chanlist_names[j].str);
/* vbi */
--
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
[Home]
[Older V4L]
[Linux DVB]
[Video Disk Recorder]
[Video Technology]
[Asterisk]
[Photo]
[DCCP]
[Netdev]
[Plasma TVs]
[Video Projectors]
[PDAs]
[Xorg]
[Util Linux NG]
[Xfree86]
[Devices]
[Big List of Linux Books]
[Free Photo Albums]
[LCD TVs]
[Fedora Users]
[Webcams]
[Fedora Women]
[HDTV]
[ALSA Users]
[ALSA Devel]
[Stuff]
[SSH]
[Linux USB]