diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-01-07 12:30:15 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-01-07 12:30:15 +0000 |
commit | c3d4f52d7c23a49d04023f4262c2d773583e1cc7 (patch) | |
tree | 64178512fe1ddbddac8523d51bab64ec9b3dbc1f /mplayer.c | |
parent | 91ba3d653156512703ed428b028cfbb09d9ec806 (diff) | |
download | mpv-c3d4f52d7c23a49d04023f4262c2d773583e1cc7.tar.bz2 mpv-c3d4f52d7c23a49d04023f4262c2d773583e1cc7.tar.xz |
Add heartbeat-cmd option
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25639 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -89,6 +89,8 @@ int enable_mouse_movements=0; char * proc_priority=NULL; #endif +char *heartbeat_cmd; + #define ROUND(x) ((int)((x)<0 ? (x)-0.5 : (x)+0.5)) #ifdef HAVE_RTC @@ -3442,6 +3444,14 @@ if(!mpctx->sh_video) { xscreensaver_heartbeat(); } #endif + if (heartbeat_cmd) { + static unsigned last_heartbeat; + unsigned now = GetTimerMS(); + if (now - last_heartbeat > 30000) { + last_heartbeat = now; + system(heartbeat_cmd); + } + } frame_time_remaining = sleep_until_update(&time_frame, &aq_sleep_time); |