feat: Allow returning of ImageProxy in a Frame Processor (#1149)
* feat: Allow returning of ImageProxy in a Frame Processor * chore: Clean up * fix: Missing space * Update useFrameProcessor.ts * Revert "Update useFrameProcessor.ts" This reverts commit 9c645489cdfdf2079972669756a2cd20cc81e25e.
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <memory>
|
||||
|
||||
#include <react/jni/NativeMap.h>
|
||||
#include <react/jni/ReadableNativeMap.h>
|
||||
@@ -179,6 +180,14 @@ jsi::Value JSIJNIConversion::convertJNIObjectToJSIValue(jsi::Runtime &runtime, c
|
||||
auto hashMap = toHashMapFunc(object.get());
|
||||
return convertJNIObjectToJSIValue(runtime, hashMap);
|
||||
|
||||
} else if (object->isInstanceOf(JImageProxy::javaClassStatic())) {
|
||||
// ImageProxy
|
||||
|
||||
auto frame = static_ref_cast<JImageProxy>(object);
|
||||
|
||||
// box into HostObject
|
||||
auto hostObject = std::make_shared<FrameHostObject>(frame);
|
||||
return jsi::Object::createFromHostObject(runtime, hostObject);
|
||||
}
|
||||
|
||||
auto type = object->getClass()->toString();
|
||||
|
Reference in New Issue
Block a user