History

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

Mention the alternative ipc method through fd inheritance. Also fix a grammar mistake.

nanahi committed 2 years ago

Commit 87686a81 parent fc6aa2c3 files · +12 −10Browse files

Unified · Split

3 files
  1. DOCS/man/ipc.rst +4 −2
  2. DOCS/man/mpv.rst +6 −6
  3. DOCS/man/options.rst +2 −2
DOCS/man/ipc.rst+4−2
@@ -3,8 +3,10 @@ JSON IPC · 2 unmodified lines
3 3
4mpv can be controlled by external programs using the JSON-based IPC protocol.4mpv can be controlled by external programs using the JSON-based IPC protocol.
5It can be enabled by specifying the path to a unix socket or a named pipe using5It can be enabled by specifying the path to a unix socket or a named pipe using
6the option ``--input-ipc-server``. Clients can connect to this socket and send6the option ``--input-ipc-server``, or the file descriptor number of a unix socket
7commands to the player or receive events from it.7or a named pipe using ``--input-ipc-client``.
8Clients can connect to this socket and send commands to the player or receive
9events from it.
8 10
9.. warning::11.. warning::
10 12
DOCS/man/mpv.rst+6−6
@@ -1034,17 +1034,17 @@ There are three choices for using mpv from other programs or scripts: · 1033 unmodified lines
1034 1034
1035 Your code should work even if you pass ``--terminal=no``. Do not attempt1035 Your code should work even if you pass ``--terminal=no``. Do not attempt
1036 to simulate user input by sending terminal control codes to mpv's stdin.1036 to simulate user input by sending terminal control codes to mpv's stdin.
1037 If you need interactive control, using ``--input-ipc-server`` is1037 If you need interactive control, using ``--input-ipc-server`` or
1038 recommended. This gives you access to the `JSON IPC`_ over unix domain1038 ``--input-ipc-client`` is recommended. This gives you access to the
1039 sockets (or named pipes on Windows).1039 `JSON IPC`_ over unix domain sockets (or named pipes on Windows).
1040 1040
1041 Depending on what you do, passing ``--no-config`` or ``--config-dir`` may1041 Depending on what you do, passing ``--no-config`` or ``--config-dir`` may
1042 be a good idea to avoid conflicts with the normal mpv user configuration1042 be a good idea to avoid conflicts with the normal mpv user configuration
1043 intended for CLI playback.1043 intended for CLI playback.
1044 1044
1045 Using ``--input-ipc-server`` is also suitable for purposes like remote1045 Using ``--input-ipc-server`` or ``--input-ipc-client`` is also suitable for
1046 control (however, the IPC protocol itself is not "secure" and not1046 purposes like remote control (however, the IPC protocol itself is not
1047 intended to be so).1047 "secure" and not intended to be so).
1048 1048
1049 2. Using libmpv. This is generally recommended when mpv is used as playback1049 2. Using libmpv. This is generally recommended when mpv is used as playback
1050 backend for a completely different application. The provided C API is1050 backend for a completely different application. The provided C API is
DOCS/man/options.rst+2−2
@@ -4229,8 +4229,8 @@ Input · 4228 unmodified lines
4229 ``--input-ipc-server``, except no socket is created, and instead the passed4229 ``--input-ipc-server``, except no socket is created, and instead the passed
4230 FD is treated like a socket connection received from ``accept()``. In4230 FD is treated like a socket connection received from ``accept()``. In
4231 practice, you could pass either a FD created by ``socketpair()``, or a pipe.4231 practice, you could pass either a FD created by ``socketpair()``, or a pipe.
4232 In both cases, you must sure the FD is actually inherited by mpv (do not4232 In both cases, you must make sure that the FD is actually inherited by mpv
4233 set the POSIX ``CLOEXEC`` flag).4233 (do not set the POSIX ``CLOEXEC`` flag).
4234 4234
4235 The player quits when the connection is closed.4235 The player quits when the connection is closed.
4236 4236

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t