summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-04-09 01:05:51 +0200
committerwm4 <wm4@nowhere>2020-04-09 01:05:51 +0200
commit1bdc3bed001168d8d2039955e57fead1ecc68144 (patch)
tree4f123328b736715219f161bb5e1597fbaeedf879 /DOCS
parentfd3caa264ea0848e7e30db94390063c87e247003 (diff)
downloadmpv-1bdc3bed001168d8d2039955e57fead1ecc68144.tar.bz2
mpv-1bdc3bed001168d8d2039955e57fead1ecc68144.tar.xz
ipc: add --input-ipc-client option
While --input-file was removed for justified reasons, wanting to pass down socket FDs this way is legitimate, useful, and easy to implement. One odd thing is that Fixes: #7592
Diffstat (limited to 'DOCS')
-rw-r--r--DOCS/interface-changes.rst5
-rw-r--r--DOCS/man/options.rst29
2 files changed, 32 insertions, 2 deletions
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst
index cd391aa034..666af5f55e 100644
--- a/DOCS/interface-changes.rst
+++ b/DOCS/interface-changes.rst
@@ -59,7 +59,8 @@ Interface changes
"error" field for end-file will silently break at some point in the
future.
- deprecate encoding mode (lack of maintainer)
- - remove deprecated --input-file option
+ - remove deprecated --input-file option, add --input-ipc-client, which is
+ vaguely a replacement of the removed option, but not the same
--- mpv 0.32.0 ---
- change behavior when using legacy option syntax with options that start
with two dashes (``--`` instead of a ``-``). Now, using the recommended
@@ -81,7 +82,7 @@ Interface changes
mpv 0.30.0 (related to the previous changelog entry). This affects video
outputs like vo_x11 and vo_drm, and screenshots, but not much else.
- deprecate --input-file (there are no plans to remove this short-term,
- but it will probably eventually go away)
+ but it will probably eventually go away <- that was a lie)
- deprecate --video-sync=display-adrop (might be removed if it's in the way;
undeprecated or readded if it's not too much of a problem)
- deprecate all input section commands (these will be changed/removed, as
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index 7fd01f0592..f5b59d291a 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -3704,6 +3704,35 @@ Input
See `JSON IPC`_ for details.
+``--input-ipc-client=fd://<N>``
+ Connect a single IPC client to the given FD. This is somewhat similar to
+ ``--input-ipc-server``, except no socket is created, and instead the passed
+ FD is treated like a socket connection received from ``accept()``. In
+ practice, you could pass either a FD created by ``socketpair()``, or a pipe.
+ In both cases, you must sure the FD is actually inherited by mpv (do not
+ set the POSIX ``CLOEXEC`` flag).
+
+ This is somewhat similar to the removed ``--input-file`` option, except it
+ supports only integer FDs, and cannot open actual paths.
+
+ .. admonition:: Example
+
+ ``--input-ipc-client=fd://123``
+
+ .. note::
+
+ Does not and will not work on Windows.
+
+ .. warning::
+
+ Writing to the ``input-ipc-server`` option at runtime will start another
+ instance of an IPC client handler for the ``input-ipc-client`` option,
+ because initialization is bundled, and this thing is stupid. This is a
+ bug. Writing to ``input-ipc-client`` at runtime will start another IPC
+ client handler for the new value, without stopping the old one, even if
+ the FD value is the same (but the string is different e.g. due to
+ whitespace). This is not a bug.
+
``--input-gamepad=<yes|no>``
Enable/disable SDL2 Gamepad support. Disabled by default.