1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 09:02:38 +00:00

cache: add a way to explicitly resume cache

This commit is contained in:
wm4 2013-12-14 00:59:26 +01:00
parent 1948131a2a
commit fc75506e8b
2 changed files with 5 additions and 0 deletions

View File

@ -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;
}

View File

@ -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,