我是 OpenCV 和 AVFoundation 框架的新手,我试图显示从相机捕获的视频预览而不将其写入文件。但是当按下开始按钮时,我需要将视频写入 Document Folder 。这是我试图执行的一段代码,但是当它运行时它不显示任何视频预览。请帮我。
self.videoCamera.defaultAVCaptureDevicePosition = AVCaptureDevicePositionFront;
self.videoCamera.defaultAVCaptureVideoOrientation = AVCaptureVideoOrientationPortrait;
self.videoCamera.defaultAVCaptureSessionPreset = AVCaptureSessionPresetMedium;
self.videoCamera.defaultFPS = 15;
self.videoCamera.grayscaleMode = NO;
self.videoCamera.recordVideo = YES;
[self.videoCamera start];
[self.videoCamera.captureSession stopRunning];