aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--DOCS/interface-changes.rst3
-rw-r--r--DOCS/man/options.rst44
-rw-r--r--options/options.c6
-rw-r--r--options/options.h2
-rw-r--r--player/core.h1
-rw-r--r--player/playloop.c16
6 files changed, 4 insertions, 68 deletions
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst
index d8c4900c21..656a5d204f 100644
--- a/DOCS/interface-changes.rst
+++ b/DOCS/interface-changes.rst
@@ -19,6 +19,9 @@ Interface changes
::
+ --- mpv 0.28.0 ---
+ - drop previously deprecated --heartbeat-cmd and --heartbeat--interval
+ options
--- mpv 0.27.0 ---
- drop previously deprecated --field-dominance option
- drop previously deprecated "osd" command
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index ce14d3e92a..fa2f676190 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -2412,50 +2412,6 @@ Window
there is a change in video parameters, video stream or file. This used to
be the default behavior. Currently only affects X11 VOs.
-``--heartbeat-cmd=<command>``
-
- .. warning::
-
- This option is redundant with Lua scripting. Further, it shouldn't be
- needed for disabling screensaver anyway, since mpv will call
- ``xdg-screensaver`` when using X11 backend. As a consequence this
- option has been deprecated with no direct replacement.
-
- Command that is executed every 30 seconds during playback via *system()* -
- i.e. using the shell. The time between the commands can be customized with
- the ``--heartbeat-interval`` option. The command is not run while playback
- is paused.
-
- .. note::
-
- mpv uses this command without any checking. It is your responsibility to
- ensure it does not cause security problems (e.g. make sure to use full
- paths if "." is in your path like on Windows). It also only works when
- playing video (i.e. not with ``--no-video`` but works with
- ``--vo=null``).
-
- This can be "misused" to disable screensavers that do not support the
- proper X API (see also ``--stop-screensaver``). If you think this is too
- complicated, ask the author of the screensaver program to support the
- proper X APIs. Note that the ``--stop-screensaver`` does not influence the
- heartbeat code at all.
-
- .. admonition:: Example for xscreensaver
-
- ``mpv --heartbeat-cmd="xscreensaver-command -deactivate" file``
-
- .. admonition:: Example for GNOME screensaver
-
- ``mpv --heartbeat-cmd="gnome-screensaver-command --deactivate" file``
-
-
-``--heartbeat-interval=<sec>``
- Time between ``--heartbeat-cmd`` invocations in seconds (default: 30).
-
- .. note::
-
- This does not affect the normal screensaver operation in any way.
-
``--no-keepaspect``, ``--keepaspect``
``--no-keepaspect`` will always stretch the video to window size, and will
disable the window manager hints that force the window aspect ratio.
diff --git a/options/options.c b/options/options.c
index e747388088..9c435edb15 100644
--- a/options/options.c
+++ b/options/options.c
@@ -565,10 +565,6 @@ const m_option_t mp_opts[] = {
OPT_FLAG("cursor-autohide-fs-only", cursor_autohide_fs, 0),
OPT_FLAG("stop-screensaver", stop_screensaver, UPDATE_SCREENSAVER),
- OPT_STRING("heartbeat-cmd", heartbeat_cmd, 0,
- .deprecation_message = "use Lua scripting instead"),
- OPT_FLOAT("heartbeat-interval", heartbeat_interval, CONF_MIN, 0),
-
OPT_SUBSTRUCT("", video_equalizer, mp_csp_equalizer_conf, 0),
OPT_FLAG("use-filedir-conf", use_filedir_conf, 0),
@@ -822,6 +818,7 @@ const m_option_t mp_opts[] = {
OPT_REPLACED("sub-ass-style-override", "sub-ass-override"),
OPT_REMOVED("fs-black-out-screens", NULL),
OPT_REPLACED("sub-paths", "sub-file-paths"),
+ OPT_REMOVED("heartbeat-cmd", "use Lua scripting instead"),
{0}
};
@@ -841,7 +838,6 @@ const struct MPOpts mp_default_opts = {
.audio_device = "auto",
.audio_client_name = "mpv",
.wintitle = "${?media-title:${media-title}}${!media-title:No file} - mpv",
- .heartbeat_interval = 30.0,
.stop_screensaver = 1,
.cursor_autohide_delay = 1000,
.video_osd = 1,
diff --git a/options/options.h b/options/options.h
index ecb38e3995..895c12182b 100644
--- a/options/options.h
+++ b/options/options.h
@@ -181,8 +181,6 @@ typedef struct MPOpts {
char *status_msg;
char *osd_status_msg;
char *osd_msg[3];
- char *heartbeat_cmd;
- float heartbeat_interval;
int player_idle_mode;
int consolecontrols;
int playlist_pos;
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) {