From 80e3173aa101ffd1c94b53299b325a0654562824 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 18 Sep 2017 22:54:03 +0200 Subject: options: remove --heartbeat-cmd and --heartbeat--interval This mechanism uses system() and shouldn't even exist. x11_common.c has its own solution for the original problem (disabling Linux DE screensavers without MPlayer/mpv having to link a dbus lib). If that is not sufficient, you can create a simple Lua script. Incidentally fixes #4888. --- player/core.h | 1 - player/playloop.c | 16 ---------------- 2 files changed, 17 deletions(-) (limited to 'player') diff --git a/player/core.h b/player/core.h index 1b08fed55b..1c1924aee2 100644 --- a/player/core.h +++ b/player/core.h @@ -386,7 +386,6 @@ typedef struct MPContext { struct frame_info *past_frames; int num_past_frames; - double next_heartbeat; double last_idle_tick; double next_cache_update; diff --git a/player/playloop.c b/player/playloop.c index c9bc91010b..c908b1a6e2 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -685,21 +685,6 @@ int get_cache_buffering_percentage(struct MPContext *mpctx) return mpctx->demuxer ? mpctx->cache_buffer : -1; } -static void handle_heartbeat_cmd(struct MPContext *mpctx) -{ -#if !HAVE_UWP - struct MPOpts *opts = mpctx->opts; - if (opts->heartbeat_cmd && !mpctx->paused && mpctx->video_out) { - double now = mp_time_sec(); - if (mpctx->next_heartbeat <= now) { - mpctx->next_heartbeat = now + opts->heartbeat_interval; - (void)system(opts->heartbeat_cmd); - } - mp_set_timeout(mpctx, mpctx->next_heartbeat - now); - } -#endif -} - static void handle_cursor_autohide(struct MPContext *mpctx) { struct MPOpts *opts = mpctx->opts; @@ -1089,7 +1074,6 @@ void run_playloop(struct MPContext *mpctx) handle_cursor_autohide(mpctx); handle_vo_events(mpctx); - handle_heartbeat_cmd(mpctx); handle_command_updates(mpctx); if (mpctx->lavfi) { -- cgit v1.2.3