feat(camera): add Logitech webcam support#361
Conversation
48bc7d8 to
f0ce600
Compare
Greptile SummaryThis PR adds first-class Logitech webcam support across the app. The main changes are:
Confidence Score: 4/5This is close, but these camera-control issues should be fixed before merging.
crates/openlogi-camera/src/uvc.rs; crates/openlogi-gui/src/components/camera_controls.rs Important Files Changed
|
7a6ed85 to
0bb4827
Compare
0bb4827 to
fdc8528
Compare
| prev.into_device().close(); | ||
| } |
There was a problem hiding this comment.
When location_hint(unique_id) is None, this branch still keeps the first Logitech UVC device as a fallback. The GUI passes the selected camera's AVFoundation ID into this backend, so an ID this parser cannot turn into a location hint can still make controls for one Logitech webcam write to whichever Logitech webcam IOKit enumerates first. With two attached Logitech cameras, this should fail closed instead of picking a best-effort device.
Context
OpenLogi only managed HID++ devices — Logitech UVC webcams were invisible. This adds first-class webcam support: enumeration, live preview, and device-level image controls written over USB to the camera's own registers, so adjustments carry into Google Meet, Zoom, and OBS rather than living only in our preview.
Note
Platform support: macOS has the full feature (AVFoundation preview + IOKit controls) and is verified end-to-end on a StreamCam. Windows matches it — DirectShow enumeration and controls (
IAMVideoProcAmp/IAMCameraControl) plus a Media Foundation live preview/snapshot backend (IMFSourceReader, RGB32) — and compiles clean againstx86_64-pc-windows-msvc, but has not yet been exercised on real Windows hardware. Linux builds against stubs and shows no cameras.Demo
config.tomland re-apply after unplug/reboot.openlogi camera get,openlogi camera set brightness 140,openlogi snapshotChanges
openlogi-cameracrate — AVFoundation capture plus IOKit UVC controls on macOS (Processing Unit and Camera Terminal, 4-byte exposure payloads, AE-mode bitmap, batched into a single device-seize); Media Foundation capture plus DirectShow enumeration/controls on Windows:capture.rs,capture_windows.rs,uvc.rs,uvc_windows.rs,controls.rs,capture_types.rscamera_preview.rs,camera_controls.rs,app.rsdevice_camera_imagemanifest key and base-model variants fetch and resolve; marker-less camera metadata parses:asset/sync.rs,asset/images.rs,openlogi-assetsCameraControlsbecomes a name-keyed map (existing TOML loads unchanged) with per-camera profiles and active selection:config.rs,state.rsopenlogi camera get/setfor every control and auto toggle;openlogi snapshotwrites a PNG:cmd/camera.rs,cmd/snapshot.rscarousel.rsNotes