[MPlayer-cvslog] r31381 - in trunk: gui/interface.c libvo/video_out.c libvo/vo_gl.c libvo/vo_gl2.c libvo/vo_vdpau.c libvo/vo_x11.c libvo/vo_xv.c libvo/vo_xvidix.c libvo/vo_xvmc.c
reimar
subversion at mplayerhq.hu
Sun Jun 13 14:04:13 CEST 2010
Author: reimar
Date: Sun Jun 13 14:04:13 2010
New Revision: 31381
Log:
For vos that support the new libvo API (provide UPDATE_SCREENINFO),
avoid duplicating some Gui-related code.
Modified:
trunk/gui/interface.c
trunk/libvo/video_out.c
trunk/libvo/vo_gl.c
trunk/libvo/vo_gl2.c
trunk/libvo/vo_vdpau.c
trunk/libvo/vo_x11.c
trunk/libvo/vo_xv.c
trunk/libvo/vo_xvidix.c
trunk/libvo/vo_xvmc.c
Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c Sun Jun 13 13:51:41 2010 (r31380)
+++ trunk/gui/interface.c Sun Jun 13 14:04:13 2010 (r31381)
@@ -552,6 +552,7 @@ int guiGetEvent( int type,void * arg )
guiIntfStruct.MovieHeight=vo_dheight;
if (guiWinID>=0)
wsMoveWindow( &appMPlayer.mainWindow,0,0, vo_dheight);
+ WinID = appMPlayer.subWindow.WindowID;
}
break;
#ifdef CONFIG_DVDREAD
Modified: trunk/libvo/video_out.c
==============================================================================
--- trunk/libvo/video_out.c Sun Jun 13 13:51:41 2010 (r31380)
+++ trunk/libvo/video_out.c Sun Jun 13 14:04:13 2010 (r31381)
@@ -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 @@ int config_video_out(const vo_functions_
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);
Modified: trunk/libvo/vo_gl.c
==============================================================================
--- trunk/libvo/vo_gl.c Sun Jun 13 13:51:41 2010 (r31380)
+++ trunk/libvo/vo_gl.c Sun Jun 13 14:04:13 2010 (r31381)
@@ -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 @@ config(uint32_t width, uint32_t height,
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)
Modified: trunk/libvo/vo_gl2.c
==============================================================================
--- trunk/libvo/vo_gl2.c Sun Jun 13 13:51:41 2010 (r31380)
+++ trunk/libvo/vo_gl2.c Sun Jun 13 14:04:13 2010 (r31381)
@@ -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, ui
}
#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 @@ config(uint32_t width, uint32_t height,
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
Modified: trunk/libvo/vo_vdpau.c
==============================================================================
--- trunk/libvo/vo_vdpau.c Sun Jun 13 13:51:41 2010 (r31380)
+++ trunk/libvo/vo_vdpau.c Sun Jun 13 14:04:13 2010 (r31381)
@@ -668,11 +668,6 @@ static int config(uint32_t width, uint32
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)
Modified: trunk/libvo/vo_x11.c
==============================================================================
--- trunk/libvo/vo_x11.c Sun Jun 13 13:51:41 2010 (r31380)
+++ trunk/libvo/vo_x11.c Sun Jun 13 14:04:13 2010 (r31381)
@@ -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",
@@ -358,11 +353,6 @@ static int config(uint32_t width, uint32
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)
Modified: trunk/libvo/vo_xv.c
==============================================================================
--- trunk/libvo/vo_xv.c Sun Jun 13 13:51:41 2010 (r31380)
+++ trunk/libvo/vo_xv.c Sun Jun 13 14:04:13 2010 (r31381)
@@ -59,10 +59,6 @@ Buffer allocation:
#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 @@ static int config(uint32_t width, uint32
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)
Modified: trunk/libvo/vo_xvidix.c
==============================================================================
--- trunk/libvo/vo_xvidix.c Sun Jun 13 13:51:41 2010 (r31380)
+++ trunk/libvo/vo_xvidix.c Sun Jun 13 14:04:13 2010 (r31381)
@@ -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
}
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
CopyFromParent, "xvidix", title);
XChangeWindowAttributes(mDisplay, vo_window, xswamask, &xswa);
-#ifdef CONFIG_GUI
- }
-#endif
-
if ((!WinID) && (flags & VOFLAG_FULLSCREEN))
{
vo_dx = 0;
Modified: trunk/libvo/vo_xvmc.c
==============================================================================
--- trunk/libvo/vo_xvmc.c Sun Jun 13 13:51:41 2010 (r31380)
+++ trunk/libvo/vo_xvmc.c Sun Jun 13 14:04:13 2010 (r31381)
@@ -623,11 +623,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 )
More information about the MPlayer-cvslog
mailing list