summaryrefslogtreecommitdiffstats
path: root/DOCS/man
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-10-26 22:26:43 +0200
committerwm4 <wm4@nowhere>2017-10-26 22:31:04 +0200
commitf08ec22567f309edb69184558cacb9af6115e985 (patch)
tree41052a82b1b90b6caf1ad13cea5f346a230b0fe0 /DOCS/man
parent22fa498bf9968e622e7d6326006c3f321a3bf2e4 (diff)
downloadmpv-f08ec22567f309edb69184558cacb9af6115e985.tar.bz2
mpv-f08ec22567f309edb69184558cacb9af6115e985.tar.xz
command: change demuxer-cache-state property to return multiple ranges
Even if the demuxer cache does not multiple ranges yet. This is to reduce the pain should caching of multiple ranges ever be implemented. Also change it from the sub properties stuff to return a mpv_node directly, which is less roundabout. Sub-property access won't work anymore, though. Remove the seekable-start/-end fields as well, as they're redundant with the ranges. All this would normally be considered an API change, but since it's been only a few days with no known users, change it immediately. This adds some node.c helpers as well, as the code would be too damn fugly otherwise.
Diffstat (limited to 'DOCS/man')
-rw-r--r--DOCS/man/input.rst18
1 files changed, 12 insertions, 6 deletions
diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst
index 2f0cd74c94..f591d695ef 100644
--- a/DOCS/man/input.rst
+++ b/DOCS/man/input.rst
@@ -1259,10 +1259,14 @@ Property list
filled to the requested amount, and is currently not reading more data.
``demuxer-cache-state``
- Various undocumented things. Some fields are documented:
+ Various undocumented or half-documented things.
- ``demuxer-cache-state/seekable-start``, ``demuxer-cache-state/seekable-end``
- Seekable range within demuxer cache. Unavailable if not possible.
+ Each entry in ``seekable-ranges`` represents a region in the demuxer cache
+ that can be seeked to. If there are multiple demuxers active, this only
+ returns information about the "main" demuxer, but might be changed in
+ future to return unified information about all demuxers. There is currently
+ only at most 1 range. Should the player implement caching for multiple
+ ranges, the order of the ranges will be unspecified and arbitrary.
When querying the property with the client API using ``MPV_FORMAT_NODE``,
or with Lua ``mp.get_property_native``, this will return a mpv_node with
@@ -1270,9 +1274,11 @@ Property list
::
- MPV_FORMAT_NODE_ARRAY
- "seekable-start" MPV_FORMAT_DOUBLE
- "seekable-end" MPV_FORMAT_DOUBLE
+ MPV_FORMAT_NODE_MAP
+ "seekable-ranges" MPV_FORMAT_NODE_ARRAY
+ MPV_FORMAT_NODE_MAP
+ "start" MPV_FORMAT_DOUBLE
+ "end" MPV_FORMAT_DOUBLE
``demuxer-via-network``
Returns ``yes`` if the stream demuxed via the main demuxer is most likely