# HG changeset patch # User pontscho # Date 1011114199 0 # Node ID 116abdd0aed1ad8995b07d795c855e02352cbebe # Parent 8110b321f2cac0bf10d3c03d515347d1b10ee658 small gtk bug fix (-display bug, baze gabu, miattad fogok elkarhozni:), and remove gui dependencie in mencoder diff -r 8110b321f2ca -r 116abdd0aed1 Gui/mplayer/widgets.c --- a/Gui/mplayer/widgets.c Tue Jan 15 16:35:17 2002 +0000 +++ b/Gui/mplayer/widgets.c Tue Jan 15 17:03:19 2002 +0000 @@ -9,7 +9,9 @@ #include #include +#include #include +#include #include #include "widgets.h" @@ -64,6 +66,8 @@ // --- forked function +extern char *mDisplayName; + static void gtkThreadProc( int argc,char * argv[] ) { struct sigaction sa; @@ -73,8 +77,14 @@ #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 gtkDone( void ){ - int status; gtkSendMessage(evExit); usleep(50000); // 50ms should be enough! printf("gtk killed...\n"); diff -r 8110b321f2ca -r 116abdd0aed1 Makefile --- a/Makefile Tue Jan 15 16:35:17 2002 +0000 +++ b/Makefile Tue Jan 15 17:03:19 2002 +0000 @@ -187,14 +187,14 @@ 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 -r 8110b321f2ca -r 116abdd0aed1 configure --- a/configure Tue Jan 15 16:35:17 2002 +0000 +++ b/configure Tue Jan 15 17:03:19 2002 +0000 @@ -2507,6 +2507,12 @@ 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 @@ /* 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 -r 8110b321f2ca -r 116abdd0aed1 mencoder.c --- a/mencoder.c Tue Jan 15 16:35:17 2002 +0000 +++ b/mencoder.c Tue Jan 15 17:03:19 2002 +0000 @@ -193,28 +193,6 @@ //--------------------------------------------------------------------------- -// 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 -r 8110b321f2ca -r 116abdd0aed1 mp_msg.c --- a/mp_msg.c Tue Jan 15 16:35:17 2002 +0000 +++ b/mp_msg.c Tue Jan 15 17:03:19 2002 +0000 @@ -28,7 +28,7 @@ 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 -r 8110b321f2ca -r 116abdd0aed1 mplayer.c --- a/mplayer.c Tue Jan 15 16:35:17 2002 +0000 +++ b/mplayer.c Tue Jan 15 17:03:19 2002 +0000 @@ -657,8 +657,11 @@ } 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()");