[mythtv] OpenCable and TS mode patch

Keith Irwin kirwin at ncsu.edu
Sat Jun 11 19:39:21 UTC 2005

The background story:
I was having problems with audio on some pure QAM channels and ATSC 
channels included in the QAM stream.  I checked with Taylor Jacob to 
see if he was seeing the same problems as I was since we're in the same 
area and hence are working off of the same cable feed.  He suggested 
that I check to make sure that I was using the TS mode rather than PS.  
I actually thought that I had set TS mode, but it turned out that I 
hadn't.  Once I switched over the audio worked peachily, but video 
didn't work at all on a couple of the channels.  Further correspondence 
with him revealed that the problem was that the OpenCable standard 
identifies MPEG-2 video differently than the ATSC standard.  With that 
fixed, everything works fine for me.  Because of the known audio bug 
and also Taylor Jacob's statement to me that the TS code is in much 
better shape than the PS code, I suggested that the default be changed 
to TS rather than PS.  So I've put together a patch.  He's really the 
one responsible for the fix, I just did the actual code changing, which 
wasn't hardly anything in this case.

What the patch does:
It adds 0x80 to the switch statement which causes MythTV to recognize 
streams coded 0x80 (as OpenCable does) as being MPEG-2 video when the 
transport stream option is turned on.
It adds a very brief comment to the two options in the switch statement 
identifying which comes from ATSC and which from OpenCable.
It changes the default setting upon database creation or upgrade to 
have the use TS option be set on by default.

What the patch does not do:
It -does not- update the database version or elsewise force an upgrade, 
so it will not change new DVB cards inserted into an existing system.  
The change is not a significant change to the database schema, and it 
seems a bit much to force an upgrade simply for this single change.  
The change will be implemented on existing systems whenever the next 
database version increment occurs.
It -does not- change existing user settings from PS mode to TS mode 
It -does not- disable PS mode in any way, just turns it off by default 
for new cards.

Hopefully this will help make QAM channels a tiny bit easier for at 
least some new users.

Keith Irwin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: recordts.diff
Type: application/octet-stream
Size: 1821 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20050611/a7134671/recordts.obj

More information about the mythtv-dev mailing list