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