mirror of
https://github.com/opencv/opencv.git
synced 2025-06-08 01:53:19 +08:00
Merge pull request #25306 from utibenkei:fix_build_of_dynamic_framework_for_visionos
fix build of dynamic framework for visionos
This commit is contained in:
commit
9813ea2b7a
@ -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…
Reference in New Issue
Block a user