summaryrefslogtreecommitdiffstats
path: root/video/out/gl_common.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-05-15 18:17:18 +0200
committerwm4 <wm4@nowhere>2013-05-26 16:44:18 +0200
commitbf10a4fdfa40cbe519e6ccb7fb895332da2021d1 (patch)
tree8ff3a3b2601c85291c5531e4d0dc88266a6b7ef6 /video/out/gl_common.h
parentc23bf5311fce3b59e9111e5de646ee57b48be27f (diff)
downloadmpv-bf10a4fdfa40cbe519e6ccb7fb895332da2021d1.tar.bz2
mpv-bf10a4fdfa40cbe519e6ccb7fb895332da2021d1.tar.xz
video/out: introduce vo_control for gl_common based VOs
Instead of having separate callbacks for each backend-handled feature (like MPGLContext.fullscreen, MPGLContext.border, etc.), pass the VOCTRL responsible for this directly to the backend. This allows removing a bunch of callbacks, that currently must be set even for optional/lesser features (like VOCTRL_BORDER). This requires changes to all VOs using gl_common, as well as all backends that support gl_common. Also introduce VOCTRL_CHECK_EVENTS. vo.check_events is now optional. VO backends can use VOCTRL_CHECK_EVENTS instead to implementing check_events. This has the advantage that the event handling code in VOs doesn't have to be duplicated if vo_control() is used.
Diffstat (limited to 'video/out/gl_common.h')
-rw-r--r--video/out/gl_common.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/video/out/gl_common.h b/video/out/gl_common.h
index 1956b73616..8a627963ed 100644
--- a/video/out/gl_common.h
+++ b/video/out/gl_common.h
@@ -108,9 +108,9 @@ typedef struct MPGLContext {
void (*swapGlBuffers)(struct MPGLContext *);
int (*check_events)(struct vo *vo);
- void (*fullscreen)(struct vo *vo);
int (*vo_init)(struct vo *vo);
void (*vo_uninit)(struct vo *vo);
+ int (*vo_control)(struct vo *vo, int *events, int request, void *arg);
void (*releaseGlContext)(struct MPGLContext *);
void (*set_current)(struct MPGLContext *, bool current);
@@ -124,13 +124,6 @@ typedef struct MPGLContext {
bool (*config_window)(struct MPGLContext *ctx, uint32_t d_width,
uint32_t d_height, uint32_t flags);
- // optional
- void (*pause)(struct vo *vo);
- void (*resume)(struct vo *vo);
- void (*ontop)(struct vo *vo);
- void (*border)(struct vo *vo);
- void (*update_xinerama_info)(struct vo *vo);
-
// An optional function to register a resize callback in the backend that
// can be called on separate thread to handle resize events immediately
// (without waiting for vo_check_events, which will come later for the