[MPlayer-dev-eng] [PATCH] new option: -startpos (was "the seek to position -ss option does not really set a new playback start position")

Jehan Pagès jehan.marmottard at gmail.com
Thu Apr 8 06:54:53 CEST 2010


Hi again,

2010/4/8 Jehan Pagès <jehan.marmottard at gmail.com>:
>> Your patch would also first start playback from the
>> wrong position and then seek to another.
>
> I don't really understand here. My patch does globally what -ss was
> already doing when you were looping a media file for instance (but was
> not doing when seeking manually, which my patch do the same way).

I have thought a little about this, and maybe I have understood what
you were meaning. Do you mean that first the code would seek backwards
as the seek command would "ask" it, then read a little of the
song/video (so might leave a slight parasitic noise), then the next
loop would see that "oh I am before start position", so would fix this
a loop late?

Maybe it does so, I am not sure of the order in the mplayer.c code, I
should give it a deeper view... Anyway after some minutes of thinking,
a solution could be to export all the startpos, endpos and seek to
second values to the MPContext (usually the variable called mpctx in
the code). Anyway these kind of values look like contextual to me, and
it would allow to take care of these special seek case in the seek
function directly (from libmpdemux/demuxer.c), then removing many
treatments made on it from mplayer.c. That's probably a more better
code (unless I see any problem afterwards, but with the basic vision I
get right now, it seems ok), though slightly more complicated to fix
of course, but not that difficult probably).

Or maybe you can tell me more of your timeline functionality because
right now I don't know at all what you were telling me about. ;-)

Or we can also leave as it is. Less job :p and really it works pretty
well right now (just give it a try), though there indeed might be a
better solution as pointed out (but as I said, I need to dive deeper
in the code to make even sure of it).

3 solutions for you to choose (or more if you have others of course).
Thanks guys.

Jehan



More information about the MPlayer-dev-eng mailing list