我正在尝试操纵触摸事件并手动调整焦点和曝光以适合用户按下的 CGPoint。 我正在获取设备对象并使用 setFocusPointOfInterest 和 setExposurePointOfInterest 来进行操作。看起来焦点工作得很好,但是当我尝试将曝光模式设置为 AVCaptureExposureModeAutoExpose 时,它崩溃了,原因是: “此设备不支持设置曝光模式 (%d)。”
一开始我以为是因为我用的是 iPhone 3GS,后来 iPhone 4 上也出现了这种情况......
有人知道出了什么问题吗?
谢谢, 盖伊。
最佳答案
我在 Apple 开发者论坛中提出了类似的问题,并得到了 Brad Ford(核心媒体工程)的回答,他是 Apple WWDC 中 Camera Capture with AV Foundation 的发言人。
这是他的 answer :
Correct. AVCaptureExposureModeAutoExpose, while defined in the header, is not currently implemented on any iOS device.
You can however implement it in your own code by setting your desired point of interest, then calling setExposureMode:AVCaptureExposureModeContinuousAutoExposure, and then listen (key-value observe) the "isAdjustingExposure" property of AVCaptureDevice to know when the exposure finishes adjusting. As soon as it does, setExposureMode to AVCaptureExposureModeLocked.
希望它能澄清并有所帮助!
关于iphone - iPhone 不支持 ExposureMode AVCaptureExposureModeAutoExpose,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4519814/