summaryrefslogtreecommitdiffstats
path: root/video/out/gl_video.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-06 17:34:29 +0100
committerwm4 <wm4@nowhere>2015-01-06 17:34:29 +0100
commitb5529707f5dfb8073a13bb376fe64010186b60cf (patch)
treebcacf577b17519c4b3afa4c72a62f44e55c1fafb /video/out/gl_video.h
parent941eff85a64f1ac2178fcf5003fc652ee1e76cc2 (diff)
downloadmpv-b5529707f5dfb8073a13bb376fe64010186b60cf.tar.bz2
mpv-b5529707f5dfb8073a13bb376fe64010186b60cf.tar.xz
vo_opengl_cb: implement equalizer controls
This makes vo_opengl_cb respond to controls like "gamma" and "brightness". The commit includes an awkward refactor for vo_opengl to make it easier for vo_opengl_cb. One problem is a logical race condition. The set of supported controls depends on the pixelformat, which in turn is set by reconfig(). But the actual reconfig() call (on the renderer) happens asynchronously on the renderer thread. At the time it happens, the player most likely already tried to set some controls for command line options (see init_vo() in video.c). So setting this command line options will fail most of the time, though it could randomly succeed. This can't be fixed directly, because the player can't wait on the renderer thread, because the renderer thread might already wait on the player.
Diffstat (limited to 'video/out/gl_video.h')
-rw-r--r--video/out/gl_video.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/video/out/gl_video.h b/video/out/gl_video.h
index c11fb51cab..1ee0ec9213 100644
--- a/video/out/gl_video.h
+++ b/video/out/gl_video.h
@@ -73,8 +73,9 @@ void gl_video_resize(struct gl_video *p, struct mp_rect *window,
struct mp_rect *src, struct mp_rect *dst,
struct mp_osd_res *osd, bool vflip);
void gl_video_get_colorspace(struct gl_video *p, struct mp_image_params *params);
-bool gl_video_set_equalizer(struct gl_video *p, const char *name, int val);
-bool gl_video_get_equalizer(struct gl_video *p, const char *name, int *val);
+struct mp_csp_equalizer;
+struct mp_csp_equalizer *gl_video_eq_ptr(struct gl_video *p);
+void gl_video_eq_update(struct gl_video *p);
void gl_video_set_debug(struct gl_video *p, bool enable);
void gl_video_resize_redraw(struct gl_video *p, int w, int h);