feat: Reintroduce Macros for Frame Processor Plugin registration (#2027)
in VisionCamera v1 & v2 there were two ObjC macros that were helping in creation/registration of Frame Processors, but these were removed with v3 This PR reintroduces such macros, which will not only make FP development easier, but also it will also fix issues people had with registration of Swift Frame Processors (+load vs +initialize issues) Docs were also updated to reflect that the macros should be used to correctly initialize and register ObjC/Swift Frame Processors
This commit is contained in:
@@ -12,6 +12,14 @@ import java.util.Map;
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
public abstract class FrameProcessorPlugin {
|
||||
public FrameProcessorPlugin() {}
|
||||
|
||||
/**
|
||||
* The initializer for a Frame Processor Plugin class that takes optional object that consists
|
||||
* options passed from JS layer
|
||||
*/
|
||||
public FrameProcessorPlugin(@Nullable Map<String, Object> options) {}
|
||||
|
||||
/**
|
||||
* The actual Frame Processor plugin callback. Called for every frame the ImageAnalyzer receives.
|
||||
* @param frame The Frame from the Camera. Don't call .close() on this, as VisionCamera handles that.
|
||||
|
Reference in New Issue
Block a user