Merge pull request #7571 from panxiaochun:CvVideoCamera_stop

pull/7596/head
Alexander Alekhin 9 years ago
commit 6c12533160
  1. 6
      modules/videoio/src/cap_ios_abstract_camera.mm
  2. 10
      modules/videoio/src/cap_ios_video_camera.mm

@ -203,11 +203,11 @@
} }
[self.captureSession stopRunning]; [self.captureSession stopRunning];
self.captureSession = nil; [captureSession release];
} }
self.captureVideoPreviewLayer = nil; [captureVideoPreviewLayer release];
self.videoCaptureConnection = nil; [videoCaptureConnection release];
captureSessionLoaded = NO; captureSessionLoaded = NO;
} }

@ -129,9 +129,10 @@ static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;}
- (void)stop; - (void)stop;
{ {
if (self.running == YES) {
[super stop]; [super stop];
self.videoDataOutput = nil; [videoDataOutput release];
if (videoDataOutputQueue) { if (videoDataOutputQueue) {
dispatch_release(videoDataOutputQueue); dispatch_release(videoDataOutputQueue);
} }
@ -144,11 +145,11 @@ static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;}
} else { } else {
NSLog(@"[Camera] Recording Error: asset writer status is not writing"); NSLog(@"[Camera] Recording Error: asset writer status is not writing");
} }
self.recordAssetWriter = nil; [recordAssetWriter release];
} }
self.recordAssetWriterInput = nil; [recordAssetWriterInput release];
self.recordPixelBufferAdaptor = nil; [recordPixelBufferAdaptor release];
} }
if (self.customPreviewLayer) { if (self.customPreviewLayer) {
@ -156,6 +157,7 @@ static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;}
self.customPreviewLayer = nil; self.customPreviewLayer = nil;
} }
} }
}
// TODO fix // TODO fix
- (void)adjustLayoutToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation; - (void)adjustLayoutToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;

Loading…
Cancel
Save