diff options
author | wm4 <wm4@nowhere> | 2020-01-08 00:14:20 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-01-08 00:16:01 +0100 |
commit | db9048f21aa955dbd7176d4e8d7245297e97177b (patch) | |
tree | c8c602ecc0b50b94a5be18544fd80c657f184b3f /DOCS/man | |
parent | d3cef97ad38fb027262a905bd82e1d3d2549aec7 (diff) | |
download | mpv-db9048f21aa955dbd7176d4e8d7245297e97177b.tar.bz2 mpv-db9048f21aa955dbd7176d4e8d7245297e97177b.tar.xz |
command: add osd-dimensions property
This "bundles" all OSD properties. It also makes some previously
Lua-only values available (Lua has mp.get_osd_margins(), unsure if
anything uses it).
The main intention is actually to allow retrieving all fields in an
"atomic" way. (Could introduce a mechanism on the level of the mpv
client API to do this, but doing ti ad-hoc all the time like this commit
is easier.)
Diffstat (limited to 'DOCS/man')
-rw-r--r-- | DOCS/man/input.rst | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index d6430581a8..75709d1adf 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -2177,9 +2177,40 @@ Property list ``overlay-add`` command. It gives you the actual OSD size, which can be different from the window size in some cases. + Alias to ``osd-dimensions/w`` and ``osd-dimensions/h``. + ``osd-par`` Last known OSD display pixel aspect (can be 0). + Alias to ``osd-dimensions/osd-par``. + +``osd-dimensions`` + Last known OSD dimensions. + + Has the following sub-properties (which can be read as ``MPV_FORMAT_NODE`` + or Lua table with ``mp.get_property_native``): + + ``w`` + Size of the VO window in OSD render units (usually pixels, but may be + scaled pixels with VOs like ``xv``). + + ``h`` + Size of the VO window in OSD render units, + + ``par`` + Pixel aspect ratio of the OSD (usually 1). + + ``aspect`` + Display aspect ratio of the VO window. (Computing from the properties + above.) + + ``mt``, ``mb``, ``ml``, ``mr`` + OSD to video margins (top, bottom, left, right). This describes the + area into which the video is rendered. + + Any of these properties may be unavailable or set to dummy values if the + VO window is not created or visible. + ``sub-text`` Return the current subtitle text regardless of sub visibility. Formatting is stripped. If the subtitle is not text-based |