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 <j.uzycki@xxxxxxxxxxxxxx>
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 <j.uzycki@xxxxxxxxxxxxxx>
---
diff -r 3ee111da5b3a util/scan/dump-zap.c
--- a/util/scan/dump-zap.c Mon May 13 15:49:02 2013 +0530
+++ b/util/scan/dump-zap.c Wed Oct 09 17:49:35 2013 +0200
@@ -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);
diff -r 3ee111da5b3a util/scan/dump-zap.h
--- a/util/scan/dump-zap.h Mon May 13 15:49:02 2013 +0530
+++ b/util/scan/dump-zap.h Wed Oct 09 17:49:35 2013 +0200
@@ -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
diff -r 3ee111da5b3a util/scan/scan.c
--- a/util/scan/scan.c Mon May 13 15:49:02 2013 +0530
+++ b/util/scan/scan.c Wed Oct 09 17:49:35 2013 +0200
@@ -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"