[][src]Function libmpv_sys::mpv_suspend

pub unsafe extern "C" fn mpv_suspend(ctx: *mut mpv_handle)

This does nothing since mpv 0.23.0 (API version 1.24). Below is the description of the old behavior.

Stop the playback thread. This means the core will stop doing anything, and only run and answer to client API requests. This is sometimes useful; for example, no new frame will be queued to the video output, so doing requests which have to wait on the video output can run instantly.

Suspension is reentrant and recursive for convenience. Any thread can call the suspend function multiple times, and the playback thread will remain suspended until the last thread resumes it. Note that during suspension, all clients still have concurrent access to the core, which is serialized through a single mutex.

Call mpv_resume() to resume the playback thread. You must call mpv_resume() for each mpv_suspend() call. Calling mpv_resume() more often than mpv_suspend() is not allowed.

Calling this on an uninitialized player (see mpv_create()) will deadlock.

@deprecated This function, as well as mpv_resume(), are deprecated, and will stop doing anything soon. Their semantics were never well-defined, and their usefulness is extremely limited. The calls will remain stubs in order to keep ABI compatibility.