diff -r f5e05e2022f1 -r 1a7977c2b683 patches/mplayer-1.0rc2-slavemode.diff --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/mplayer-1.0rc2-slavemode.diff Sat Dec 29 14:54:06 2007 +0100 @@ -0,0 +1,25 @@ +--- mplayer.c.orig 2007-10-07 21:49:33.000000000 +0200 ++++ mplayer.c 2007-10-28 14:13:54.000000000 +0100 +@@ -3543,6 +3543,22 @@ + edl_decision = 0; + } + ++#if 1 ++ if(slave_mode){ ++ float position=0.0; ++ float time=0.0; ++ if(mpctx->demuxer->file_format==DEMUXER_TYPE_AVI && mpctx->sh_video && mpctx->sh_video->video.dwLength>2){ ++ // get pos from frame number / total frames ++ position=(float)mpctx->d_video->pack_no*100.0f/mpctx->sh_video->video.dwLength; ++ } else { ++ position=demuxer_get_percent_pos(mpctx->demuxer); ++ } ++ if(mpctx->sh_video) time=mpctx->sh_video->pts; ++ else if(mpctx->sh_audio) time=playing_audio_pts(mpctx->sh_audio, mpctx->d_audio, mpctx->audio_out); ++ mp_msg(MSGT_OSD,MSGL_ERR,"SLAVE: time=%.2f position=%.2f\r",time,position); ++ } ++#endif ++ + #ifdef HAVE_NEW_GUI + if(use_gui){ + guiEventHandling();