Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ExposureMode AVCaptureExposureModeAutoExpose is not supported in iPhone

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.

like image 389
Guys Avatar asked Nov 05 '22 05:11

Guys


1 Answers

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!

like image 52
yonasstephen Avatar answered Nov 13 '22 19:11

yonasstephen