# HG changeset patch # User reimar # Date 1276430653 0 # Node ID ad274a5b093b1d583edd52e7dedbac56c4ce56b1 # Parent c69ecf7d80a4f81c4de75590a35afc1592801106 For vos that support the new libvo API (provide UPDATE_SCREENINFO), avoid duplicating some Gui-related code. diff -r c69ecf7d80a4 -r ad274a5b093b gui/interface.c --- a/gui/interface.c Sun Jun 13 11:51:41 2010 +0000 +++ b/gui/interface.c Sun Jun 13 12:04:13 2010 +0000 @@ -552,6 +552,7 @@ guiIntfStruct.MovieHeight=vo_dheight; if (guiWinID>=0) wsMoveWindow( &appMPlayer.mainWindow,0,0, vo_dheight); + WinID = appMPlayer.subWindow.WindowID; } break; #ifdef CONFIG_DVDREAD diff -r c69ecf7d80a4 -r ad274a5b093b libvo/video_out.c --- a/libvo/video_out.c Sun Jun 13 11:51:41 2010 +0000 +++ b/libvo/video_out.c Sun Jun 13 12:04:13 2010 +0000 @@ -30,6 +30,9 @@ #include "aspect.h" #include "geometry.h" +#ifdef CONFIG_GUI +#include "gui/interface.h" +#endif #include "mp_msg.h" #include "help_mp.h" #include "input/input.h" @@ -361,6 +364,12 @@ vo_dy += xinerama_y; vo_dwidth = d_width; vo_dheight = d_height; +#ifdef CONFIG_GUI + if (use_gui) { + // GUI creates and manages window for us + guiGetEvent(guiSetShVideo, 0); + } +#endif } return vo->config(width, height, d_width, d_height, flags, title, format); diff -r c69ecf7d80a4 -r ad274a5b093b libvo/vo_gl.c --- a/libvo/vo_gl.c Sun Jun 13 11:51:41 2010 +0000 +++ b/libvo/vo_gl.c Sun Jun 13 12:04:13 2010 +0000 @@ -36,9 +36,6 @@ #include "gl_common.h" #include "aspect.h" -#ifdef CONFIG_GUI -#include "gui/interface.h" -#endif #include "fastmemcpy.h" #include "libass/ass_mp.h" @@ -638,17 +635,9 @@ int_pause = 0; vo_flipped = !!(flags & VOFLAG_FLIPPING); -#ifdef CONFIG_GUI - if (use_gui) { - // GUI creates and manages window for us - guiGetEvent(guiSetShVideo, 0); - goto glconfig; - } -#endif if (create_window(d_width, d_height, flags, title) < 0) return -1; -glconfig: if (vo_config_count) uninitGl(); if (glctx.setGlWindow(&glctx) == SET_WINDOW_FAILED) diff -r c69ecf7d80a4 -r ad274a5b093b libvo/vo_gl2.c --- a/libvo/vo_gl2.c Sun Jun 13 11:51:41 2010 +0000 +++ b/libvo/vo_gl2.c Sun Jun 13 12:04:13 2010 +0000 @@ -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 @@ } #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; @@ -631,15 +621,6 @@ int_pause = 0; -#ifdef CONFIG_GUI - if (use_gui) { - if (config_glx_gui(d_width, d_height) == -1) - return -1; - } -#ifndef CONFIG_GL_WIN32 - else -#endif -#endif #ifdef CONFIG_GL_WIN32 if (config_w32(width, height, d_width, d_height, flags, title, format) == -1) #endif diff -r c69ecf7d80a4 -r ad274a5b093b libvo/vo_vdpau.c --- a/libvo/vo_vdpau.c Sun Jun 13 11:51:41 2010 +0000 +++ b/libvo/vo_vdpau.c Sun Jun 13 12:04:13 2010 +0000 @@ -668,11 +668,6 @@ int_pause = 0; 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) diff -r c69ecf7d80a4 -r ad274a5b093b libvo/vo_x11.c --- a/libvo/vo_x11.c Sun Jun 13 11:51:41 2010 +0000 +++ b/libvo/vo_x11.c Sun Jun 13 12:04:13 2010 +0000 @@ -56,11 +56,6 @@ #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", @@ -358,11 +353,6 @@ 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) diff -r c69ecf7d80a4 -r ad274a5b093b libvo/vo_xv.c --- a/libvo/vo_xv.c Sun Jun 13 11:51:41 2010 +0000 +++ b/libvo/vo_xv.c Sun Jun 13 12:04:13 2010 +0000 @@ -59,10 +59,6 @@ #include "input/input.h" -#ifdef CONFIG_GUI -#include "gui/interface.h" -#endif - #include "libavutil/common.h" static const vo_info_t info = { @@ -229,11 +225,6 @@ return -1; } -#ifdef CONFIG_GUI - if (use_gui) - guiGetEvent(guiSetShVideo, 0); // the GUI will set up / resize the window - else -#endif { #ifdef CONFIG_XF86VM if (vm) diff -r c69ecf7d80a4 -r ad274a5b093b libvo/vo_xvidix.c --- a/libvo/vo_xvidix.c Sun Jun 13 11:51:41 2010 +0000 +++ b/libvo/vo_xvidix.c Sun Jun 13 12:04:13 2010 +0000 @@ -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 @@ } 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 @@ CopyFromParent, "xvidix", title); XChangeWindowAttributes(mDisplay, vo_window, xswamask, &xswa); -#ifdef CONFIG_GUI - } -#endif - if ((!WinID) && (flags & VOFLAG_FULLSCREEN)) { vo_dx = 0; diff -r c69ecf7d80a4 -r ad274a5b093b libvo/vo_xvmc.c --- a/libvo/vo_xvmc.c Sun Jun 13 11:51:41 2010 +0000 +++ b/libvo/vo_xvmc.c Sun Jun 13 12:04:13 2010 +0000 @@ -623,11 +623,6 @@ 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 )