diff options
author | wm4 <wm4@nowhere> | 2013-12-14 00:59:26 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-14 00:59:26 +0100 |
commit | fc75506e8b0d0fab4d4d51fa2765a04352cc144c (patch) | |
tree | f69557a4819bf538561d7b117a5d48a8b11d9d2c | |
parent | 1948131a2a7372ffd310f71edf12c25632a05403 (diff) | |
download | mpv-fc75506e8b0d0fab4d4d51fa2765a04352cc144c.tar.bz2 mpv-fc75506e8b0d0fab4d4d51fa2765a04352cc144c.tar.xz |
cache: add a way to explicitly resume cache
-rw-r--r-- | stream/cache.c | 4 | ||||
-rw-r--r-- | stream/stream.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/stream/cache.c b/stream/cache.c index bbfd042178..65b2c86b51 100644 --- a/stream/cache.c +++ b/stream/cache.c @@ -373,6 +373,10 @@ static int cache_get_cached_control(stream_t *cache, int cmd, void *arg) } return STREAM_UNSUPPORTED; } + case STREAM_CTRL_RESUME_CACHE: + s->idle = s->eof = false; + pthread_cond_signal(&s->wakeup); + return STREAM_OK; } return STREAM_ERROR; } diff --git a/stream/stream.h b/stream/stream.h index a3592a692d..a444601a58 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -93,6 +93,7 @@ enum stream_ctrl { STREAM_CTRL_GET_CACHE_SIZE, STREAM_CTRL_GET_CACHE_FILL, STREAM_CTRL_GET_CACHE_IDLE, + STREAM_CTRL_RESUME_CACHE, STREAM_CTRL_RECONNECT, // DVD/Bluray, signal general support for GET_CURRENT_TIME etc. STREAM_CTRL_MANAGES_TIMELINE, |