Mercurial > mplayer.hg
changeset 4176:116abdd0aed1
small gtk bug fix (-display bug, baze gabu, miattad fogok elkarhozni:), and remove gui dependencie in mencoder
author | pontscho |
---|---|
date | Tue, 15 Jan 2002 17:03:19 +0000 |
parents | 8110b321f2ca |
children | cab4ac1467e4 |
files | Gui/mplayer/widgets.c Makefile configure mencoder.c mp_msg.c mplayer.c |
diffstat | 6 files changed, 27 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- 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 <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 @@ // --- 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");
--- 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
--- 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
--- 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;
--- 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;
--- 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()");