[mythtv] What is the recordedmarkup table for?
Chris Pinkham
cpinkham at bc2va.org
Wed Jun 11 12:53:36 EDT 2003
> I should probably have mentioned that I did as much due-diligence as I
> could, and I can see that the MARK_KEYFRAME data is read out of
> recordedmarkup during OpenFile, but I don't really understand why (since
For mpeg2 files, the seektable is read from recordedmarkup during OpenFile.
This is because there is no seektable in the file itself.
For mpeg4/rtjpeg files, if no seektable is found in the file, then the
database is read but Myth may assume the seektable is incomplete (since this
could be an inprogress recording).
The reason for using the seektable from the file or database is to allow
direct seeks to a keyframe rather than having to scan forward through the
whole file loking for 'Q' frames. Seeking forward/backward is the main
use, but imagine watching a 2-hour movie and setting a bookmark 10 minutes
before the end because you have to leave. You come back the next day to
start watching where you left off. Without the seektable you'd have to
scan through the whole file until you got to the frame where the bookmark
is. With the seektable read from the DB or file then you can seek to
the closest (previous) keyframe which is almost instantaneous since you have
the file offset.
When you're playing a file that has an incomplete (or no) seektable, then
the player will build a seektable as it goes to allow you to skip backwards
in the file quickly (or forwards up to the furthest point you've watched).
This seektable is not saved to the DB or file with the exception of the
commercial flagging process. When the commercial flagging process runs
through a file and finishes and determines that the file did not have a
seektable, it will create one in the database. This allows you to recover
damaged recordings and makes sure that the commercial skipping works as
intended since skipping isn't as nice if you have to wait for the player to
scan through 3-4 minutes of commercials to find the ending frame.
Chris
More information about the mythtv-dev
mailing list