Updated by Dmitry Retinskiy about 11 years ago


AVCaptureVideoPreviewLayer setOrientation is deprecated: depricated:

where:
/opencv-2.4.8/modules/highgui/src/

file:
cap_ios_abstract_camera.mm

method:
-(void)createVideoPreviewLayer {

//replace isOrientationSupported: with the following code:

if (self.captureVideoPreviewLayer.connection respondsToSelector:@selector(connection)])
{
if ([self.captureVideoPreviewLayer.connection isVideoOrientationSupported])
{
[self.captureVideoPreviewLayer.connection setVideoOrientation:self.interfaceOrientation];
}
}
else
{
// Deprecated in 6.0; here for backward compatibility
if ([self.captureVideoPreviewLayer.connection isOrientationSupported])
{
[self.captureVideoPreviewLayer.connection setOrientation:self.interfaceOrientation];
}
}

Back