Merge pull request #25306 from utibenkei:fix_build_of_dynamic_framework_for_visionos

fix build of dynamic framework for visionos
pull/25391/head
Alexander Smorkalov 10 months ago committed by GitHub
commit 9813ea2b7a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      modules/core/misc/objc/common/Mat.h
  2. 2
      modules/core/misc/objc/common/Mat.mm
  3. 2
      modules/imgcodecs/src/ios_conversions.mm
  4. 4
      modules/videoio/src/cap_avfoundation.mm

@ -15,7 +15,7 @@
#import <Foundation/Foundation.h>
#ifdef AVAILABLE_IMGCODECS
#if TARGET_OS_IPHONE
#if TARGET_OS_IPHONE || TARGET_OS_VISION
#import <UIKit/UIKit.h>
#elif TARGET_OS_MAC
#import <AppKit/AppKit.h>
@ -197,7 +197,7 @@ CV_EXPORTS @interface Mat : NSObject
- (instancetype)initWithCGImage:(CGImageRef)image;
- (instancetype)initWithCGImage:(CGImageRef)image alphaExist:(BOOL)alphaExist;
#if TARGET_OS_IPHONE
#if TARGET_OS_IPHONE || TARGET_OS_VISION
- (UIImage*)toUIImage;
- (instancetype)initWithUIImage:(UIImage*)image;

@ -951,7 +951,7 @@ template<typename T> int putData(NSArray<NSNumber*>* indices, cv::Mat* mat, int
return [MatConverters convertCGImageRefToMat:image alphaExist:alphaExist];
}
#if TARGET_OS_IPHONE
#if TARGET_OS_IPHONE || TARGET_OS_VISION
-(UIImage*)toUIImage {
return [MatConverters converMatToUIImage:self];

@ -40,7 +40,7 @@
//
//M*/
#include <TargetConditionals.h>
#if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
#if (TARGET_OS_IOS || TARGET_OS_VISION) && !TARGET_OS_MACCATALYST
#import <UIKit/UIKit.h>
#include "apple_conversions.h"

@ -221,18 +221,18 @@ cv::Ptr<cv::IVideoCapture> cv::create_AVFoundation_capture_file(const std::strin
}
#if !TARGET_OS_VISION
cv::Ptr<cv::IVideoCapture> cv::create_AVFoundation_capture_cam(int index)
{
#if !TARGET_OS_VISION
CvCaptureCAM* retval = new CvCaptureCAM(index);
if (retval->didStart())
return cv::makePtr<cv::LegacyCapture>(retval);
delete retval;
#endif
return 0;
}
#endif
cv::Ptr<cv::IVideoWriter> cv::create_AVFoundation_writer(const std::string& filename, int fourcc,
double fps, const cv::Size &frameSize,

Loading…
Cancel
Save