[MPlayer-dev-eng] NUT seeking
Oded Shimon
ods15 at ods15.dyndns.org
Mon Dec 19 07:47:56 CET 2005
Well, I really wanted to have my own ml's for this, but since mphq2 isn't
coming any time soon at this rate, I'll continue discussing this all
here...
(to be clear, when I say "stream", I mean video or audio or whatever
stream, not the nut file, which I will call "file"...)
I'm having trouble with seeking, understanding how the hell I use index...
The index gives you positions for keyframes on a stream, not syncpoints.
and there are multiple streams. Now, practically all pts's in the file
are relative to previous pts, so you very much can't jump to a random point
in the file unless you know the exact pts of every stream in that position.
You just can't do that with the index... So, what do I do with the index?
This is the only thing I can guess the index might be useful for:
(example 2 streams)
I want pts P, I check the index for both streams, and find that in stream
0 there is pts A at pos X, and in stream 1 there is pts B in pos Y. A and B
are as close as they can be to match P. X is smaller than Y, so I seek to
X, start "playing" until I reach Y, by basically discarding all frames of
both streams, and only checking the pts of stream 0. When I end up at Y, I
now know both the precise pts of stream 0 and stream 1. Stream 1 I know
simply thanks to the index telling me Y is B, and stream 0 I know thanks to
knowing A at X and then continuing until I reach Y...
This is the only way I can see to use the index, which, if I'm not
mistaken, is a rather bad way of using it... I think we should simplify
everything by keeping a "syncpoint index", a single index for the entire
file saying the exact position of every syncpoint in the file, and the
global pts it represents. In implementation, to be efficient, I have to
keep an index of all the syncpoints anyway...
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...
- ods15
More information about the MPlayer-dev-eng
mailing list