feat: native Frame
type to provide Orientation (#186)
* Use Frame.h * Add orientation * Determine buffer orientation * Replace plugins * fix calls * Update FRAME_PROCESSOR_CREATE_PLUGIN_IOS.mdx * Update FRAME_PROCESSOR_CREATE_PLUGIN_IOS.mdx * format * Update CameraPage.tsx * Update FRAME_PROCESSOR_CREATE_PLUGIN_IOS.mdx * Add links to docs * Use `.` syntax * Make properties `readonly` * Fix `@synthesize` backing store
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <VisionCamera/FrameProcessorPlugin.h>
|
||||
#import <Vision/VNDetectBarcodesRequest.h>
|
||||
#import <VisionCamera/Frame.h>
|
||||
|
||||
// Example for an Objective-C Frame Processor plugin
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
@implementation QRCodeFrameProcessorPluginObjC
|
||||
|
||||
static inline id exampleObjC___scanQRCodes(CMSampleBufferRef buffer, NSArray* arguments) {
|
||||
// TODO: Use some AI to detect QR codes in the CMSampleBufferRef
|
||||
static inline id exampleObjC___scanQRCodes(Frame* frame, NSArray* arguments) {
|
||||
// TODO: Use some AI to detect QR codes in the frame
|
||||
return @[];
|
||||
}
|
||||
|
||||
|
@@ -12,7 +12,7 @@ import Vision
|
||||
@objc(QRCodeFrameProcessorPluginSwift)
|
||||
public class QRCodeFrameProcessorPluginSwift: NSObject, FrameProcessorPluginBase {
|
||||
@objc
|
||||
public static func callback(_: CMSampleBuffer!, withArgs _: [Any]!) -> Any! {
|
||||
public static func callback(_: Frame!, withArgs _: [Any]!) -> Any! {
|
||||
// TODO: Use some AI to detect QR codes in the CMSampleBufferRef
|
||||
[]
|
||||
}
|
||||
|
Reference in New Issue
Block a user