[MPlayer-dev-eng] [PATCH] seekbar support for mp4 files

Jérôme Petazzoni jp at enix.org
Tue Dec 21 10:54:03 CET 2004


>YOu should not set movi_start and especially movi_end if you don't know the values, as far as I know MPlayer might stop playing when it gets beyond movi_end.
>
Oh, as a matter of fact this problem shows up the other way around - 
with my patch (and without it as well), when you reach the end of a MP4 
file, mplayer will stop playing (and quit correctly), but if you seek 
past the end of the file, it will wrap to the beginning. I will check if 
there is an easy way to get correct values for movi_start and movi_end, 
but IMVHO the MOV/MP4 demuxer was very quickly hacked and lacks easy 
access to those features. Providing dummy values for movi_start and 
movi_end is yet better than providing no values at all, still (at least 
it allows the seekbar to work in the GUI, and also shows the total 
running time of the movie...)

> Instead to OSD should be fixed to use demuxer_get_percent_pos instead of these values I think.
>  
>
I did not understand at all why there was :
- a "get_percent_pos" function to display the %age in the OSD
- a "get total time" function to display the total time in the OSD
- things like movi_start, movi_end and pos to display the seek bar in 
the OSD

I suppose there are very good reasons for that :-)
But actually, with "current time" and "total time" all those things can 
be calculated without extra parameters. OTOH, if the running time of a 
file can't be calculated easily, but we know its length (in bytes) and 
the current position, we can calculate a rough percentage and display 
the OSD seek bar ... I suppose that this reason is the rationale behind 
those discrepancies. But I would quite appreciate if the authors of the 
original code would enlighten me ?

Best regards,
Jérôme.




More information about the MPlayer-dev-eng mailing list