iPhone不支持ExposureMode AVCaptureExposureModeAutoExpose [英] ExposureMode AVCaptureExposureModeAutoExpose is not supported in iPhone
问题描述
我试图操纵触摸事件,并手动调整焦点和曝光度以适合用户按下的CGPoint. 我正在使用设备对象,并使用 setFocusPointOfInterest 和 setExposurePointOfInterest 进行操作.似乎焦点工作得很好,但是当我尝试将Exposure模式设置为 AVCaptureExposureModeAutoExpose 时,崩溃的原因是: 此设备不支持设置exposureMode(%d)."
I'm trying to manipulate the touch event and manually adjust the focus and exposure to fit the CGPoint a user has pressed. I'm taking the device object and uses setFocusPointOfInterest and setExposurePointOfInterest in order to do the manipulation. It seems like the focus is working pretty good but when I try to set the Exposure mode to AVCaptureExposureModeAutoExpose it crashes with the cause : "Setting exposureMode (%d) is not supported by this device."
一开始我以为是因为我使用了iPhone 3GS,但后来它也发生在iPhone 4上...
At the beginning I thought it's because I used iPhone 3GS but then it happend on iPhone 4 too ...
有人知道怎么了吗?
谢谢, 伙计
推荐答案
我在Apple Developer论坛上质疑类似的问题,得到了Apple WWDC的带有AV Foundation的Camera Capture的发言人Brad Ford(核心媒体工程)的回答.
I was questioning the similar question in Apple Developer forum and got answered by Brad Ford (Core Media Engineering), the speaker of Camera Capture with AV Foundation in Apple's WWDC.
这是他的答案:
正确.在标头中定义的AVCaptureExposureModeAutoExpose当前未在任何iOS设备上实现.
不过,您可以通过设置所需的代码在自己的代码中实现 兴趣点,然后致电 setExposureMode:AVCaptureExposureModeContinuousAutoExposure,然后 侦听(键值观察)的"isAdjustingExposure"属性 AVCaptureDevice知道曝光何时完成调整.尽快 为此,请将ExposureMode设置为AVCaptureExposureModeLocked.
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.
希望它能澄清和帮助您!
Hope it clarifies and helps!
这篇关于iPhone不支持ExposureMode AVCaptureExposureModeAutoExpose的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!