summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorAnton Khirnov <wyskas@gmail.com>2009-07-07 19:35:54 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-07-07 21:49:42 +0300
commit87366694d82c8d4c7f0bc210e6baa0ccd651d0c2 (patch)
tree57c6a283eed4934c6041658effab17435ef2ff1c /libvo
parenta2037a2effbd4622d0e8336245a9b14c3f886bde (diff)
downloadmpv-87366694d82c8d4c7f0bc210e6baa0ccd651d0c2.tar.bz2
mpv-87366694d82c8d4c7f0bc210e6baa0ccd651d0c2.tar.xz
Remove the internal GUI
The GUI is badly designed and too closely coupled to the internal details of other code. The GUI code is in bad shape and unmaintained for years. There is no indication that anyone would maintain it in the future either. Even if someone did volunteer to implement a better integrated GUI having the current code in the tree probably wouldn't help much. So get rid of it.
Diffstat (limited to 'libvo')
-rw-r--r--libvo/mga_common.c5
-rw-r--r--libvo/video_out.h4
-rw-r--r--libvo/vo_dfbmga.c4
-rw-r--r--libvo/vo_direct3d.c2
-rw-r--r--libvo/vo_directx.c9
-rw-r--r--libvo/vo_dxr3.c35
-rw-r--r--libvo/vo_gl.c14
-rw-r--r--libvo/vo_gl2.c21
-rw-r--r--libvo/vo_vdpau.c10
-rw-r--r--libvo/vo_x11.c12
-rw-r--r--libvo/vo_xmga.c11
-rw-r--r--libvo/vo_xover.c16
-rw-r--r--libvo/vo_xv.c11
-rw-r--r--libvo/vo_xvidix.c18
-rw-r--r--libvo/vo_xvmc.c8
-rw-r--r--libvo/x11_common.c37
16 files changed, 2 insertions, 215 deletions
diff --git a/libvo/mga_common.c b/libvo/mga_common.c
index a40f934ee5..9a173b3ded 100644
--- a/libvo/mga_common.c
+++ b/libvo/mga_common.c
@@ -330,11 +330,6 @@ static int control(uint32_t request, void *data)
return VO_TRUE;
#endif
-#if defined(VO_XMGA) && defined(CONFIG_GUI)
- case VOCTRL_GUISUPPORT:
- return VO_TRUE;
-#endif
-
#ifdef VO_XMGA
case VOCTRL_ONTOP:
vo_x11_ontop();
diff --git a/libvo/video_out.h b/libvo/video_out.h
index 6d4b405e56..48b2eb295c 100644
--- a/libvo/video_out.h
+++ b/libvo/video_out.h
@@ -39,9 +39,6 @@
#define VOCTRL_QUERY_FORMAT 2
/* signal a device reset seek */
#define VOCTRL_RESET 3
-/* true if vo driver can use GUI created windows */
-#define VOCTRL_GUISUPPORT 4
-#define VOCTRL_GUI_NOWINDOW 19
/* used to switch to fullscreen */
#define VOCTRL_FULLSCREEN 5
/* signal a device pause */
@@ -69,7 +66,6 @@ struct voctrl_get_equalizer_args {
const char *name;
int *valueptr;
};
-//#define VOCTRL_GUI_NOWINDOW 19
/* Frame duplication */
#define VOCTRL_DUPLICATE_FRAME 20
// ... 21
diff --git a/libvo/vo_dfbmga.c b/libvo/vo_dfbmga.c
index 73d67c4f8e..457a481c7a 100644
--- a/libvo/vo_dfbmga.c
+++ b/libvo/vo_dfbmga.c
@@ -1468,10 +1468,6 @@ static int
control( uint32_t request, void *data)
{
switch (request) {
- case VOCTRL_GUISUPPORT:
- case VOCTRL_GUI_NOWINDOW:
- return VO_TRUE;
-
case VOCTRL_QUERY_FORMAT:
return query_format( *((uint32_t *) data) );
diff --git a/libvo/vo_direct3d.c b/libvo/vo_direct3d.c
index c0f79d45d4..7094af8823 100644
--- a/libvo/vo_direct3d.c
+++ b/libvo/vo_direct3d.c
@@ -763,8 +763,6 @@ static int control(uint32_t request, void *data)
case VOCTRL_RESUME:
priv->is_paused = 0;
return VO_TRUE;
- case VOCTRL_GUISUPPORT:
- return VO_NOTIMPL;
case VOCTRL_SET_EQUALIZER:
return VO_NOTIMPL;
case VOCTRL_GET_EQUALIZER:
diff --git a/libvo/vo_directx.c b/libvo/vo_directx.c
index 37a12567dc..a51a4314e5 100644
--- a/libvo/vo_directx.c
+++ b/libvo/vo_directx.c
@@ -39,10 +39,6 @@
#include "mp_fifo.h"
#include "sub.h"
-#ifdef CONFIG_GUI
-#include "gui/interface.h"
-#endif
-
#ifndef WM_XBUTTONDOWN
# define WM_XBUTTONDOWN 0x020B
# define WM_XBUTTONUP 0x020C
@@ -1292,11 +1288,6 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
if(format != primary_image_format)nooverlay = 0;
window_aspect= (float)d_image_width / (float)d_image_height;
-#ifdef CONFIG_GUI
- if(use_gui){
- guiGetEvent(guiSetShVideo, 0);
- }
-#endif
/*release all directx objects*/
if (g_cc != NULL)g_cc->lpVtbl->Release(g_cc);
g_cc=NULL;
diff --git a/libvo/vo_dxr3.c b/libvo/vo_dxr3.c
index 4312c156f9..898ee96756 100644
--- a/libvo/vo_dxr3.c
+++ b/libvo/vo_dxr3.c
@@ -44,9 +44,6 @@
#include "aspect.h"
#include "spuenc.h"
#include "sub.h"
-#ifdef CONFIG_GUI
-#include "gui/interface.h"
-#endif
#ifdef CONFIG_X11
#include "x11_common.h"
#endif
@@ -177,13 +174,6 @@ static overlay_t *overlay_data;
static int control(uint32_t request, void *data)
{
switch (request) {
- case VOCTRL_GUISUPPORT:
- return VO_TRUE;
- case VOCTRL_GUI_NOWINDOW:
- if (dxr3_overlay) {
- return VO_FALSE;
- }
- return VO_TRUE;
case VOCTRL_SET_SPU_PALETTE:
if (ioctl(fd_spu, EM8300_IOCTL_SPU_SETPALETTE, data) < 0) {
mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_DXR3] Unable to load new SPU palette!\n");
@@ -488,19 +478,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_
vo_dy = (vo_screenheight - d_height) / 2;
vo_dwidth = d_width;
vo_dheight = d_height;
-#ifdef CONFIG_GUI
- if (use_gui) {
- guiGetEvent(guiSetShVideo, 0);
- XSetWindowBackground(mDisplay, vo_window, KEY_COLOR);
- XClearWindow(mDisplay, vo_window);
- XGetWindowAttributes(mDisplay, DefaultRootWindow(mDisplay), &xwin_attribs);
- depth = xwin_attribs.depth;
- if (depth != 15 && depth != 16 && depth != 24 && depth != 32) {
- depth = 24;
- }
- XMatchVisualInfo(mDisplay, mScreen, depth, TrueColor, &vinfo);
- } else
-#endif
{
XGetWindowAttributes(mDisplay, DefaultRootWindow(mDisplay), &xwin_attribs);
depth = xwin_attribs.depth;
@@ -702,14 +679,8 @@ static void uninit(void)
overlay_set_mode(overlay_data, EM8300_OVERLAY_MODE_OFF);
overlay_release(overlay_data);
-#ifdef CONFIG_GUI
- if (!use_gui) {
-#endif
vo_x11_uninit();
-#ifdef CONFIG_GUI
- }
-#endif
}
#endif
if (old_vmode != -1) {
@@ -884,16 +855,10 @@ static int preinit(const char *arg)
/* Initialize overlay and X11 */
overlay_data = overlay_init(fd_control);
-#ifdef CONFIG_GUI
- if (!use_gui) {
-#endif
if (!vo_init()) {
mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_DXR3] Unable to init X11!\n");
return -1;
}
-#ifdef CONFIG_GUI
- }
-#endif
}
#endif
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index 31448e83cf..602829164d 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -31,9 +31,6 @@
#include "gl_common.h"
#include "aspect.h"
-#ifdef CONFIG_GUI
-#include "gui/interface.h"
-#endif
#include "fastmemcpy.h"
#include "libass/ass.h"
#include "libass/ass_mp.h"
@@ -540,15 +537,6 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
vo_flipped = !!(flags & VOFLAG_FLIPPING);
-#ifdef CONFIG_GUI
- if (use_gui) {
- // GUI creates and manages window for us
- guiGetEvent(guiSetShVideo, 0);
-#ifndef GL_WIN32
- goto glconfig;
-#endif
- }
-#endif
#ifdef GL_WIN32
if (!vo_w32_config(d_width, d_height, flags))
return -1;
@@ -1155,8 +1143,6 @@ static int control(uint32_t request, void *data)
}
}
return VO_TRUE;
- case VOCTRL_GUISUPPORT:
- return VO_TRUE;
case VOCTRL_ONTOP:
vo_gl_ontop();
return VO_TRUE;
diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c
index c545165b29..9e719e03c9 100644
--- a/libvo/vo_gl2.c
+++ b/libvo/vo_gl2.c
@@ -33,9 +33,6 @@
#include "gl_common.h"
#include "aspect.h"
-#ifdef CONFIG_GUI
-#include "gui/interface.h"
-#endif
#undef TEXTUREFORMAT_ALWAYS
#ifdef __APPLE__
@@ -550,13 +547,6 @@ static int config_glx(uint32_t width, uint32_t height, uint32_t d_width, uint32_
}
#endif
-#ifdef CONFIG_GUI
-static int config_glx_gui(uint32_t d_width, uint32_t d_height) {
- guiGetEvent( guiSetShVideo,0 ); // the GUI will set up / resize the window
- return 0;
-}
-#endif
-
static int initGl(uint32_t d_width, uint32_t d_height)
{
fragprog = lookupTex = 0;
@@ -622,15 +612,6 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
image_width = width;
image_format = format;
-#ifdef CONFIG_GUI
- if (use_gui) {
- if (config_glx_gui(d_width, d_height) == -1)
- return -1;
- }
-#ifndef GL_WIN32
- else
-#endif
-#endif
#ifdef GL_WIN32
if (config_w32(width, height, d_width, d_height, flags, title, format) == -1)
#else
@@ -883,8 +864,6 @@ static int control(uint32_t request, void *data)
return VO_TRUE;
case VOCTRL_QUERY_FORMAT:
return query_format(*((uint32_t*)data));
- case VOCTRL_GUISUPPORT:
- return VO_TRUE;
case VOCTRL_ONTOP:
vo_gl_ontop();
return VO_TRUE;
diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c
index 31bfba4eae..597edeb8b3 100644
--- a/libvo/vo_vdpau.c
+++ b/libvo/vo_vdpau.c
@@ -43,11 +43,10 @@
#include "aspect.h"
#include "sub.h"
#include "subopt-helper.h"
+#include "font_load.h"
#include "libavcodec/vdpau.h"
-#include "gui/interface.h"
-
#include "libavutil/common.h"
#include "libavutil/mathematics.h"
@@ -555,11 +554,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
visible_buf = 0;
-#ifdef CONFIG_GUI
- if (use_gui)
- guiGetEvent(guiSetShVideo, 0); // the GUI will set up / resize our window
- else
-#endif
{
#ifdef CONFIG_XF86VM
if (vm)
@@ -1196,8 +1190,6 @@ static int control(uint32_t request, void *data)
return get_image(data);
case VOCTRL_DRAW_IMAGE:
return draw_image(data);
- case VOCTRL_GUISUPPORT:
- return VO_TRUE;
case VOCTRL_BORDER:
vo_x11_border();
resize();
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c
index c890a312e6..d1120ae927 100644
--- a/libvo/vo_x11.c
+++ b/libvo/vo_x11.c
@@ -56,11 +56,6 @@ static int CompletionType = -1;
#include "mp_msg.h"
#include "help_mp.h"
-#ifdef CONFIG_GUI
-#include "gui/interface.h"
-#include "mplayer.h"
-#endif
-
static const vo_info_t info = {
"X11 ( XImage/Shm )",
"x11",
@@ -357,11 +352,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
image_width = (width + 7) & (~7);
image_height = height;
-#ifdef CONFIG_GUI
- if (use_gui)
- guiGetEvent(guiSetShVideo, 0); // the GUI will set up / resize the window
- else
-#endif
{
#ifdef CONFIG_XF86VM
if (vm)
@@ -676,8 +666,6 @@ static int control(uint32_t request, void *data)
return query_format(*((uint32_t *) data));
case VOCTRL_GET_IMAGE:
return get_image(data);
- case VOCTRL_GUISUPPORT:
- return VO_TRUE;
case VOCTRL_FULLSCREEN:
vo_x11_fullscreen();
vo_x11_clearwindow(mDisplay, vo_window);
diff --git a/libvo/vo_xmga.c b/libvo/vo_xmga.c
index b0d44440bb..817ce2d2e8 100644
--- a/libvo/vo_xmga.c
+++ b/libvo/vo_xmga.c
@@ -55,10 +55,6 @@ static unsigned int timer = 0;
static unsigned int timerd = 0;
#endif
-#ifdef CONFIG_GUI
-#include "gui/interface.h"
-#endif
-
static const vo_info_t info = {
"Matrox G200/G4x0/G550 overlay in X11 window (using /dev/mga_vid)",
"xmga",
@@ -181,11 +177,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
initialized = 1;
-#ifdef CONFIG_GUI
- if (use_gui)
- guiGetEvent(guiSetShVideo, 0); // the GUI will set up / resize the window
- else
-#endif
{
if (flags & VOFLAG_FULLSCREEN)
aspect(&dwidth, &dheight, A_ZOOM);
@@ -205,7 +196,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
flags, xWAttribs.colormap, "xmga", title);
XChangeWindowAttributes(mDisplay, vo_window, xswamask, &xWAttribs);
- } // !GUI
+ }
if ((flags & VOFLAG_FULLSCREEN) && (!WinID))
{
diff --git a/libvo/vo_xover.c b/libvo/vo_xover.c
index ac8b3e85a7..dd7bceadb1 100644
--- a/libvo/vo_xover.c
+++ b/libvo/vo_xover.c
@@ -48,10 +48,6 @@
#include "aspect.h"
#include "mp_msg.h"
-#ifdef CONFIG_GUI
-#include "gui/interface.h"
-#endif
-
static const vo_info_t info =
{
@@ -270,12 +266,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
vo_dy += xinerama_y;
vo_dwidth=d_width; vo_dheight=d_height;
-#ifdef CONFIG_GUI
- if(use_gui) guiGetEvent( guiSetShVideo,0 ); // the GUI will set up / resize the window
- else
- {
-#endif
-
#ifdef X11_FULLSCREEN
if ( ( flags&VOFLAG_FULLSCREEN )||(flags & VOFLAG_SWSCALE) ) aspect(&d_width, &d_height, A_ZOOM);
#endif
@@ -302,10 +292,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
xswa.colormap, "xvidix", title);
XChangeWindowAttributes(mDisplay, vo_window, xswamask, &xswa);
-#ifdef CONFIG_GUI
- }
-#endif
-
if ( ( !WinID )&&( flags&VOFLAG_FULLSCREEN ) ) { vo_dx=0; vo_dy=0; vo_dwidth=vo_screenwidth; vo_dheight=vo_screenheight; vo_fs=1; }
if(sub_vo->config(image_width,image_height,vo_dwidth,vo_dheight,
@@ -428,8 +414,6 @@ static int control(uint32_t request, void *data)
{
if(!sub_vo) return VO_ERROR;
switch (request) {
- case VOCTRL_GUISUPPORT:
- return VO_TRUE;
case VOCTRL_GET_PANSCAN:
if ( !vo_config_count || !vo_fs ) return VO_FALSE;
return VO_TRUE;
diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c
index 18519ec666..1085f51327 100644
--- a/libvo/vo_xv.c
+++ b/libvo/vo_xv.c
@@ -65,10 +65,6 @@ Buffer allocation:
#include "input/input.h"
#include "mp_fifo.h"
-#ifdef CONFIG_GUI
-#include "gui/interface.h"
-#endif
-
#include "libavutil/common.h"
static const vo_info_t info = {
@@ -239,11 +235,6 @@ static int config(struct vo *vo, uint32_t width, uint32_t height,
if (!ctx->xv_format)
return -1;
-#ifdef CONFIG_GUI
- if (use_gui)
- guiGetEvent(guiSetShVideo, 0); // the GUI will set up / resize the window
- else
-#endif
{
#ifdef CONFIG_XF86VM
int vm = flags & VOFLAG_MODESWITCHING;
@@ -813,8 +804,6 @@ static int control(struct vo *vo, uint32_t request, void *data)
return get_image(ctx, data);
case VOCTRL_DRAW_IMAGE:
return draw_image(vo, data);
- case VOCTRL_GUISUPPORT:
- return VO_TRUE;
case VOCTRL_GET_PANSCAN:
if (!vo->config_ok || !vo_fs)
return VO_FALSE;
diff --git a/libvo/vo_xvidix.c b/libvo/vo_xvidix.c
index 620d6df3b5..c7481ae613 100644
--- a/libvo/vo_xvidix.c
+++ b/libvo/vo_xvidix.c
@@ -49,11 +49,6 @@
#include "vosub_vidix.h"
#include "vidix/vidix.h"
-#ifdef CONFIG_GUI
-#include "gui/interface.h"
-#endif
-
-
static const vo_info_t info = {
"X11 (VIDIX)",
"xvidix",
@@ -252,13 +247,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
}
mp_msg(MSGT_VO, MSGL_V, "Using colorkey: %x\n", colorkey);
-#ifdef CONFIG_GUI
- if (use_gui)
- guiGetEvent(guiSetShVideo, 0); // the GUI will set up / resize the window
- else
- {
-#endif
-
#ifdef X11_FULLSCREEN
if ((flags & VOFLAG_FULLSCREEN) || (flags & VOFLAG_SWSCALE))
aspect(&d_width, &d_height, A_ZOOM);
@@ -289,10 +277,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
CopyFromParent, "xvidix", title);
XChangeWindowAttributes(mDisplay, vo_window, xswamask, &xswa);
-#ifdef CONFIG_GUI
- }
-#endif
-
if ((!WinID) && (flags & VOFLAG_FULLSCREEN))
{
vo_dx = 0;
@@ -421,8 +405,6 @@ static int control(uint32_t request, void *data)
{
case VOCTRL_QUERY_FORMAT:
return query_format(*((uint32_t *) data));
- case VOCTRL_GUISUPPORT:
- return VO_TRUE;
case VOCTRL_GET_PANSCAN:
if (!vo_config_count || !vo_fs)
return VO_FALSE;
diff --git a/libvo/vo_xvmc.c b/libvo/vo_xvmc.c
index aad00de687..968b11aa0d 100644
--- a/libvo/vo_xvmc.c
+++ b/libvo/vo_xvmc.c
@@ -49,7 +49,6 @@
#include "aspect.h"
#include "subopt-helper.h"
-#include "gui/interface.h"
#include "libavutil/common.h"
@@ -623,11 +622,6 @@ found_subpic:
skip_surface_allocation:
-#ifdef CONFIG_GUI
- if(use_gui)
- guiGetEvent( guiSetShVideo,0 ); // let the GUI to setup/resize our window
- else
-#endif
{
#ifdef CONFIG_XF86VM
if ( vm )
@@ -1285,8 +1279,6 @@ static int control(uint32_t request, void *data)
case VOCTRL_GET_IMAGE:
return get_image((mp_image_t *)data);
//vo_xv
- case VOCTRL_GUISUPPORT:
- return VO_TRUE;
case VOCTRL_ONTOP:
vo_x11_ontop();
return VO_TRUE;
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index 51c85bee9e..8911a242b3 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -77,11 +77,6 @@
#include "input/input.h"
#include "input/mouse.h"
-#ifdef CONFIG_GUI
-#include "gui/interface.h"
-#include "mplayer.h"
-#endif
-
#define WIN_LAYER_ONBOTTOM 2
#define WIN_LAYER_NORMAL 4
#define WIN_LAYER_ONTOP 6
@@ -737,10 +732,6 @@ void vo_x11_uninit(struct vo *vo)
XFreeGC(vo->x11->display, x11->f_gc);
x11->f_gc = NULL;
}
-#ifdef CONFIG_GUI
- /* destroy window only if it's not controlled by the GUI */
- if (!use_gui)
-#endif
{
if (x11->vo_gc)
{
@@ -792,14 +783,6 @@ int vo_x11_check_events(struct vo *vo)
while (XPending(display))
{
XNextEvent(display, &Event);
-#ifdef CONFIG_GUI
- if (use_gui)
- {
- guiGetEvent(0, (char *) &Event);
- if (x11->window != Event.xany.window)
- continue;
- }
-#endif
// printf("\rEvent.type=%X \n",Event.type);
switch (Event.type)
{
@@ -822,10 +805,6 @@ int vo_x11_check_events(struct vo *vo)
{
int key;
-#ifdef CONFIG_GUI
- if ( use_gui ) { break; }
-#endif
-
XLookupString(&Event.xkey, buf, sizeof(buf), &keySym,
&x11->compose_status);
#ifdef XF86XK_AudioPause
@@ -861,12 +840,6 @@ int vo_x11_check_events(struct vo *vo)
x11->mouse_waiting_hide = 1;
x11->mouse_timer = GetTimerMS();
}
-#ifdef CONFIG_GUI
- // Ignore mouse button 1-3 under GUI.
- if (use_gui && (Event.xbutton.button >= 1)
- && (Event.xbutton.button <= 3))
- break;
-#endif
mplayer_put_key(vo->key_fifo,
(MOUSE_BTN0 + Event.xbutton.button - 1)
| MP_KEY_DOWN);
@@ -878,12 +851,6 @@ int vo_x11_check_events(struct vo *vo)
x11->mouse_waiting_hide = 1;
x11->mouse_timer = GetTimerMS();
}
-#ifdef CONFIG_GUI
- // Ignore mouse button 1-3 under GUI.
- if (use_gui && (Event.xbutton.button >= 1)
- && (Event.xbutton.button <= 3))
- break;
-#endif
mplayer_put_key(vo->key_fifo,
MOUSE_BTN0 + Event.xbutton.button - 1);
break;
@@ -1647,11 +1614,7 @@ void vo_vm_close(struct vo *vo)
{
Display *dpy = vo->x11->display;
struct MPOpts *opts = vo->opts;
-#ifdef CONFIG_GUI
- if (vidmodes != NULL && vo->x11->vo_window != None)
-#else
if (vidmodes != NULL)
-#endif
{
int i, modecount;