mirror of https://github.com/mpv-player/mpv
command: add cache-duration to cache state property
Convenience; see following commit.
This commit is contained in:
parent
27d5d32020
commit
11d223228c
|
@ -1800,6 +1800,8 @@ Property list
|
|||
includes all overhead, and possibly unused data (like pruned data). This
|
||||
member is missing if the file cache is not active.
|
||||
|
||||
``cache-duration`` is ``demuxer-cache-duration``. Missing if unavailable.
|
||||
|
||||
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
|
||||
the following contents:
|
||||
|
@ -1815,6 +1817,7 @@ Property list
|
|||
"eof-cached" MPV_FORMAT_FLAG
|
||||
"fw-bytes" MPV_FORMAT_INT64
|
||||
"file-cache-bytes" MPV_FORMAT_INT64
|
||||
"cache-duration" MPV_FORMAT_DOUBLE
|
||||
|
||||
Other fields (might be changed or removed in the future):
|
||||
|
||||
|
|
|
@ -1450,6 +1450,9 @@ static int mp_property_demuxer_cache_state(void *ctx, struct m_property *prop,
|
|||
if (s.ts_reader != MP_NOPTS_VALUE)
|
||||
node_map_add_double(r, "reader-pts", s.ts_reader);
|
||||
|
||||
if (s.ts_duration >= 0)
|
||||
node_map_add_double(r, "cache-duration", s.ts_duration);
|
||||
|
||||
node_map_add_flag(r, "eof", s.eof);
|
||||
node_map_add_flag(r, "underrun", s.underrun);
|
||||
node_map_add_flag(r, "idle", s.idle);
|
||||
|
|
Loading…
Reference in New Issue