Mailing List archive

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

[vdr] Formally correct output patch for scan



> Florian
> (PS: Lauri could you please create a commandline option to switch
> nit/tid usage on [Default off] with a big warning message? [scan])

Done..
Adds parameter -e to scan, e as version, v is used as verbose

        -e N    VDR version, default 2 for VDR-1.2.x
                ANYTHING ELSE GIVES NONZERO NIT and TID

Hopefully somebody will stuff this to DVB cvs

@Klaus: Any particular changes for upcoming mythical beast
to be considered for channels.conf format.
--- Begin Message ---
Index: DVB/apps/scan/dump-vdr.c
===================================================================
RCS file: /cvs/linuxtv/DVB/apps/scan/dump-vdr.c,v
retrieving revision 1.13
diff -u -p -r1.13 dump-vdr.c
--- DVB/apps/scan/dump-vdr.c	21 Jul 2003 14:05:01 -0000	1.13
+++ DVB/apps/scan/dump-vdr.c	8 Sep 2003 14:45:13 -0000
@@ -125,7 +125,8 @@ void vdr_dump_service_parameter_set (FIL
 				 int orbital_pos,
 				 int we_flag,
 				 int dump_provider,
-				 int ca_select)
+				 int ca_select,
+				 int vdr_version)
 {
         int i;
 
@@ -144,6 +145,10 @@ void vdr_dump_service_parameter_set (FIL
 		if (ac3_pid)
 			fprintf (f, ";%i", ac3_pid);
 		if (scrambled == 1) scrambled = ca_select;
+		if (vdr_version == 2) {
+			network_id = 0;
+			transport_stream_id = 0;
+		} 
 		fprintf (f, ":%d:%d:%d:%d:%d:0", teletext_pid, scrambled,
 				service_id, network_id, transport_stream_id);
 		fprintf (f, "\n");
Index: DVB/apps/scan/dump-vdr.h
===================================================================
RCS file: /cvs/linuxtv/DVB/apps/scan/dump-vdr.h,v
retrieving revision 1.6
diff -u -p -r1.6 dump-vdr.h
--- DVB/apps/scan/dump-vdr.h	1 Jul 2003 17:05:51 -0000	1.6
+++ DVB/apps/scan/dump-vdr.h	8 Sep 2003 14:45:13 -0000
@@ -28,7 +28,8 @@ void vdr_dump_service_parameter_set (FIL
 				 int orbital_pos,
 				 int we_flag,
 				 int dump_provider,
-				 int ca_select);
+				 int ca_select,
+				 int vdr_version);
 
 #endif
 
Index: DVB/apps/scan/scan.c
===================================================================
RCS file: /cvs/linuxtv/DVB/apps/scan/scan.c,v
retrieving revision 1.49
diff -u -p -r1.49 scan.c
--- DVB/apps/scan/scan.c	26 Aug 2003 18:21:03 -0000	1.49
+++ DVB/apps/scan/scan.c	8 Sep 2003 14:45:13 -0000
@@ -45,6 +45,7 @@ static int get_other_nits;
 static int vdr_dump_provider;
 static int ca_select = 1;
 static int serv_select = 7;
+static int vdr_version = 2;
 
 enum table_type {
 	PAT,
@@ -1537,7 +1538,8 @@ void dump_lists (void)
 						    t->orbital_pos,
 						    t->we_flag,
 						    vdr_dump_provider,
-						    ca_select);
+						    ca_select,
+						    vdr_version);
 				break;
 			  case OUTPUT_ZAP:
 				zap_dump_service_parameter_set (stdout,
@@ -1582,7 +1584,9 @@ static const char *usage = "\n"
 	"		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 output format: dump provider name\n"
+	"	-e N	VDR version, default 2 for VDR-1.2.x\n"
+	"		ANYTHING ELSE GIVES NONZERO NIT and TID\n";
 
 int main (int argc, char **argv)
 {
@@ -1593,7 +1597,7 @@ int main (int argc, char **argv)
 	int frontend_fd;
 	int fe_open_mode;
 
-	while ((opt = getopt(argc, argv, "5cnpa:f:d:s:o:x:t:vq")) != -1) {
+	while ((opt = getopt(argc, argv, "5cnpa:f:d:s:o:x:e:t:vq")) != -1) {
 		switch (opt) {
 		case 'a':
 			adapter = strtoul(optarg, NULL, 0);
@@ -1631,6 +1635,9 @@ int main (int argc, char **argv)
 			break;
 		case 'x':
 			ca_select = strtoul(optarg, NULL, 0);
+			break;
+		case 'e':
+			vdr_version = strtoul(optarg, NULL, 0);
 			break;
 		case 't':
 			serv_select = strtoul(optarg, NULL, 0);

--- End Message ---

Home | Main Index | Thread Index