diff options
author | wm4 <wm4@nowhere> | 2016-03-29 11:29:52 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-03-29 11:29:52 +0200 |
commit | 57506b27ed0d567c11bd932cf758318fb3b2079c (patch) | |
tree | f9bfbdf9ca316546f6de72d16b837411cb95e423 /stream/stream.h | |
parent | e1264d397613b0dac86757d6fd3a4a3494e16868 (diff) | |
download | mpv-57506b27ed0d567c11bd932cf758318fb3b2079c.tar.bz2 mpv-57506b27ed0d567c11bd932cf758318fb3b2079c.tar.xz |
cache: use a single STREAM_CTRL for various cache info
Instead of having a separate for each, which also requires separate
additional caching in the demuxer. (The demuxer adds an indirection,
since STREAM_CTRLs are not thread-safe.)
Since this includes the cache speed, this should fix #3003.
Diffstat (limited to 'stream/stream.h')
-rw-r--r-- | stream/stream.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/stream/stream.h b/stream/stream.h index e6964c2020..21e497e563 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -67,11 +67,8 @@ enum stream_ctrl { STREAM_CTRL_GET_SIZE = 1, // Cache - STREAM_CTRL_GET_CACHE_SIZE, + STREAM_CTRL_GET_CACHE_INFO, STREAM_CTRL_SET_CACHE_SIZE, - STREAM_CTRL_GET_CACHE_FILL, - STREAM_CTRL_GET_CACHE_IDLE, - STREAM_CTRL_GET_CACHE_SPEED, STREAM_CTRL_SET_READAHEAD, // stream_memory.c @@ -122,6 +119,14 @@ enum stream_ctrl { STREAM_CTRL_SET_CURRENT_TITLE, }; +// for STREAM_CTRL_GET_CACHE_INFO +struct stream_cache_info { + int64_t size; + int64_t fill; + bool idle; + int64_t speed; +}; + struct stream_lang_req { int type; // STREAM_AUDIO, STREAM_SUB int id; |