From 87686a80e5195815bb2be5a88a2a8b9c3e9bcff2 Mon Sep 17 00:00:00 2001 From: nanahi <130121847+na-na-hi@users.noreply.github.com> Date: Sun, 28 Jul 2024 10:16:29 -0400 Subject: [PATCH] DOCS/man: add more --input-ipc-client references Mention the alternative ipc method through fd inheritance. Also fix a grammar mistake. --- DOCS/man/ipc.rst | 6 ++++-- DOCS/man/mpv.rst | 12 ++++++------ DOCS/man/options.rst | 4 ++-- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/DOCS/man/ipc.rst b/DOCS/man/ipc.rst index fbb0b01f5d..bcff88862c 100644 --- a/DOCS/man/ipc.rst +++ b/DOCS/man/ipc.rst @@ -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:: diff --git a/DOCS/man/mpv.rst b/DOCS/man/mpv.rst index 9f8207865b..bf2e82c6eb 100644 --- a/DOCS/man/mpv.rst +++ b/DOCS/man/mpv.rst @@ -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 diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index e2a5323589..0d7c5df623 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -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.