summaryrefslogtreecommitdiffstats
path: root/libvo/video_out.c
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2011-09-29 22:20:46 +0200
committerUoti Urpala <uau@mplayer2.org>2011-10-24 06:14:19 +0300
commitbb8781a00a590412926f240fd0731a25127eb046 (patch)
tree03d4c7aef466dffdfa6db6426e98820b00dd35c8 /libvo/video_out.c
parent98b89d4aa78dc62317300ac59e8bd4b1d5d80977 (diff)
downloadmpv-bb8781a00a590412926f240fd0731a25127eb046.tar.bz2
mpv-bb8781a00a590412926f240fd0731a25127eb046.tar.xz
vo_gl: add new vo name "gl_sdl" to make SDL+GL mode available
The actual work is done by the existing SDL code. This commit merely makes it possible to explicitly select the SDL backend ("gl" alone uses SDL only if the X11 and win32 backends are not available, while the new "gl_sdl" always forces use of SDL). Also disable YUV conversion method autodetection when SDL is used. This gets rid of a temporary window that appears for a moment and is immediately closed again. SDL can't deal with the VOFLAG_HIDDEN flag, which is needed to create an invisible GL context (when the autodetection is run, the video size isn't yet known to the VO, and creating a window then resizing would cause problems with window placement). Instead always pick the fragment program method by default (yuv=2). This change affects the normal "gl" VO too if it chooses the SDL backend.
Diffstat (limited to 'libvo/video_out.c')
-rw-r--r--libvo/video_out.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libvo/video_out.c b/libvo/video_out.c
index 3338dbf551..e796784b1e 100644
--- a/libvo/video_out.c
+++ b/libvo/video_out.c
@@ -84,6 +84,7 @@ 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_gl_sdl;
extern struct vo_driver video_out_dga;
extern struct vo_driver video_out_sdl;
extern struct vo_driver video_out_3dfx;
@@ -180,6 +181,9 @@ const struct vo_driver *video_out_drivers[] =
#ifdef CONFIG_GL
&video_out_gl,
#endif
+#ifdef CONFIG_GL_SDL
+ &video_out_gl_sdl,
+#endif
#ifdef CONFIG_DGA
&video_out_dga,
#endif