[MPlayer-cvslog] CVS: main mplayer.c,1.844,1.845

Reimar Döffinger CVS syncmail at mplayerhq.hu
Wed May 18 13:38:08 CEST 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv11403

Modified Files:
	mplayer.c 
Log Message:
new get_time_pos slave mode commando


Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.844
retrieving revision 1.845
diff -u -r1.844 -r1.845
--- mplayer.c	29 Apr 2005 10:48:32 -0000	1.844
+++ mplayer.c	18 May 2005 11:38:05 -0000	1.845
@@ -3503,6 +3503,15 @@
     case MP_CMD_GET_PERCENT_POS : {
 	mp_msg(MSGT_GLOBAL,MSGL_INFO,MSGTR_AnsPercentPos, demuxer_get_percent_pos(demuxer));
     } break;
+    case MP_CMD_GET_TIME_POS : {
+      float pos = 0;
+      if (sh_video)
+        pos = sh_video->pts;
+      else
+      if (sh_audio && audio_out)
+        pos = sh_audio->delay - audio_out->get_delay() * playback_speed;
+      mp_msg(MSGT_GLOBAL, MSGL_INFO, MSGTR_AnsTimePos, pos);
+    } break;
     case MP_CMD_SWITCH_AUDIO : {
         int v = demuxer_switch_audio(demuxer, cmd->args[0].v.i);
         if (identify)




More information about the MPlayer-cvslog mailing list