Closed alexisgaziello closed 1 week ago
Hi,
I think the easiest way would be to put all the code from example (i.e. https://github.com/lit-robotics/libcamera-rs/blob/main/libcamera/examples/jpeg_capture.rs) into a thread and communicate over channels. You would need 2 channels, one to send a signal to capture and another to wait for response. The camera thread would loop on waiting for signal and then send an actual capture request to camera. Once request is completed, it would return the result over the second channel.
So your capture()
function would just send a signal to a channel to start capture, and then wait on the second channel for the response.
Let me know if this is clear or if you need additional help.
Hey,
I was wondering, what would be the correct way of initializing some sort of singleton for a camera object, that could be called to get frames very fast? Something like:
Could someone put me on the right track for the definition of
Camera
? and where is the best place to read documentation that would help resolving this?