From 3611d1bf9ba6f34909108166aaa21deaffc72c57 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 23 Sep 2012 16:10:00 +0200 Subject: VO: actually rename VOs gl -> opengl-old, gl3 -> opengl This renames vo_gl3 to vo_opengl, and makes it the default. The old vo_gl is still available under "opengl-old". We keep "gl3" as alias to "opengl" for short-term compatibility. For OSX/Cocoa, the autoprobe order changes (prefer the "opengl" over "opengl-old"). Remove "gl_nosw". This was a compatibility alias for "opengl-old", and there's no point in keeping it. --- libvo/video_out.c | 15 +++++++-------- libvo/vo_opengl.c | 29 ++++++++++++++++++++++++----- libvo/vo_opengl_old.c | 30 ++++-------------------------- 3 files changed, 35 insertions(+), 39 deletions(-) (limited to 'libvo') diff --git a/libvo/video_out.c b/libvo/video_out.c index 2be311f87c..f75d9f273c 100644 --- a/libvo/video_out.c +++ b/libvo/video_out.c @@ -73,8 +73,8 @@ int vo_colorkey = 0x0000ff00; // default colorkey is green extern struct vo_driver video_out_x11; extern struct vo_driver video_out_vdpau; extern struct vo_driver video_out_xv; -extern struct vo_driver video_out_gl_nosw; -extern struct vo_driver video_out_gl; +extern struct vo_driver video_out_opengl; +extern struct vo_driver video_out_opengl_old; extern struct vo_driver video_out_gl3; extern struct vo_driver video_out_null; extern struct vo_driver video_out_image; @@ -91,7 +91,8 @@ const struct vo_driver *video_out_drivers[] = &video_out_direct3d, #endif #ifdef CONFIG_GL_COCOA - &video_out_gl, + &video_out_opengl, + &video_out_opengl_old, #endif #ifdef CONFIG_COREVIDEO &video_out_corevideo, @@ -103,9 +104,9 @@ const struct vo_driver *video_out_drivers[] = &video_out_xv, #endif #ifdef CONFIG_GL - &video_out_gl3, #if !defined CONFIG_GL_COCOA - &video_out_gl, + &video_out_opengl, + &video_out_opengl_old, #endif #endif #ifdef CONFIG_X11 @@ -120,10 +121,8 @@ const struct vo_driver *video_out_drivers[] = #ifdef CONFIG_ENCODING &video_out_lavc, #endif -#ifdef CONFIG_X11 #ifdef CONFIG_GL - &video_out_gl_nosw, -#endif + &video_out_gl3, #endif NULL }; diff --git a/libvo/vo_opengl.c b/libvo/vo_opengl.c index d2a28aa41a..2f1cc0545b 100644 --- a/libvo/vo_opengl.c +++ b/libvo/vo_opengl.c @@ -54,7 +54,7 @@ #include "fastmemcpy.h" #include "sub/ass_mp.h" -static const char vo_gl3_shaders[] = +static const char vo_opengl_shaders[] = // Generated from libvo/vo_opengl_shaders.glsl #include "libvo/vo_opengl_shaders.h" ; @@ -655,7 +655,7 @@ static void compile_shaders(struct gl_priv *p) void *tmp = talloc_new(NULL); - struct bstr src = bstr0(vo_gl3_shaders); + struct bstr src = bstr0(vo_opengl_shaders); char *vertex_shader = get_section(tmp, src, "vertex_all"); char *shader_prelude = get_section(tmp, src, "prelude"); char *s_video = get_section(tmp, src, "frag_video"); @@ -2437,10 +2437,29 @@ err_out: return -1; } +const struct vo_driver video_out_opengl = { + .is_new = true, + .info = &(const vo_info_t) { + "Extended OpenGL Renderer", + "opengl", + "Based on vo_gl.c by Reimar Doeffinger", + "" + }, + .preinit = preinit, + .config = config, + .control = control, + .draw_slice = draw_slice, + .draw_osd = draw_osd, + .flip_page = flip_page, + .check_events = check_events, + .uninit = uninit, +}; + +// short-term compatibility const struct vo_driver video_out_gl3 = { .is_new = true, .info = &(const vo_info_t) { - "OpenGL 3.x", + "Extended OpenGL Renderer", "gl3", "Based on vo_gl.c by Reimar Doeffinger", "" @@ -2456,8 +2475,8 @@ const struct vo_driver video_out_gl3 = { }; static const char help_text[] = -"\n--vo=gl3 command line help:\n" -"Example: mplayer --vo=gl3:scale-sep:lscale=lanczos2\n" +"\n--vo=opengl command line help:\n" +"Example: mplayer --vo=opengl:scale-sep:lscale=lanczos2\n" "\nOptions:\n" " lscale=\n" " Set the scaling filter. Possible choices:\n" diff --git a/libvo/vo_opengl_old.c b/libvo/vo_opengl_old.c index f24448ac6c..e8cdd47172 100644 --- a/libvo/vo_opengl_old.c +++ b/libvo/vo_opengl_old.c @@ -1230,8 +1230,8 @@ static int preinit(struct vo *vo, const char *arg) if (subopt_parse(arg, subopts) != 0) { mp_msg(MSGT_VO, MSGL_FATAL, - "\n-vo gl command line help:\n" - "Example: mplayer -vo gl:slice-height=4\n" + "\n-vo opengl_old command line help:\n" + "Example: mplayer -vo opengl_old:slice-height=4\n" "\nOptions:\n" " nomanyfmts\n" " Disable extended color formats for OpenGL 1.2 and later\n" @@ -1454,33 +1454,11 @@ static int control(struct vo *vo, uint32_t request, void *data) return VO_NOTIMPL; } -const struct vo_driver video_out_gl = { +const struct vo_driver video_out_opengl_old = { .is_new = true, .info = &(const vo_info_t) { "OpenGL", - "gl", - "Reimar Doeffinger ", - "" - }, - .preinit = preinit, - .config = config, - .control = control, - .draw_slice = draw_slice, - .draw_osd = draw_osd, - .flip_page = flip_page, - .check_events = check_events, - .uninit = uninit, -}; - -// "-vo gl" used to accept software renderers by default. This is not the case -// anymore: you have to use "-vo gl:sw" to get this. This means gl and gl_nosw -// are exactly the same thing now. Keep gl_nosw to not break user configs. -const struct vo_driver video_out_gl_nosw = -{ - .is_new = true, - .info = &(const vo_info_t) { - "OpenGL no software rendering", - "gl_nosw", + "opengl-old", "Reimar Doeffinger ", "" }, -- cgit v1.2.3