summaryrefslogtreecommitdiffstats
path: root/libmpv
diff options
context:
space:
mode:
Diffstat (limited to 'libmpv')
-rw-r--r--libmpv/client.h16
-rw-r--r--libmpv/mpv.def1
2 files changed, 16 insertions, 1 deletions
diff --git a/libmpv/client.h b/libmpv/client.h
index 7208912ee0..500f03cd94 100644
--- a/libmpv/client.h
+++ b/libmpv/client.h
@@ -167,7 +167,7 @@ extern "C" {
* relational operators (<, >, <=, >=).
*/
#define MPV_MAKE_VERSION(major, minor) (((major) << 16) | (minor) | 0UL)
-#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(1, 13)
+#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(1, 14)
/**
* Return the MPV_CLIENT_API_VERSION the mpv source has been compiled with.
@@ -1478,6 +1478,20 @@ void mpv_set_wakeup_callback(mpv_handle *ctx, void (*cb)(void *d), void *d);
*/
int mpv_get_wakeup_pipe(mpv_handle *ctx);
+/**
+ * Block until all asynchronous requests are done. This affects functions like
+ * mpv_command_async(), which return immediately and return their result as
+ * events.
+ *
+ * This is a helper, and somewhat equivalent to calling mpv_wait_event() in a
+ * loop until all known asynchronous requests have sent their reply as event,
+ * except that the event queue is not emptied.
+ *
+ * In case you called mpv_suspend() before, this will also forcibly reset the
+ * suspend counter of the given handle.
+ */
+void mpv_wait_async_requests(mpv_handle *ctx);
+
typedef enum mpv_sub_api {
/**
* For using mpv's OpenGL renderer on an external OpenGL context.
diff --git a/libmpv/mpv.def b/libmpv/mpv.def
index 5176beaa8a..d4d45874fa 100644
--- a/libmpv/mpv.def
+++ b/libmpv/mpv.def
@@ -38,5 +38,6 @@ mpv_set_wakeup_callback
mpv_suspend
mpv_terminate_destroy
mpv_unobserve_property
+mpv_wait_async_requests
mpv_wait_event
mpv_wakeup \ No newline at end of file