Add target conditionals for Mac Catalyst

This commit is contained in:
Chris Ballinger 2020-05-14 12:48:37 -07:00 committed by Chris Ballinger
parent de720ac34a
commit 220df8252d
2 changed files with 3 additions and 1 deletions

View File

@ -383,7 +383,7 @@ int CvCaptureCAM::startCaptureDevice(int cameraNum) {
[mCaptureDecompressedVideoOutput setVideoSettings:pixelBufferOptions];
mCaptureDecompressedVideoOutput.alwaysDiscardsLateVideoFrames = YES;
#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
#if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR) && !TARGET_OS_MACCATALYST
mCaptureDecompressedVideoOutput.minFrameDuration = CMTimeMake(1, 30);
#endif

View File

@ -299,11 +299,13 @@
}
else
{
#if !TARGET_OS_MACCATALYST
// Deprecated in 6.0; here for backward compatibility
if ([self.captureVideoPreviewLayer isOrientationSupported])
{
[self.captureVideoPreviewLayer setOrientation:self.defaultAVCaptureVideoOrientation];
}
#endif
}
if (parentView != nil) {