[mythtv] [Experimental Patch] HDTV Recorder patch updated
Daniel Thor Kristjansson
danielk at mrl.nyu.edu
Wed Sep 29 11:49:18 EDT 2004
On Mon, 27 Sep 2004, Daniel Thor Kristjansson wrote:
]I looked at the PMT update problem in ffmpeg today. The problem wasn't
]so much as a broken implementation of PAT/PMT scanning, as a completely
]absent one. They look at the first PAT to get the PID of the first PMT,
CVS just came back online for me and I uploaded hdtv recorder patch 24.
It copes somewhat with PMT changes. I have a define "WHACK_A_BUG" which
when set cycles through different pid's in the recorder for the video
stream every few seconds. I then patched ffmpeg to check for PAT and PMT
updates. When a new PMT comes in, avcodec calls the streams_changed()
callback. In MythTV's avformatdecoder I use this to re-scan the stream
info and reopen the right new streams.
This last part is pretty flacky right now. I can't use ffmpeg's function
for setting up the codec, because it assumes an unused stream, so I just
have an "if (0 == enc->codec_id) enc->codec_id = (CodecID)2;" in the
CODEC_TYPE_VIDEO case, which is enough to keep an MPEG2 video stream
going, but is an ugly hack that will break other streams. I'm also not
dealing with pid changes on the audio, one I get the video working I
figure I can fix the audio the same way. Finally, I'm not properly
closing stale streams in the stream info scanning function or elsewhere.
More information about the mythtv-dev