summaryrefslogtreecommitdiffstats
path: root/DOCS/man
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-08-12 17:23:13 +0200
committerwm4 <wm4@nowhere>2020-08-12 17:23:13 +0200
commit720bcd79d0304dd82e607efa95d421f402c8a3dd (patch)
tree83cd5d25657e6a0d3c4f9837685d8e190c88e3b5 /DOCS/man
parent45cc47a68bfe657c351a9f6be1840dc0c9a11ba2 (diff)
downloadmpv-720bcd79d0304dd82e607efa95d421f402c8a3dd.tar.bz2
mpv-720bcd79d0304dd82e607efa95d421f402c8a3dd.tar.xz
command: add a way to access properties of a current track
Requested. Should be good for simple use cases. "sub2" is technically inconsistent (since the option is called --secondary-sid), but fuck the consistent name.
Diffstat (limited to 'DOCS/man')
-rw-r--r--DOCS/man/input.rst20
1 files changed, 20 insertions, 0 deletions
diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst
index 8593dd75a2..6c589e7521 100644
--- a/DOCS/man/input.rst
+++ b/DOCS/man/input.rst
@@ -2780,6 +2780,26 @@ Property list
"replaygain-album-peak" MPV_FORMAT_DOUBLE
"replaygain-album-gain" MPV_FORMAT_DOUBLE
+``current-tracks/...``
+ This gives access to currently selected tracks. It redirects to the correct
+ entry in ``track-list``.
+
+ The following sub-entries are defined: ``video``, ``audio``, ``sub``,
+ ``sub2``
+
+ For example, ``current-tracks/audio/lang`` returns the current audio track's
+ language field (the same value as ``track-list/N/lang``).
+
+ A sub-entry is accessible only if a track of that type is actually selected.
+ Tracks selected via ``--lavfi-complex`` never appear under this property.
+ ``current-tracks`` and ``current-tracks/`` are currently not accessible, and
+ will not return anything.
+
+ Scripts etc. should not use this. They should use ``track-list``, loop over
+ all tracks, and inspect the ``selected`` field to test whether a track is
+ selected (or compare the ``id`` field to the ``video`` / ``audio`` etc.
+ options).
+
``chapter-list``
List of chapters, current entry marked. Currently, the raw property value
is useless.