0
我想制作一个自定义录像机的iPhone应用程序,我需要支持240 fps。但是,当我将AVCaptureDevice
设置为使用格式和activeVideoMaxFrameDuration
时,整个视频视图就会被冻结。如果我使用60fps,120fps,一切正常,没有任何问题。iOS慢动作记录
对于输出部分,我正在使用AVCaptureMovieFileOutput,并且我还设置了曝光自动对焦模式,如果这很重要的话。
[self.videoConnection setPreferredVideoStabilizationMode:AVCaptureVideoStabilizationModeOff];
if ([self.videoDevice isExposureModeSupported:AVCaptureExposureModeAutoExpose] &&
[self.videoDevice lockForConfiguration:&error]) {
[self.videoDevice setExposureMode:AVCaptureExposureModeContinuousAutoExposure];
[self.videoDevice unlockForConfiguration];
}
if ([self.videoDevice isFocusModeSupported:AVCaptureFocusModeAutoFocus] &&
[self.videoDevice lockForConfiguration:&error]) {
[self.videoDevice setFocusMode:AVCaptureFocusModeContinuousAutoFocus];
[self.videoDevice unlockForConfiguration];
}
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self tapInView:nil];
});