// // Created by Marc Rousavy on 22.06.21. // #pragma once #include #include #include #include "java-bindings/JImageProxy.h" namespace vision { using namespace facebook; using namespace jni; class FrameProcessorPlugin: public HybridClass { public: static auto constexpr kJavaDescriptor = "Lcom/mrousavy/camera/frameprocessor/FrameProcessorPlugin;"; static jni::local_ref initHybrid(jni::alias_ref jThis, const std::string& name); static void registerNatives(); local_ref callback(alias_ref image, alias_ref> params); std::string getName(); private: friend HybridBase; jni::global_ref javaPart_; std::string name; FrameProcessorPlugin(alias_ref jThis, std::string name): javaPart_(make_global(jThis)), name(name) {} }; } // namespace vision