examples/uvc_cam: add UVC camera streaming app#3438
examples/uvc_cam: add UVC camera streaming app#3438JianyuWang0623 wants to merge 1 commit intoapache:masterfrom
Conversation
|
Awesome! @JianyuWang0623 could you also please add Documentation on how to use this application as part of documentation in apache/nuttx#18609 bundle? :-) |
Usage: uvc_cam [nframes] [video_dev] [uvc_dev] V4L2 capture -> write UVC gadget device. Uses boardctl to initialize/deinitialize UVC gadget. Queries sensor pixel format, resolution and frame rate via V4L2. Uses poll() to wait for USB host streaming state. Supports optional device path arguments (default /dev/video0, /dev/uvc0). Supports configurable frame count (0=infinite). Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
1861b5f to
18f177f
Compare
@cederom Will do! I’ve just added the usage documentation here: https://github.com/apache/nuttx/compare/9d2ec9642d7bf0c41699f104c06948febeac64b4..e4babac55082a02feef90ad9ed128a5c5ad84648 |
TANK U SIR! =) |
|
@JianyuWang0623 This error is not related to this PR You will need to wait for this PR #3440 to be merged, after which you will need to rebase |
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:
VIDIOC_ENUM_FMT,VIDIOC_ENUM_FRAMESIZES, andVIDIOC_ENUM_FRAMEINTERVALS— no hardcoded video parameters.boardctl(BOARDIOC_USBDEV_CONTROL).poll()withPOLLOUTto wait for the USB host to start streaming, and to detect host disconnect/reconnect.uvc_cam [nframes] [video_dev] [uvc_dev].CONFIG_EXAMPLES_UVC_CAM_NFRAMES, 0 = infinite).Depends on the nuttx UVC gadget class driver (apache/nuttx#18609).
Impact
New example application only. No impact on existing code or build.
Adds Kconfig symbol
CONFIG_EXAMPLES_UVC_CAM(depends onUSBUVC), with sub-options for program name, priority, stack size, and frame count.Testing
xtensalckfb-szpi-esp32s3:uvcmake distclean && ./tools/configure.sh lckfb-szpi-esp32s3:uvc && make -j$(nproc)— clean build, zero warnings.ffplay -f v4l2 -video_size 320x240 -i /dev/video1. Verified host disconnect/reconnect recovery.