[mythtv] Commercial skipping: Can I get the byte position in a recording instead of the frame?
cpinkham at bc2va.org
Tue Jan 30 06:50:46 UTC 2007
* On Mon Jan 22, 2007 at 11:40:07AM -0600, Maclaren, James M wrote:
> backend mainserver.cpp code. I suspect the answer is no but, can I get
> this keyframe information by sending a message to the backend as I did
> with a QUERY_COMMBREAK to get the commercial starts and stops. This
I don't believe so. I think you're going to have to hit the recordedseek
table directly right now. Are you using direct SQL access to the
database at all right now?
MythTV loads the seektable for a file inside libs/libmythtv/programinfo.cpp
in ProgramInfo::GetPositionMap(). In this method, we take this info and
store it in a keyframe number to byte position map. A lot of the seeking
is handled inside libs/libmythtv/decoderbase.cpp if you want to look at
Basically, if the video has keyframes every 15 frames and the user wants to
seek to frame #50, we'd seek to the byte position of the 3rd keyframe
then seek forward frame by frame until we hit frame number 50 then we'd
resume playback. I don't know if you'll be able to do such granular seeking
on the Roku or if you'll have to settle for seeking to keyframes only.
More information about the mythtv-dev