nathan@0: --- mplayer.c.orig 2003-10-04 03:24:50.000000000 +0200 nathan@0: +++ mplayer.c 2003-11-01 16:17:37.000000000 +0100 nathan@0: @@ -3444,6 +3444,25 @@ nathan@0: loop_seek=0; nathan@0: } nathan@0: nathan@0: +#if 1 nathan@0: + if(slave_mode){ nathan@0: + float position=0.0; nathan@0: + float time=0.0; nathan@0: + if(demuxer->file_format==DEMUXER_TYPE_AVI && sh_video->video.dwLength>2) { nathan@0: + // get pos from frame number / total frames nathan@0: + position=(float)d_video->pack_no*100.0/(float)sh_video->video.dwLength; nathan@0: + } nathan@0: + else { nathan@0: + off_t len = ( demuxer->movi_end - demuxer->movi_start ); nathan@0: + off_t pos = ( demuxer->file_format == DEMUXER_TYPE_AUDIO?stream->pos:demuxer->filepos ); nathan@0: + if(len>0) position=( pos - demuxer->movi_start ) * 100.0 / len; nathan@0: + } nathan@0: + if(sh_video) time=d_video->pts; nathan@0: + else if(sh_audio) time=sh_audio->delay; nathan@0: + mp_msg(MSGT_OSD,MSGL_ERR,"SLAVE: time=%.2f position=%.2f\r",time,position); nathan@0: + } nathan@0: +#endif nathan@0: + nathan@0: #ifdef HAVE_NEW_GUI nathan@0: if(use_gui){ nathan@0: guiEventHandling();