diff options
-rw-r--r-- | Gui/mplayer/widgets.c | 13 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rwxr-xr-x | configure | 9 | ||||
-rw-r--r-- | mencoder.c | 22 | ||||
-rw-r--r-- | mp_msg.c | 2 | ||||
-rw-r--r-- | mplayer.c | 5 |
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"); @@ -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 @@ -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; @@ -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; @@ -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()"); |