patches/mplayer-1.0rc2-slavemode.diff
branchtrunk
changeset 8 1a7977c2b683
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/mplayer-1.0rc2-slavemode.diff	Sat Dec 29 14:54:06 2007 +0100
     1.3 @@ -0,0 +1,25 @@
     1.4 +--- mplayer.c.orig	2007-10-07 21:49:33.000000000 +0200
     1.5 ++++ mplayer.c	2007-10-28 14:13:54.000000000 +0100
     1.6 +@@ -3543,6 +3543,22 @@
     1.7 +   edl_decision = 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(mpctx->demuxer->file_format==DEMUXER_TYPE_AVI && mpctx->sh_video && mpctx->sh_video->video.dwLength>2){
    1.15 ++      // get pos from frame number / total frames
    1.16 ++      position=(float)mpctx->d_video->pack_no*100.0f/mpctx->sh_video->video.dwLength;
    1.17 ++    } else {
    1.18 ++      position=demuxer_get_percent_pos(mpctx->demuxer);
    1.19 ++    }
    1.20 ++    if(mpctx->sh_video) time=mpctx->sh_video->pts;
    1.21 ++    else if(mpctx->sh_audio) time=playing_audio_pts(mpctx->sh_audio, mpctx->d_audio, mpctx->audio_out);
    1.22 ++    mp_msg(MSGT_OSD,MSGL_ERR,"SLAVE: time=%.2f position=%.2f\r",time,position);
    1.23 ++    }
    1.24 ++#endif
    1.25 ++
    1.26 + #ifdef HAVE_NEW_GUI
    1.27 +       if(use_gui){
    1.28 +         guiEventHandling();