29fe98cc44
* feat: Create `TypedArray` class for Frame Processor Plugins * Type * feat: Pass `VisionCameraProxy` along (BREAKING) * feat: Finish implementation * Log a bit * feat: Successfully convert JSI <> JNI buffers * Wrap buffer * fix: Fix using wrong Runtime * feat: Add docs * add zero copy example * Format C++ * Create iOS base * feat: Finish iOS implementation * chore: Format * fix: Use `NSData` instead of `NSMutableData` * Format * fix: Fix build when Frame Processors are disabled * chore: Rename `TypedArray` to `SharedArray` * fix: Fix Swift typings for Array * Remove a few default inits * fix: Fix Android build * fix: Use `NSInteger` * Update SharedArray.mm * fix: Expose bytes directly on iOS (NSData was immutable)
26 lines
697 B
Objective-C
26 lines
697 B
Objective-C
//
|
|
// FrameProcessorPlugin.m
|
|
// VisionCamera
|
|
//
|
|
// Created by Marc Rousavy on 31.07.23.
|
|
// Copyright © 2023 mrousavy. All rights reserved.
|
|
//
|
|
|
|
#import "FrameProcessorPlugin.h"
|
|
|
|
// Base implementation (empty)
|
|
@implementation FrameProcessorPlugin
|
|
|
|
- (instancetype)initWithProxy:(VisionCameraProxyHolder* _Nonnull)proxy withOptions:(NSDictionary* _Nullable)options {
|
|
self = [super init];
|
|
return self;
|
|
}
|
|
|
|
- (id _Nullable)callback:(Frame* _Nonnull)frame withArguments:(NSDictionary* _Nullable)arguments {
|
|
[NSException raise:NSInternalInconsistencyException
|
|
format:@"Frame Processor Plugin does not override the `callback(frame:withArguments:)` method!"];
|
|
return nil;
|
|
}
|
|
|
|
@end
|