dvb-apps/util/scan: zap compatible with w_scan (option)
Hi.
The feature is useful if you have file generated by "w_scan -X" and your card is just tuned and works. I could use "scan -c -o zap -a 0" to update the file but it wan't full compatible with w_scan. Now it can be with "-p" option like for VDR output format, ie. "scan -c -o zap -a 0 -p". I would be nice to have the feature in mainline.
best regards
Janusz Uzycki
ELPROMA
From: Janusz Uzycki <[email protected]>
Date: Wed Oct 9 14:51:39 2013 +0200
Subject: scan: zap output compatible with w_scan
"w_scan -X" selects tzap/czap/xine output format.
It starts zap output as "service_name(provider_name):", not "service_name:". Thanks to the patch "scan -o zap -p" generates compatible output.
Signed-off-by Janusz Uzycki <[email protected]>
---
util/scan/dump-zap.c +6 -1
@@ -110,14 +110,19 @@void zap_dump_service_parameter_set (FILE *f,const char *service_name, +const char *provider_name,fe_type_t type,struct dvb_frontend_parameters *p,char polarity,int sat_number,uint16_t video_pid,uint16_t *audio_pid, -uint16_t service_id) +uint16_t service_id, +int dump_provider) { +if (dump_provider ==1 ) +fprintf (f,"%s(%s):" , service_name, provider_name);/* w_scan tzap/czap/xine output format */ +else fprintf (f,"%s:" , service_name);zap_dump_dvb_parameters (f, type, p, polarity, sat_number);fprintf (f,":%i:%i:%i" , video_pid, audio_pid[0 ], service_id);
util/scan/dump-zap.h +3 -1
@@ -9,11 +9,13 @@extern void zap_dump_service_parameter_set (FILE *f,const char *service_name, +const char *provider_name,fe_type_t type,struct dvb_frontend_parameters *t,char polarity,int sat,uint16_t video_pid,uint16_t *audio_pid, -uint16_t service_id); +uint16_t service_id, +int dump_provider);#endif
util/scan/scan.c +4 -2
@@ -2471,13 +2471,15 @@case OUTPUT_ZAP :zap_dump_service_parameter_set (stdout, s->service_name, + s->provider_name, t->type, &t->param,sat_polarisation (t),sat_number (t), s->video_pid, s->audio_pid, - s->service_id); + s->service_id, + vdr_dump_provider);default :break ; }
@@ -2539,7 +2541,7 @@" N=xxx sets ca field in vdr output to :xxx:\n" " -t N Service select, Combined bitfield parameter.\n" " 1 = TV, 2 = Radio, 4 = Other, (default 7)\n" -" -p for vdr output format: dump provider name\n" +" -p for vdr / zap output format: dump provider name\n" " -e N VDR version, default 3 for VDR-1.3.x and newer\n" " value 2 sets NIT and TID to zero\n" " Vdr version 1.3.x and up implies -p.\n"