Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] patch for scan



new parameter -x
scan -h shows usage
------------------------------

--- scan.c.orig	2003-06-26 11:15:11.000000000 +0300
+++ scan.c	2003-06-26 11:47:14.000000000 +0300
@@ -38,6 +38,7 @@
 static int current_tp_only;
 static int get_other_nits;
 static int vdr_dump_provider;
+static int ca_select;

 enum table_type {
 	PAT,
@@ -1463,7 +1464,8 @@
 						    s->transport_stream_id,
 						    t->orbital_pos,
 						    t->we_flag,
-						    vdr_dump_provider);
+						    vdr_dump_provider,
+						    ca_select);
                                 break;
                           case OUTPUT_ZAP:
 			        zap_dump_service_parameter_set (stdout,
@@ -1497,6 +1499,9 @@
 	"	-5	multiply all filter timeouts by factor 5\n"
 	"		for non-DVB-compliant section repitition rates\n"
 	"	-o fmt	output format: 'zap' (default), 'vdr' or 'pids' (default with -c)\n"
+	"	-x N	Conditional Axcess, (default 1)\n"
+	"		N=0 gets only FTA channels\n"
+	"		N=xxx sets ca field in vdr output to :xxx:\n"
 	"	-p	for vdr output format: dump provider name\n";


@@ -1506,8 +1511,9 @@
 	int adapter = 0, frontend = 0, demux = 0;
 	int opt, i;
 	vdr_dump_provider = 0;
+	ca_select = 1;

-	while ((opt = getopt(argc, argv, "5cnpa:f:d:s:o:")) != -1) {
+	while ((opt = getopt(argc, argv, "5cnpa:f:d:s:o:x:")) != -1) {
 		switch (opt) {
 		case 'a':
 			adapter = strtoul(optarg, NULL, 0);
@@ -1543,6 +1549,9 @@
 		case '5':
 			long_timeout = 1;
 			break;
+		case 'x':
+			ca_select = strtoul(optarg, NULL, 0);
+			break;
 		default:
 			fprintf (stderr, usage, argv[0]);
 			return -1;
--- dump-vdr.c.orig	2003-06-26 11:15:28.000000000 +0300
+++ dump-vdr.c	2003-06-26 13:21:07.000000000 +0300
@@ -123,11 +123,12 @@
 				 int transport_stream_id,
 				 int orbital_pos,
 				 int we_flag,
-				 int dump_provider)
+				 int dump_provider,
+				 int ca_select)
 {
         int i;

-	if (video_pid || audio_pid[0]) {
+	if ((video_pid || audio_pid[0]) && ((ca_select > 0) || ((ca_select == 0) && (scrambled == 0)))) {
 		if (dump_provider == 1)
 			fprintf (f, "%s:", provider_name);
 		fprintf (f, "%s:", service_name);
@@ -136,10 +137,10 @@
 			fprintf (f, "%i+%i:", video_pid, pcr_pid);
 		else
 			fprintf (f, "%i:", video_pid);
-
 		fprintf (f, "%i", audio_pid[0]);
 	        for (i = 1; i < audio_num; i++)
 			fprintf (f, ",%i", audio_pid[i]);
+		if (scrambled == 1) scrambled = ca_select;
 		fprintf (f, ":%d:%d:%d:%d:%d:0", teletext_pid, scrambled,
 				service_id, network_id, transport_stream_id);
 		fprintf (f, "\n");
--- dump-vdr.h.orig	2003-06-24 22:31:01.000000000 +0300
+++ dump-vdr.h	2003-06-26 11:43:58.000000000 +0300
@@ -26,7 +26,8 @@
 				 int transport_stream_id,
 				 int orbital_pos,
 				 int we_flag,
-				 int dump_provider);
+				 int dump_provider,
+				 int ca_select);

 #endif





--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index