[MPlayer-dev-eng] [PATCH] Mac OS X Finder support
Chris Roccati
roccati at pobox.com
Sat Nov 6 13:36:37 CET 2004
On 5 Nov 2004, at 22:36, Reimar Döffinger wrote:
> Ok, just a quick reply...
> Well, it adds a big hunk of code to mplayer.c - I don't really like
> that, especially as it's system specific. Could it be put in a seperate
> file (maybe in osdep??), best even with possibility to disable?
The code must replace the main() function in order to provide a
replacement for argc and argv. It could be moved somewhere else but
everything gets dirty and dirtier -- It is not very pretty even now.
What could be done is something along these lines:
add --enable-osx-finder-support to the configure script
add an adeguately #ifdef bracketed #define main(a,b) UnixMain(a,b) in
config.h
move all the code of the patch in a separate file say osdep/macos_main.c
add a the suitable ifeq() in osdep/Makefile
while we are at it, the main/Makefile should be changed to build the
Info.plist (updating CFBundleShortVersionString), the resource fork or
the appwrapper directory.
That would make for a quite invasive patch...
Some things should be decided for the Info.plist:
the CFBundleIdentifier: I think everybody agrees for it to be
hu.mplayerhq.mplayer
the CFBundleGetInfoString: should it say "MPlayer <version>"? Something
more?
the CFBundleDocumentTypes+CFBundleIconFile: I've currently stolen the
one from MPlayerOSX, we'll need some icons...
> Also I think there are already quite a few escaping/unescaping
> functions in MPlayer, maybe it's not necessary to add another one, but
> I don't know...
It was very well hidden, inside libmpdemux/url.c
There's another url parser in m_options.c, parse_custom_url but I was
not able to understand how to use it (that was the first one I found --
I didn't think there was another one).
More information about the MPlayer-dev-eng
mailing list