From fc52bafec0ee3772cafc9e19815476e92546fdc7 Mon Sep 17 00:00:00 2001 From: arpi Date: Fri, 7 Feb 2003 18:06:16 +0000 Subject: [PATCH] this patch adds the option -guiwid to gmplayer. I think its a more clean approach than using just wid. Fabian Franz git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9315 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/mplayer.1 | 4 ++++ Gui/interface.c | 6 ++++-- cfg-mplayer.h | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/DOCS/mplayer.1 b/DOCS/mplayer.1 index 35198e10db..45892e8e5f 100644 --- a/DOCS/mplayer.1 +++ b/DOCS/mplayer.1 @@ -1454,6 +1454,10 @@ Places the window at the bottom left corner of the screen .PD 1 . .TP +.B \-guiwid +This tells the gui to also use a X11 window and stick itself to bottom of video, which is useful to embed an mini-GUI in a +browser (with the mplayerplug-in for instance). +.TP .B \-hue <\-100\-100> Adjust hue of video signal (default: 0). You can get colored negative of image with this option. diff --git a/Gui/interface.c b/Gui/interface.c index c666c28cc5..fd96aeea86 100644 --- a/Gui/interface.c +++ b/Gui/interface.c @@ -40,6 +40,7 @@ #include "../libmpcodecs/dec_video.h" guiInterface_t guiIntfStruct; +int guiWinID=-1; char * gstrcat( char ** dest,char * src ) { @@ -197,10 +198,11 @@ void guiInit( void ) if (WinID>0) { appMPlayer.subWindow.Parent=WinID; - appMPlayer.mainWindow.Parent=WinID; appMPlayer.sub.x=0; appMPlayer.sub.y=0; } + if (guiWinID>=0) + appMPlayer.mainWindow.Parent=guiWinID; wsCreateWindow( &appMPlayer.subWindow, appMPlayer.sub.x,appMPlayer.sub.y,appMPlayer.sub.width,appMPlayer.sub.height, @@ -517,7 +519,7 @@ int guiGetEvent( int type,char * arg ) } guiIntfStruct.MovieWidth=vo_dwidth; guiIntfStruct.MovieHeight=vo_dheight; - if (WinID>0) + if (guiWinID>=0) wsMoveWindow( &appMPlayer.mainWindow,0,0, vo_dheight); } break; diff --git a/cfg-mplayer.h b/cfg-mplayer.h index d70bcc40a0..f858308c2b 100644 --- a/cfg-mplayer.h +++ b/cfg-mplayer.h @@ -107,6 +107,7 @@ extern int rtspStreamOverTCP; #ifdef HAVE_NEW_GUI extern char * skinName; extern int enqueue; +extern int guiWinID; #endif #ifdef HAVE_ODIVX_POSTPROCESS @@ -398,6 +399,7 @@ static config_t mplayer_opts[]={ {"skin", &skinName, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL}, {"enqueue", &enqueue, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"noenqueue", &enqueue, CONF_TYPE_FLAG, 0, 0, 0, NULL}, + {"guiwid", &guiWinID, CONF_TYPE_INT, 0, 0, 0, NULL}, #endif {"noloop", &loop_times, CONF_TYPE_FLAG, 0, 0, -1, NULL},