summaryrefslogtreecommitdiffstats
path: root/libvo/gl_common.c
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2012-07-28 20:20:17 +0200
committerwm4 <wm4@mplayer2.org>2012-07-28 20:44:59 +0200
commit16145ff43fd92947cb8fe301ebce46e7be52a9fb (patch)
tree5a5ade633d922f416d3b1c7c68e8aff878da9a8f /libvo/gl_common.c
parentf03eed6469e34a5bff975ed43292016a621296ea (diff)
downloadmpv-16145ff43fd92947cb8fe301ebce46e7be52a9fb.tar.bz2
mpv-16145ff43fd92947cb8fe301ebce46e7be52a9fb.tar.xz
libvo, libao: remove useless video and audio output drivers
Some of these have only limited use, and some of these have no use at all. Remove them. They make maintainance harder and nobody needs them. It's possible that many of the removed drivers were very useful a dozen of years ago, but now it's 2012. Note that some of these could be added back, in case they were more useful than I thought. But right now, they are just a burden. Reason for removal for each module: vo_3dfx, vo_dfbmga, vo_dxr3, vo_ivtv, vo_mga, vo_s3fb, vo_tdfxfb, vo_xmga, vo_tdfx_vid: All of these are for very specific and outdated hardware. Some of them require non-standard kernel drivers or do direct HW access. vo_dga: the most crappy and ancient way to get fast output on X. vo_aa: there's vo_caca for the same purpose. vo_ggi: this never lived, and is entirely useless. vo_mpegpes: for DVB cards, I can't test this and it's crappy. vo_fbdev, vo_fbdev2: there's vo_directfb2 vo_bl: what is this even? But it's neither important, nor alive. vo_svga, vo_vesa: you want to use this? You can't be serious. vo_wii: I can't test this, and who the hell uses this? vo_xvr100: some Sun thing. vo_xover: only useful in connection with xvr100. ao_nas: still alive, but I doubt it has any meaning today. ao_sun: Sun. ao_win32: use ao_dsound or ao_portaudio instead. ao_ivtv: removed along vo_ivtv. Also get rid of anything SDL related. SDL 1.x is total crap for video output, and will be replaced with SDL 2.x soon (perhaps), so if you want to use SDL, write output drivers for SDL 2.x. Additionally, I accidentally damaged Sun support, which made me completely remove Sun/Solaris support. Nobody cares about this anyway. Some left overs from previous commits removing modules were cleaned up.
Diffstat (limited to 'libvo/gl_common.c')
-rw-r--r--libvo/gl_common.c76
1 files changed, 1 insertions, 75 deletions
diff --git a/libvo/gl_common.c b/libvo/gl_common.c
index 621bfa39a8..1c156277dc 100644
--- a/libvo/gl_common.c
+++ b/libvo/gl_common.c
@@ -2306,59 +2306,6 @@ static void swapGlBuffers_x11(MPGLContext *ctx)
}
#endif
-#ifdef CONFIG_GL_SDL
-#include "sdl_common.h"
-
-static int create_window_sdl(struct MPGLContext *ctx, uint32_t d_width,
- uint32_t d_height, uint32_t flags)
-{
- SDL_WM_SetCaption(vo_get_window_title(ctx->vo), NULL);
- ctx->vo->dwidth = d_width;
- ctx->vo->dheight = d_height;
- return 0;
-}
-
-static void swapGlBuffers_sdl(MPGLContext *ctx)
-{
- SDL_GL_SwapBuffers();
-}
-
-static void *sdlgpa(const GLubyte *name)
-{
- return SDL_GL_GetProcAddress(name);
-}
-
-static int setGlWindow_sdl(MPGLContext *ctx)
-{
- if (sdl_set_mode(0, SDL_OPENGL | SDL_RESIZABLE) < 0)
- return SET_WINDOW_FAILED;
- SDL_GL_LoadLibrary(NULL);
- getFunctions(ctx->gl, sdlgpa, NULL, false);
- return SET_WINDOW_OK;
-}
-
-static void releaseGlContext_sdl(MPGLContext *ctx)
-{
-}
-
-static int sdl_check_events(struct vo *vo)
-{
- int res = 0;
- SDL_Event event;
- while (SDL_PollEvent(&event))
- res |= sdl_default_handle_event(&event);
- // poll "events" from within MPlayer code
- res |= sdl_default_handle_event(NULL);
- if (res & VO_EVENT_RESIZE)
- sdl_set_mode(0, SDL_OPENGL | SDL_RESIZABLE);
- return res;
-}
-
-static void new_sdl_update_xinerama_info(struct vo *vo) { sdl_update_xinerama_info(); }
-static void new_vo_sdl_fullscreen(struct vo *vo) { vo_sdl_fullscreen(); }
-static void new_vo_sdl_uninit(struct vo *vo) { vo_sdl_uninit(); }
-
-#endif
struct backend {
const char *name;
@@ -2370,13 +2317,11 @@ static struct backend backends[] = {
{"cocoa", GLTYPE_COCOA},
{"win", GLTYPE_W32},
{"x11", GLTYPE_X11},
- {"sdl", GLTYPE_SDL},
// mplayer-svn aliases (note that mplayer-svn couples these with the numeric
// values of the internal GLTYPE_* constants)
{"-1", GLTYPE_AUTO},
{ "0", GLTYPE_W32},
{ "1", GLTYPE_X11},
- { "2", GLTYPE_SDL},
{0}
};
@@ -2400,10 +2345,7 @@ MPGLContext *init_mpglcontext(enum MPGLType type, struct vo *vo)
ctx = init_mpglcontext(GLTYPE_W32, vo);
if (ctx)
return ctx;
- ctx = init_mpglcontext(GLTYPE_X11, vo);
- if (ctx)
- return ctx;
- return init_mpglcontext(GLTYPE_SDL, vo);
+ return init_mpglcontext(GLTYPE_X11, vo);
}
ctx = talloc_zero(NULL, MPGLContext);
ctx->gl = talloc_zero(ctx, GL);
@@ -2462,22 +2404,6 @@ MPGLContext *init_mpglcontext(enum MPGLType type, struct vo *vo)
return ctx;
break;
#endif
-#ifdef CONFIG_GL_SDL
- case GLTYPE_SDL:
- ctx->create_window = create_window_sdl;
- ctx->setGlWindow = setGlWindow_sdl;
- ctx->releaseGlContext = releaseGlContext_sdl;
- ctx->swapGlBuffers = swapGlBuffers_sdl;
- ctx->update_xinerama_info = new_sdl_update_xinerama_info;
- ctx->check_events = sdl_check_events;
- ctx->fullscreen = new_vo_sdl_fullscreen;
- ctx->vo_uninit = new_vo_sdl_uninit;
- //the SDL code is hardcoded to use the deprecated vo API
- global_vo = vo;
- if (vo_sdl_init())
- return ctx;
- break;
-#endif
}
talloc_free(ctx);
return NULL;