iOS 10 zoom&RAW issue.

I need to capture 2 images: 1. zoomed jpeg image 2. RAW image

My device is iPhone 6s with iOS 10.

As iOS can't capture RAW when videoZoomFactor is not 1.0, I need to set it to 1.0 before RAW capture.

My problem is that after I set videoZoomFactor to 1.0 it's applied not immediately, but with delay. And the biggest problem is that delay is bigger in low-light conditions! Office light - about 50 ms, low-light about 200-400 ms. So now I have to make a delay before RAW capture to avoid crashes in didFinishProcessingRawPhotoSampleBuffer.

Same issue with iPhone 7 Plus, but delay is 100 ms in any conditions.

Maybe there is a way to get an event that zoom level is really set to 1.0 or smth else? Or it's a system bug?

Thanks in advance!

Here is my code to reset zooming:

NSError *error = nil;

if ([self.videoDevice respondsToSelector:@selector(setVideoZoomFactor:)])

{

     if ( [self.videoDevice lockForConfiguration:&error] )

     {

          self.videoDevice.videoZoomFactor = 1.0;

          [self.videoDevice unlockForConfiguration];

     }

}

Replies

This issue still exists in iOS 12. Did you ever come up with a solution?