Skip to content
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

Create photon-core JNI #1067

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

mcm001
Copy link
Contributor

@mcm001 mcm001 commented Dec 23, 2023

No description provided.

@srimanachanta
Copy link
Member

I would create a new jni section in shared and apply that to photon-server and photon-core instead of modifying javacpp. photon-targeting and photon-lib aren't currently JNI'd unless that is something we are trying to add.

@mcm001
Copy link
Contributor Author

mcm001 commented Dec 27, 2023

I'm still not sure how to make the Java side of photon core/server depend on native artifacts we build anyways

@srimanachanta
Copy link
Member

srimanachanta commented May 20, 2024

What components do we want in photon-core JNI? I thought we wanted to keep LibCamera and MrCal as separate repos. Do we want to merge those dependencies into core's cpp system then replace their discrete JNIs with a custom one. An issue is there is a lot of platform-specific stuff going on which would make build system annoying with linking dependencies properly.

If we want to do it that way, we would create calibration JNIs in cpp that abstract out either OpenCV and MrCal implements and then the gradle build arguments would decide which system is linked. That way our Java code has 0 changes and our cpp code is build based. Because OpenCV is universally supported, we can still provide overrides as a setting which would be no-ops for MrCal if that platform wasn't supported. BTW, I've only ever done this on cmake, not gradle. gradle bad tbh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants