mirror of https://github.com/mpv-player/mpv
Plugger patch by Sam Lin
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3656 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
3e6ce4f646
commit
3a9a9e827c
|
@ -58,6 +58,7 @@ extern int ao_pcm_waveheader;
|
|||
|
||||
#ifdef HAVE_X11
|
||||
extern char *mDisplayName;
|
||||
extern int WinID;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_AA
|
||||
|
@ -247,6 +248,7 @@ struct config conf[]={
|
|||
{"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
|
||||
|
|
|
@ -43,6 +43,7 @@ static char help_text[]=
|
|||
" -pp <quality> 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 <window id> use existing window for video output (useful with plugger!)\n"
|
||||
"\n"
|
||||
"Keys:\n"
|
||||
" <- or -> seek backward/forward 10 seconds\n"
|
||||
|
|
|
@ -71,6 +71,9 @@ static XImage *myximage;
|
|||
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 @@ static uint32_t init( uint32_t width,uint32_t height,uint32_t d_width,uint32_t d
|
|||
}
|
||||
#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 );
|
||||
|
|
Loading…
Reference in New Issue