diff options
author | wm4 <wm4@nowhere> | 2016-07-20 20:42:30 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-07-20 20:42:30 +0200 |
commit | bd9c0a10e577e7f839aabc27af6e186a9ba0cdaa (patch) | |
tree | 30ef3d3bbffa7e0e7693aed2619e26c2001269a3 /video/out/opengl | |
parent | e11a20a8122b370b66235284dd4f67ce1f1bbc0b (diff) |
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.
Diffstat (limited to 'video/out/opengl')
-rw-r--r-- | video/out/opengl/context.h | 5 |
1 files changed, 5 insertions, 0 deletions
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); }; |