[mythtv] Seektable file vs. DB

Chris Pinkham cpinkham at bc2va.org
Fri May 23 20:23:32 EDT 2003


> >Modified nuppeldecoder to get seektable from database if file does not
> >containe one.

> I guess it's not really important, but I was idly wondering since a 
> while: What is the difference between having the seektable in the file 
> and in the DB? Shouldn't it be in the file always?

It should be in the file, but occasionally there could be cases where
there isn't a seektable in the file (and for mpeg2 files there is never
a seektable in the file).  This code makes an easy way to fix corrupted
files if they occur, but also saves the seektable to the DB periodically 
while recording should anything cause the recording to fail and not
finish properly (when the seektable would normally get written out).
One sideeffect should also be a minor speedup in jumps while watching
an in-progress recording or livetv when using non-mpeg2 compression
(whether mjpeg or software).  Since the code now keeps a seektable in
a QMap to write to the database, when you jump it will use that
rather than having to sequentially search through the whole seektable
to find the keyframe position the player is requesting.

So, the main benefit is fixing and preventing broken files but there
are a couple smaller benefits as well.  I have code to re-create
the seektable in the file if it is damaged or non-existent but that
isn't really necessary with the patch I applied today.  I can email
it to anyone if they want, but don't expect it to show up CVS
anytime soon.

Chris



More information about the mythtv-dev mailing list