JianyuWang0623 opened a new pull request, #3438: URL: https://github.com/apache/nuttx-apps/pull/3438
## Summary Add a UVC camera streaming example application (`examples/uvc_cam`) that captures frames from a V4L2 camera sensor and streams them to a USB host via the UVC gadget driver. The application: - Queries the sensor's native pixel format, resolution, and frame rate dynamically via `VIDIOC_ENUM_FMT`, `VIDIOC_ENUM_FRAMESIZES`, and `VIDIOC_ENUM_FRAMEINTERVALS` — no hardcoded video parameters. - Initializes/deinitializes the UVC gadget through `boardctl(BOARDIOC_USBDEV_CONTROL)`. - Uses `poll()` with `POLLOUT` to wait for the USB host to start streaming, and to detect host disconnect/reconnect. - Supports optional positional arguments: `uvc_cam [nframes] [video_dev] [uvc_dev]`. - Supports configurable frame count via Kconfig (`CONFIG_EXAMPLES_UVC_CAM_NFRAMES`, 0 = infinite). Depends on the nuttx UVC gadget class driver (https://github.com/apache/nuttx/pull/18609). ## Impact New example application only. No impact on existing code or build. Adds Kconfig symbol `CONFIG_EXAMPLES_UVC_CAM` (depends on `USBUVC`), with sub-options for program name, priority, stack size, and frame count. ## Testing - Host: Ubuntu 22.04 x86_64, GCC 13.2.0 (Xtensa esp32s3 cross-compiler) - Target: `xtensa` `lckfb-szpi-esp32s3:uvc` - Build: `make distclean && ./tools/configure.sh lckfb-szpi-esp32s3:uvc && make -j$(nproc)` — clean build, zero warnings. - Runtime: Flashed to ESP32-S3 board with GC0308 camera sensor. Verified 320×240 YUYV streaming to Linux host — frames displayed correctly via `ffplay -f v4l2 -video_size 320x240 -i /dev/video1`. Verified host disconnect/reconnect recovery. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
