[Mplayer-cvslog] CVS: main/libvo vo_xv.c,1.120,1.121
Arpi of Ize
arpi at mplayerhq.hu
Wed Oct 16 21:31:10 CEST 2002
Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv5211
Modified Files:
vo_xv.c
Log Message:
-fixed-vo support, based on patch by .so :)
Index: vo_xv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -r1.120 -r1.121
--- vo_xv.c 10 Oct 2002 00:09:34 -0000 1.120
+++ vo_xv.c 16 Oct 2002 19:31:07 -0000 1.121
@@ -1,3 +1,4 @@
+/* vo_xv.c, X11 Xv interface */
// Number of buffers _FOR_DOUBLEBUFFERING_MODE_
// Use option -double to enable double buffering! (default: single buffer)
@@ -15,21 +16,6 @@
3: 2*STATIC+TEMP
*/
-
-/*
- * vo_xv.c, X11 Xv interface
- *
- * Copyright (C) 1996, MPEG Software Simulation Group. All Rights Reserved.
- *
- * Hacked into mpeg2dec by
- *
- * Aaron Holtzman <aholtzma at ess.engr.uvic.ca>
- *
- * Xv image suuport by Gerd Knorr <kraxel at goldbach.in-berlin.de>
- * fullscreen support by Pontscho
- * double buffering support by A'rpi
- */
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -258,6 +244,8 @@
return(VO_FALSE);
}
+static void deallocate_xvimage(int foo);
+
/*
* connect to server, create and map window,
* allocate colors and (shared) memory
@@ -377,7 +365,7 @@
XMapWindow( mDisplay,vo_window );
} else { drwX=vo_dx; drwY=vo_dy; }
} else
- {
+ if ( vo_window == None ){
vo_window = XCreateWindow(mDisplay, mRootWin,
hint.x, hint.y, hint.width, hint.height,
0, depth,CopyFromParent,vinfo.visual,xswamask,&xswa);
@@ -396,7 +384,9 @@
#ifdef HAVE_XINERAMA
vo_x11_xinerama_move(mDisplay,vo_window);
#endif
- }
+ } else
+ XMoveResizeWindow( mDisplay,vo_window,hint.x,hint.y,hint.width,hint.height );
+
vo_gc = XCreateGC(mDisplay, vo_window, 0L, &xgcv);
XFlush(mDisplay);
XSync(mDisplay, False);
@@ -424,6 +414,10 @@
case IMGFMT_UYVY: draw_alpha_fnc=draw_alpha_uyvy; break;
default: draw_alpha_fnc=draw_alpha_null;
}
+
+ if ( vo_config_count )
+ for(current_buf=0;current_buf<num_buffers;++current_buf)
+ deallocate_xvimage(current_buf);
for(current_buf=0;current_buf<num_buffers;++current_buf)
allocate_xvimage(current_buf);
More information about the MPlayer-cvslog
mailing list