[mythtv] Problems with DTV scanning in SVN?

Mark Doliner thekingant at users.sourceforge.net
Wed Dec 28 15:21:14 EST 2005


I don't follow MythTV development closely, so please ignore me if this topic
has been beat to death.

It appears that there is a mismatch between the channels found when doing a
channel scan in mythtv-setup and the channels found when getting TV listings.
 siscan.cpp adds entries to the 'channel' table with a 'channum' of, for
example "501" for the channel "50.1"  While getting TV listings adds entries
to the 'channel' table with a 'channum' of "50_1"

I think this has the effect of letting people watch TV somewhat (but there are
a lot of channels with NULL mplexid/serviceid/atscsrcid, which makes the
process tedious).  And you can schedule recordings... but they get scheduled
for the 50_1 channels, so when the recording starts mythbackend is unable to
change to the correct channel with the following errors:

DVB#0 ERROR - Could not find dvb tuning parameters for transport 0
DVB#0 ERROR - Failed to get channel options for channel 50_1.

>From my standpoint as a humble user, it seems like the following changes might
improve things:

* Either change the channel scanning to insert an underscore before
subchannels, or change the TV listing grabber to NOT insert an underscore
before subchannels, or (even better) change them both to use a decimal point

* When watching TV on an invalid channel when the backend spits out "DVB#0
WARNING - No data from card in 1 second." a bunch of times, make the UI more
responsive/informative.  Maybe show a "no video" message or something?

For any DTV users who are running into this problem, I found the following
posts helpful:
http://mythtv.org/pipermail/mythtv-users/2005-March/079403.html
http://mythtv.org/pipermail/mythtv-dev/2005-May/036035.html
http://www.linuxtv.org/pipermail/linux-dvb/2005-February/000342.html

I worked around the problem by modifying my 'channel' table in MySQL as
suggested in the last email.

I was hoping the following change would fix this, but it didn't, and if I
tried to do anything more complicated than this I'd probably break something.

Index: libs/libmythtv/siparser.cpp
===================================================================
--- libs/libmythtv/siparser.cpp (revision 8397)
+++ libs/libmythtv/siparser.cpp (working copy)
@@ -2159,7 +2159,7 @@
         uint16_t major_channel_number = ((buffer[pos+14] & 0x0F) >> 2) |
((buffer[pos+15] & 0xFC) >> 2);
         uint16_t minor_channel_number = (buffer[pos+15] & 0x03) << 2 |
(buffer[pos+16]);
         uint8_t modulation = buffer[pos+17];
-        s.ChanNum = (major_channel_number * 10) + minor_channel_number;
+        s.ChanNum = (major_channel_number * 10) + '_' + minor_channel_number;

         s.TransportID = buffer[pos+22] << 8 | buffer[pos+23];

MythTV is amazing, and I appreciate every minute of time you guys spend
working on it!
-Mark


More information about the mythtv-dev mailing list