[MPlayer-dev-eng] [PATCH] silence compiling warning on vo_corevideo

Zongyao Qu zongyao.qu at gmail.com
Thu Sep 13 10:30:11 CEST 2012


> +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
> +			if (assertionID) {
> +				IOPMAssertionRelease(assertionID);
> +				assertionID = 0;
> +			}
> +#endif

There is a sepcial variable for 0, please use kIOPMNullAssertionID.

> kIOPMAssertionTypeNoDisplaySleep

This one is not compatible with 10.8, since there is a more aggressive
policy on PM in 10.8.

Please use
kIOPMAssertionTypePreventUserIdleDisplaySleep
and
IOPMAssertionDeclareUserActivity()
for 10.7 or above.

Please let me explain, 
kIOPMAssertionTypePreventUserIdleDisplaySleep will help
you to avoid display dimming as long as you hold the assertionID,
but once you release it after the power management timer times out,
for example, playback finished, or paused by AppleRemote,
the display will dimmed out ASAP.

And also, if you assert it when display is already dimmed out, it will
NOT wake up automatically, so IOPMAssertionDeclareUserActivity() should
be used with the assertion/release.

This is the new behavior in 10.8.



More information about the MPlayer-dev-eng mailing list