mirror of
https://github.com/mpv-player/mpv
synced 2024-09-28 17:52:52 +02:00
options: rename --play-direction to --play-dir
And add simpler aliases for the modes. I'm not sure how to name things, and the option list is in general full of different conventions. Some names are shortened, some are explicit and long. I guess options that have a chance to be used normally (i.e. not obscure tuning or debugging) should have a short and convenient names. In this specific case, play-direction is like a mixture of both. It should be either playback-direction or play-dir, not shorten one word but not the other. The convenience aliases are because I got sick of typing out "backward". I guess "back" would also do it, but there's no proper antonym (and maybe it's "wrong" in the strict sense of the word).
This commit is contained in:
parent
8812530b31
commit
0c5df2965e
@ -379,13 +379,15 @@ Playback Control
|
||||
of them fails. This doesn't affect playback of audio-only or video-only
|
||||
files.
|
||||
|
||||
``--play-direction=<forward|backward>``
|
||||
``--play-dir=<forward|+|backward|->``
|
||||
Control the playback direction (default: forward). Setting ``backward``
|
||||
will attempt to play the file in reverse direction, with decreasing
|
||||
playback time. If this is set on playback starts, playback will start from
|
||||
the end of the file. If this is changed at during playback, a hr-seek will
|
||||
be issued to change the direction.
|
||||
|
||||
``+`` and ``-`` are aliases for ``forward`` and ``backward``.
|
||||
|
||||
The rest of this option description pertains to the ``backward`` mode.
|
||||
|
||||
.. note::
|
||||
@ -568,7 +570,7 @@ Playback Control
|
||||
``--demuxer-backward-playback-step=<seconds>``
|
||||
Number of seconds the demuxer should seek back to get new packets during
|
||||
backward playback (default: 60). This is useful for tuning backward
|
||||
playback, see ``--play-direction`` for details.
|
||||
playback, see ``--play-dir`` for details.
|
||||
|
||||
Setting this to a very low value or 0 may make the player think seeking is
|
||||
broken, or may make it perform multiple seeks.
|
||||
|
@ -403,8 +403,8 @@ const m_option_t mp_opts[] = {
|
||||
OPT_REL_TIME("end", play_end, 0),
|
||||
OPT_REL_TIME("length", play_length, 0),
|
||||
|
||||
OPT_CHOICE("play-direction", play_dir, 0,
|
||||
({"forward", 1}, {"backward", -1})),
|
||||
OPT_CHOICE("play-dir", play_dir, 0,
|
||||
({"forward", 1}, {"+", 1}, {"backward", -1}, {"-", -1})),
|
||||
OPT_BYTE_SIZE("video-reversal-buffer", video_reverse_size, 0, 0, (size_t)-1),
|
||||
OPT_BYTE_SIZE("audio-reversal-buffer", audio_reverse_size, 0, 0, (size_t)-1),
|
||||
|
||||
|
@ -3568,7 +3568,7 @@ static const struct m_property mp_properties_base[] = {
|
||||
{"property-list", mp_property_list},
|
||||
{"profile-list", mp_profile_list},
|
||||
|
||||
{"play-direction", mp_property_play_direction},
|
||||
{"play-dir", mp_property_play_direction},
|
||||
|
||||
M_PROPERTY_ALIAS("video", "vid"),
|
||||
M_PROPERTY_ALIAS("audio", "aid"),
|
||||
|
Loading…
Reference in New Issue
Block a user