AVCaptureVideoPreviewLayer setOrientation is deprecated (Bugfix #3520)
Description
AVCaptureVideoPreviewLayer setOrientation is deprecated:
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];
}
}
Associated revisions
Merge pull request #3520 from JoeHowse:master
History
Updated by Dmitry Retinskiy about 11 years ago
Hi Marijan,
thanks for reporting this problem.
Could you describe your suggested correction in the form of pull request?
That would be very appreciated.
Here are some instructions on how to do it: http://www.code.opencv.org/projects/opencv/wiki/How_to_contribute.
Thanks.
- Assignee changed from Alexander Shishkov to Marijan Vukcevich
- Subject changed from AVCaptureVideoPreviewLayer setOrientation is depricated to AVCaptureVideoPreviewLayer setOrientation is deprecated
- Status changed from New to Open
- Description changed from AVCaptureVideoPreviewLayer setOrientation is depricated: where: /opencv-2.... to AVCaptureVideoPreviewLayer setOrientation is deprecated: where: /opencv-2.4... More
Updated by Alexander Smorkalov almost 11 years ago
- Target version changed from 2.4.9 to 2.4.10