diff options
Diffstat (limited to 'libvo/vo_gl.c')
-rw-r--r-- | libvo/vo_gl.c | 54 |
1 files changed, 20 insertions, 34 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index ab24a65494..e86425dbe7 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -31,11 +31,8 @@ #include "gl_common.h" #include "aspect.h" -#ifdef CONFIG_GUI -#include "gui/interface.h" -#endif #include "fastmemcpy.h" -#include "libass/ass_mp.h" +#include "ass_mp.h" static const vo_info_t info = { @@ -293,11 +290,11 @@ static void clearEOSD(void) { eosdtex = NULL; } -static inline int is_tinytex(ass_image_t *i, int tinytexcur) { +static inline int is_tinytex(ASS_Image *i, int tinytexcur) { return i->w < TINYTEX_SIZE && i->h < TINYTEX_SIZE && tinytexcur < TINYTEX_MAX; } -static inline int is_smalltex(ass_image_t *i, int smalltexcur) { +static inline int is_smalltex(ASS_Image *i, int smalltexcur) { return i->w < SMALLTEX_SIZE && i->h < SMALLTEX_SIZE && smalltexcur < SMALLTEX_MAX; } @@ -322,8 +319,8 @@ static void genEOSD(mp_eosd_images_t *imgs) { int smalltexcur = 0; GLuint *curtex; GLint scale_type = scaled_osd ? GL_LINEAR : GL_NEAREST; - ass_image_t *img = imgs->imgs; - ass_image_t *i; + ASS_Image *img = imgs->imgs; + ASS_Image *i; if (imgs->changed == 0) // there are elements, but they are unchanged return; @@ -550,16 +547,8 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin is_yuv |= (xs << 8) | (ys << 16); glFindFormat(format, NULL, &gl_texfmt, &gl_format, &gl_type); - int_pause = 0; vo_flipped = !!(flags & VOFLAG_FLIPPING); -#ifdef CONFIG_GUI - if (use_gui) { - // GUI creates and manages window for us - guiGetEvent(guiSetShVideo, 0); - goto glconfig; - } -#endif #ifdef CONFIG_GL_WIN32 if (glctx.type == GLTYPE_W32 && !vo_w32_config(d_width, d_height, flags)) return -1; @@ -1167,7 +1156,7 @@ static const struct { {NULL, NULL, 0 } }; -static int control(uint32_t request, void *data, ...) +static int control(uint32_t request, void *data) { switch (request) { case VOCTRL_PAUSE: @@ -1190,7 +1179,6 @@ static int control(uint32_t request, void *data, ...) { mp_eosd_res_t *r = data; r->w = vo_dwidth; r->h = vo_dheight; - r->srcw = image_width; r->srch = image_height; r->mt = r->mb = r->ml = r->mr = 0; if (scaled_osd) {r->w = image_width; r->h = image_height;} else if (aspect_scaling()) { @@ -1199,8 +1187,6 @@ static int control(uint32_t request, void *data, ...) } } return VO_TRUE; - case VOCTRL_GUISUPPORT: - return VO_TRUE; case VOCTRL_ONTOP: glctx.ontop(); return VO_TRUE; @@ -1221,33 +1207,25 @@ static int control(uint32_t request, void *data, ...) return VO_TRUE; case VOCTRL_GET_EQUALIZER: if (is_yuv) { + struct voctrl_get_equalizer_args *args = data; int i; - va_list va; - int *value; - va_start(va, data); - value = va_arg(va, int *); - va_end(va); for (i = 0; eq_map[i].name; i++) - if (strcmp(data, eq_map[i].name) == 0) break; + if (strcmp(args->name, eq_map[i].name) == 0) break; if (!(eq_map[i].supportmask & (1 << use_yuv))) break; - *value = *eq_map[i].value; + *args->valueptr = *eq_map[i].value; return VO_TRUE; } break; case VOCTRL_SET_EQUALIZER: if (is_yuv) { + struct voctrl_set_equalizer_args *args = data; int i; - va_list va; - int value; - va_start(va, data); - value = va_arg(va, int); - va_end(va); for (i = 0; eq_map[i].name; i++) - if (strcmp(data, eq_map[i].name) == 0) break; + if (strcmp(args->name, eq_map[i].name) == 0) break; if (!(eq_map[i].supportmask & (1 << use_yuv))) break; - *eq_map[i].value = value; + *eq_map[i].value = args->value; update_yuvconv(); return VO_TRUE; } @@ -1255,6 +1233,14 @@ static int control(uint32_t request, void *data, ...) case VOCTRL_UPDATE_SCREENINFO: glctx.update_xinerama_info(); return VO_TRUE; + case VOCTRL_REDRAW_OSD: + if (vo_doublebuffering) + do_render(); + draw_osd(); + if (vo_doublebuffering) + do_render_osd(2); + flip_page(); + return VO_TRUE; } return VO_NOTIMPL; } |