[mythtv] [PATCH] better GOP detection for HDTV

Jason Hoos jhoos at thwack.net
Tue Dec 23 02:49:37 EST 2003


> For live TV, avformatdecoder does not get the positionmap from  
> hdtvrecorder, but figures it out by watching the stream.  Watching an  
> in-progress recording does some of this as well.  I'd say your problem  
> is that MpegPreProcessPkt needs to look for sequence headers (instead  
> of GOP) under the same set of circumstances that hdtvrecorder does.

Ok, I found this and modified it to act like sequence headers are GOPs
until it actually sees a real GOP, and it seems to work.  I am able to
seek on that station now; I haven't gone back and re-tested the normal
station since the reception on it tonight seems to be a bit lacking.  

Fast forwarding and rewind are still a bit choppy; it works for a bit,
and then it gets hung up for 5-10 seconds on "waiting for xxx to pause"
messages (where xxx is "video output", "decoder", etc. depending on
whether I'm watching Live TV or a recording), and then finally gets
going again on its own.  Not sure what the underlying cause there is,
maybe a race condition or something.  I imagine whatever it is is being
aggravated by the fact that I was using the sticky keys, and it seems
that sticky keys cause a "pause, ff/rw, unpause" cycle for each frame
advance, rather than just pausing once, doing the ff/rw until the sticky
key is turned off, then unpausing again.  Once I get the keyframe thing
ironed out I may dig into that a bit and see what's going on there; need
to find the underlying cause of the "waiting" messages (for all I know
it may be related to the bandwidth issues being discussed in the
performance thread), and then I may look into whether or not it would be
good to change the sticky-key behavior so that they just pause once
until ff/rw is done.  Who knows when I'll actually have time to get
anywhere on either front though...

In any case I should be able to put together the sequence start patch
sometime soon; I'll probably comment out the "pict_start_is_gop" stuff
at that point since hopefully it won't be necessary anymore, and 
avformatdecoder isn't using that method for keyframe detection either...

Jason



More information about the mythtv-dev mailing list