-
Notifications
You must be signed in to change notification settings - Fork 16
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
Can't add new control to Request #2
Comments
Okay looking at the implementation in libcamera, this isn't going to work as documented. Then again, the issue remains though, since I couldn't find a way to supply a list of Controls to |
Hey, thanks for reporting this.
I tried to do the same and that describes my experience pretty well lol. Interfacing Rust with C++, especially when templates are used is a nightmare. That's why I went the C wrapper route. The issue should be fixed, please check if it's working. One caveat is that not all controls are supported by all cameras, so the |
Seems to work, thank you! I think the only problem that remains is that |
Just came across this myself. Should |
I don't think libcamera API allows accessing camera controls to implement suggested I created a fix in #6, please test and see if it works for you. Unfortunatelly, it is not possible to create let mut ctrls = ControlList::new();
ctrls.set(controls::FrameDuration(1000)).unwrap();
cam.start(Some(&ctrls)).unwrap(); Beware that UVC USB cameras ignore any controls given in |
It seems that regardless of whether I add the controls to |
It's likely that integrated laptop camera is attached over internal USB bus and uses UVC protocol. AFAIK, libcamera can't control UVC FPS, supported controls are these: https://github.com/kbingham/libcamera/blob/master/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp#L268 |
Note that it's not that libcamera /can't/ control more features of UVC ... just that no one has added support. If you want to fix control handling in the uvc pipeline handler, patches are most welcome at the libcamera-devel mailing list. |
First of all, thank you for creating this libcamera-wrapper! I was recently trying to create one as well (using cxx/autocxx) and almost went mad.
I'm trying to set a new control in a
Request
, which should be possible with the C++ API:But this results in
Setting control failed: NotFound(7)
.This of course happens because
.set()
expects the Control ID to exist:libcamera-rs/libcamera-rs/src/control.rs
Lines 80 to 87 in 5b60854
From a quick try I figured implementing this wasn't as easy as creating a new
libcamera_control_list_set
since there is currently no way to create a new instance oflibcamera_control_value_t
from Rust. If I can up with a solution, I will create a PR.The text was updated successfully, but these errors were encountered: