Reputation: 352
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.
Upvotes: 5
Views: 1464
Reputation: 2725
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!
Upvotes: 2