aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-01-15 17:03:19 +0000
committerGravatar pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-01-15 17:03:19 +0000
commit8d184312b08d57c659aef1fe8cee77303b940aa8 (patch)
tree035aa4f5e95a91e2a8271095bf20cb8d3f6b782a
parenteadeed12f4eb900c92f0e4f7a9dabd14fce47208 (diff)
small gtk bug fix (-display bug, baze gabu, miattad fogok elkarhozni:), and remove gui dependencie in mencoder
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4177 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--Gui/mplayer/widgets.c13
-rw-r--r--Makefile4
-rwxr-xr-xconfigure9
-rw-r--r--mencoder.c22
-rw-r--r--mp_msg.c2
-rw-r--r--mplayer.c5
6 files changed, 27 insertions, 28 deletions
diff --git a/Gui/mplayer/widgets.c b/Gui/mplayer/widgets.c
index 1629265a91..b056f5b4d2 100644
--- a/Gui/mplayer/widgets.c
+++ b/Gui/mplayer/widgets.c
@@ -9,7 +9,9 @@
#include <string.h>
#include <signal.h>
+#include <gdk/gdkprivate.h>
#include <gdk/gdkkeysyms.h>
+#include <gdk/gdk.h>
#include <gtk/gtk.h>
#include "widgets.h"
@@ -64,6 +66,8 @@ void widgetsCreate( void )
// --- forked function
+extern char *mDisplayName;
+
static void gtkThreadProc( int argc,char * argv[] )
{
struct sigaction sa;
@@ -73,8 +77,14 @@ static void gtkThreadProc( int argc,char * argv[] )
#endif
gtk_set_locale();
- gtk_init( &argc,&argv );
+ {
+ char tmp[128];
+ sprintf( tmp,"--display=%s",mDisplayName );
+ argv[argc++]=strdup( tmp );
+ gtk_init( &argc,&argv );
+ }
gdk_set_use_xshm( TRUE );
+ printf( "[gtk] display: %s\n",gdk_get_display() );
widgetsCreate();
@@ -101,7 +111,6 @@ void gtkInit( int argc,char* argv[], char *envp[] )
}
void gtkDone( void ){
- int status;
gtkSendMessage(evExit);
usleep(50000); // 50ms should be enough!
printf("gtk killed...\n");
diff --git a/Makefile b/Makefile
index c718fee605..42f1bd23fc 100644
--- a/Makefile
+++ b/Makefile
@@ -187,14 +187,14 @@ VIDIX_LIBS += -Lvidix -lvidix
endif
$(PRG): $(MPLAYER_DEP)
- $(CC) $(CFLAGS) -o $(PRG) $(OBJS_MPLAYER) $(CODEC_LIBS) -Llibmpdemux -lmpdemux $(VO_LIBS) $(AO_LIBS) $(LIB_LOADER) $(GUI_LIBS) $(COMMON_LIBS) $(EXTRA_LIB) $(A_LIBS) $(V_LIBS) $(LIRC_LIB) $(CSS_LIB) $(ARCH_LIB) $(DECORE_LIB) $(TERMCAP_LIB) $(STATIC_LIB) $(GTK_LIBS) $(PNG_LIB) $(Z_LIB) $(STREAMING_LIB) $(VIDIX_LIBS) -lm
+ $(CC) $(CFLAGS) -o $(PRG) $(OBJS_MPLAYER) $(CODEC_LIBS) -Llibmpdemux -lmpdemux $(GUI_LIBS) $(VO_LIBS) $(AO_LIBS) $(LIB_LOADER) $(COMMON_LIBS) $(EXTRA_LIB) $(A_LIBS) $(V_LIBS) $(LIRC_LIB) $(CSS_LIB) $(ARCH_LIB) $(DECORE_LIB) $(TERMCAP_LIB) $(STATIC_LIB) $(GTK_LIBS) $(PNG_LIB) $(Z_LIB) $(STREAMING_LIB) $(VIDIX_LIBS) -lm
$(PRG_FIBMAP): fibmap_mplayer.o
$(CC) -o $(PRG_FIBMAP) fibmap_mplayer.o
ifeq ($(MENCODER),yes)
$(PRG_MENCODER): $(MENCODER_DEP)
- $(CC) $(CFLAGS) -o $(PRG_MENCODER) $(OBJS_MENCODER) $(CODEC_LIBS) -Llibmpdemux -lmpdemux $(LIB_LOADER) $(GUI_LIBS) $(COMMON_LIBS) $(EXTRA_LIB) $(A_LIBS) $(CSS_LIB) $(GTK_LIBS) $(PNG_LIB) $(Z_LIB) $(ARCH_LIB) $(DECORE_LIB) $(ENCORE_LIB) $(TERMCAP_LIB) $(STREAMING_LIB) -lm
+ $(CC) $(CFLAGS) -o $(PRG_MENCODER) $(OBJS_MENCODER) $(CODEC_LIBS) -Llibmpdemux -lmpdemux $(LIB_LOADER) $(COMMON_LIBS) $(EXTRA_LIB) $(A_LIBS) $(CSS_LIB) $(GTK_LIBS) $(PNG_LIB) $(Z_LIB) $(ARCH_LIB) $(DECORE_LIB) $(ENCORE_LIB) $(TERMCAP_LIB) $(STREAMING_LIB) -lm
endif
# Every mplayer dependancy depends on version.h, to force building version.h
diff --git a/configure b/configure
index b714953883..4fa5cb7196 100755
--- a/configure
+++ b/configure
@@ -2507,6 +2507,12 @@ EOF
fi
+echocheck "mencoder"
+_mencoder_flag='#undef HAVE_MENCODER'
+if test "$_mencoder" = yes ; then
+ _mencoder_flag='#define HAVE_MENCODER'
+fi
+echores "$_mencoder"
echocheck "lirc"
if test "$_lirc" = auto ; then
@@ -2883,6 +2889,9 @@ $_def_dvdread
/* You have to change DECORE_LIBS in config.mak too! */
$_def_decore
+/* If build mencoder */
+$_mencoder_flag
+
/* Indicates if Divx4linux encore is available
Note: for mencoder */
$_def_encore
diff --git a/mencoder.c b/mencoder.c
index d4391b4cd0..c989af5f4e 100644
--- a/mencoder.c
+++ b/mencoder.c
@@ -193,28 +193,6 @@ static int parse_end_at(struct config *conf, const char* param);
//---------------------------------------------------------------------------
-// dummy datas for gui :(
-
-#ifdef HAVE_NEW_GUI
-float rel_seek_secs=0;
-int abs_seek_pos=0;
-int use_gui=0;
-
-void exit_player(char* how){
-}
-void vo_x11_putkey(int key){
-}
-void vo_setwindow( int w,int g ) {
-}
-void vo_setwindowsize( int w,int h ) {
-}
-
-int vo_resize = 0;
-int vo_expose = 0;
-
-#endif
-// ---
-
// mini dummy libvo:
static unsigned char* vo_image=NULL;
diff --git a/mp_msg.c b/mp_msg.c
index 885d69fa62..033b21fc6b 100644
--- a/mp_msg.c
+++ b/mp_msg.c
@@ -28,7 +28,7 @@ void mp_msg_c( int x, const char *format, ... ){
va_list va;
if((x&255)>mp_msg_levels[x>>8]) return; // do not display
va_start(va, format);
-#ifdef HAVE_NEW_GUI
+#if defined( HAVE_NEW_GUI ) && !defined( HAVE_MENCODER )
if(use_gui){
char tmp[16*80];
vsnprintf( tmp,8*80,format,va ); tmp[8*80-1]=0;
diff --git a/mplayer.c b/mplayer.c
index 9e927afd89..f748632db2 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -657,8 +657,11 @@ if(!parse_codec_cfg(get_path("codecs.conf"))){
} else
printf("Using Linux's hardware RTC timing (%ldHz)\n", irqp);
}
+#ifdef HAVE_NEW_GUI
// breaks DGA and SVGAlib and VESA drivers: --A'rpi
-// setuid( getuid() ); // strongly test, please check this.
+// and now ? -- Pontscho
+ if(use_gui) setuid( getuid() ); // strongly test, please check this.
+#endif
if(rtc_fd<0)
#endif
printf("Using %s timing\n",softsleep?"software":"usleep()");