0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

command: default to osd-msg-bar for seeks

The previous default was osd-bar (unless the user specified
--no-osd-bar, in which case case it was osd-msg). Aside from requiring
some twisted logic to implement, this surprised users since osd-msg3
wasn't displayed when seeking with the keyboard (#3028), so the time
seeked to was never displayed.
This commit is contained in:
Kevin Mitchell 2018-01-05 18:52:04 -08:00
parent 57f43c35ec
commit cd8daee3d3
2 changed files with 7 additions and 10 deletions

View File

@ -3102,8 +3102,7 @@ OSD
Whether to load the on-screen-controller (default: yes). Whether to load the on-screen-controller (default: yes).
``--no-osd-bar``, ``--osd-bar`` ``--no-osd-bar``, ``--osd-bar``
Disable display of the OSD bar. This will make some things (like seeking) Disable display of the OSD bar.
use OSD text messages instead of the bar.
You can configure this on a per-command basis in input.conf using ``osd-`` You can configure this on a per-command basis in input.conf using ``osd-``
prefixes, see ``Input command prefixes``. If you want to disable the OSD prefixes, see ``Input command prefixes``. If you want to disable the OSD
@ -3141,16 +3140,15 @@ OSD
shown. shown.
This is also used for the ``show-progress`` command (by default mapped to This is also used for the ``show-progress`` command (by default mapped to
``P``), or in some non-default cases when seeking. ``P``), and when seeking.
``--osd-status-msg`` is a legacy equivalent (but with a minor difference). ``--osd-status-msg`` is a legacy equivalent (but with a minor difference).
``--osd-status-msg=<string>`` ``--osd-status-msg=<string>``
Show a custom string during playback instead of the standard status text. Show a custom string during playback instead of the standard status text.
This overrides the status text used for ``--osd-level=3``, when using the This overrides the status text used for ``--osd-level=3``, when using the
``show-progress`` command (by default mapped to ``P``), or in some ``show-progress`` command (by default mapped to ``P``), and when
non-default cases when seeking. Expands properties. See seeking. Expands properties. See `Property Expansion`_.
`Property Expansion`_.
This option has been replaced with ``--osd-msg3``. The only difference is This option has been replaced with ``--osd-msg3``. The only difference is
that this option implicitly includes ``${osd-sym-cc}``. This option is that this option implicitly includes ``${osd-sym-cc}``. This option is

View File

@ -4821,7 +4821,6 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
bool auto_osd = on_osd == MP_ON_OSD_AUTO; bool auto_osd = on_osd == MP_ON_OSD_AUTO;
bool msg_osd = auto_osd || (on_osd & MP_ON_OSD_MSG); bool msg_osd = auto_osd || (on_osd & MP_ON_OSD_MSG);
bool bar_osd = auto_osd || (on_osd & MP_ON_OSD_BAR); bool bar_osd = auto_osd || (on_osd & MP_ON_OSD_BAR);
bool msg_or_nobar_osd = msg_osd && !(auto_osd && opts->osd_bar_visible);
int osdl = msg_osd ? 1 : OSD_LEVEL_INVISIBLE; int osdl = msg_osd ? 1 : OSD_LEVEL_INVISIBLE;
bool async = cmd->flags & MP_ASYNC_CMD; bool async = cmd->flags & MP_ASYNC_CMD;
@ -4887,7 +4886,7 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
}} }}
if (bar_osd) if (bar_osd)
mpctx->add_osd_seek_info |= OSD_SEEK_INFO_BAR; mpctx->add_osd_seek_info |= OSD_SEEK_INFO_BAR;
if (msg_or_nobar_osd) if (msg_osd)
mpctx->add_osd_seek_info |= OSD_SEEK_INFO_TEXT; mpctx->add_osd_seek_info |= OSD_SEEK_INFO_TEXT;
break; break;
} }
@ -4908,7 +4907,7 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
set_osd_function(mpctx, OSD_REW); set_osd_function(mpctx, OSD_REW);
if (bar_osd) if (bar_osd)
mpctx->add_osd_seek_info |= OSD_SEEK_INFO_BAR; mpctx->add_osd_seek_info |= OSD_SEEK_INFO_BAR;
if (msg_or_nobar_osd) if (msg_osd)
mpctx->add_osd_seek_info |= OSD_SEEK_INFO_TEXT; mpctx->add_osd_seek_info |= OSD_SEEK_INFO_TEXT;
} else { } else {
return -1; return -1;
@ -5104,7 +5103,7 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
set_osd_function(mpctx, (a[0] > refpts) ? OSD_FFW : OSD_REW); set_osd_function(mpctx, (a[0] > refpts) ? OSD_FFW : OSD_REW);
if (bar_osd) if (bar_osd)
mpctx->add_osd_seek_info |= OSD_SEEK_INFO_BAR; mpctx->add_osd_seek_info |= OSD_SEEK_INFO_BAR;
if (msg_or_nobar_osd) if (msg_osd)
mpctx->add_osd_seek_info |= OSD_SEEK_INFO_TEXT; mpctx->add_osd_seek_info |= OSD_SEEK_INFO_TEXT;
} }
} }