1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/mplayer-1.0pre2-slavemode.diff Sat Dec 29 14:47:40 2007 +0100
1.3 @@ -0,0 +1,28 @@
1.4 +--- mplayer.c.orig 2003-10-04 03:24:50.000000000 +0200
1.5 ++++ mplayer.c 2003-11-01 16:17:37.000000000 +0100
1.6 +@@ -3444,6 +3444,25 @@
1.7 + loop_seek=0;
1.8 + }
1.9 +
1.10 ++#if 1
1.11 ++ if(slave_mode){
1.12 ++ float position=0.0;
1.13 ++ float time=0.0;
1.14 ++ if(demuxer->file_format==DEMUXER_TYPE_AVI && sh_video->video.dwLength>2) {
1.15 ++ // get pos from frame number / total frames
1.16 ++ position=(float)d_video->pack_no*100.0/(float)sh_video->video.dwLength;
1.17 ++ }
1.18 ++ else {
1.19 ++ off_t len = ( demuxer->movi_end - demuxer->movi_start );
1.20 ++ off_t pos = ( demuxer->file_format == DEMUXER_TYPE_AUDIO?stream->pos:demuxer->filepos );
1.21 ++ if(len>0) position=( pos - demuxer->movi_start ) * 100.0 / len;
1.22 ++ }
1.23 ++ if(sh_video) time=d_video->pts;
1.24 ++ else if(sh_audio) time=sh_audio->delay;
1.25 ++ mp_msg(MSGT_OSD,MSGL_ERR,"SLAVE: time=%.2f position=%.2f\r",time,position);
1.26 ++ }
1.27 ++#endif
1.28 ++
1.29 + #ifdef HAVE_NEW_GUI
1.30 + if(use_gui){
1.31 + guiEventHandling();