mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
player: update status line cache display
Replace the "+" with "/". The "+" was supposed to imply that the cache is the sum of the time (demuxer cache) and the size in bytes (stream cache). We could not provide something nicer, because we had no idea how many seconds of media was buffered in the stream cache. Now the stream cache is done, and both the duration and byte size show the amount buffered in the demuxer cache. Hopefully "/" is better to imply this properly. Update the manpage explanations too.
This commit is contained in:
@@ -719,12 +719,10 @@ listed.
|
|||||||
to the display as well, e.g.: ``Dropped: 4/34``. This happens only if
|
to the display as well, e.g.: ``Dropped: 4/34``. This happens only if
|
||||||
decoder frame dropping is enabled with the ``--framedrop`` options.
|
decoder frame dropping is enabled with the ``--framedrop`` options.
|
||||||
(``drop-frame-count`` property.)
|
(``drop-frame-count`` property.)
|
||||||
- Cache state, e.g. ``Cache: 2s+134KB``. Visible if the stream cache is enabled.
|
- Cache state, e.g. ``Cache: 2s/134KB``. Visible if the stream cache is enabled.
|
||||||
The first value shows the amount of video buffered in the demuxer in seconds,
|
The first value shows the amount of video buffered in the demuxer in seconds,
|
||||||
the second value shows the sum of the demuxer forward cache size and the
|
the second value shows the estimated size of the buffered amount in kilobytes.
|
||||||
*additional* data buffered in the stream cache in kilobytes.
|
(``demuxer-cache-duration`` and ``demuxer-cache-state`` properties.)
|
||||||
(``demuxer-cache-duration``, ``demuxer-cache-state``, ``cache-used``
|
|
||||||
properties.)
|
|
||||||
|
|
||||||
|
|
||||||
LOW LATENCY PLAYBACK
|
LOW LATENCY PLAYBACK
|
||||||
|
|||||||
@@ -243,9 +243,9 @@ static char *get_term_status_msg(struct MPContext *mpctx)
|
|||||||
int64_t cache_size = s.fw_bytes;
|
int64_t cache_size = s.fw_bytes;
|
||||||
if (cache_size > 0) {
|
if (cache_size > 0) {
|
||||||
if (cache_size >= 1024 * 1024) {
|
if (cache_size >= 1024 * 1024) {
|
||||||
saddf(&line, "+%lldMB", (long long)(cache_size / 1024 / 1024));
|
saddf(&line, "/%lldMB", (long long)(cache_size / 1024 / 1024));
|
||||||
} else {
|
} else {
|
||||||
saddf(&line, "+%lldKB", (long long)(cache_size / 1024));
|
saddf(&line, "/%lldKB", (long long)(cache_size / 1024));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user