1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 16:33:02 +00:00

DOCS/man: add more --input-ipc-client references

Mention the alternative ipc method through fd inheritance.
Also fix a grammar mistake.
This commit is contained in:
nanahi 2024-07-28 10:16:29 -04:00 committed by Kacper Michajłow
parent fc6aa2cc8a
commit 87686a80e5
3 changed files with 12 additions and 10 deletions

View File

@ -3,8 +3,10 @@ JSON IPC
mpv can be controlled by external programs using the JSON-based IPC protocol.
It can be enabled by specifying the path to a unix socket or a named pipe using
the option ``--input-ipc-server``. Clients can connect to this socket and send
commands to the player or receive events from it.
the option ``--input-ipc-server``, or the file descriptor number of a unix socket
or a named pipe using ``--input-ipc-client``.
Clients can connect to this socket and send commands to the player or receive
events from it.
.. warning::

View File

@ -1034,17 +1034,17 @@ There are three choices for using mpv from other programs or scripts:
Your code should work even if you pass ``--terminal=no``. Do not attempt
to simulate user input by sending terminal control codes to mpv's stdin.
If you need interactive control, using ``--input-ipc-server`` is
recommended. This gives you access to the `JSON IPC`_ over unix domain
sockets (or named pipes on Windows).
If you need interactive control, using ``--input-ipc-server`` or
``--input-ipc-client`` is recommended. This gives you access to the
`JSON IPC`_ over unix domain sockets (or named pipes on Windows).
Depending on what you do, passing ``--no-config`` or ``--config-dir`` may
be a good idea to avoid conflicts with the normal mpv user configuration
intended for CLI playback.
Using ``--input-ipc-server`` is also suitable for purposes like remote
control (however, the IPC protocol itself is not "secure" and not
intended to be so).
Using ``--input-ipc-server`` or ``--input-ipc-client`` is also suitable for
purposes like remote control (however, the IPC protocol itself is not
"secure" and not intended to be so).
2. Using libmpv. This is generally recommended when mpv is used as playback
backend for a completely different application. The provided C API is

View File

@ -4229,8 +4229,8 @@ Input
``--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).
In both cases, you must make sure that the FD is actually inherited by mpv
(do not set the POSIX ``CLOEXEC`` flag).
The player quits when the connection is closed.