[Mplayer-cvslog] CVS: main mplayer.c,1.557,1.558 Makefile,1.208,1.209 mencoder.c,1.152,1.153 cfgparser.c,1.53,1.54 cfgparser.h,1.15,1.16
Atmosfear
atmos4 at mplayerhq.hu
Sat Aug 31 17:04:20 CEST 2002
Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv1902
Modified Files:
mplayer.c Makefile mencoder.c cfgparser.c cfgparser.h
Log Message:
Improved MacOS X SDL support, enable SDL main() wrapper for Darwin, remove unused envp.
Patch by Donnie Smith <xc0bead2d8130df59 at f4n.org>, updated by me.
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.557
retrieving revision 1.558
diff -u -r1.557 -r1.558
--- mplayer.c 31 Aug 2002 13:09:22 -0000 1.557
+++ mplayer.c 31 Aug 2002 15:04:06 -0000 1.558
@@ -469,7 +469,17 @@
return eof;
}
-int main(int argc,char* argv[], char *envp[]){
+/*
+ * In Mac OS X the SDL-lib is built upon Cocoa. The easiest way to
+ * make it all work is to use the builtin SDL-bootstrap code, which
+ * will be done automatically by replacing our main() if we include SDL.h.
+ */
+#if defined(SYS_DARWIN) && defined(HAVE_SDL)
+#include <SDL.h>
+#endif
+
+int main(int argc,char* argv[]){
+
static demux_stream_t *d_audio=NULL;
@@ -564,7 +574,7 @@
if ( use_gui ) cfg_read();
#endif
- if(m_config_parse_command_line(mconfig, argc, argv, envp) < 0) exit(1); // error parsing cmdline
+ if(m_config_parse_command_line(mconfig, argc, argv) < 0) exit(1); // error parsing cmdline
playtree = play_tree_cleanup(playtree);
if(playtree) {
Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/Makefile,v
retrieving revision 1.208
retrieving revision 1.209
diff -u -r1.208 -r1.209
--- Makefile 30 Aug 2002 21:24:04 -0000 1.208
+++ Makefile 31 Aug 2002 15:04:06 -0000 1.209
@@ -50,7 +50,7 @@
ifeq ($(VIDIX),yes)
MISC_LIBS += -Llibdha -ldha vidix/libvidix.a
endif
-CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Iloader $(VO_INC) $(EXTRA_INC) $(CDPARANOIA_INC) $(FREETYPE_INC) # -Wall
+CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Iloader $(VO_INC) $(EXTRA_INC) $(CDPARANOIA_INC) $(FREETYPE_INC) $(SDL_INC) # -Wall
PARTS = libfame libmpdemux libmpcodecs mp3lib liba52 libmp1e libmpeg2 libavcodec libao2 drivers linux postproc input libmpdvdkit libvo
ifeq ($(VIDIX),yes)
Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -r1.152 -r1.153
--- mencoder.c 30 Aug 2002 21:44:04 -0000 1.152
+++ mencoder.c 31 Aug 2002 15:04:06 -0000 1.153
@@ -295,7 +295,7 @@
}
-int main(int argc,char* argv[], char *envp[]){
+int main(int argc,char* argv[]){
stream_t* stream=NULL;
demuxer_t* demuxer=NULL;
@@ -373,7 +373,7 @@
me_register_options(mconfig);
parse_cfgfiles(mconfig);
- if(m_config_parse_command_line(mconfig, argc, argv, envp) < 0) mencoder_exit(1, "error parsing cmdline");
+ if(m_config_parse_command_line(mconfig, argc, argv) < 0) mencoder_exit(1, "error parsing cmdline");
playtree = play_tree_cleanup(playtree);
if(playtree) {
playtree_iter = play_tree_iter_new(playtree,mconfig);
Index: cfgparser.c
===================================================================
RCS file: /cvsroot/mplayer/main/cfgparser.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- cfgparser.c 29 Aug 2002 20:50:48 -0000 1.53
+++ cfgparser.c 31 Aug 2002 15:04:06 -0000 1.54
@@ -1033,7 +1033,7 @@
return ret;
}
-int m_config_parse_command_line(m_config_t *config, int argc, char **argv, char **envp)
+int m_config_parse_command_line(m_config_t *config, int argc, char **argv)
{
int i;
int tmp;
@@ -1044,7 +1044,6 @@
assert(config != NULL);
assert(config->pt != NULL);
assert(argv != NULL);
- assert(envp != NULL);
assert(argc >= 1);
#endif
Index: cfgparser.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfgparser.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- cfgparser.h 28 Aug 2002 16:55:40 -0000 1.15
+++ cfgparser.h 31 Aug 2002 15:04:06 -0000 1.16
@@ -95,7 +95,7 @@
* -1 on error (invalid option...)
* 1 otherwise
*/
-int m_config_parse_command_line(m_config_t* config, int argc, char **argv, char **envp);
+int m_config_parse_command_line(m_config_t* config, int argc, char **argv);
m_config_t* m_config_new(play_tree_t* pt);
More information about the MPlayer-cvslog
mailing list