[MPlayer-dev-eng] -endpos option in mplayer.c

Oded Shimon ods15 at ods15.dyndns.org
Thu Oct 27 19:42:22 CEST 2005


On Thu, Oct 27, 2005 at 07:25:51PM +0200, Paul TT wrote:
> i'm patching mplayer.c to implement -endpos option...
> what i've done up till now seems to work when endpos is relative to a
> time, just as endpos for mencoder. (i'll do some other tests before
> posting a patch)
> 
> anyway, the question is: if i would like to make endpos work with number
> of bytes to read, is there a variable which contains read bytes or do i
> have to add such variable and count those bytes????

endpos in mplayer is generally just weird because of seeking, should it be 
total time played or until a certain time. anyway, doing it for bytes is 
really useless, you can't do it like you can do in mencoder, and in 
mencoder it makes sense - it's bytes WRITTEN, not bytes read, there's no 
such thin as bytes written in mencoder. if you insist you want it, the way 
you'd do it is by comparing to sh_video->timer (see video_read_frame() in 
mplayer.c:2400), but i wouldn't really trust it.

- ods15




More information about the MPlayer-dev-eng mailing list