[mythtv] Re: [mythtv-commits] mythtv commit: r7076 by danielk

Mark Spieth mark at dclabs.com.au
Fri Aug 19 06:50:01 UTC 2005


> On Fri, 2005-08-19 at 00:30 -0400, Isaac Richards wrote:
> > On Thursday 18 August 2005 11:46 pm, Daniel Kristjansson wrote:
> > > Ok, then this flag is right.
> > >
> > > Any idea why avlib seeking doesn't work with LiveTV? I get a bunch of
> > > messages about safe_read failing. Perhaps it is because the ring
buffer
> > > really is a ring buffer and not a linear file in LiveTV? Or, perhaps
we
> > > need to reset the avlib timecode when using the DummyDTVRecorder?
> >
> > The libavformat seeking code's basically disabled in live-tv mode.  It's
> > implemented poorly, and if the timestamps ever wrap (ie., if you change
the
> > channel), it starts eating tons of cpu.

seek in livetv should be fine as the DB seek table is written while its
being recorded. since it exists, the standard mythtv seek method is used not
the libavformat one, which is a fallback when the DB table doesnt exist.

mpeg2 seek support in libavformat is not as good as it should be as it has
no knowledge about keyframes. hence my fudge of seeking mpeg1/2 at least 15
frames before the frame desired so that it hits a keyframe on its way to
getting the actual frame being sought. This is not a problem if using myths
seeking DB table as keyframe locs are stored explicitly.

the only reason I could see why livetv seek didnt work is that this seek DB
is not immediately accessible by the associated player and thus reverts to
the libavformat seek method. never tested this as I never use livetv so this
is a guess.

>
> Well as of changeset 7076 it is always disabled in LiveTV mode.
>
> But if it avlib seek has problems with timestamp wrapping that
> probably explains my problems, since there is basically always
> a timestamp discontinuity when using the DummyDTVRecorder and
> often timestamp wrapping. Sometimes the avlib seeking worked,
> perhaps that was just when timestamps happened to look ok.

the timestamp discontinuity is a problem as the avformatdecoder has
compensation part for the adjust which isaac left out of my patch in
libavformat.
Note I put it in there as this was the point of origin for converting native
stream timestamps/pts to normalized usec timestamps. It seems silly to put
it anywhere else. and I have thought about it ;-)

cheers
mark



More information about the mythtv-dev mailing list