patches/mplayer-1.0rc2-slavemode.diff
author nathan
Sat, 29 Dec 2007 14:56:02 +0100
branchtrunk
changeset 9 dc75c2890a31
parent 8 1a7977c2b683
permissions -rw-r--r--
generate plugin version from hg identify
     1 --- mplayer.c.orig	2007-10-07 21:49:33.000000000 +0200
     2 +++ mplayer.c	2007-10-28 14:13:54.000000000 +0100
     3 @@ -3543,6 +3543,22 @@
     4    edl_decision = 0;
     5  }
     6  
     7 +#if 1
     8 +  if(slave_mode){
     9 +    float position=0.0;
    10 +    float time=0.0;
    11 +    if(mpctx->demuxer->file_format==DEMUXER_TYPE_AVI && mpctx->sh_video && mpctx->sh_video->video.dwLength>2){
    12 +      // get pos from frame number / total frames
    13 +      position=(float)mpctx->d_video->pack_no*100.0f/mpctx->sh_video->video.dwLength;
    14 +    } else {
    15 +      position=demuxer_get_percent_pos(mpctx->demuxer);
    16 +    }
    17 +    if(mpctx->sh_video) time=mpctx->sh_video->pts;
    18 +    else if(mpctx->sh_audio) time=playing_audio_pts(mpctx->sh_audio, mpctx->d_audio, mpctx->audio_out);
    19 +    mp_msg(MSGT_OSD,MSGL_ERR,"SLAVE: time=%.2f position=%.2f\r",time,position);
    20 +    }
    21 +#endif
    22 +
    23  #ifdef HAVE_NEW_GUI
    24        if(use_gui){
    25          guiEventHandling();