feat: Make Frame thread-safe and improve error messages (#2327)
				
					
				
			* fix: Fix multi-Thread access on Java * fix: Thread-lock access on iOS as well * whoops add missing header impl * Update Podfile.lock * fix: Don't use `CFGetRetainCount` * fix: Lock access on iOS as well * C++ format * More detailed error * chore: Move getters into `Frame` * Format c++ * Use enum `orientation` again * format * fix: Synchronize `isValid` on Java * Also log pixelformat * feat: Use Java enums in C++ * Format C++
This commit is contained in:
		
							
								
								
									
										39
									
								
								package/ios/Frame Processor/UIImageOrientation+descriptor.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								package/ios/Frame Processor/UIImageOrientation+descriptor.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,39 @@ | ||||
| // | ||||
| //  UIImageOrientation+descriptor.h | ||||
| //  VisionCamera | ||||
| // | ||||
| //  Created by Marc Rousavy on 29.12.23. | ||||
| //  Copyright © 2023 mrousavy. All rights reserved. | ||||
| // | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #import <Foundation/Foundation.h> | ||||
| #import <UIKit/UIImage.h> | ||||
|  | ||||
| @interface NSString (UIImageOrientationJSDescriptor) | ||||
|  | ||||
| + (NSString*)stringWithParsed:(UIImageOrientation)orientation; | ||||
|  | ||||
| @end | ||||
|  | ||||
| @implementation NSString (UIImageOrientationJSDescriptor) | ||||
|  | ||||
| + (NSString*)stringWithParsed:(UIImageOrientation)orientation { | ||||
|   switch (orientation) { | ||||
|     case UIImageOrientationUp: | ||||
|     case UIImageOrientationUpMirrored: | ||||
|       return @"portrait"; | ||||
|     case UIImageOrientationDown: | ||||
|     case UIImageOrientationDownMirrored: | ||||
|       return @"portrait-upside-down"; | ||||
|     case UIImageOrientationLeft: | ||||
|     case UIImageOrientationLeftMirrored: | ||||
|       return @"landscape-left"; | ||||
|     case UIImageOrientationRight: | ||||
|     case UIImageOrientationRightMirrored: | ||||
|       return @"landscape-right"; | ||||
|   } | ||||
| } | ||||
|  | ||||
| @end | ||||
		Reference in New Issue
	
	Block a user