[MPlayer-dev-eng] [PATCH] Replaced deprecated QuickDraw calls in vo_quartz

Gregor Riepl onitake at gmail.com
Fri Oct 3 17:49:01 CEST 2008


> Sorry for the confusion.

your first statement was perfectly intelligible. :)

anyway, i dug up a two things.
first, UpdateSystemActivity is nowhere mentioned as being deprecated  
or not available. it's even in the CoreServices/OSServices framework  
for all 4 supported architectures. the only problem is that apple  
inserted a
#if !__LP64__
#ifndef __POWER__
#include <OSServices/Power.h>
#endif
into /System/Library/Frameworks/CoreServices.framework/Frameworks/ 
OSServices.framework/Headers/OSServices.h, which makes the compiler  
fail. the linker would in fact succeed.
i filed a bug (radar #6267445) against this.

second, up from 10.5, there is a replacement for this function:
IOPMAssertionCreate(kIOPMAssertionTypeNoDisplaySleep,  
kIOPMAssertionLevelOn, &assertionID);
the problem is that this only disables display power management and  
not the screensaver. i have yet to find a good way to do this. people  
suggest
defaults write com.apple.screensaver write idleTime 0
but this looks like a terrible hack to me and it seems setting it back  
to a positive number doesn't turn the screensaver back on again.

here's an updated patch. i don't suggest applying it yet, as it  
switches to IOPMAssertion when compiling for 10.5, and the screensaver  
is still on. but you can test if it works on x86_64, if you like.

i hope apple helps with a permanent solution.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer-svn27682-quartz-macosx-deprecated.patch
Type: application/octet-stream
Size: 16931 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20081003/8c2c4540/attachment.obj>
-------------- next part --------------



More information about the MPlayer-dev-eng mailing list