[MPlayer-dev-eng] [PATCH] MacOS X Application Bundle Support

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue Dec 21 23:41:55 CET 2004


Hi,
> >>does CFURLGetFileSystemRepresentation when it succeeds always 
> >>guarantee to return a
> >>null-terminated string (because e.g. snprintf (IMHO very stupidly) 
> >>doesn't)?
> >>If not you should make sure it the string always is null-terminated...
> >
> >Yes. The documentation says:
> >"Boolean CFURLGetFileSystemRepresentation (
> >   CFURLRef url,
> >   Boolean resolveAgainstBase,
> >   UInt8 *buffer,
> >   CFIndex maxBufLen
> >);
> >
> >No more than maxBufLen bytes are written to buffer. If url requires 
> >more than maxBufLen bytes to represent itself, including the 
> >terminating null byte, this function returns false. To avoid this 
> >possible failure, you should pass a buffer with size of at least the 
> >maximum path length for the file system in question."
> >
> >So the loop will only exit when the full path (including the null 
> >byte) will fit.
> 
> Can this be applied? Now we really need to look into creating/porting a 
> gui for OSX. Porting the actual mplayer gtk gui to osx look difficult 
> (impossible).
> Sugestion are welcome.

You can be sure that I will vote for _removing_ our current Gui before I
agree on adding yet another such a permanently broken piece of crap.
And that's what it will become unless it only uses slave mode and then
there's no need to have it in MPlayer's cvs dir (a Gui is a lot of code
to download for people who have no use for it).

Greetings,
Reimar Döffinger




More information about the MPlayer-dev-eng mailing list