[MPlayer-dev-eng] NUT seeking

Oded Shimon ods15 at ods15.dyndns.org
Mon Dec 19 07:57:10 CET 2005


On Mon, Dec 19, 2005 at 08:47:56AM +0200, Oded Shimon wrote:
> Rich's goals for seeking:
> - finding the previous keyframe for a given stream before a given timestamp
> - finding the latest point X such that if you start decoding at X you can 
> have all relevant information for the set of streams you're interested in 
> at a given timestamp
> 
> I think my goals are similar... A syncpoint index would not satisfy these 
> goals, it can only help you with all streams.
> I'm no longer sure what the problem was...

Either way, here's my proposal for syncpoint index:

index:
	items				v
	for (i = 0; i < items; i++)
		pos			v
		pts			v

items - ALL the syncpoints in the file.
pts is obviously in global timebase

pos and pts - relative to last values. (starting at 0, 0)

however - pos is NOT the position of the syncpoint to match 'pts' 
timestamp, it is the position of the syncpoint pointed to by the back_ptr.
Also for compression, pos is real_pos/8.

So, if you want to seek to P, you find in the index the highest pts lower 
than P, seek to position pointed to by 'pos', read possibly 7 bytes of 
trash till you get to the syncpoint, and then play.

- ods15




More information about the MPlayer-dev-eng mailing list