ExposureMode AVCaptureExposureModeAutoExpose is not supported in iPhone

a 夏天 提交于 2019-12-21 16:50:21

问题


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."

At the beginning I thought it's because I used iPhone 3GS but then it happend on iPhone 4 too ...

Anyone knows what's wrong ?

Thanks, Guy.


回答1:


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.

Here's his 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.

Hope it clarifies and helps!




回答2:


This function available in iOS 4.0 and later.



来源:https://stackoverflow.com/questions/4519814/exposuremode-avcaptureexposuremodeautoexpose-is-not-supported-in-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!