[mythtv] DVB Development - Code for help in debugging

Duncan Charlton lists-dpc-dc-rw at duncancharlton.com
Sun May 23 17:46:16 EDT 2004


Taylor Jacob wrote:

> ...
> If you are interested please compile this stuff and send me some
> results, or post them here if there is something you see in error, or
> something that others might benifit from.
> ...

In the 'terrestrial delivery system descriptor' frequency is a 32-bit
uimsbf field rather than BCD.

Attached diff gives the correct frequency values for the DVB-T NIT.

HTH

Cheers

Duncan
-------------- next part --------------
--- mythscan.cpp.orig	2004-05-23 22:32:56.000000000 +0100
+++ mythscan.cpp	2004-05-23 22:36:05.000000000 +0100
@@ -163,15 +163,11 @@
     retval.Type = QString("DVB-T");
 
     // Frequency
-    retval.Frequency=QString("%1%2%3%4%5%6%7%8")
-             .arg((buffer[2] & 0xF0) >> 4)
-             .arg( buffer[2] & 0x0F)
-             .arg((buffer[3] & 0xF0) >> 4)
-             .arg( buffer[3] & 0x0F)
-             .arg((buffer[4] & 0xF0) >> 4)
-             .arg( buffer[4] & 0x0F)
-             .arg((buffer[5] & 0xF0) >> 4)
-             .arg( buffer[5] & 0x0F);
+    retval.Frequency=QString("%1")
+        .arg(
+             (buffer[2]<<24 | buffer[3]<<16 | 
+              buffer[4] << 8 | buffer[5])*10
+             );
 
     // Bandwidth
     switch ((buffer[6] & 0xE0) >> 5) {


More information about the mythtv-dev mailing list