mpv_terminate_destroy

Similar to mpv_destroy(), but brings the player and all clients down as well, and waits until all of them are destroyed. This function blocks. The advantage over mpv_destroy() is that while mpv_destroy() merely detaches the client handle from the player, this function quits the player, waits until all other clients are destroyed (i.e. all mpv_handles are detached), and also waits for the final termination of the player.

Since mpv_destroy() is called somewhere on the way, it's not safe to call other functions concurrently on the same context.

Since mpv client API version 1.29: The first call on any mpv_handle will block until the core is destroyed. This means it will wait until other mpv_handle have been destroyed. If you want asynchronous destruction, just run the "quit" command, and then react to the MPV_EVENT_SHUTDOWN event. If another mpv_handle already called mpv_terminate_destroy(), this call will not actually block. It will destroy the mpv_handle, and exit immediately, while other mpv_handles might still be uninitializing.

Before mpv client API version 1.29: If this is called on a mpv_handle that was not created with mpv_create(), this function will merely send a quit command and then call mpv_destroy(), without waiting for the actual shutdown.

extern (C)
void
mpv_terminate_destroy

Meta