summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-02-07 18:06:16 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-02-07 18:06:16 +0000
commitfc52bafec0ee3772cafc9e19815476e92546fdc7 (patch)
tree9983b7b6d6aca12d84d5bf53046d74aa7d1185ef
parent205fd981f3b8e583f430f771333311f9cad79014 (diff)
downloadmpv-fc52bafec0ee3772cafc9e19815476e92546fdc7.tar.bz2
mpv-fc52bafec0ee3772cafc9e19815476e92546fdc7.tar.xz
this patch adds the option -guiwid to gmplayer. I think its a more clean
approach than using just wid. Fabian Franz <FabianFranz@gmx.de> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9315 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--DOCS/mplayer.14
-rw-r--r--Gui/interface.c6
-rw-r--r--cfg-mplayer.h2
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 <window\ id>
+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},