I am learning about AVCaptureSession and how to capture multiple images with its delegate method
- (void)captureOutput:(AVCaptureOutput *)captureOutput
didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
fromConnection:(AVCaptureConnection *)connection
My goal is to capture 1 or many images with a predefined rate per second. For example, 1 or 2 images per 1 second. So I set
AVCaptureVideoDataOutput *captureOutput = [[AVCaptureVideoDataOutput alloc] init];
captureOutput.alwaysDiscardsLateVideoFrames = YES;
captureOutput.minFrameDuration = CMTimeMake(1, 1);
When [self.captureSession startRunning]; is started my log file shows delegate is being called 20 times a second. Where is it coming from and how to capture images with my intended intervals?
本文探讨了如何使用AVCaptureSession及其代理方法捕获单张或多张图片,并介绍了如何通过设置来实现每秒捕获一张或几张图片的目标。文中提供了一个示例函数,用于按特定间隔捕获图像。

591






