[mythtv] [RFC] AvFormatDecoder Improvements.

Doug Larrick doug at ties.org
Wed Nov 19 08:39:59 EST 2003


On 11/10/03 04:43:00, Kenneth Aafløy wrote:
> In AvFormatDecoder and the Recorders in MythTV there is code to
> generate a map of where keyframes in the recording is bytewise.  
> Although the concept of storing the keyframe locations for speeding  
> up seeking is a very good idea, I see some problems with files that  
> have a variable keyframe distance. When a clip with variable keyframe  
> distance is recorded and the keyframe locations are stored in the  
> database, the code 'frames / keyframedist' will cause random  
> overwrites when the keyframe distance changes. I propose (and are  
> willing to code as soon as the DVB code is done with) a change, so  
> that the key to positionMap will only be based on the frame number.  
> And that when doing seeking a search for the closest keyframe to the  
> frame requested will be performed.

All right, the problems with ff/rew in HDTV are really starting to bug  
me, so I'm gonna work on this part, using frame number as the index in  
positionMap.  I'll add a new marktype (in recordedmarkup) for the by- 
frame positionmap.  I'll use a (sorted) QValueVector in avformatdecoder  
so that we can binary-search by either frame number or position.  This  
approach (rather than the hashing of a QMap) also allows finding the  
nearest entry on a miss, and easily stepping forward/backward by one  
keyframe.

I'm not planning to touch the current features that allow seeking w/o a  
positionMap, so my changes should not preclude future work in that  
area.

-Doug
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20031119/023b7c44/attachment.pgp


More information about the mythtv-dev mailing list