[mythtv] seeking with pvr

Isaac Richards ijr at po.cwru.edu
Thu Apr 24 02:43:41 EDT 2003


On Wednesday 23 April 2003 12:32 pm, Jim Paris wrote:
> Isaac, any news on the seeking around during playback with the PVR?
> I looked into adding it, but I'm not even sure where to start with
> that, since libavcodec doesn't seem to give any indication of where
> individual frames start within the stream?

I've not had time, really, what with deciding to break everything with the 
(necessary) pre-buffering that I added over the weekend.  But, here's what 
I've thought 'bout it so far.   If you want to work on bits of it, be my 
guest =)

You can infer where frames begin just by keeping track of where packets begin 
as returned by libavformat and doing some simple chunking, I believe.

Anyway, I was planning on doing two stages of seeking support, like the 
nuppelvideo stuff does.

First step (which is inaccurate and, well, crappy), just seek in the file 
based off of the bitrate and current position, and parse until the next 
keyframe.

Second step (and a much better way to do it) would be to do some quick 
demuxing on record and store the start locations of the keyframes, much like 
the nuppelvideo stuff does now when it generates a seektable.  Probably have 
to store this data in the DB, but it should allow exact positioning, and 
extremely fast seeking.  Like the nuppeldecoder class, it can just fall back 
on the other method if the seektable doesn't exist.

Isaac



More information about the mythtv-dev mailing list