[MPlayer-cvslog] r30507 - in trunk/libvo: video_out.h vo_gl.c x11_common.c

reimar subversion at mplayerhq.hu
Thu Feb 4 23:08:23 CET 2010


Author: reimar
Date: Thu Feb  4 23:08:23 2010
New Revision: 30507

Log:
Create the OpenGL probe window as a hidden Window on X11.

Modified:
   trunk/libvo/video_out.h
   trunk/libvo/vo_gl.c
   trunk/libvo/x11_common.c

Modified: trunk/libvo/video_out.h
==============================================================================
--- trunk/libvo/video_out.h	Thu Feb  4 22:20:47 2010	(r30506)
+++ trunk/libvo/video_out.h	Thu Feb  4 23:08:23 2010	(r30507)
@@ -108,6 +108,7 @@ typedef struct {
 #define VOFLAG_MODESWITCHING	0x02
 #define VOFLAG_SWSCALE		0x04
 #define VOFLAG_FLIPPING		0x08
+#define VOFLAG_HIDDEN		0x10  //< Use to create a hidden window
 #define VOFLAG_XOVERLAY_SUB_VO  0x10000
 
 typedef struct vo_info_s

Modified: trunk/libvo/vo_gl.c
==============================================================================
--- trunk/libvo/vo_gl.c	Thu Feb  4 22:20:47 2010	(r30506)
+++ trunk/libvo/vo_gl.c	Thu Feb  4 23:08:23 2010	(r30507)
@@ -1167,7 +1167,7 @@ static int preinit(const char *arg)
     if (!init_mpglcontext(&glctx, gltype))
       goto err_out;
     if (use_yuv == -1) {
-      if (create_window(320, 200, 0, NULL) < 0)
+      if (create_window(320, 200, VOFLAG_HIDDEN, NULL) < 0)
         goto err_out;
       if (glctx.setGlWindow(&glctx) == SET_WINDOW_FAILED)
         goto err_out;

Modified: trunk/libvo/x11_common.c
==============================================================================
--- trunk/libvo/x11_common.c	Thu Feb  4 22:20:47 2010	(r30506)
+++ trunk/libvo/x11_common.c	Thu Feb  4 23:08:23 2010	(r30507)
@@ -104,6 +104,7 @@ int mLocalDisplay;
 int vo_mouse_autohide = 0;
 int vo_wm_type = 0;
 int vo_fs_type = 0; // needs to be accessible for GUI X11 code
+static int window_state;
 static int vo_fs_flip = 0;
 char **vo_fstype_list;
 
@@ -1102,13 +1103,18 @@ void vo_x11_create_vo_window(XVisualInfo
     goto final;
   }
   if (vo_window == None) {
-    XSizeHints hint;
-    XEvent xev;
     vo_fs = 0;
     vo_dwidth = width;
     vo_dheight = height;
     vo_window = vo_x11_create_smooth_window(mDisplay, mRootWin, vis->visual,
                       x, y, width, height, vis->depth, col_map);
+    window_state = VOFLAG_HIDDEN;
+  }
+  if (flags & VOFLAG_HIDDEN)
+    goto final;
+  if (window_state & VOFLAG_HIDDEN) {
+    XSizeHints hint;
+    XEvent xev;
     vo_x11_classhint(mDisplay, vo_window, classname);
     XStoreName(mDisplay, vo_window, title);
     vo_hidecursor(mDisplay, vo_window);


More information about the MPlayer-cvslog mailing list