1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-25 04:38:01 +00:00

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
This commit is contained in:
pontscho 2002-01-15 17:03:19 +00:00
parent eadeed12f4
commit 8d184312b0
6 changed files with 27 additions and 28 deletions

View File

@ -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");

View File

@ -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

9
configure vendored
View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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()");