-
Notifications
You must be signed in to change notification settings - Fork 24
Expanded support for Libcamera Controls (ControlInfoMap and ControlInfo) #46
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
base: main
Are you sure you want to change the base?
Conversation
I realized I skipped over the values method inside of ControlInfo. I have added an implementation that appears to work with the same systems mentioned before. I also expanded on top of the libcamera-meta to allow getting the id and names of the ControlId/PropertyId from the enum directly. |
Hey, sorry for not reviewing this earlier. The changes look good, but could you rebase or cherry pick on main branch? Many things not related to ControlInfo have been merged |
If this has no movement on it in a few days I'll probably grab the changes, resolve the conflicts and rebase. I made similar changes on my own fork (though very crude). I'm re-writing the project I used libcamera-rs for currently, so I'm in no hurry and don't want to step on anyones toes |
the other changes should be removed, working on getting the branch ready to merge with main |
should be good now, let me know if anything needs changing |
We might need to update the version of clippy we use in our CI as rust v1.86 is giving me clippy lints for this PR. |
@SoZ0 I have had quite a few demands on my time this week but i promise i will review this more thoroughly shortly. I was able to set controls and get there values dynamically with mainline, and so as this PR does not contain any examples, what it is you are able to do with this, PR? Im not trying to be dismissive, i will try and test this on hardware and make sure it builds for the supported versions before approving so was wondering what i should be looking for when testing etc :) |
no worries, I'll write up a few examples of what this changes exactly but the main gist of this was to expose more of ControlInfoMap and ControlInfo. I will try to have them done by Wednesday |
I have created the examples if you would like to look them over they live with the other examples:
I have tested the examples on several different cameras without issue so far:
I have tested all of these cameras on a compute module 4/5 with a MIPI/CSI connection and the Logitech cameras were tested on a Fedora 40/41/42 machine as well as the cm4/5 as a USB webcam. I have not tested all permutations of this list but I have been able to read up to 4 different camera module's controls at the same time (I ran out of ports) but I believe there is no limit or at least the limit is high enough to be used in reasonable any use case. There may be an edge case I could be missing still, but I feel very confident that the changes work, will not disrupt any existing code bases and is beneficial for the library. If you need any more information or would like to see and specific use cases please let me know. I will be glad to help out with anything you might need. |
I believe i have implemented the rest of ControlInfoMap and ControlInfo and created a few methods to turn it into an iterator.
I have tested on my host machine (Libcamera 0.3.1, Fedora 40 - x86) and with cross compiling to arm64 (Libcamera 0.3.2, Debian Bookworm). The code works on both x86 and arm64 (tested with a compute module 4).
I am working on a project that requires quite extensive information from libcamera so I will continue to make pull request as I expand libcamera-sys and libcamera to support the remaining missing implementation I need