Commit f58cb69a authored by Sam Hocevar's avatar Sam Hocevar

  * Probably fixed the "X eats more and more CPU" bug. Please test.
  * mingw32 cross-compilation issue fixed.
parent 43f8d0ef
...@@ -46,6 +46,7 @@ CC = @CC@ ...@@ -46,6 +46,7 @@ CC = @CC@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
SHELL = @SHELL@ SHELL = @SHELL@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
WINDRES = @WINDRES@
MOC = @MOC@ MOC = @MOC@
# #
......
...@@ -4525,6 +4525,7 @@ fi ...@@ -4525,6 +4525,7 @@ fi
trap '' 1 2 15 trap '' 1 2 15
...@@ -4693,6 +4694,7 @@ s%@PROFILING@%$PROFILING%g ...@@ -4693,6 +4694,7 @@ s%@PROFILING@%$PROFILING%g
s%@OPTIMS@%$OPTIMS%g s%@OPTIMS@%$OPTIMS%g
s%@CSS@%$CSS%g s%@CSS@%$CSS%g
s%@MOC@%$MOC%g s%@MOC@%$MOC%g
s%@WINDRES@%$WINDRES%g
s%@LCFLAGS@%$LCFLAGS%g s%@LCFLAGS@%$LCFLAGS%g
s%@PLCFLAGS@%$PLCFLAGS%g s%@PLCFLAGS@%$PLCFLAGS%g
s%@LIB@%$LIB%g s%@LIB@%$LIB%g
......
...@@ -634,6 +634,7 @@ AC_SUBST(PROFILING) ...@@ -634,6 +634,7 @@ AC_SUBST(PROFILING)
AC_SUBST(OPTIMS) AC_SUBST(OPTIMS)
AC_SUBST(CSS) AC_SUBST(CSS)
AC_SUBST(MOC) AC_SUBST(MOC)
AC_SUBST(WINDRES)
AC_SUBST(LCFLAGS) AC_SUBST(LCFLAGS)
AC_SUBST(PLCFLAGS) AC_SUBST(PLCFLAGS)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout_x11.c: X11 video output display method * vout_x11.c: X11 video output display method
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * 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> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -683,7 +683,7 @@ static void vout_Display( vout_thread_t *p_vout ) ...@@ -683,7 +683,7 @@ static void vout_Display( vout_thread_t *p_vout )
p_vout->p_sys->p_ximage[ p_vout->i_buffer_index ], p_vout->p_sys->p_ximage[ p_vout->i_buffer_index ],
0, 0, 0, 0, 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 ]->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 */ /* Send the order to the X server */
XSync(p_vout->p_sys->p_display, False); XSync(p_vout->p_sys->p_display, False);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout_xvideo.c: Xvideo video output display method * vout_xvideo.c: Xvideo video output display method
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN * 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> * Authors: Shane Harper <shanegh@optusnet.com.au>
* Vincent Seguin <seguin@via.ecp.fr> * Vincent Seguin <seguin@via.ecp.fr>
...@@ -1144,6 +1144,7 @@ static int XVideoGetPort( Display *dpy ) ...@@ -1144,6 +1144,7 @@ static int XVideoGetPort( Display *dpy )
} }
for( i=0; i < i_adaptors && xv_port == -1; ++i ) for( i=0; i < i_adaptors && xv_port == -1; ++i )
{
if( ( adaptor_info[ i ].type & XvInputMask ) && if( ( adaptor_info[ i ].type & XvInputMask ) &&
( adaptor_info[ i ].type & XvImageMask ) ) ( adaptor_info[ i ].type & XvImageMask ) )
{ {
...@@ -1155,24 +1156,37 @@ static int XVideoGetPort( Display *dpy ) ...@@ -1155,24 +1156,37 @@ static int XVideoGetPort( Display *dpy )
imageFormats = XvListImageFormats( dpy, port, &i_num_formats ); imageFormats = XvListImageFormats( dpy, port, &i_num_formats );
for( i=0; i < i_num_formats && xv_port == -1; ++i ) for( i=0; i < i_num_formats && xv_port == -1; ++i )
{
if( imageFormats[ i ].id == GUID_YUV12_PLANAR ) if( imageFormats[ i ].id == GUID_YUV12_PLANAR )
{
xv_port = port; xv_port = port;
}
}
if( xv_port == -1 ) if( xv_port == -1 )
{
intf_WarnMsg( 3, "vout: XVideo image input port %d " intf_WarnMsg( 3, "vout: XVideo image input port %d "
"does not support the YUV12 planar format which is " "does not support the YUV12 planar format which is "
"currently required by the xvideo output plugin.", "currently required by the xvideo output plugin",
port ); port );
}
if( imageFormats ) if( imageFormats )
{
XFree( imageFormats ); XFree( imageFormats );
}
} }
}
if( i_adaptors > 0 ) if( i_adaptors > 0 )
{
XvFreeAdaptorInfo(adaptor_info); XvFreeAdaptorInfo(adaptor_info);
}
if( xv_port == -1 ) 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 ); return( xv_port );
} }
...@@ -1189,7 +1203,10 @@ static void XVideoDisplay( vout_thread_t *p_vout ) ...@@ -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; 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, XVideoOutputCoords( p_vout->p_rendered_pic, p_vout->b_scale,
p_vout->p_sys->i_window_width, p_vout->p_sys->i_window_width,
...@@ -1204,12 +1221,15 @@ static void XVideoDisplay( vout_thread_t *p_vout ) ...@@ -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_width,
p_vout->p_rendered_pic->i_height, p_vout->p_rendered_pic->i_height,
0 /*dest_x*/, 0 /*dest_y*/, i_dest_width, i_dest_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, /* Send the order to the X server */
i_dest_width, i_dest_height ); XSync( p_vout->p_sys->p_display, False );
XMoveWindow( p_vout->p_sys->p_display, p_vout->p_sys->yuv_window,
i_dest_x, i_dest_y );
} }
#if 0 #if 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment