From bd9c0a10e577e7f839aabc27af6e186a9ba0cdaa Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 20 Jul 2016 20:42:30 +0200 Subject: vo_opengl: allow backends to provide callbacks for custom event loops Until now, this has been either handled over vo.event_fd (which should go away), or by putting event handling on a separate thread. The backends which do the latter do it for a reason and won't need this, but X11 and Wayland will, in order to get rid of event_fd. --- video/out/opengl/context.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'video/out/opengl/context.h') diff --git a/video/out/opengl/context.h b/video/out/opengl/context.h index df842bc8a1..a546e00be0 100644 --- a/video/out/opengl/context.h +++ b/video/out/opengl/context.h @@ -63,6 +63,11 @@ struct mpgl_driver { // This behaves exactly like vo_driver.control(). int (*control)(struct MPGLContext *ctx, int *events, int request, void *arg); + // These behave exactly like vo_driver.wakeup/wait_events. They are + // optional. + void (*wakeup)(struct MPGLContext *ctx); + void (*wait_events)(struct MPGLContext *ctx, int64_t until_time_us); + // Destroy the GL context and possibly the underlying VO backend. void (*uninit)(struct MPGLContext *ctx); }; -- cgit v1.2.3