简体   繁体   中英

AVCaptureScreen on Mac OS X 10.8

I have been trying to use the AVCaptureScreenInput class on Mountain Lion 10.8:

https://developer.apple.com/library/mac/#documentation/AVFoundation/Reference/AVCaptureScreenInput_Class/Reference/Reference.html

I downloaded the following sample code provided by Apple:

http://developer.apple.com/library/mac/#samplecode/AVScreenShack/Introduction/Intro.html

But when I ran it, it did not capture my screen. Instead it just showed a green screen where my screen was supposed to be.

Someone else noticed the problem here: http://openradar.appspot.com/12220970

Does anyone know how to work around this problem?

Doing the following "fixed" the problem. I don't know why:

defaults write com.apple.cmio CMIO_Unit_Input_ASC.DoNotUseOpenCL -bool YES

I filed a bug here: https://bugreport.apple.com/cgi-bin/WebObjects/RadarWeb.woa/41/wo/Dtr5y1Zj8ikA0Rjw6xYON0/6.83.28.0.9

Bug ID = 13917881

"High" session preset doesn't work in Mac OS 10.8. But on changing to other preset like medium or any other resolution sample code will work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM