All of lore.kernel.org
 help / color / mirror / Atom feed
From: j.uzycki@elproma.com.pl
To: Manu Abraham <manu@linuxtv.org>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: dvb-apps/util/scan: zap compatible with w_scan (option)
Date: Wed, 09 Oct 2013 18:53:15 +0200	[thread overview]
Message-ID: <dc8e415ddbc41ec184a9d2ea021cc566@beep.pl> (raw)

[-- Attachment #1: Type: text/plain, Size: 381 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: zap_provider.patch --]
[-- Type: text/x-diff; name=zap_provider.patch, Size: 2748 bytes --]

From: Janusz Uzycki <j.uzycki@elproma.com.pl>
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@elproma.com.pl>
---

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"

                 reply	other threads:[~2013-10-09 17:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dc8e415ddbc41ec184a9d2ea021cc566@beep.pl \
    --to=j.uzycki@elproma.com.pl \
    --cc=linux-media@vger.kernel.org \
    --cc=manu@linuxtv.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.