]> git.sesse.net Git - vlc/commitdiff
* Probably fixed the "X eats more and more CPU" bug. Please test.
authorSam Hocevar <sam@videolan.org>
Sat, 7 Jul 2001 17:45:29 +0000 (17:45 +0000)
committerSam Hocevar <sam@videolan.org>
Sat, 7 Jul 2001 17:45:29 +0000 (17:45 +0000)
  * mingw32 cross-compilation issue fixed.

Makefile.opts.in
configure
configure.in
plugins/x11/vout_x11.c
plugins/x11/vout_xvideo.c

index daa57953ebb20114b0f43191d6476258e57706de..58114f0fde9b4a128457a15f52e64beb2e414d57 100644 (file)
@@ -46,6 +46,7 @@ CC = @CC@
 CFLAGS = @CFLAGS@
 SHELL = @SHELL@
 RANLIB = @RANLIB@
+WINDRES = @WINDRES@
 MOC = @MOC@
 
 # 
index f74f6a3d71d7e736a0f28777e2c6a3966e0d513e..fbec586b2d01be4b207ae45ca5c5e26b89b8276c 100755 (executable)
--- a/configure
+++ b/configure
@@ -4525,6 +4525,7 @@ fi
 
 
 
+
 
 
 trap '' 1 2 15
@@ -4693,6 +4694,7 @@ s%@PROFILING@%$PROFILING%g
 s%@OPTIMS@%$OPTIMS%g
 s%@CSS@%$CSS%g
 s%@MOC@%$MOC%g
+s%@WINDRES@%$WINDRES%g
 s%@LCFLAGS@%$LCFLAGS%g
 s%@PLCFLAGS@%$PLCFLAGS%g
 s%@LIB@%$LIB%g
index f4a7e388bc69d685a5397612f99dc32b4fdca981..28a74fce5d964cc497b0279a142a1d8ff7bd625c 100644 (file)
@@ -634,6 +634,7 @@ AC_SUBST(PROFILING)
 AC_SUBST(OPTIMS)
 AC_SUBST(CSS)
 AC_SUBST(MOC)
+AC_SUBST(WINDRES)
 
 AC_SUBST(LCFLAGS)
 AC_SUBST(PLCFLAGS)
index aeca0227ff434b685fda70cde08303c43c04e141..edee5bc5ca154d7b7d5c5e7e059b3357cb96ce7b 100644 (file)
@@ -2,7 +2,7 @@
  * vout_x11.c: X11 video output display method
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vout_x11.c,v 1.28 2001/06/25 11:34:08 sam Exp $
+ * $Id: vout_x11.c,v 1.29 2001/07/07 17:45:28 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -683,7 +683,7 @@ static void vout_Display( vout_thread_t *p_vout )
                      p_vout->p_sys->p_ximage[ p_vout->i_buffer_index ],
                      0, 0, 0, 0,
                      p_vout->p_sys->p_ximage[ p_vout->i_buffer_index ]->width,
-                     p_vout->p_sys->p_ximage[ p_vout->i_buffer_index ]->height, True);
+                     p_vout->p_sys->p_ximage[ p_vout->i_buffer_index ]->height, False);
 
         /* Send the order to the X server */
         XSync(p_vout->p_sys->p_display, False);
index d44e6ce455242cf126d532edf82dae330d68a12e..8f36862fd9c3a0b7e71fa3241ace9802a41d9c27 100644 (file)
@@ -2,7 +2,7 @@
  * vout_xvideo.c: Xvideo video output display method
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
- * $Id: vout_xvideo.c,v 1.20 2001/06/25 11:34:08 sam Exp $
+ * $Id: vout_xvideo.c,v 1.21 2001/07/07 17:45:29 sam Exp $
  *
  * Authors: Shane Harper <shanegh@optusnet.com.au>
  *          Vincent Seguin <seguin@via.ecp.fr>
@@ -1144,6 +1144,7 @@ static int XVideoGetPort( Display *dpy )
     }
 
     for( i=0; i < i_adaptors && xv_port == -1; ++i )
+    {
         if( ( adaptor_info[ i ].type & XvInputMask ) &&
             ( adaptor_info[ i ].type & XvImageMask ) )
         {
@@ -1155,24 +1156,37 @@ static int XVideoGetPort( Display *dpy )
             imageFormats = XvListImageFormats( dpy, port, &i_num_formats );
 
             for( i=0; i < i_num_formats && xv_port == -1; ++i )
+            {
                 if( imageFormats[ i ].id == GUID_YUV12_PLANAR )
+                {
                     xv_port = port;
+                }
+            }
 
             if( xv_port == -1 )
+            {
                 intf_WarnMsg( 3, "vout: XVideo image input port %d "
                         "does not support the YUV12 planar format which is "
-                        "currently required by the xvideo output plugin.",
+                        "currently required by the xvideo output plugin",
                         port );
+            }
 
             if( imageFormats )
+            {
                 XFree( imageFormats );
+            }
         }
+    }
 
     if( i_adaptors > 0 )
+    {
         XvFreeAdaptorInfo(adaptor_info);
+    }
 
     if( xv_port == -1 )
-        intf_ErrMsg( "vout error: didn't find a suitable Xvideo image input port." );
+    {
+        intf_ErrMsg( "vout error: no suitable Xvideo image input port" );
+    }
 
     return( xv_port );
 }
@@ -1189,7 +1203,10 @@ static void XVideoDisplay( vout_thread_t *p_vout )
 {
     int     i_dest_width, i_dest_height, i_dest_x, i_dest_y;
 
-    if( !p_vout->p_sys->p_xvimage ) return;
+    if( !p_vout->p_sys->p_xvimage )
+    {
+        return;
+    }
 
     XVideoOutputCoords( p_vout->p_rendered_pic, p_vout->b_scale,
                         p_vout->p_sys->i_window_width,
@@ -1204,12 +1221,15 @@ static void XVideoDisplay( vout_thread_t *p_vout )
                    p_vout->p_rendered_pic->i_width,
                    p_vout->p_rendered_pic->i_height,
                    0 /*dest_x*/, 0 /*dest_y*/, i_dest_width, i_dest_height,
-                   True );
+                   False );
+
+    XResizeWindow( p_vout->p_sys->p_display, p_vout->p_sys->yuv_window,
+                   i_dest_width, i_dest_height );
+    XMoveWindow( p_vout->p_sys->p_display, p_vout->p_sys->yuv_window,
+                 i_dest_x, i_dest_y );
 
-     XResizeWindow( p_vout->p_sys->p_display, p_vout->p_sys->yuv_window,
-             i_dest_width, i_dest_height );
-     XMoveWindow( p_vout->p_sys->p_display, p_vout->p_sys->yuv_window,
-             i_dest_x, i_dest_y );
+    /* Send the order to the X server */
+    XSync( p_vout->p_sys->p_display, False );
 }
 
 #if 0