summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/client-api-changes.rst4
-rw-r--r--DOCS/interface-changes.rst25
-rw-r--r--DOCS/man/input.rst401
-rw-r--r--DOCS/man/ipc.rst42
-rw-r--r--DOCS/man/lua.rst92
-rw-r--r--DOCS/man/options.rst119
-rw-r--r--TOOLS/lua/command-test.lua95
-rw-r--r--audio/decode/ad_lavc.c6
-rw-r--r--audio/out/ao.c25
-rw-r--r--audio/out/ao.h7
-rw-r--r--common/global.h5
-rw-r--r--common/msg.c11
-rw-r--r--common/msg_control.h3
-rw-r--r--common/playlist.c7
-rw-r--r--common/playlist.h4
-rw-r--r--common/recorder.c3
-rw-r--r--demux/codec_tags.c16
-rw-r--r--demux/demux.c310
-rw-r--r--demux/demux.h24
-rw-r--r--demux/demux_disc.c16
-rw-r--r--demux/demux_lavf.c85
-rw-r--r--demux/demux_mkv_timeline.c18
-rw-r--r--demux/demux_playlist.c1
-rw-r--r--demux/demux_timeline.c6
-rw-r--r--demux/demux_tv.c2
-rw-r--r--demux/timeline.c6
-rw-r--r--etc/input.conf6
-rw-r--r--etc/mpv.conf3
-rw-r--r--filters/f_decoder_wrapper.c21
-rw-r--r--input/cmd.c242
-rw-r--r--input/cmd.h34
-rw-r--r--input/input.c40
-rw-r--r--input/input.h4
-rw-r--r--input/ipc-unix.c7
-rw-r--r--input/ipc-win.c5
-rw-r--r--input/ipc.c23
-rw-r--r--libmpv/client.h105
-rw-r--r--libmpv/mpv.def1
-rw-r--r--libmpv/render_gl.h18
-rw-r--r--libmpv/stream_cb.h2
-rw-r--r--misc/json.c59
-rw-r--r--misc/linked_list.h107
-rw-r--r--misc/node.c65
-rw-r--r--misc/node.h3
-rw-r--r--misc/thread_pool.c200
-rw-r--r--misc/thread_pool.h28
-rw-r--r--misc/thread_tools.c269
-rw-r--r--misc/thread_tools.h82
-rw-r--r--options/m_config.c647
-rw-r--r--options/m_config.h40
-rw-r--r--options/m_option.h1
-rw-r--r--options/options.c28
-rw-r--r--options/options.h25
-rw-r--r--options/parse_commandline.c8
-rw-r--r--options/parse_commandline.h2
-rw-r--r--options/path.c22
-rw-r--r--options/path.h3
-rw-r--r--osdep/compiler.h5
-rw-r--r--osdep/subprocess-posix.c3
-rw-r--r--osdep/subprocess-win.c1
-rw-r--r--osdep/timer.c10
-rw-r--r--osdep/timer.h7
-rw-r--r--player/client.c262
-rw-r--r--player/client.h1
-rw-r--r--player/command.c940
-rw-r--r--player/command.h27
-rw-r--r--player/core.h45
-rw-r--r--player/external_files.c27
-rw-r--r--player/external_files.h4
-rw-r--r--player/loadfile.c362
-rw-r--r--player/lua.c136
-rw-r--r--player/lua/defaults.lua62
-rw-r--r--player/lua/stats.lua11
-rw-r--r--player/main.c34
-rw-r--r--player/misc.c18
-rw-r--r--player/osd.c40
-rw-r--r--player/playloop.c27
-rw-r--r--player/screenshot.c185
-rw-r--r--player/screenshot.h22
-rw-r--r--player/sub.c6
-rw-r--r--player/video.c3
-rw-r--r--stream/cache.c808
-rw-r--r--stream/cache_file.c158
-rw-r--r--stream/stream.c244
-rw-r--r--stream/stream.h38
-rw-r--r--stream/stream_avdevice.c1
-rw-r--r--stream/stream_dvb.c2
-rw-r--r--stream/stream_dvdnav.c1
-rw-r--r--stream/stream_edl.c1
-rw-r--r--stream/stream_file.c12
-rw-r--r--stream/stream_lavf.c1
-rw-r--r--stream/stream_libarchive.c1
-rw-r--r--stream/stream_memory.c1
-rw-r--r--stream/stream_mf.c1
-rw-r--r--stream/stream_tv.c1
-rw-r--r--sub/osd.c6
-rw-r--r--test/json.c97
-rw-r--r--test/linked_list.c162
-rw-r--r--video/decode/vd_lavc.c62
-rw-r--r--video/out/gpu/context.h3
-rw-r--r--video/out/gpu/video.c4
-rw-r--r--video/out/opengl/context.c9
-rw-r--r--video/out/opengl/context.h3
-rw-r--r--video/out/opengl/context_glx.c129
-rw-r--r--video/out/vo.c45
-rw-r--r--video/out/vo.h38
-rw-r--r--video/out/vo_gpu.c9
-rw-r--r--video/out/x11_common.c49
-rw-r--r--video/out/x11_common.h4
-rw-r--r--waftools/detections/compiler.py7
-rw-r--r--wscript_build.py3
111 files changed, 4378 insertions, 3193 deletions
diff --git a/DOCS/client-api-changes.rst b/DOCS/client-api-changes.rst
index 6197e48a39..b9b264d220 100644
--- a/DOCS/client-api-changes.rst
+++ b/DOCS/client-api-changes.rst
@@ -32,6 +32,10 @@ API changes
::
--- mpv 0.30.0 ---
+ 1.103 - redo handling of async commands
+ - add mpv_event_command and make it possible to return values from
+ commands issued with mpv_command_async() or mpv_command_node_async()
+ - add mpv_abort_async_command()
1.102 - rename struct mpv_opengl_drm_osd_size to mpv_opengl_drm_draw_surface_size
- rename MPV_RENDER_PARAM_DRM_OSD_SIZE to MPV_RENDER_PARAM_DRM_DRAW_SURFACE_SIZE
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst
index 2fd30628d8..160bc3679c 100644
--- a/DOCS/interface-changes.rst
+++ b/DOCS/interface-changes.rst
@@ -53,6 +53,29 @@ Interface changes
mapped versions of a color.
- add --hdr-peak-decay-rate and --hdr-scene-threshold-low/high
- add --tone-mapping-max-boost
+ - ipc: require that "request_id" fields are integers. Other types are still
+ accepted for compatibility, but this will stop in the future. Also, if no
+ request_id is provided, 0 will be assumed.
+ - mpv_command_node() and mp.command_native() now support named arguments
+ (see manpage). If you want to use them, use a new version of the manpage
+ as reference, which lists the definitive names.
+ - edition and disc title switching will now fully reload playback (may have
+ consequences for scripts, client API, or when using file-local options)
+ - with the removal of the stream cache, the following properties and options were
+ dropped: `cache`, `cache-size`, `cache-free`, `cache-used`, `--cache-default`,
+ `--cache-initial`, `--cache-seek-min`, `--cache-backbuffer`, `--cache-file`,
+ `--cache-file-size`
+ - remove async playback abort hack. This breaks aborting playback in the
+ following cases, iff the current stream is a network stream that
+ completely stopped responding:
+ - setting "program" property
+ - setting "cache-size" property
+ In earlier versions of mpv, the player core froze as well in these cases,
+ but could still be aborted with the quit, stop, playlist-prev,
+ playlist-next commands. If these properties are not accessed, frozen
+ network streams should not freeze the player core (only playback in
+ uncached regions), and differing behavior should be reported as a bug.
+ If --demuxer-thread=no is used, there are no guarantees.
--- mpv 0.29.0 ---
- drop --opensles-sample-rate, as --audio-samplerate should be used if desired
- drop deprecated --videotoolbox-format, --ff-aid, --ff-vid, --ff-sid,
@@ -137,8 +160,6 @@ Interface changes
of 3D content doesn't justify such an option anyway.
- change cycle-values command to use the current value, instead of an
internal counter that remembered the current position.
- - edition and disc title switching will now fully reload playback (may have
- consequences for scripts, client API, or when using file-local options)
- remove deprecated ao/vo auto profiles. Consider using scripts like
auto-profiles.lua instead.
--- mpv 0.28.0 ---
diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst
index f55eea1409..b2d676c644 100644
--- a/DOCS/man/input.rst
+++ b/DOCS/man/input.rst
@@ -41,10 +41,10 @@ commands they're bound to on the OSD, instead of executing the commands::
(Only closing the window will make **mpv** exit, pressing normal keys will
merely display the binding, even if mapped to quit.)
-General Input Command Syntax
-----------------------------
+input.conf syntax
+-----------------
-``[Shift+][Ctrl+][Alt+][Meta+]<key> [{<section>}] [<prefixes>] <command> (<argument>)* [; <command>]``
+``[Shift+][Ctrl+][Alt+][Meta+]<key> [{<section>}] <command> ( ; <command> )*``
Note that by default, the right Alt key can be used to create special
characters, and thus does not register as a modifier. The option
@@ -59,9 +59,9 @@ character), or a symbolic name (as printed by ``--input-keylist``).
``<section>`` (braced with ``{`` and ``}``) is the input section for this
command.
-Arguments are separated by whitespace. This applies even to string arguments.
-For this reason, string arguments should be quoted with ``"``. Inside quotes,
-C-style escaping can be used.
+``<command>`` is the command itself. It consists of the command name and
+multiple (or none) commands, all separated by whitespace. String arguments
+need to be quoted with ``"``. Details see ``Flat command syntax``.
You can bind multiple commands to one key. For example:
@@ -78,15 +78,89 @@ that matches, and the multi-key command will never be called. Intermediate keys
can be remapped to ``ignore`` in order to avoid this issue. The maximum number
of (non-modifier) keys for combinations is currently 4.
+Flat command syntax
+-------------------
+
+This is the syntax used in input.conf, and referred to "input.conf syntax" in
+a number of other places.
+
+``<command> ::= [<prefixes>] <command_name> (<argument>)*``
+``<argument> ::= (<string> | " <quoted_string> " )``
+
+``command_name`` is an unquoted string with the command name itself. See
+`List of Input Commands`_ for a list.
+
+Arguments are separated by whitespace. This applies even to string arguments.
+For this reason, string arguments should be quoted with ``"``. If a string