[MPlayer-cvslog] r18918 - in trunk: Gui/Makefile configure libvo/vo_directx.c mplayer.c
vayne
subversion at mplayerhq.hu
Thu Jul 6 03:51:31 CEST 2006
Author: vayne
Date: Thu Jul 6 03:51:31 2006
New Revision: 18918
Modified:
trunk/Gui/Makefile
trunk/configure
trunk/libvo/vo_directx.c
trunk/mplayer.c
Log:
Initial win32 gui release.
Modified: trunk/Gui/Makefile
==============================================================================
--- trunk/Gui/Makefile (original)
+++ trunk/Gui/Makefile Thu Jul 6 03:51:31 2006
@@ -9,6 +9,16 @@
CFLAGS = $(OPTIMIZE) $(INCDIR) $(DEBUG)
+ifeq ($(TARGET_WIN32),yes)
+SRCS = win32/dialogs.c \
+ win32/gui.c \
+ win32/interface.c \
+ win32/playlist.c \
+ win32/preferences.c \
+ win32/skinload.c \
+ win32/widgetrender.c \
+ win32/wincfg.c
+else
SRCS = wm/ws.c \
wm/wsxdnd.c \
app.c \
@@ -34,8 +44,8 @@
mplayer/gtk/opts.c \
mplayer/gtk/url.c \
mplayer/gtk/eq.c \
- mplayer/gtk/common.c \
-
+ mplayer/gtk/common.c
+endif
OBJS = $(SRCS:.c=.o)
.SUFFIXES: .c .o
@@ -57,7 +67,8 @@
mplayer/*.o mplayer/*~ \
mplayer/gtk/*.o mplayer/gtk/*~ \
skin/*.o skin/*~ \
- wm/*.o wm/*~
+ wm/*.o wm/*~ \
+ win32/*.o
#dep: depend
#
Modified: trunk/configure
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Thu Jul 6 03:51:31 2006
@@ -6942,6 +6942,7 @@
# Required libraries
test "$_png" != yes && die "PNG support required for GUI compilation, please install libpng and libpng-dev packages."
+if not win32 ; then
test "$_x11" != yes && die "X11 support required for GUI compilation"
echocheck "XShape extension"
@@ -7046,6 +7047,13 @@
_ld_gui='$(GTKLIB) $(GLIBLIB)'
fi
+else
+ _ld_win32libs="-lcomdlg32 -lcomctl32 -lshell32 -lkernel32 $_ld_win32libs"
+ _def_gui='#define HAVE_NEW_GUI 1'
+ _def_gtk2_gui='#undef HAVE_GTK2_GUI'
+ _ld_gui='$(GTKLIB) $(GLIBLIB)'
+fi
+
echo "Creating Gui/config.mak"
cat > Gui/config.mak << EOF
# -------- Generated by configure -----------
Modified: trunk/libvo/vo_directx.c
==============================================================================
--- trunk/libvo/vo_directx.c (original)
+++ trunk/libvo/vo_directx.c Thu Jul 6 03:51:31 2006
@@ -35,6 +35,10 @@
#include "aspect.h"
#include "geometry.h"
+#ifdef HAVE_NEW_GUI
+#include "Gui/interface.h"
+#endif
+
#ifndef WM_XBUTTONDOWN
# define WM_XBUTTONDOWN 0x020B
# define WM_XBUTTONUP 0x020C
@@ -1311,6 +1315,13 @@
vo_dx = 0;
vo_dy = 0;
+#ifdef HAVE_NEW_GUI
+ if(use_gui && WinID != -1){
+ vo_dwidth = d_image_width;
+ vo_dheight = d_image_height;
+ guiGetEvent(guiSetShVideo, 0);
+ }
+#endif
/*release all directx objects*/
if (g_cc != NULL)g_cc->lpVtbl->Release(g_cc);
g_cc=NULL;
Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c (original)
+++ trunk/mplayer.c Thu Jul 6 03:51:31 2006
@@ -2538,10 +2538,16 @@
tv_param_immediate = 1;
#endif
+#if defined(WIN32) && defined(HAVE_NEW_GUI)
+ char *cmdline = GetCommandLine();
+ if(!strstr(cmdline, "-slave"))
+ use_gui=1;
+#else
if ( argv[0] )
if(!strcmp(argv[0],"gmplayer") ||
(strrchr(argv[0],'/') && !strcmp(strrchr(argv[0],'/'),"/gmplayer") ) )
use_gui=1;
+#endif
mconfig = m_config_new();
m_config_register_options(mconfig,mplayer_opts);
@@ -2570,6 +2576,21 @@
}
}
+#if defined(WIN32) && defined(HAVE_NEW_GUI)
+ void *runningmplayer = FindWindow("MPlayer GUI for Windows", "MPlayer for Windows");
+ if(runningmplayer && filename && use_gui){
+ COPYDATASTRUCT csData;
+ char file[MAX_PATH];
+ char *filepart = filename;
+ if(GetFullPathName(filename, MAX_PATH, file, &filepart)){
+ csData.dwData = 0;
+ csData.cbData = strlen(file)*2;
+ csData.lpData = file;
+ SendMessage(runningmplayer, WM_COPYDATA, (WPARAM)runningmplayer, (LPARAM)&csData);
+ }
+ }
+#endif
+
#ifdef WIN32
if(proc_priority){
int i;
@@ -2598,12 +2619,14 @@
play_tree_iter_free(playtree_iter);
playtree_iter=NULL;
+#ifndef WIN32 //Allow playing movies from network drives. eg. \\Desktop\c\somemovie.avi
if (getcwd(cwd, PATH_MAX) != (char *)NULL)
{
strcat(cwd, "/");
// Prefix relative paths with current working directory
play_tree_add_bpf(playtree, cwd);
}
+#endif /* WIN32 */
// Import initital playtree into GUI.
import_initial_playtree_into_gui(playtree, mconfig, enqueue);
}
More information about the MPlayer-cvslog
mailing list