# HG changeset patch # User atmos4 # Date 1009012809 0 # Node ID 18cca6a6816c6391e836ad2dae544f00718f9f9f # Parent 33c3cff374a11e661f4e06c2b4e5ee7b60a83a2f Plugger patch by Sam Lin diff -r 33c3cff374a1 -r 18cca6a6816c cfg-mplayer.h --- a/cfg-mplayer.h Sat Dec 22 00:55:58 2001 +0000 +++ b/cfg-mplayer.h Sat Dec 22 09:20:09 2001 +0000 @@ -58,6 +58,7 @@ #ifdef HAVE_X11 extern char *mDisplayName; +extern int WinID; #endif #ifdef HAVE_AA @@ -247,6 +248,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 diff -r 33c3cff374a1 -r 18cca6a6816c help_mp-en.h --- a/help_mp-en.h Sat Dec 22 00:55:58 2001 +0000 +++ b/help_mp-en.h Sat Dec 22 09:20:09 2001 +0000 @@ -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" diff -r 33c3cff374a1 -r 18cca6a6816c libvo/vo_x11.c --- a/libvo/vo_x11.c Sat Dec 22 00:55:58 2001 +0000 +++ b/libvo/vo_x11.c Sat Dec 22 09:20:09 2001 +0000 @@ -71,6 +71,9 @@ static int depth,bpp,mode; static XWindowAttributes attribs; +/* output window id */ +int WinID=0; + //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 );