w_scan: allow frontend and demux selection
PATCH 1/1 w_scan: allow frontend and demux selection
I found a problem with w_scan. With the following system (2x HVR-4000):
/dev/dvb/adapter0/frontend0 : DVB-S/S2/dev/dvb/adapter0/frontend1 : DVB-T/dev/dvb/adapter1/frontend0 : DVB-S/S2/dev/dvb/adapter1/frontend1 : DVB-T
there is no way to do a (DVB-T) scan on adapter1/frontend1 because 1)the automatic selector will always choose adapter0/frontend1 and
2)the -a option (manual adapter) always forces frontend = 0.
Here's a patch for w_scan which allows one to precisely choose which frontend is scanned by adding options to specify frontend (-n) and demux (-d), to be used with the existing adapter (-a) option.
Hans
Signed-off-by Hans Werner <[email protected]>
scan.c renamed from scan.c.orig +10 -2
@@ -2418,7 +2418,9 @@" 6 = VDR-1.6.x (default)\n" " 7 = VDR-1.7.x\n" ".................Device..................\n" -" -a N use device /dev/dvb/adapterN/ [default: auto detect]\n" +" -a A use adapter A /dev/dvb/adapterA/frontend0 [default: auto detect]\n" +" -n N (with -a ) use frontend N /dev/dvb/adapterA/frontendN [default: auto detect]\n" +" -d D (with -a ) use demux D /dev/dvb/adapterA/demuxD [default: auto detect]\n" " -F use long filter timeout\n" " -t N tuning timeout\n" " 1 = fastest [default]\n"
@@ -2520,11 +2522,17 @@ flags.version = version; start_time =time (NULL ); -while ((opt =getopt (argc, argv,"a:c:e:f:hi:kl:o:p:qr:s:t:vxA:D:E:FHI:O:PQ:R:S:T:VX" )) !=-1 ) { +while ((opt =getopt (argc, argv,"a:n:d:c:e:f:hi:kl:o:p:qr:s:t:vxA:D:E:FHI:O:PQ:R:S:T:VX" )) !=-1 ) {switch (opt) {case 'a' ://adapter adapter =strtoul (optarg,NULL ,0 );break ; +case 'n' ://frontend + frontend =strtoul (optarg,NULL ,0 ); +break ; +case 'd' ://demux + demux =strtoul (optarg,NULL ,0 ); +break ;case 'c' ://country setting country=strdup (optarg);if (0 ==strcasecmp (country,"?" )) {
Signature · 4 lines
Release early, release often. GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01