-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Rewrite Android C++ part (VisionCameraProxy
+ JFrame
)
#1661
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
||
std::vector<jsi::PropNameID> FrameProcessorPluginHostObject::getPropertyNames(jsi::Runtime &runtime) { | ||
std::vector<jsi::PropNameID> result; | ||
result.push_back(jsi::PropNameID::forUtf8(runtime, std::string("call"))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Add #include for string [build/include_what_you_use] [4]
return jsi::Value::undefined(); | ||
} | ||
|
||
} // namespace vision |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Could not find a newline character at the end of the file. [whitespace/ending_newline] [5]
using namespace facebook; | ||
|
||
class FrameProcessorPluginHostObject: public jsi::HostObject { | ||
public: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
public: should be indented +1 space inside class FrameProcessorPluginHostObject [whitespace/indent] [3]
_plugin(plugin) { } | ||
~FrameProcessorPluginHostObject() { } | ||
|
||
public: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
public: should be indented +1 space inside class FrameProcessorPluginHostObject [whitespace/indent] [3]
std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override; | ||
jsi::Value get(jsi::Runtime& runtime, const jsi::PropNameID& name) override; | ||
|
||
private: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
private: should be indented +1 space inside class FrameProcessorPluginHostObject [whitespace/indent] [3]
|
||
private: | ||
std::shared_ptr<RNWorklet::JsiWorkletContext> _workletContext; | ||
std::shared_ptr<react::CallInvoker> _callInvoker; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Add #include for shared_ptr<> [build/include_what_you_use] [4]
jni::alias_ref<JVisionCameraScheduler::javaobject> scheduler); | ||
}; | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Could not find a newline character at the end of the file. [whitespace/ending_newline] [5]
using namespace facebook; | ||
|
||
struct JFrameProcessor : public jni::HybridClass<JFrameProcessor> { | ||
public: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
public: should be indented +1 space inside struct JFrameProcessor [whitespace/indent] [3]
explicit JFrameProcessor(std::shared_ptr<RNWorklet::JsiWorklet> worklet, | ||
std::shared_ptr<RNWorklet::JsiWorkletContext> context); | ||
|
||
public: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
public: should be indented +1 space inside struct JFrameProcessor [whitespace/indent] [3]
*/ | ||
void call(alias_ref<JFrame::javaobject> frame) const; | ||
|
||
private: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
private: should be indented +1 space inside struct JFrameProcessor [whitespace/indent] [3]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
cpplint
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|41| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|47| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|48| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|49| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|53| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|54| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|58| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|59| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|60| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|64| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|65| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|66| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|70| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|71| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|72| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|73| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|74| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|76| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|77| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|78| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|79| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|81| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|84| Namespace should be terminated with "// namespace vision" [readability/namespace] [5]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|33| Add #include for move [build/include_what_you_use] [4]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|57| Add #include for string [build/include_what_you_use] [4]
android/src/main/cpp/java-bindings/JVisionCameraProxy.cpp|84| Could not find a newline character at the end of the file. [whitespace/ending_newline] [5]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|20| public: should be indented +1 space inside class JVisionCameraProxy [whitespace/indent] [3]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|21| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|23| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|24| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|25| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|26| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|27| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|29| public: should be indented +1 space inside class JVisionCameraProxy [whitespace/indent] [3]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|30| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|32| private: should be indented +1 space inside class JVisionCameraProxy [whitespace/indent] [3]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|33| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|35| private: should be indented +1 space inside class JVisionCameraProxy [whitespace/indent] [3]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|36| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|37| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|38| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|39| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|41| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|42| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|43| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|44| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|45| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|46| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|47| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|48| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|51| Namespace should be terminated with "// namespace vision" [readability/namespace] [5]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|26| Add #include for string [build/include_what_you_use] [4]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|43| Add #include for shared_ptr<> [build/include_what_you_use] [4]
VisionCameraProxy::~VisionCameraProxy() { | ||
__android_log_write(ANDROID_LOG_INFO, TAG, "Destroying Context..."); | ||
// Destroy ArrayBuffer cache for both the JS and the Worklet Runtime. | ||
auto workletContext = _javaProxy->cthis()->getWorkletContext(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
throw std::runtime_error("Unknown FrameProcessor.type passed! Received: " + frameProcessorType); | ||
} | ||
|
||
_javaProxy->cthis()->setFrameProcessor(viewTag, make_global(frameProcessor)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
} | ||
|
||
void VisionCameraProxy::removeFrameProcessor(int viewTag) { | ||
_javaProxy->cthis()->removeFrameProcessor(viewTag); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
|
||
|
||
void VisionCameraInstaller::install(jni::alias_ref<jni::JClass>, | ||
jni::alias_ref<JVisionCameraProxy::javaobject> proxy) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
_javaProxy->cthis()->removeFrameProcessor(viewTag); | ||
} | ||
|
||
jsi::Value VisionCameraProxy::getFrameProcessorPlugin(jsi::Runtime& runtime, std::string name, jsi::Value jsOptions) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Add #include for string [build/include_what_you_use] [4]
scheduler->cthis()->dispatchAsync([f = std::move(f)](){ | ||
f(); | ||
}); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
f(); | ||
}); | ||
}; | ||
_workletContext = std::make_shared<RNWorklet::JsiWorkletContext>("VisionCamera", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
}); | ||
}; | ||
_workletContext = std::make_shared<RNWorklet::JsiWorkletContext>("VisionCamera", | ||
runtime, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
}; | ||
_workletContext = std::make_shared<RNWorklet::JsiWorkletContext>("VisionCamera", | ||
runtime, | ||
runOnJS, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
_workletContext = std::make_shared<RNWorklet::JsiWorkletContext>("VisionCamera", | ||
runtime, | ||
runOnJS, | ||
runOnWorklet); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
cpplint
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|25| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|26| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|27| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|28| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|30| public: should be indented +1 space inside class JVisionCameraProxy [whitespace/indent] [3]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|31| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|33| private: should be indented +1 space inside class JVisionCameraProxy [whitespace/indent] [3]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|34| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|36| private: should be indented +1 space inside class JVisionCameraProxy [whitespace/indent] [3]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|37| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|38| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|39| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|40| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|42| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|43| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|44| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|45| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|46| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|47| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|48| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|49| Tab found; better to use spaces [whitespace/tab] [1]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|52| Namespace should be terminated with "// namespace vision" [readability/namespace] [5]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|27| Add #include for string [build/include_what_you_use] [4]
android/src/main/cpp/java-bindings/JVisionCameraProxy.h|44| Add #include for shared_ptr<> [build/include_what_you_use] [4]
_javaProxy->cthis()->removeFrameProcessor(viewTag); | ||
} | ||
|
||
jsi::Value VisionCameraProxy::getFrameProcessorPlugin(jsi::Runtime& runtime, std::string name, const jsi::Object& jsOptions) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Add #include for string [build/include_what_you_use] [4]
runtime, | ||
runOnJS, | ||
runOnWorklet); | ||
__android_log_write(ANDROID_LOG_INFO, TAG, "Worklet Context created!"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
|
||
|
||
void JVisionCameraProxy::setFrameProcessor(int viewTag, | ||
alias_ref<JFrameProcessor::javaobject> frameProcessor) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
|
||
void JVisionCameraProxy::setFrameProcessor(int viewTag, | ||
alias_ref<JFrameProcessor::javaobject> frameProcessor) { | ||
auto setFrameProcessorMethod = javaClassLocal()->getMethod<void(int, alias_ref<JFrameProcessor::javaobject>)>("setFrameProcessor"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
void JVisionCameraProxy::setFrameProcessor(int viewTag, | ||
alias_ref<JFrameProcessor::javaobject> frameProcessor) { | ||
auto setFrameProcessorMethod = javaClassLocal()->getMethod<void(int, alias_ref<JFrameProcessor::javaobject>)>("setFrameProcessor"); | ||
setFrameProcessorMethod(_javaPart, viewTag, frameProcessor); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
removeFrameProcessorMethod(_javaPart, viewTag); | ||
} | ||
|
||
local_ref<JFrameProcessorPlugin::javaobject> JVisionCameraProxy::getFrameProcessorPlugin(std::string name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Add #include for string [build/include_what_you_use] [4]
return makeCxxInstance(jThis, jsRuntime, jsCallInvoker, sharedScheduler); | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Could not find a newline character at the end of the file. [whitespace/ending_newline] [5]
using namespace facebook; | ||
|
||
class JVisionCameraProxy : public jni::HybridClass<JVisionCameraProxy> { | ||
public: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
public: should be indented +1 space inside class JVisionCameraProxy [whitespace/indent] [3]
|
||
class JVisionCameraProxy : public jni::HybridClass<JVisionCameraProxy> { | ||
public: | ||
static void registerNatives(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
public: | ||
static void registerNatives(); | ||
|
||
void setFrameProcessor(int viewTag, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
static void registerNatives(); | ||
|
||
void setFrameProcessor(int viewTag, | ||
jni::alias_ref<JFrameProcessor::javaobject> frameProcessor); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
|
||
void setFrameProcessor(int viewTag, | ||
jni::alias_ref<JFrameProcessor::javaobject> frameProcessor); | ||
void removeFrameProcessor(int viewTag); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
void setFrameProcessor(int viewTag, | ||
jni::alias_ref<JFrameProcessor::javaobject> frameProcessor); | ||
void removeFrameProcessor(int viewTag); | ||
jni::local_ref<JFrameProcessorPlugin::javaobject> getFrameProcessorPlugin(std::string name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
jni::alias_ref<JFrameProcessor::javaobject> frameProcessor); | ||
void removeFrameProcessor(int viewTag); | ||
jni::local_ref<JFrameProcessorPlugin::javaobject> getFrameProcessorPlugin(std::string name, | ||
jni::local_ref<react::ReadableNativeMap::javaobject> options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
jni::local_ref<JFrameProcessorPlugin::javaobject> getFrameProcessorPlugin(std::string name, | ||
jni::local_ref<react::ReadableNativeMap::javaobject> options); | ||
|
||
public: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
public: should be indented +1 space inside class JVisionCameraProxy [whitespace/indent] [3]
jni::global_ref<JVisionCameraScheduler::javaobject> scheduler); | ||
static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject> javaThis, | ||
jlong jsRuntimePointer, | ||
jni::alias_ref<facebook::react::CallInvokerHolder::javaobject> jsCallInvokerHolder, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject> javaThis, | ||
jlong jsRuntimePointer, | ||
jni::alias_ref<facebook::react::CallInvokerHolder::javaobject> jsCallInvokerHolder, | ||
jni::alias_ref<JVisionCameraScheduler::javaobject> scheduler); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
jni::alias_ref<JVisionCameraScheduler::javaobject> scheduler); | ||
}; | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Namespace should be terminated with "// namespace vision" [readability/namespace] [5]
void setFrameProcessor(int viewTag, | ||
jni::alias_ref<JFrameProcessor::javaobject> frameProcessor); | ||
void removeFrameProcessor(int viewTag); | ||
jni::local_ref<JFrameProcessorPlugin::javaobject> getFrameProcessorPlugin(std::string name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Add #include for string [build/include_what_you_use] [4]
|
||
explicit JVisionCameraProxy(jni::alias_ref<JVisionCameraProxy::jhybridobject> javaThis, | ||
jsi::Runtime* jsRuntime, | ||
std::shared_ptr<facebook::react::CallInvoker> jsCallInvoker, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Add #include for shared_ptr<> [build/include_what_you_use] [4]
example/src/CameraPage.tsx
Outdated
@@ -8,6 +8,7 @@ import { | |||
PhotoFile, | |||
sortFormats, | |||
useCameraDevices, | |||
useFrameProcessor, | |||
useSkiaFrameProcessor, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[tsc] <6133> reported by reviewdog 🐶
'useSkiaFrameProcessor' is declared but its value is never read.
example/src/CameraPage.tsx
Outdated
@@ -218,15 +219,10 @@ | |||
paint.setImageFilter(imageFilter); | |||
|
|||
const isIOS = Platform.OS === 'ios'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[tsc] <6133> reported by reviewdog 🐶
'isIOS' is declared but its value is never read.
} | ||
|
||
jsi::Value VisionCameraProxy::getFrameProcessorPlugin(jsi::Runtime& runtime, | ||
const std::string& name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Add #include for string [build/include_what_you_use] [4]
private: | ||
void setFrameProcessor(int viewTag, jsi::Runtime& runtime, const jsi::Object& frameProcessor); | ||
void removeFrameProcessor(int viewTag); | ||
jsi::Value getFrameProcessorPlugin(jsi::Runtime& runtime, const std::string& name, const jsi::Object& options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Add #include for string [build/include_what_you_use] [4]
|
||
JVisionCameraProxy::JVisionCameraProxy(const jni::alias_ref<JVisionCameraProxy::jhybridobject>& javaThis, | ||
jsi::Runtime* runtime, | ||
const std::shared_ptr<facebook::react::CallInvoker>& callInvoker, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
JVisionCameraProxy::JVisionCameraProxy(const jni::alias_ref<JVisionCameraProxy::jhybridobject>& javaThis, | ||
jsi::Runtime* runtime, | ||
const std::shared_ptr<facebook::react::CallInvoker>& callInvoker, | ||
const jni::global_ref<JVisionCameraScheduler::javaobject>& scheduler) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
|
||
|
||
void JVisionCameraProxy::setFrameProcessor(int viewTag, | ||
const alias_ref<JFrameProcessor::javaobject>& frameProcessor) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
|
||
explicit JVisionCameraProxy(const jni::alias_ref<JVisionCameraProxy::jhybridobject>& javaThis, | ||
jsi::Runtime* jsRuntime, | ||
const std::shared_ptr<facebook::react::CallInvoker>& jsCallInvoker, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
explicit JVisionCameraProxy(const jni::alias_ref<JVisionCameraProxy::jhybridobject>& javaThis, | ||
jsi::Runtime* jsRuntime, | ||
const std::shared_ptr<facebook::react::CallInvoker>& jsCallInvoker, | ||
const jni::global_ref<JVisionCameraScheduler::javaobject>& scheduler); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject> javaThis, | ||
jlong jsRuntimePointer, | ||
jni::alias_ref<facebook::react::CallInvokerHolder::javaobject> jsCallInvokerHolder, | ||
const jni::alias_ref<JVisionCameraScheduler::javaobject>& scheduler); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Tab found; better to use spaces [whitespace/tab] [1]
void setFrameProcessor(int viewTag, | ||
const jni::alias_ref<JFrameProcessor::javaobject>& frameProcessor); | ||
void removeFrameProcessor(int viewTag); | ||
jni::local_ref<JFrameProcessorPlugin::javaobject> getFrameProcessorPlugin(const std::string& name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Add #include for string [build/include_what_you_use] [4]
|
||
explicit JVisionCameraProxy(const jni::alias_ref<JVisionCameraProxy::jhybridobject>& javaThis, | ||
jsi::Runtime* jsRuntime, | ||
const std::shared_ptr<facebook::react::CallInvoker>& jsCallInvoker, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
Add #include for shared_ptr<> [build/include_what_you_use] [4]
@@ -18,16 +19,12 @@ using namespace jni; | |||
struct JFrameProcessorPlugin : public JavaClass<JFrameProcessorPlugin> { | |||
static constexpr auto kJavaDescriptor = "Lcom/mrousavy/camera/frameprocessor/FrameProcessorPlugin;"; | |||
|
|||
public: | |||
public: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
public: should be indented +1 space inside struct JFrameProcessorPlugin [whitespace/indent] [3]
public: | ||
explicit FrameHostObject(jni::alias_ref<JImageProxy::javaobject> image); | ||
explicit FrameHostObject(const jni::alias_ref<JFrame::javaobject>& frame); | ||
public: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
public: should be indented +1 space inside class FrameHostObject [whitespace/indent] [3]
~FrameHostObject(); | ||
|
||
public: | ||
public: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
public: should be indented +1 space inside class FrameHostObject [whitespace/indent] [3]
jsi::Value get(jsi::Runtime &, const jsi::PropNameID &name) override; | ||
std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime &rt) override; | ||
|
||
public: | ||
jni::global_ref<JImageProxy> frame; | ||
public: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
public: should be indented +1 space inside class FrameHostObject [whitespace/indent] [3]
|
||
private: | ||
private: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
private: should be indented +1 space inside class FrameHostObject [whitespace/indent] [3]
class VisionCameraScheduler : public jni::HybridClass<VisionCameraScheduler> { | ||
public: | ||
class JVisionCameraScheduler : public jni::HybridClass<JVisionCameraScheduler> { | ||
public: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
public: should be indented +1 space inside class JVisionCameraScheduler [whitespace/indent] [3]
|
||
private: | ||
private: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[cpplint] reported by reviewdog 🐶
private: should be indented +1 space inside class JVisionCameraScheduler [whitespace/indent] [3]
* First Android rewrite * Rewrite Android C++ backend * Pass `ReadableNativeMap`, fix build error * fix: Fix FrameProcessor init * Make a bunch of stuff const reference to avoid copies * Indents * Cleanup * indents * docs: Update Android docs * Update CameraView.kt * fix: Format C++ code
What
JImageProxy
withJFrame
wrapperVisionCameraProxy
VisionCameraProxy.getFrameProcessorPlugin(..)
)Changes
Tested on
Related issues