// // Created by Marc Rousavy on 22.06.21. // #include "FrameProcessorPlugin.h" #include namespace vision { using namespace facebook; using namespace jni; using TSelf = local_ref::jhybriddata>; using TFrameProcessorPlugin = jobject(alias_ref, alias_ref>); TSelf vision::FrameProcessorPlugin::initHybrid(alias_ref jThis, const std::string& name) { return makeCxxInstance(jThis, name); } void FrameProcessorPlugin::registerNatives() { registerHybrid({ makeNativeMethod("initHybrid", FrameProcessorPlugin::initHybrid), }); } local_ref FrameProcessorPlugin::callback(alias_ref image, alias_ref> params) { auto func = javaPart_->getClass()->getMethod("callback"); auto result = func(javaPart_.get(), image, params); return make_local(result); } std::string FrameProcessorPlugin::getName() { return name; } } // namespace vision