summaryrefslogtreecommitdiffstats
path: root/DOCS/man/input.rst
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-03 01:24:48 +0200
committerwm4 <wm4@nowhere>2014-10-03 01:24:48 +0200
commit433210535244e94d20d92eb272d27097daea9a11 (patch)
treea7cc386bffae69a8a5d14c9f9ff280309377f8b9 /DOCS/man/input.rst
parent3e899b102e4644baf347520d98ff44fd8a842fec (diff)
downloadmpv-433210535244e94d20d92eb272d27097daea9a11.tar.bz2
mpv-433210535244e94d20d92eb272d27097daea9a11.tar.xz
command: allow passing memory addresses to overlay_add
For the sake of libmpv. Might make things much easier for the user, especially on Windows. On the other hand, it's a bit sketchy that a command exists that makes the player access arbitrary memory regions. (But do note that input commands are not meant to be "secure" and never were - for example, there's the "run" command, which obviously allows running random shell commands.)
Diffstat (limited to 'DOCS/man/input.rst')
-rw-r--r--DOCS/man/input.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst
index f83e72703c..bbfe2b7963 100644
--- a/DOCS/man/input.rst
+++ b/DOCS/man/input.rst
@@ -456,6 +456,16 @@ Input Commands that are Possibly Subject to Change
random points. Instead, call ``overlay_add`` again (preferably with a
different memory region to prevent tearing).
+ It is also possible to pass a raw memory address for use as bitmap memory
+ by passing a memory address as integer prefixed with a ``&`` character.
+ Passing the wrong thing here will crash the player. The ``offset`` parameter
+ is not used and must be 0. This mode might be useful for use with libmpv.
+
+ On Windows, currently only raw memory addresses work. File mapping is not
+ implemented because a ``mmap`` compatibility layer is missing, and because
+ this kind of shared memory method would perhaps not be overly useful on
+ Windows.
+
``offset`` is the offset of the first pixel in the source file. It is
passed directly to ``mmap`` and is subject to certain restrictions
(see ``man mmap`` for details). In particular, this value has to be a