summaryrefslogtreecommitdiffstats
path: root/wscript_build.py
diff options
context:
space:
mode:
authorJames Ross-Gowan <rossymiles@gmail.com>2016-03-17 19:27:30 +1100
committerJames Ross-Gowan <rossymiles@gmail.com>2016-03-23 23:15:20 +1100
commit5bf473d5ca3b1a8f0902d08799b28512eb81070b (patch)
tree8cf46e3867d1998fae059b31306df5a05e474a86 /wscript_build.py
parentba4569cf702c72fd85e11abeb52ba06e860ed2ea (diff)
downloadmpv-5bf473d5ca3b1a8f0902d08799b28512eb81070b.tar.bz2
mpv-5bf473d5ca3b1a8f0902d08799b28512eb81070b.tar.xz
ipc: add Windows implementation with named pipes
This implements the JSON IPC protocol with named pipes, which are probably the closest Windows equivalent to Unix domain sockets in terms of functionality. Like with Unix sockets, this will allow mpv to listen for IPC connections and handle multiple IPC clients at once. A few cross platform libraries and frameworks (Qt, node.js) use named pipes for IPC on Windows and Unix sockets on Linux and Unix, so hopefully this will ease the creation of portable JSON IPC clients. Unlike the Unix implementation, this doesn't share code with --input-file, meaning --input-file on Windows won't understand JSON commands (yet.) Sharing code and removing the separate implementation in pipe-win32.c is definitely a possible future improvement.
Diffstat (limited to 'wscript_build.py')
-rw-r--r--wscript_build.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/wscript_build.py b/wscript_build.py
index 1bf67b0b59..fb98affe89 100644
--- a/wscript_build.py
+++ b/wscript_build.py
@@ -190,7 +190,9 @@ def build(ctx):
( "input/cmd_parse.c" ),
( "input/event.c" ),
( "input/input.c" ),
- ( "input/ipc.c", "!mingw" ),
+ ( "input/ipc.c" ),
+ ( "input/ipc-unix.c", "!mingw" ),
+ ( "input/ipc-win.c", "mingw" ),
( "input/keycodes.c" ),
( "input/pipe-win32.c", "mingw" ),