小编Zy *_*hao的帖子

AVFoundation我使用setActiveVideoMinFrameDuration不起作用

AVCaptureVideoDataOutput在我的演示中使用,在没有声音的情况下拍摄循环照片(如扫描仪),所以我将fps设置为低级别

[device setActiveVideoMinFrameDuration:CMTimeMake(1, 1)];
[device setActiveVideoMaxFrameDuration:CMTimeMake(1, 1)];
Run Code Online (Sandbox Code Playgroud)

在我的代码中,然后执行此操作

- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
   fromConnection:(AVCaptureConnection *)connection
{
     NSLog(@"date");
}
Run Code Online (Sandbox Code Playgroud)

检查是否有效,我发现它每秒打印24次,而不是1秒1秒

PS:设备版本是iPhone 5C和iOS 8.12

avfoundation ios avcapture

3
推荐指数
1
解决办法
1703
查看次数

标签 统计

avcapture ×1

avfoundation ×1

ios ×1