fix: Use property accessors on Frame (#2400)
* fix: Use property accessors on `Frame` * Format * Use `_Nonnull` * fix: Assume nonnull * Use `NS_ASSUME_NONNULL_BEGIN` more * Format C++
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
#import "VisionCameraProxy.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* The base class of a native Frame Processor Plugin.
|
||||
*
|
||||
@@ -32,7 +34,7 @@
|
||||
* - proxy: The VisionCameraProxy instance for using the Frame Processor Context, e.g. to initialize SharedArrays.
|
||||
* - options: An options dictionary passed from the JS side, or `nil` if none.
|
||||
*/
|
||||
- (instancetype _Nonnull)initWithProxy:(VisionCameraProxyHolder* _Nonnull)proxy
|
||||
- (instancetype _Nonnull)initWithProxy:(VisionCameraProxyHolder*)proxy
|
||||
withOptions:(NSDictionary* _Nullable)options NS_SWIFT_NAME(init(proxy:options:));
|
||||
|
||||
- (instancetype _Nonnull)init NS_UNAVAILABLE;
|
||||
@@ -44,14 +46,17 @@
|
||||
*
|
||||
* - Parameters:
|
||||
* - frame: The Frame from the Camera. Don't do any ref-counting on this, as VisionCamera handles that.
|
||||
* - arguments: An options dictionary passed from the JS side, or `nil` if none.
|
||||
* - Returns: You can return any primitive, map or array you want.
|
||||
* See the <a href="https://react-native-vision-camera.com/docs/guides/frame-processors-plugins-overview#types">Types</a>
|
||||
* table for a list of supported types.
|
||||
*/
|
||||
- (id _Nullable)callback:(Frame* _Nonnull)frame withArguments:(NSDictionary* _Nullable)arguments;
|
||||
- (id _Nullable)callback:(Frame*)frame withArguments:(NSDictionary* _Nullable)arguments;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#define VISION_CONCAT2(A, B) A##B
|
||||
#define VISION_CONCAT(A, B) VISION_CONCAT2(A, B)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user