【发布时间】:2012-01-06 01:50:28
【问题描述】:
我正在学习 AVCaptureSession 以及如何使用它的委托方法捕获多个图像
- (void)captureOutput:(AVCaptureOutput *)captureOutput
didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
fromConnection:(AVCaptureConnection *)connection
我的目标是以每秒预定义的速率捕获 1 张或多张图像。例如,每 1 秒 1 或 2 张图像。所以我设置了
AVCaptureVideoDataOutput *captureOutput = [[AVCaptureVideoDataOutput alloc] init];
captureOutput.alwaysDiscardsLateVideoFrames = YES;
captureOutput.minFrameDuration = CMTimeMake(1, 1);
[self.captureSession startRunning]; 启动时,我的日志文件显示委托每秒被调用 20 次。它来自哪里以及如何以我的预期间隔捕获图像?
【问题讨论】:
标签: iphone objective-c uiimageview calayer avcapturesession