--- main/mplayer.c Thu Dec 20 13:09:38 2001 +++ main-itrs/mplayer.c Thu Dec 20 12:11:41 2001 @@ -240,6 +240,9 @@ int sub_auto = 1; /*DSP!!char *dsp=NULL;*/ +// output window id +int WinID; + extern char *vo_subdevice; extern char *ao_subdevice; --- main/cfg-mplayer.h Thu Dec 20 13:09:31 2001 +++ main-itrs/cfg-mplayer.h Wed Dec 19 14:34:08 2001 @@ -246,6 +246,7 @@ {"softsleep", &softsleep, CONF_TYPE_FLAG, 0, 0, 1}, {"slave", &slave_mode, CONF_TYPE_FLAG, 0, 0, 1}, + {"wid", &WinID, CONF_TYPE_INT, 0, 0, 0}, #define MAIN_CONF --- main/help_mp-en.h Thu Dec 20 13:09:32 2001 +++ main-itrs/help_mp-en.h Wed Dec 19 14:35:42 2001 @@ -43,6 +43,7 @@ " -pp enable postprocessing filter (0-4 for DivX, 0-63 for mpegs)\n" " -nobps use alternative A-V sync method for AVI files (may help!)\n" " -framedrop enable frame-dropping (for slow machines)\n" +" -wid use existing window for video output (useful with plugger!)\n" "\n" "Keys:\n" " <- or -> seek backward/forward 10 seconds\n" --- main/libvo/vo_x11.c Thu Dec 20 13:10:01 2001 +++ main-itrs/libvo/vo_x11.c Wed Dec 19 14:54:01 2001 @@ -71,6 +71,9 @@ static int depth,bpp,mode; static XWindowAttributes attribs; +//output window id +extern int WinID; + //static int vo_dwidth,vo_dheight; static int Flip_Flag; @@ -281,7 +284,13 @@ } #endif - mywindow=XCreateWindow( mDisplay,RootWindow( mDisplay,mScreen ), + if ( WinID ){ + mywindow = (Window)WinID; + XUnmapWindow( mDisplay,mywindow ); + XChangeWindowAttributes( mDisplay,mywindow,xswamask,&xswa ); + } + else + mywindow=XCreateWindow( mDisplay,RootWindow( mDisplay,mScreen ), hint.x,hint.y, hint.width,hint.height, xswa.border_pixel,depth,CopyFromParent,vinfo.visual,xswamask,&xswa );