mirror of
https://github.com/opencv/opencv.git
synced 2025-06-13 04:52:53 +08:00
Add target conditionals for Mac Catalyst
This commit is contained in:
parent
de720ac34a
commit
220df8252d
@ -383,7 +383,7 @@ int CvCaptureCAM::startCaptureDevice(int cameraNum) {
|
|||||||
[mCaptureDecompressedVideoOutput setVideoSettings:pixelBufferOptions];
|
[mCaptureDecompressedVideoOutput setVideoSettings:pixelBufferOptions];
|
||||||
mCaptureDecompressedVideoOutput.alwaysDiscardsLateVideoFrames = YES;
|
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);
|
mCaptureDecompressedVideoOutput.minFrameDuration = CMTimeMake(1, 30);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -299,11 +299,13 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#if !TARGET_OS_MACCATALYST
|
||||||
// Deprecated in 6.0; here for backward compatibility
|
// Deprecated in 6.0; here for backward compatibility
|
||||||
if ([self.captureVideoPreviewLayer isOrientationSupported])
|
if ([self.captureVideoPreviewLayer isOrientationSupported])
|
||||||
{
|
{
|
||||||
[self.captureVideoPreviewLayer setOrientation:self.defaultAVCaptureVideoOrientation];
|
[self.captureVideoPreviewLayer setOrientation:self.defaultAVCaptureVideoOrientation];
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parentView != nil) {
|
if (parentView != nil) {
|
||||||
|
Loading…
Reference in New Issue
Block a user