[mythtv] experimental HDTV recorder patch update (v8)

Daniel Thor Kristjansson danielk at cat.nyu.edu
Wed May 12 04:42:41 EDT 2004


If you just want a working HDTV recorder stick with version 6.
However, this much improves the HDTV recorder code. I would love
the output of "mythbackend --verbose record" from as many different
HDTV channels as possible. Especially if it crashes mythbackend.
I only have one channel that sends TV Guide data in my area, and it's
the one from which I get the worst reception.

     http://www.mrl.nyu.edu/~danielk/mythtv/hdtv-recorder-v8.tbz

 v6 still uses hdtvrecoder::RewritePAT and hdtvrecoder::RewritePMT
   but this version parses those tables only when the version changes,
   and writes simplified versions to the nuv file every time there
   is one in the input..

 This version also parses most PSIP tables, including ones that span
   multiple TS packets. It prints these out when versions change.
   This should let us record the audio in your prefered language,
   suck TV Guide data into the database, and show subtitles+emergency
   messages and detect directed commercial breaks. Good stuff.

 tspacket has been broken up into multiple classes, and
   TS packet processing, especially wrt tables, has been simplified.

 The rewrite pid hacks are protected by ifdefs so they can be disabled.

 I finally check the CRC for all tables.

 The program and audio is picked a little bit more robustly. This can be
   made better once the PSIP data is available and ffmpeg is hacked to
   deal with slightly more complex PMT's.

Current problems with this patch include:
 Version management. I'm not doing this correctly with VCT and ETT
   tables, and not doing it nicely with any of these.
 The psip and pes packet offsets are off by one, this isn't a functional
   problem, as it's incorrect consistently. It is ugly though.
 I'm still rewriting pid's, this is was done to cope with a bug in
   ffmpeg, but the right thing to do is fix ffmpeg. You can disable the
   rewriting, but if you do you will lose video in LiveTV mode after
   changing to a channel that uses a different pid for video.
 I just send the PSIP info to the stderr, I don't use it or even save it.
 tspacketprocessor has been refactored to the point where I think this
   procesing code should really be back in hdtvrecorder.
 I do not assemble video or audio pes packets. I don't know for sure if
   these are CRC protected, but if they are that should really help with
   poor reception channels.
 I do not have any code to write a tspacket that spans multiple
   tspackets
 I do not decode huffman encoded text.
   I may have been up too late already when I looked at the
   huffman tables, but C5 and C7 made no sense to me. I have
   translated these tables to ascii in
     http://www.mrl.nyu.edu/~danielk/mythtv/recorder-extras.tbz
 Lots of STL stuff which could be QTized, plus some ugly constructs like
   fixed size arrays.
 I implementing a ATSC scanner in MythTV would be easy now, but I
   didn't do it...

I'm going to go back to the xvmc-playback patch next, but would like
feedback on this, especially table parsing that triggers asserts or
crashes mythbackend in some other way. I found the ATSC docs weren't
always even internally consistent, and sometimes the input from the
CBS simply wasn't compliant to with any interpretation of the
standard as written.

I do have a newer xvmc-playback patch at:
  http://www.mrl.nyu.edu/~danielk/mythtv/xvmc-playback-v3.patch
It's not really changed, I removed some tabs and it's against the
latest CVS. I'm breaking this patch up into smaller pieces so this may
be the last complete version.

-- Daniel


More information about the mythtv-dev mailing list