This is a (yet another) fork of Freedesktop UVC gadget library.
Original library cannot utilize
libcameraadvanced camera control parameters, such as AWB, Autofocus and etc modes - this heavily limits customization options when using RPi with Camera Module as an Plug-and-play OTG webcam.The goal is to add parameters to
uvc-gadgetbinary that will pass those control options tolibcamera.I am not an expert with development in this use case (C, UVC cameras, RPi), so expect hacky solutions - I did this for personal usage.
Changes are tested with RPi Zero 2 W, Camera Module 3 (IMX708, basic module with no IR or wide lense), Pi OS Bookworm, and libcamera v0.5.2+99-bfd68f78.
You can find full guide here, with specific systemd fixes required for Bookworm here (thank you f4mi for inspiration and fixes!). The updated systemd script of mine could be found here.
uvcgadget is a pure C library that implements handling of UVC gadget functions.
- uvc-gadget - Sample test application
To compile:
$ meson build
$ ninja -C build
Cross compilation can be managed by meson. Please read the directions at https://mesonbuild.com/Cross-compilation.html for detailed guidance on using meson.
In brief summary:
$ meson build --cross <meson cross file>
$ ninja -C build