[MPlayer-dev-eng] [PATCH] Mac OS X Finder support

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Wed Nov 10 15:12:22 CET 2004


Hi,
> >>I dont think both can live together, sdl override the main function 
> >>by sdl_main
> >>thats why your patch do not work with it. Best option is to disable 
> >>sdl if using the finder support IMHO.
> >
> >Ok, I think this time everything is as it should:
> >
> >the 'odoc' Apple Event handler is now called macosx_finder_args.c
> >instead of replacing main() or clobbering argc/argv, the patch now 
> >changes parser-mpcmp.c at function m_config_parse_mp_command_line(). 
> >if mplayer was started from the finder, the arguments of the apple 
> >event are used to directly populate the play_tree_t structure, 
> >otherwise the normal command line processing will be performed. as a 
> >side effect, the two error messages are now passed to mp_msg(), which 
> >at this time is initialized.
> >
> >when started from the finder, the quiet switch is enabled, because the 
> >status line (printed to stdout) would heavyly clutter the 
> >/Library/Logs/<user>/Console/console.log (by the way I've also noticed 
> >that the cache filling status seems to ingnore the quiet switch)...
> >
> >-- look, ma': no main() function!! they can't call me a wrapper 
> >anymore!! --
> >
> I tested this patch and it work great with no side effect on osx. 
> Reimar, do I have a go to commit it?

Looks mostly okay, but I do not know if it will compile with gcc 2.95
with that extern in the middle of the code - if that is an issue with
MacOSX...
Might be better to put it at a more "normal" place i.e. above the
function in which it is used, although wthis needs one more #ifdef. Your
decision.

Greetings,
Reimar Döffinger




More information about the MPlayer-dev-eng mailing list