[MPlayer-G2-dev] Darwin port

Dan Christiansen danchr at daimi.au.dk
Wed May 7 20:43:20 CEST 2003


Attached below is a patch to make g2 pre20 compile on Darwin/Mac OS X. 
Everything seems to work quite well, except there's no working vo 
module. Here's a short description of what I did:
- The WORDS_BIGENDIAN code had obviously never been compiled. Added a 
some missing casts as well as a missing macro.
- Changed "$(AR) r" to "$(AR) sr" to avoid using ranlib. Does this work 
on other platforms as well?
- The libvo2 test requires all sorts of odd flags and libraries to 
compile on Darwin. Rather than clogging the Makefile with them, I 
removed it from "all".
- Made "make clean" recursive.
- Updated timer-macosx.
- Added the required libraries to each target in the main Makefile. I 
wish there was some way to simplify this..

I ran into one problem which I couldn't figure out how to solve 
properly. It seems like gCpuCaps symbol isn't included in libosdep.a, 
so I had to explicitly link osdep/cpudetect.o into test-codecs. I tried 
everything I could think of, and I still don't understand why it 
doesn't work...
> # FIXME: for some odd reason the gCpuCaps symbol will be undefined on 
> Darwin
> #        unless osdep/cpudetect.o is explicitely linked
> 	$(CC) $(OBJS) test-codecs.o osdep/cpudetect.o -o test-codecs 
> $(CODECS_DEPS) $(STREAM_DEPS) $(PLAYER_DEPS) $(EXTRA_LIB) 
> $(CDPARANOIA_LIB) osdep/libosdep.a $(SMBCLIENT_LIB) $(AO_LIBS) 
> $(VO_LIBS) $(I18NLIBS) -lm

Other than that, with these changes, mplayer-g2 should compile fine 
assuming the configure script from mplayer is used.

BTW, when you write the interface for the actual library, please 
consider adding a simple way to extract metadata from a file. There 
really aren't any utilities out there which can read metadata from most 
media files.

Also, if anyone is considering porting vo_gl from mplayer, could you 
perhaps try to isolate the X11 dependencies in the same time? I tried 
to make a mac native vo based off it, but it was too difficult for me.

- Dan Christiansen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: g2-darwin.diff
Type: application/octet-stream
Size: 13560 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-g2-dev/attachments/20030507/a1ddb982/attachment.obj>


More information about the MPlayer-G2-dev mailing list