[MPlayer-dev-eng] [PATCH] vo_macosx: process events with shared_buffer (and patch roundup)

Michael Guntsche mike at it-loops.com
Thu May 7 23:56:00 CEST 2009


On May 7, 2009, at 18:59, Michael Guntsche wrote:

> The older (check_events) patch has worked without a problem so far.  
> I think the reason for this is that there are still Cocoa methods  
> being called even with a shared_buffer hence we end up as an  
> NSApplication. I applied the flip_page and check_events patch to my  
> current source and will do some further testing, I do think that I  
> won't see this problem with it though.

Ok once again I was too early to say that everything was ok. While I  
no longer got the (not responding) message in the activity window  
ObjectAlloc told me that this change introduced a leak. After seeing  
this I wondered again why the events are not taken care of  
automatically in the first place.
So I read up on it and found out the following.
Normally with an NSApplication the "run" method is called as the last  
step. One part the run-method is doing is to process all incoming  
events. Here the run method is NOT called so we have to do this  
ourself. Attached patch is the latest attempt to fix this.
It is pretty simple, we just implement a poor mans run method by  
forwarding ALL events to the NSApp. With this change I neither get the  
error NOR leaking mallocs. The output of ObjectAlloc shows that there  
might be other leaks in there as well, but I will try to fix them in a  
next step.


Kind regards,
Michael


-------------- next part --------------
A non-text attachment was scrubbed...
Name: vo_corevideo_check_events-2.patch
Type: application/octet-stream
Size: 480 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090507/d16d3906/attachment.obj>
-------------- next part --------------



More information about the MPlayer-dev-eng mailing list