[MPlayer-dev-eng] [PROBLEM] MacOSX and SDL in window mode

Klokan Petr Pridal xpridal at informatics.muni.cz
Mon Jun 10 19:56:38 CEST 2002


Some time ago I report here that MPlayer crashes when running on MacOSX with SDL and the mode is changed from (default) fullscreen to window. A problem is, that for running in window mode SDL need at startup of program some initialization.
Normally this is done by automatic redefinition of main() function of program, when it includes "SDL.h". I this time MPlayer didn't this (resp. mplayer.c don't contain #include "SDL.h"). On other platforms are not problems?
I tried adapt mplayer and after that it can ran window mode very well and switch between modes. But there are some other problems, so I didn't make a patch.

So ofered solotion:
It's possible to #include "SDL.h" in the mplayer.c in the future? You have to also remove from main() parametr "char *envp[]" and get this array another way (if it's used)...
There is also need to add window mode as default for driver "Quartz" on line 896 in libvo/vo_sdl.c.
 
Normaly It runs perfect in the window. (And look like really good on MacOSX Aqua Blue desktop :-), I can send a screenshot...)

If you have new (buggy) QuickTime 6.0 beta, the content of window is not updated. Only when another window is draged over the content it is changed the right way. The same do VLC client.

By pressing c you can switch to different fullscreen resolution, but there is only a black board, but don't crash :-)).
(BTW "c" key don't run before SDL.h was in the mplayer.c, so I think SDL_InitSubSystem() could run, but I can mistake)
When you are going back to window mode you crash and got this message:
kCGErrorIllegalArgument : CGSRemoveSurface: Invalid window
MPlayer interrupted by signal 10 in module: vo_check_events 
vo: x11 uninit called but X11 not inited..

By pressing n (for double size window) it will crash with SDL erors:
kCGErrorIllegalArgument : CGSLockWindowRectBits: Invalid window
kCGErrorIllegalArgument : CGSRemoveSurface: Invalid window

When running fullscreen from commandline I got new errors...
mplayer -fs -vo sdl: mplayer change resolution to fullscreen but after that crashes with:
SDL: Using 0x32315659 (Planar YV12) image format
SDL: Using driver: Quartz
SDL: using hardware-surface
SDL: setting zoomed fullscreen without modeswitching
SDL: Info - please use -vm or -zoom to switch to best resolution.
*** malloc_zone_malloc[12506]: argument too large: -2536
*** malloc_zone_malloc[12506]: argument too large: -2560
SDL: Couldn't create a YUV overlay: Out of memory
*** [vo] Exporting mp_image_t, 640x304x12bpp YUV planar, 291840 bytes
MPlayer interrupted by signal 10 in module: decode_video 

I can work on this... and I will, but if somebody would help I'll be glad.
It this time we have exams on our university.

Have a nice day/night :-)

Klokan
-- 
 (\_/)    Klokan Petr Pridal
 (o o)    ----------------------------
  (.)     student FI MU Brno, webmaster http://www.linux.cz/
 (] [) _  mailto:klokan at seznam.cz
 {~~~}/ ) ICQ:3674202
(')  (')  http://klokan.misto.cz/
 \_)-(_)  Look at http://www.fi.muni.cz/~xpridal/



More information about the MPlayer-dev-eng mailing list