[MPlayer-cvslog] r25639 - in trunk: DOCS/man/en/mplayer.1 cfg-mplayer.h mplayer.c
reimar
subversion at mplayerhq.hu
Mon Jan 7 13:30:15 CET 2008
Author: reimar
Date: Mon Jan 7 13:30:15 2008
New Revision: 25639
Log:
Add heartbeat-cmd option
Modified:
trunk/cfg-mplayer.h
trunk/mplayer.c
Changes in other areas also in this revision:
Modified:
trunk/DOCS/man/en/mplayer.1
Modified: trunk/cfg-mplayer.h
==============================================================================
--- trunk/cfg-mplayer.h (original)
+++ trunk/cfg-mplayer.h Mon Jan 7 13:30:15 2008
@@ -207,6 +207,7 @@ const m_option_t mplayer_opts[]={
{"stop_xscreensaver", "Use -stop-xscreensaver instead, options with _ have been obsoleted.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
{"fstype", &vo_fstype_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
#endif
+ {"heartbeat-cmd", &heartbeat_cmd, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"mouseinput", &vo_nomouse_input, CONF_TYPE_FLAG, 0, 1, 0, NULL},
{"nomouseinput", &vo_nomouse_input, CONF_TYPE_FLAG,0, 0, 1, NULL},
Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c (original)
+++ trunk/mplayer.c Mon Jan 7 13:30:15 2008
@@ -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);
More information about the MPlayer-cvslog
mailing list