[Mplayer-cvslog] CVS: main/libvo vo_x11.c,1.99,1.100 x11_common.c,1.74,1.75 x11_common.h,1.22,1.23
Zoltan Ponekker
pontscho at mplayerhq.hu
Wed May 8 18:41:47 CEST 2002
Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv26564/libvo
Modified Files:
vo_x11.c x11_common.c x11_common.h
Log Message:
some bugfix, x[11|mga|v] ( fullscreen with more files )
Index: vo_x11.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_x11.c,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -r1.99 -r1.100
--- vo_x11.c 6 May 2002 16:56:41 -0000 1.99
+++ vo_x11.c 8 May 2002 16:41:44 -0000 1.100
@@ -45,6 +45,11 @@
#include "../mp_msg.h"
+#ifdef HAVE_NEW_GUI
+#include "../Gui/interface.h"
+#include "../mplayer.h"
+#endif
+
static vo_info_t vo_info =
{
"X11 ( XImage/Shm )",
@@ -91,6 +96,9 @@
static int srcH=-1;
static int aspect; // 1<<16 based fixed point aspect, so that the aspect stays correct during resizing
+static int old_vo_dwidth=-1;
+static int old_vo_dheight=-1;
+
static void check_events(){
int ret = vo_x11_check_events(mDisplay);
@@ -243,6 +251,9 @@
vo_mouse_autohide=1;
+ old_vo_dwidth=-1;
+ old_vo_dheight=-1;
+
if (!title)
title = strdup("MPlayer X11 (XImage/Shm) render");
@@ -260,7 +271,7 @@
//printf( "w: %d h: %d\n\n",vo_dwidth,vo_dheight );
- XGetWindowAttributes( mDisplay,DefaultRootWindow( mDisplay ),&attribs );
+ XGetWindowAttributes( mDisplay,mRootWin,&attribs );
depth=attribs.depth;
if ( depth != 15 && depth != 16 && depth != 24 && depth != 32 ) depth=24;
@@ -275,18 +286,19 @@
aspect= ((1<<16)*d_width + d_height/2)/d_height;
#ifdef HAVE_NEW_GUI
- if ( vo_window == None )
+ if(use_gui) guiGetEvent( guiSetShVideo,0 ); // the GUI will set up / resize the window
+ else
#endif
{
hint.x=0;
hint.y=0;
- if(zoomFlag){
- hint.width=d_width;
- hint.height=d_height;
- }else{
- hint.width=width;
- hint.height=height;
- }
+// if(zoomFlag){
+// hint.width=d_width;
+// hint.height=d_height;
+// }else{
+// hint.width=width;
+// hint.height=height;
+// }
#ifdef HAVE_XF86VM
if ( vm )
@@ -468,8 +480,6 @@
{
uint8_t *dst[3];
int dstStride[3];
- static int old_vo_dwidth=-1;
- static int old_vo_dheight=-1;
if((old_vo_dwidth != vo_dwidth || old_vo_dheight != vo_dheight) /*&& y==0*/ && zoomFlag)
{
@@ -602,6 +612,7 @@
vo_vm_close(mDisplay);
#endif
+ zoomFlag=0;
vo_x11_uninit(mDisplay, vo_window);
freeSwsContext(swsContext);
@@ -616,7 +627,7 @@
}
#ifdef HAVE_NEW_GUI
- if ( vo_window == None )
+ if ( !use_gui )
#endif
if( !vo_init() ) return -1; // Can't open X11
Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- x11_common.c 7 May 2002 13:31:29 -0000 1.74
+++ x11_common.c 8 May 2002 16:41:44 -0000 1.75
@@ -37,6 +37,7 @@
#ifdef HAVE_NEW_GUI
#include "../Gui/interface.h"
+#include "../mplayer.h"
#endif
/*
@@ -355,6 +356,12 @@
return 1;
}
+void vo_uninit( void )
+{
+ printf("vo: uninit ...\n" );
+ if( !vo_depthonscreen ) return;
+ XCloseDisplay( mDisplay );
+}
#include "../linux/keycodes.h"
#include "wskeys.h"
@@ -507,14 +514,14 @@
#ifdef HAVE_NEW_GUI
/* destroy window only if it's not controlled by GUI */
- if (vo_window == None)
+ if ( !use_gui )
#endif
{
/* and -wid is set */
if (!(WinID > 0))
XDestroyWindow(display, window);
- XCloseDisplay(display);
vo_depthonscreen = 0;
+ vo_fs=0;
}
return(1);
}
@@ -721,7 +728,7 @@
// vo_x11_decoration( mDisplay,vo_window,(vo_fs) ? 1 : 0 );
break;
case vo_wm_Unknown:
- vo_x11_decoration( mDisplay,vo_window,(vo_fs) ? 1 : 0 );
+// vo_x11_decoration( mDisplay,vo_window,(vo_fs) ? 1 : 0 );
XUnmapWindow( mDisplay,vo_window );
break;
case vo_wm_IceWM:
Index: x11_common.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- x11_common.h 6 May 2002 15:48:07 -0000 1.22
+++ x11_common.h 8 May 2002 16:41:44 -0000 1.23
@@ -25,14 +25,15 @@
extern int vo_mouse_timer_const;
extern int vo_mouse_autohide;
-int vo_init( void );
-int vo_hidecursor ( Display* , Window );
+extern int vo_init( void );
+extern void vo_uninit( void );
+extern int vo_hidecursor ( Display* , Window );
extern void vo_showcursor( Display *disp, Window win );
-void vo_x11_decoration( Display * vo_Display,Window w,int d );
-void vo_x11_classhint( Display * display,Window window,char *name );
-void vo_x11_sizehint( int x, int y, int width, int height, int max );
-int vo_x11_check_events(Display *mydisplay);
-void vo_x11_fullscreen( void );
+extern void vo_x11_decoration( Display * vo_Display,Window w,int d );
+extern void vo_x11_classhint( Display * display,Window window,char *name );
+extern void vo_x11_sizehint( int x, int y, int width, int height, int max );
+extern int vo_x11_check_events(Display *mydisplay);
+extern void vo_x11_fullscreen( void );
#endif
extern Window vo_window;
More information about the MPlayer-cvslog
mailing list