Merge pull request #7181 from valeriyvan:ioscleanup

This commit is contained in:
Alexander Alekhin 2016-09-14 17:04:59 +00:00
commit d1492eefca
2 changed files with 2 additions and 28 deletions

View File

@ -41,27 +41,9 @@
@interface CvAbstractCamera : NSObject
{
AVCaptureSession* captureSession;
AVCaptureConnection* videoCaptureConnection;
AVCaptureVideoPreviewLayer *captureVideoPreviewLayer;
UIDeviceOrientation currentDeviceOrientation;
BOOL cameraAvailable;
BOOL captureSessionLoaded;
BOOL running;
BOOL useAVCaptureVideoPreviewLayer;
AVCaptureDevicePosition defaultAVCaptureDevicePosition;
AVCaptureVideoOrientation defaultAVCaptureVideoOrientation;
NSString *const defaultAVCaptureSessionPreset;
int defaultFPS;
UIView* parentView;
int imageWidth;
int imageHeight;
}
@property (nonatomic, strong) AVCaptureSession* captureSession;
@ -121,14 +103,6 @@
dispatch_queue_t videoDataOutputQueue;
CALayer *customPreviewLayer;
BOOL grayscaleMode;
BOOL recordVideo;
BOOL rotateVideo;
AVAssetWriterInput* recordAssetWriterInput;
AVAssetWriterInputPixelBufferAdaptor* recordPixelBufferAdaptor;
AVAssetWriter* recordAssetWriter;
CMTime lastSampleTime;
}

View File

@ -190,7 +190,7 @@ static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;}
break; // leave the layer in its last known orientation
}
switch (defaultAVCaptureVideoOrientation) {
switch (self.defaultAVCaptureVideoOrientation) {
case AVCaptureVideoOrientationLandscapeRight:
rotation_angle += 180;
break;
@ -256,7 +256,7 @@ static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;}
break; // leave the layer in its last known orientation
}
switch (defaultAVCaptureVideoOrientation) {
switch (self.defaultAVCaptureVideoOrientation) {
case AVCaptureVideoOrientationLandscapeRight:
rotation_angle += 180;
break;