iOS, after stopping camera last frame is delayed for 10-15 sec

asked 2015-02-14 22:35:26 -0500

sx0 gravatar image

How can I fix it?

...     
[self.videoCamera stop]; // after this last frame remains within 10 sec
...

- (void)viewDidLoad {
    [super viewDidLoad];

    // Start OpenCV camera
    self.videoCamera = [[CvVideoCamera alloc] initWithParentView:_imageView];
    self.videoCamera.delegate = self;
    self.videoCamera.defaultAVCaptureDevicePosition = AVCaptureDevicePositionFront;
    self.videoCamera.defaultAVCaptureSessionPreset = AVCaptureSessionPresetPhoto;
    self.videoCamera.defaultAVCaptureVideoOrientation = AVCaptureVideoOrientationPortrait;
    [self.videoCamera start];
}
edit retag flag offensive close merge delete