This PR introduces version 2 of the USB Host UVC driver, aimed at enabling ESP SoCs to stream frames from connected USB cameras.
The driver provides frames to the user via a callback, offering a flexible interface that can serve as a foundation for more advanced frame processing applications.
Internally, the driver manages a FreeRTOS Queue containing multiple frame buffers, which helps prevent buffer overflows and underflows during streaming.
Detailed feature descriptions, future plans, and usage instructions are available in the README.md file.
Information for Testers
This section provides instructions for testing the driver’s functionality and public API.
Two examples are included for testing:
1. basic_uvc_stream
Test Setup: Tested on ESP32-P4 with a customer-specified dual-camera setup.
Functionality: Opens two UVC streams and continuously starts and stops them.
2. camera_display
Test Setup: Tested on ESP32-S3 with multiple compatible cameras.
Functionality: Initializes a display, opens a single UVC stream, decodes received JPEG frames, and displays them on the screen.
Information for Reviewers
This section provides guidance for those reviewing the internal code structure of the driver.
The driver includes a host_test folder with tests designed to run on Linux. These tests use a mocked version of the esp-idf/usb component, focusing on the following areas, which should need less in-depth review:
Introduction
This PR introduces version 2 of the USB Host UVC driver, aimed at enabling ESP SoCs to stream frames from connected USB cameras.
The driver provides frames to the user via a callback, offering a flexible interface that can serve as a foundation for more advanced frame processing applications.
Internally, the driver manages a FreeRTOS Queue containing multiple frame buffers, which helps prevent buffer overflows and underflows during streaming.
Detailed feature descriptions, future plans, and usage instructions are available in the README.md file.
Information for Testers
This section provides instructions for testing the driver’s functionality and public API.
Two examples are included for testing:
1.
basic_uvc_stream
2.
camera_display
Information for Reviewers
This section provides guidance for those reviewing the internal code structure of the driver.
The driver includes a
host_test
folder with tests designed to run on Linux. These tests use a mocked version of the esp-idf/usb component, focusing on the following areas, which should need less in-depth review:uvc_descriptor_parsing.c
uvc_isoc.c
anduvc_bulk.c
The following file, focused on human-readable output, also requires only a light review:
uvc_descriptor_printing.c
Areas not yet covered by
host_tests
and requiring more detailed review include:uvc_frame.c
(manages queue of empty frame buffers)uvc_control.c
(handles video format negotiation and other control requests)uvc_host.c
(includes driver installation, device management, stream initiation, etc.)Related Information