[mythtv] [PATCH] HDTV Recorder Patch

Daniel Thor Kristjansson danielk at mrl.nyu.edu
Thu Dec 2 18:55:51 UTC 2004


On Wed, 1 Dec 2004, Isaac Richards wrote:
]Yeah, the old hdtvrecorder would treat sequence headers as gop starts if no 
]real gop headers were found.  Looking over your patch, I think you've broken 
]it slightly:
]            else if (0xB8 == k1)
]                HandleGOP();
]            else if (0xB3 == k1 && !_gop_seen)
]                HandleGOP();

I've updated the HDTV recorder patch:
  http://www.mrl.nyu.edu/~danielk/mythtv/hdtv-recorder-v34.tbz

It has four improvements motivated by John Poet's testing:

  1) The PCR stream is recorded, even if it is not in the PMT.
     This isn't in the old hdtvrecorder, but is needed to produce
     valid streams when recording John's local CBS station. Thanks
     go to Taylor Jacob for the info that lead to this bug fix.

  2) If GOPs are not found the hdtvrecorder tries to use sequence
     headers instead. This is in the old hdtvrecorder, but
     got lost in the new hdtvrecorder code.

  3) If neither GOPs, nor Sequence headers are found in the first 30 
     frames hdtvrecorder creates a jump table by marking every 15th 
     frame as a keyframe. This works for recordings but if we don't fix 
     the resolution change bug in ffmpeg, it could cause problems there.
     Hopefully every stream will have a GOP or Sequence header anyway.

  4) I created a statistics class TSStats which keeps track of the 
     streams we are not recording. If VB_RECORD is true the recorder 
     prints out the cummulative statistics once for every million 
     packets we see. This prevents debugging messages from swamping
     the CPU, while providing the same information.

-- Daniel


More information about the mythtv-dev mailing list