Skip to content

Commit

Permalink
update the ios files for vision-camera 3.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
xulihang committed Jan 30, 2024
1 parent cf815c7 commit c3c66b7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions ios/DetectionFrameProcessorPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ @implementation DetectionFrameProcessorPlugin (FrameProcessorPluginLoader)

+ (void)load
{
[FrameProcessorPluginRegistry addFrameProcessorPlugin:@"detect"
withInitializer:^FrameProcessorPlugin* (NSDictionary* options) {
return [[DetectionFrameProcessorPlugin alloc] init];
}];
[FrameProcessorPluginRegistry addFrameProcessorPlugin:@"detect"
withInitializer:^FrameProcessorPlugin* (VisionCameraProxyHolder* proxy, NSDictionary* options) {
return [[DetectionFrameProcessorPlugin alloc] initWithProxy:proxy withOptions:options];
}];
}

@end
3 changes: 3 additions & 0 deletions ios/DetectionFrameProcessorPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import DynamsoftDocumentNormalizer

@objc(DetectionFrameProcessorPlugin)
public class DetectionFrameProcessorPlugin: FrameProcessorPlugin {
public override init(proxy: VisionCameraProxyHolder, options: [AnyHashable : Any]! = [:]) {
super.init(proxy: proxy, options: options)
}
public override func callback(_ frame: Frame, withArguments arguments: [AnyHashable: Any]?) -> Any? {
guard let imageBuffer = CMSampleBufferGetImageBuffer(frame.buffer) else {
print("Failed to get CVPixelBuffer!")
Expand Down
2 changes: 1 addition & 1 deletion ios/VisionCameraDynamsoftDocumentNormalizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// VisionCameraDynamsoftDocumentNormalizer.h
// VisionCameraDynamsoftDocumentNormalizer
//
// Created by 徐力航 on 2023/11/22.
// Created by xulihang on 2023/11/22.
// Copyright © 2023 Facebook. All rights reserved.
//

Expand Down

0 comments on commit c3c66b7

Please sign in to comment.