[Mplayer-cvslog] CVS: main Makefile,1.27,1.28 cfg-mplayer.h,1.38,1.39 configure,1.41,1.42 mplayer.c,1.107,1.108
Zoltan Ponekker
pontscho at users.sourceforge.net
Tue May 8 14:17:05 CEST 2001
- Previous message: [Mplayer-cvslog] CVS: main mplayer.c,1.106,1.107
- Next message: [Mplayer-cvslog] CVS: main/libvo vo_xmga.c,1.18,1.19 vo_xv.c,1.18,1.19 x11_common.c,1.17,1.18 x11_common.h,1.4,1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main
In directory usw-pr-cvs1:/tmp/cvs-serv2829
Modified Files:
Makefile cfg-mplayer.h configure mplayer.c
Log Message:
add gui support
Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/Makefile,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** Makefile 2001/05/02 00:11:56 1.27
--- Makefile 2001/05/08 12:17:02 1.28
***************
*** 63,67 ****
$(MAKE) -C encore
! $(PRG): .depend mplayer.o $(OBJS) loader/libloader.a $(DS_DEP) libmpeg2/libmpeg2.a opendivx/libdecore.a $(COMMONLIBS) encore/libencore.a
$(CC) $(CFLAGS) -o $(PRG) mplayer.o $(OBJS) $(XMM_LIBS) $(LIRC_LIBS) $(A_LIBS) -lm $(TERMCAP_LIB) -Lloader -lloader $(DS_LIB) -ldl -Llibmpeg2 -lmpeg2 -Lopendivx -ldecore $(VO_LIBS) $(CSS_LIB) -Lencore -lencore -lpthread
--- 63,70 ----
$(MAKE) -C encore
! mplayerwithoutlink: .depend mplayer.o $(OBJS) loader/libloader.a $(DS_DEP) libmpeg2/libmpeg2.a opendivx/libdecore.a $(COMMONLIBS) encore/libencore.a
! @for a in mp3lib libac3 libmpeg2 libvo opendivx encore loader/DirectShow ; do $(MAKE) -C $$a all ; done
!
! $(PRG): mplayerwithoutlink
$(CC) $(CFLAGS) -o $(PRG) mplayer.o $(OBJS) $(XMM_LIBS) $(LIRC_LIBS) $(A_LIBS) -lm $(TERMCAP_LIB) -Lloader -lloader $(DS_LIB) -ldl -Llibmpeg2 -lmpeg2 -Lopendivx -ldecore $(VO_LIBS) $(CSS_LIB) -Lencore -lencore -lpthread
Index: cfg-mplayer.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-mplayer.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -r1.38 -r1.39
*** cfg-mplayer.h 2001/04/26 22:10:01 1.38
--- cfg-mplayer.h 2001/05/08 12:17:02 1.39
***************
*** 117,123 ****
{"verbose", &verbose, CONF_TYPE_INT, CONF_RANGE, 0, 100},
{"v", cfg_inc_verbose, CONF_TYPE_FUNC, 0, 0, 0},
! {"-help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
! {"help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
! {"h", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
{NULL, NULL, 0, 0, 0, 0}
};
--- 117,123 ----
{"verbose", &verbose, CONF_TYPE_INT, CONF_RANGE, 0, 100},
{"v", cfg_inc_verbose, CONF_TYPE_FUNC, 0, 0, 0},
! // {"-help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
! // {"help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
! // {"h", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
{NULL, NULL, 0, 0, 0, 0}
};
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -r1.41 -r1.42
*** configure 2001/05/07 07:52:50 1.41
--- configure 2001/05/08 12:17:02 1.42
***************
*** 230,233 ****
--- 230,235 ----
_select='#define HAVE_AUDIO_SELECT'
+ _gui=no;
+
for i in `echo $pparam`; do
***************
*** 590,593 ****
--- 592,598 ----
_select='#define HAVE_AUDIO_SELECT'
;;
+ --enable-gui)
+ _gui=yes
+ ;;
--disable-css)
_css=no
***************
*** 657,660 ****
--- 662,668 ----
_fastmemcpy=no
;;
+ --disable-gui)
+ _gui=no
+ ;;
--with-win32libdir=*)
_win32libdir=`echo $ac_option | cut -d '=' -f 2`
***************
*** 984,987 ****
--- 992,1001 ----
fi
+ if [ $_gui = yes ]; then
+ _gui='#define HAVE_GUI'
+ else
+ _gui='#undef HAVE_GUI'
+ fi
+
cat > $CCONF << EOF
***************
*** 1037,1040 ****
--- 1051,1057 ----
/* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/
$_fastmemcpy
+
+ /* gui support, please do not edit this option */
+ $_gui
/* Define if your processor stores words with the most significant
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.107
retrieving revision 1.108
diff -C2 -r1.107 -r1.108
*** mplayer.c 2001/05/08 01:58:59 1.107
--- mplayer.c 2001/05/08 12:17:02 1.108
***************
*** 89,92 ****
--- 89,95 ----
#define DEBUG if(0)
+ #ifdef HAVE_GUI
+ int nogui=1; // new
+ #endif
int verbose=0;
***************
*** 326,330 ****
--- 329,351 ----
extern void avi_fixate();
+ #ifdef HAVE_GUI
+ #include "../Gui/mplayer/psignal.h"
+ #endif
+
void exit_player(char* how){
+
+ #ifdef HAVE_GUI
+ if ( !nogui )
+ {
+ if ( how != NULL )
+ {
+ if ( !strcmp( how,"Quit" ) ) mplSendMessage( mplEndOfFile );
+ if ( !strcmp( how,"End of file" ) ) mplSendMessage( mplEndOfFile );
+ if ( !strcmp( how,"audio_init" ) ) mplSendMessage( mplAudioError );
+ }
+ else mplSendMessage( mplUnknowError );
+ }
+ #endif
+
if(how) printf("\nExiting... (%s)\n",how);
if(verbose) printf("max framesize was %d bytes\n",max_framesize);
***************
*** 341,344 ****
--- 362,368 ----
if(encode_name) avi_fixate();
#ifdef HAVE_LIRC
+ #ifdef HAVE_GUI
+ if ( nogui )
+ #endif
lirc_mp_cleanup();
#endif
***************
*** 360,363 ****
--- 384,394 ----
current_module?current_module:"unknown"
);
+ #ifdef HAVE_GUI
+ if ( !nogui )
+ {
+ mplShMem->items.error.signal=x;
+ strcpy( mplShMem->items.error.module,current_module?current_module:"unknown" );
+ }
+ #endif
exit_player(NULL);
}
***************
*** 373,377 ****
extern int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int maxlen);
- int main(int argc,char* argv[], char *envp[]){
char* filename=NULL; //"MI2-Trailer.avi";
int i;
--- 404,407 ----
***************
*** 438,446 ****
//int user_bpp=0;
#include "mixer.h"
#include "cfg-mplayer.h"
-
- printf("%s",banner_text);
if (parse_config_file(conf, "/etc/mplayer.conf") < 0)
exit(1);
--- 468,482 ----
//int user_bpp=0;
+ int osd_visible=100;
+ int osd_function=OSD_PLAY;
+ int osd_last_pts=-303;
+
+ int rel_seek_secs=0;
+
#include "mixer.h"
#include "cfg-mplayer.h"
+ void parse_cfgfiles( void )
+ {
if (parse_config_file(conf, "/etc/mplayer.conf") < 0)
exit(1);
***************
*** 463,487 ****
}
}
- if (parse_command_line(conf, argc, argv, envp, &filename) < 0)
- exit(1);
-
- // Many users forget to include command line in bugreports...
- if(verbose){
- printf("CommandLine:");
- for(i=1;i<argc;i++)printf(" '%s'",argv[i]);
- printf("\n");
- }
-
- if(video_driver && strcmp(video_driver,"help")==0){
- printf("Available video output drivers:\n");
- i=0;
- while (video_out_drivers[i]) {
- const vo_info_t *info = video_out_drivers[i++]->get_info ();
- printf("\t%s\t%s\n", info->short_name, info->name);
- }
- printf("\n");
- exit(0);
}
if(!filename){
if(vcd_track) filename="/dev/cdrom";
--- 499,539 ----
}
}
}
+ #ifndef HAVE_GUI
+ int main(int argc,char* argv[], char *envp[]){
+ #else
+ int mplayer(int argc,char* argv[], char *envp[]){
+ #endif
+
+ printf("%s",banner_text);
+
+ #ifdef HAVE_GUI
+ if ( nogui )
+ {
+ #endif
+ if (parse_command_line(conf, argc, argv, envp, &filename) < 0) exit(1);
+
+ // Many users forget to include command line in bugreports...
+ if(verbose){
+ printf("CommandLine:");
+ for(i=1;i<argc;i++)printf(" '%s'",argv[i]);
+ printf("\n");
+ }
+
+ if(video_driver && strcmp(video_driver,"help")==0){
+ printf("Available video output drivers:\n");
+ i=0;
+ while (video_out_drivers[i]) {
+ const vo_info_t *info = video_out_drivers[i++]->get_info ();
+ printf("\t%s\t%s\n", info->short_name, info->name);
+ }
+ printf("\n");
+ exit(0);
+ }
+ #ifdef HAVE_GUI
+ }
+ #endif
+
if(!filename){
if(vcd_track) filename="/dev/cdrom";
***************
*** 509,512 ****
--- 561,567 ----
if(!parse_codec_cfg(get_path("codecs.conf"))){
printf("(copy/link DOCS/codecs.conf to ~/.mplayer/codecs.conf)\n");
+ #ifdef HAVE_GUI
+ if ( !nogui ) { mplSendMessage( mplCodecConfNotFound ); usleep( 10000 ); }
+ #endif
exit(1);
}
***************
*** 574,577 ****
--- 629,635 ----
if (dvd_import_key(dvdimportkey)) {
fprintf(stderr,"Error processing DVD KEY.\n");
+ #ifdef HAVE_GUI
+ if ( !nogui ) { mplSendMessage( mplErrorDVDKeyProcess ); usleep( 10000 ); }
+ #endif
exit(1);
}
***************
*** 579,583 ****
}
if (dvd_device) {
! if (dvd_auth(dvd_device,f)) exit(0);
printf("DVD auth sequence seems to be OK.\n");
}
--- 637,646 ----
}
if (dvd_device) {
! if (dvd_auth(dvd_device,f)) {
! #ifdef HAVE_GUI
! if ( !nogui ) { mplSendMessage( mplErrorDVDAuth ); usleep( 10000 ); }
! #endif
! exit(0);
! }
printf("DVD auth sequence seems to be OK.\n");
}
***************
*** 654,657 ****
--- 717,723 ----
printf("============= Sorry, this file format not recognized/supported ===============\n");
printf("=== If this file is an AVI, ASF or MPEG stream, please contact the author! ===\n");
+ #ifdef HAVE_GUI
+ if ( !nogui ) { mplSendMessage( mplUnknowFileType ); usleep( 10000 ); }
+ #endif
exit(1);
}
***************
*** 704,707 ****
--- 770,776 ----
if(v_pos==-1){
printf("AVI_NI: missing video stream!? contact the author, it may be a bug :(\n");
+ #ifdef HAVE_GUI
+ if ( !nogui ) { mplSendMessage( mplErrorAVINI ); usleep( 10000 ); }
+ #endif
exit(1);
}
***************
*** 728,731 ****
--- 797,803 ----
if(!ds_fill_buffer(d_video)){
printf("AVI: missing video stream!? contact the author, it may be a bug :(\n");
+ #ifdef HAVE_GUI
+ if ( !nogui ) { mplSendMessage( mplAVIErrorMissingVideoStream ); usleep( 10000 ); }
+ #endif
exit(1);
}
***************
*** 769,772 ****
--- 841,847 ----
if(!ds_fill_buffer(d_video)){
printf("ASF: missing video stream!? contact the author, it may be a bug :(\n");
+ #ifdef HAVE_GUI
+ if ( !nogui ) { mplSendMessage( mplASFErrorMissingVideoStream ); usleep( 10000 ); }
+ #endif
exit(1);
}
***************
*** 837,840 ****
--- 912,918 ----
if(verbose) printf("NONE :(\n");
printf("MPEG: FATAL: EOF while searching for sequence header\n");
+ #ifdef HAVE_GUI
+ if ( !nogui ) { mplSendMessage( mplMPEGErrorSeqHeaderSearch ); usleep( 10000 ); }
+ #endif
exit(1);
}
***************
*** 846,860 ****
// ========= Read & process sequence header & extension ============
videobuffer=shmem_alloc(VIDEOBUFFER_SIZE);
! if(!videobuffer){ printf("Cannot allocate shared memory\n");exit(0);}
videobuf_len=0;
! if(!read_video_packet(d_video)){ printf("FATAL: Cannot read sequence header!\n");exit(1);}
if(header_process_sequence_header (picture, &videobuffer[4])) {
! printf ("bad sequence header!\n"); exit(1);
}
if(sync_video_packet(d_video)==0x1B5){ // next packet is seq. ext.
videobuf_len=0;
! if(!read_video_packet(d_video)){ printf("FATAL: Cannot read sequence header extension!\n");exit(1);}
if(header_process_extension (picture, &videobuffer[4])) {
! printf ("bad sequence header extension!\n"); exit(1);
}
}
--- 924,964 ----
// ========= Read & process sequence header & extension ============
videobuffer=shmem_alloc(VIDEOBUFFER_SIZE);
! if(!videobuffer){
! printf("Cannot allocate shared memory\n");
! #ifdef HAVE_GUI
! if ( !nogui ) { mplSendMessage( mplErrorShMemAlloc ); usleep( 10000 ); }
! #endif
! exit(0);
! }
videobuf_len=0;
! if(!read_video_packet(d_video)){
! printf("FATAL: Cannot read sequence header!\n");
! #ifdef HAVE_GUI
! if ( !nogui ) { mplSendMessage( mplMPEGErrorCannotReadSeqHeader ); usleep( 10000 ); }
! #endif
! exit(1);
! }
if(header_process_sequence_header (picture, &videobuffer[4])) {
! printf ("bad sequence header!\n");
! #ifdef HAVE_GUI
! if ( !nogui ) { mplSendMessage( mplMPEGErrorBadSeqHeader ); usleep( 10000 ); }
! #endif
! exit(1);
}
if(sync_video_packet(d_video)==0x1B5){ // next packet is seq. ext.
videobuf_len=0;
! if(!read_video_packet(d_video)){
! printf("FATAL: Cannot read sequence header extension!\n");
! #ifdef HAVE_GUI
! if ( !nogui ) { mplSendMessage( mplMPEGErrorCannotReadSeqHeaderExt ); usleep( 10000 ); }
! #endif
! exit(1);
! }
if(header_process_extension (picture, &videobuffer[4])) {
! printf ("bad sequence header extension!\n");
! #ifdef HAVE_GUI
! if ( !nogui ) { mplSendMessage( mplMPEGErrorBadSeqHeaderExt ); usleep( 10000 ); }
! #endif
! exit(1);
}
}
***************
*** 941,944 ****
--- 1045,1056 ----
if(!sh_video->codec){
printf("Can't find codec for video format 0x%X !\n",sh_video->format);
+ #ifdef HAVE_GUI
+ if ( !nogui )
+ {
+ mplShMem->items.videodata.format=sh_video->format;
+ mplSendMessage( mplCantFindCodecForVideoFormat );
+ usleep( 10000 );
+ }
+ #endif
exit(1);
}
***************
*** 960,963 ****
--- 1072,1078 ----
if(i>=CODECS_MAX_OUTFMT){
printf("Sorry, selected video_out device is incompatible with this codec.\n");
+ #ifdef HAVE_GUI
+ if ( !nogui ) { mplSendMessage( mplIncompatibleVideoOutDevice ); usleep( 10000 ); }
+ #endif
exit(1);
}
***************
*** 968,972 ****
switch(sh_video->codec->driver){
case 2: {
! if(!init_video_codec(sh_video)) exit(1);
if(verbose) printf("INFO: Win32 video codec init OK!\n");
break;
--- 1083,1092 ----
switch(sh_video->codec->driver){
case 2: {
! if(!init_video_codec(sh_video)) {
! #ifdef HAVE_GUI
! if ( !nogui ) { mplSendMessage( mplUnknowError ); usleep( 10000 ); }
! #endif
! exit(1);
! }
if(verbose) printf("INFO: Win32 video codec init OK!\n");
break;
***************
*** 975,978 ****
--- 1095,1101 ----
#ifndef USE_DIRECTSHOW
printf("MPlayer was compiled WITHOUT directshow support!\n");
+ #ifdef HAVE_GUI
+ if ( !nogui ) { mplSendMessage( mplCompileWithoutDSSupport ); usleep( 10000 ); }
+ #endif
exit(1);
#else
***************
*** 984,987 ****
--- 1107,1118 ----
printf("package from: ftp://thot.banki.hu/esp-team/linux/MPlayer/w32codec.zip !\n");
printf("Or you should disable DShow support: make distclean;make -f Makefile.No-DS\n");
+ #ifdef HAVE_GUI
+ if ( !nogui )
+ {
+ strcpy( mplShMem->items.videodata.codecdll,sh_video->codec->dll );
+ mplSendMessage( mplDSCodecNotFound );
+ usleep( 10000 );
+ }
+ #endif
exit(1);
}
***************
*** 1126,1134 ****
if(verbose) printf("vo_debug3: out_fmt=0x%08X\n",out_fmt);
if(video_out->init(sh_video->disp_w,sh_video->disp_h,
screen_size_x,screen_size_y,
fullscreen|(vidmode<<1)|(softzoom<<2),
title,out_fmt)){
! printf("FATAL: Cannot initialize video driver!\n");exit(1);
}
if(verbose) printf("INFO: Video OUT driver init OK!\n");
--- 1257,1278 ----
if(verbose) printf("vo_debug3: out_fmt=0x%08X\n",out_fmt);
+ #ifdef HAVE_GUI
+ if ( !nogui )
+ {
+ mplShMem->items.videodata.width=sh_video->disp_w;
+ mplShMem->items.videodata.height=sh_video->disp_h;
+ mplSendMessage( mplSetVideoData );
+ }
+ #endif
+
if(video_out->init(sh_video->disp_w,sh_video->disp_h,
screen_size_x,screen_size_y,
fullscreen|(vidmode<<1)|(softzoom<<2),
title,out_fmt)){
! printf("FATAL: Cannot initialize video driver!\n");
! #ifdef HAVE_GUI
! if ( !nogui ) { mplSendMessage( mplCantInitVideoDriver ); usleep( 10000 ); }
! #endif
! exit(1);
}
if(verbose) printf("INFO: Video OUT driver init OK!\n");
***************
*** 1157,1167 ****
int grab_frames=0;
char osd_text_buffer[64];
- int osd_visible=100;
- int osd_function=OSD_PLAY;
- int osd_last_pts=-303;
int drop_frame=0;
int drop_frame_cnt=0;
#ifdef HAVE_LIRC
lirc_mp_setup();
#endif
--- 1301,1311 ----
int grab_frames=0;
char osd_text_buffer[64];
int drop_frame=0;
int drop_frame_cnt=0;
#ifdef HAVE_LIRC
+ #ifdef HAVE_GUI
+ if ( nogui )
+ #endif
lirc_mp_setup();
#endif
***************
*** 1176,1180 ****
signal(SIGTERM,exit_sighandler); // kill
signal(SIGHUP,exit_sighandler); // kill -HUP / xterm closed
! signal(SIGINT,exit_sighandler); // Interrupt from keyboard
signal(SIGQUIT,exit_sighandler); // Quit from keyboard
// fatal errors:
--- 1320,1329 ----
signal(SIGTERM,exit_sighandler); // kill
signal(SIGHUP,exit_sighandler); // kill -HUP / xterm closed
!
! #ifdef HAVE_GUI
! if ( nogui )
! #endif
! signal(SIGINT,exit_sighandler); // Interrupt from keyboard
!
signal(SIGQUIT,exit_sighandler); // Quit from keyboard
// fatal errors:
***************
*** 1659,1671 ****
if(osd_function==OSD_PAUSE){
printf("\n------ PAUSED -------\r");fflush(stdout);
! while(
#ifdef HAVE_LIRC
! lirc_mp_getinput()<=0 &&
#endif
! (!f || getch2(20)<=0) && mplayer_get_key()<=0){
! video_out->check_events();
! if(!f) usleep(1000); // do not eat the CPU
! }
! osd_function=OSD_PLAY;
}
--- 1808,1827 ----
if(osd_function==OSD_PAUSE){
printf("\n------ PAUSED -------\r");fflush(stdout);
! #ifdef HAVE_GUI
! if ( nogui )
! {
! #endif
! while(
#ifdef HAVE_LIRC
! lirc_mp_getinput()<=0 &&
#endif
! (!f || getch2(20)<=0) && mplayer_get_key()<=0){
! video_out->check_events();
! if(!f) usleep(1000); // do not eat the CPU
! }
! osd_function=OSD_PLAY;
! #ifdef HAVE_GUI
! } else while( osd_function != OSD_PLAY ) usleep( 1000 );
! #endif
}
***************
*** 1675,1680 ****
//================= Keyboard events, SEEKing ====================
! { int rel_seek_secs=0;
! int c;
while(
#ifdef HAVE_LIRC
--- 1831,1835 ----
//================= Keyboard events, SEEKing ====================
! { int c;
while(
#ifdef HAVE_LIRC
***************
*** 2042,2045 ****
--- 2197,2201 ----
}
+ rel_seek_secs=0;
} // keyboard event handler
_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog
- Previous message: [Mplayer-cvslog] CVS: main mplayer.c,1.106,1.107
- Next message: [Mplayer-cvslog] CVS: main/libvo vo_xmga.c,1.18,1.19 vo_xv.c,1.18,1.19 x11_common.c,1.17,1.18 x11_common.h,1.4,1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list