Skip to contentSkip to conversation

support for channel numbers in scan with Finnish DVB-C Welho

PATCH New Anssi Kolehmainen 1 participant 1 message Feb 2, 2009 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 support for channel numbers in scan with Finnish DVB-C Welho

Hi,

Attached is small patch to enable channel numbering for FI DVB-C Welho (similar to UK Freeview). Works for me though resulting list needs to be sorted before using or else VDR gets channel numbers wrong.

Signature · 3 lines
Anssi Kolehmainen
[email protected]
040-5085390
util/scan/scan.c +18 -1
diff -r 98d3c06e5ef9 util/scan/scan.c
@@ -363,6 +363,16 @@
 		}
 		buf += 4;
 	}
+}
+
+static void parse_cable_fi_channel_number (const unsigned char *buf, struct service *s)
+{
+	//We should have four bytes of data
+	if (buf[1] != 0x04)
+		return;
+
+	s->channel_num = buf[3];
+	verbosedebug("Channel number is %d\n", s->channel_num);
 }
 
 
@@ -685,6 +695,13 @@
 			 * problems when 0x83 is something entirely different... */
 			if (t == NIT && vdr_dump_channum)
 				parse_terrestrial_uk_channel_number (buf, data);
+			break;
+		
+		case 0x91:
+			/* 0x91 is also in private range so parse only when we want
+			 * channel numbers */
+			if (t == SDT && vdr_dump_channum)
+				parse_cable_fi_channel_number (buf, data);
 			break;
 
 		default:
@@ -2103,7 +2120,7 @@
 	"		Vdr version 1.3.x and up implies -p.\n"
 	"	-l lnb-type (DVB-S Only) (use -l help to print types) or \n"
 	"	-l low[,high[,switch]] in Mhz\n"
-	"	-u      UK DVB-T Freeview channel numbering for VDR\n\n"
+	"	-u      UK DVB-T Freeview / FI DVB-C Welho channel numbering for VDR\n\n"
 	"	-P do not use ATSC PSIP tables for scanning\n"
 	"	    (but only PAT and PMT) (applies for ATSC only)\n"
 	"	-A N	check for ATSC 1=Terrestrial [default], 2=Cable or 3=both\n"