AVCaptureVideoPreviewLayer setOrientation is deprecated (Bugfix #3520)


Added by Marijan Vukcevich about 11 years ago. Updated almost 11 years ago.


Status:Open Start date:2014-02-03
Priority:Normal Due date:
Assignee:Marijan Vukcevich % Done:

0%

Category:ios
Target version:2.4.10 Estimated time:0.10 hour
Affected version:2.4.8 (latest release) Operating System:iOS
Difficulty:Easy HW Platform:Any
Pull request:

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

Revision c0005fd2
Added by Vadim Pisarevsky about 10 years ago

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

Also available in: Atom PDF