I am using AVFoundation to display video in a UIView using AVCaptureVideoPreviewOverlay . Then I use AVStillImageOutput - captureStillImageAsynchronouslyFromConnection : to capture a still image from a video with the predefined AVCaptureSessionPresetPhoto .
I am freezing a video using AVCaptureSession - stopRunning in the captureStillImageAsynchronouslyFromConnection completion block mentioned earlier. However, it is too late, and the video continues to work while a still image is taken, so freezing occurs after a second or two. When I show the image, a jump occurs.
How can I freeze the video the moment the photo was taken?
ios iphone avfoundation avcapture
user1130254
source share