From fc75506e8b0d0fab4d4d51fa2765a04352cc144c Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 14 Dec 2013 00:59:26 +0100 Subject: cache: add a way to explicitly resume cache --- stream/cache.c | 4 ++++ stream/stream.h | 1 + 2 files changed, 5 insertions(+) (limited to 'stream') 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, -- cgit v1.2.3