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