diff --git a/.build-test-rules.yml b/.build-test-rules.yml index 31fd6468..83e5f54a 100644 --- a/.build-test-rules.yml +++ b/.build-test-rules.yml @@ -6,15 +6,23 @@ host/class: enable: - if: SOC_USB_OTG_SUPPORTED == 1 +host/class/uvc/usb_host_uvc/examples/camera_display: + enable: + - if: (IDF_VERSION_MAJOR >= 5 and IDF_VERSION_MINOR >= 3) + reason: This example uses esp_lcd API introduced in v5.3 + # Host tests host/class/cdc/usb_host_cdc_acm/host_test: enable: - if: IDF_TARGET in ["linux"] and (IDF_VERSION_MAJOR >= 5 and IDF_VERSION_MINOR >= 4) + host/class/hid/usb_host_hid/host_test: enable: - if: IDF_TARGET in ["linux"] and (IDF_VERSION_MAJOR >= 5 and IDF_VERSION_MINOR >= 4) + reason: USB mock was added in v5.4 host/class/uvc/usb_host_uvc/host_test: enable: - - if: IDF_TARGET in ["linux"] and (IDF_VERSION_MAJOR >= 5 and IDF_VERSION_MINOR >= 4) \ No newline at end of file + - if: IDF_TARGET in ["linux"] and (IDF_VERSION_MAJOR >= 5 and IDF_VERSION_MINOR >= 4) + reason: USB mock was added in v5.4 diff --git a/.gitmodules b/.gitmodules index fffd40de..e69de29b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "host/usb_host_uvc/libuvc"] - path = host/class/uvc/usb_host_uvc/libuvc - url = ../../espressif/libuvc.git diff --git a/host/class/uvc/usb_host_uvc/CHANGELOG.md b/host/class/uvc/usb_host_uvc/CHANGELOG.md index c046ba4c..de62cddc 100644 --- a/host/class/uvc/usb_host_uvc/CHANGELOG.md +++ b/host/class/uvc/usb_host_uvc/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.0.0 + +- New version of the driver, native to Espressif's USB Host Library +- Removed libuvc dependency + ## 1.0.4 - Support printf frame based descriptor diff --git a/host/class/uvc/usb_host_uvc/CMakeLists.txt b/host/class/uvc/usb_host_uvc/CMakeLists.txt index f9ada3aa..21e81c02 100644 --- a/host/class/uvc/usb_host_uvc/CMakeLists.txt +++ b/host/class/uvc/usb_host_uvc/CMakeLists.txt @@ -1,28 +1,13 @@ -configure_file(${CMAKE_CURRENT_LIST_DIR}/libuvc/include/libuvc/libuvc_config.h.in - ${CMAKE_CURRENT_BINARY_DIR}/include/libuvc/libuvc_config.h - @ONLY) - -set(LIBUVC_SOURCES libuvc/src/ctrl.c - libuvc/src/ctrl-gen.c - libuvc/src/device.c - libuvc/src/diag.c - libuvc/src/frame.c - libuvc/src/init.c - libuvc/src/misc.c - libuvc/src/stream.c) - -idf_component_register( - SRCS ${LIBUVC_SOURCES} src/descriptor.c src/libusb_adapter.c - INCLUDE_DIRS include libuvc/include - PRIV_INCLUDE_DIRS private_include - REQUIRES usb pthread) - -set_source_files_properties( - ${CMAKE_CURRENT_LIST_DIR}/libuvc/src/device.c PROPERTIES COMPILE_FLAGS -Wno-implicit-fallthrough) -set_source_files_properties( - ${CMAKE_CURRENT_LIST_DIR}/libuvc/src/stream.c PROPERTIES COMPILE_FLAGS -Wno-unused-variable) - set_source_files_properties( - ${CMAKE_CURRENT_LIST_DIR}/libuvc/src/diag.c PROPERTIES COMPILE_FLAGS -Wno-format) - -target_compile_definitions(${COMPONENT_LIB} PRIVATE LIBUVC_NUM_TRANSFER_BUFS=4) -target_include_directories(${COMPONENT_LIB} PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/include/) +idf_component_register(SRCS + "uvc_host.c" + "uvc_descriptor_parsing.c" + "uvc_descriptor_printing.c" + "uvc_frame.c" + "uvc_control.c" + "uvc_isoc.c" + "uvc_bulk.c" + INCLUDE_DIRS include + PRIV_INCLUDE_DIRS private_include include/esp_private + PRIV_REQUIRES heap + REQUIRES usb + ) diff --git a/host/class/uvc/usb_host_uvc/LICENCE b/host/class/uvc/usb_host_uvc/LICENSE similarity index 99% rename from host/class/uvc/usb_host_uvc/LICENCE rename to host/class/uvc/usb_host_uvc/LICENSE index 261eeb9e..d6456956 100644 --- a/host/class/uvc/usb_host_uvc/LICENCE +++ b/host/class/uvc/usb_host_uvc/LICENSE @@ -1,3 +1,4 @@ + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ diff --git a/host/class/uvc/usb_host_uvc/README.md b/host/class/uvc/usb_host_uvc/README.md index b8398839..ebb6f385 100644 --- a/host/class/uvc/usb_host_uvc/README.md +++ b/host/class/uvc/usb_host_uvc/README.md @@ -1,24 +1,26 @@ -# USB Host UVC Driver +# USB Host UVC Class Driver [![Component Registry](https://components.espressif.com/components/espressif/usb_host_uvc/badge.svg)](https://components.espressif.com/components/espressif/usb_host_uvc) +![maintenance-status](https://img.shields.io/badge/maintenance-experimental-blue.svg) -This directory contains USB host UVC driver based on [libuvc](https://github.com/libuvc/libuvc) library. Support for `libuvc` is achieved by implementing adapter between [libusb](https://github.com/libusb/libusb) (underling host library used by `libuvc`) and [usb_host](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-reference/peripherals/usb_host.html) library targeted for ESP SOCs. +This component contains an implementation of a USB Host UVC Class Driver that is implemented on top of the [USB Host Library](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-reference/peripherals/usb_host.html). -## Usage +The UVC driver allows video streaming from USB cameras. -Reference [uvc_host_example](https://github.com/espressif/esp-idf/tree/master/examples/peripherals/usb/host/uvc) is similar to one found in `libuvc` repository with few additions: -1. Before calling `uvc_init()`, `initialize_usb_host_lib()` has to be called in order to initialize usb host library. -2. Since `libuvc` selects highest possible `dwMaxPayloadTransferSize` by default, user has to manually overwrite obatained value to 512 bytes (maximum transfer size supported by ESP32-S2/S3) before passing it to `uvc_print_stream_ctrl()` function. -3. Optionally, user can configure `libusb adapter` by passing appropriate parameters to `libuvc_adapter_set_config()`. +### Features +- Isochronous and Bulk transfers streaming +- Multiple video streams +- Frame buffers in PSRAM +- Video Stream format negotiation +- Stream overflow and underflow management -## Known limitations +### Usage -Having only Full Speed USB peripheral and hardware limited MPS (maximum packet size) to 512 bytes, ESP32-S2/S3 is capable of reading about 0.5 MB of data per second. When connected to Full Speed USB host, cameras normally provide resolution no larger than 640x480 pixels. -Following two supported formats are the most common (both encoded in MJPEG): - * 320x240 30 FPS - * 640x480 15 FPS +Following sequence diagram represents public API usage of the UVC driver. New frames are passed to user in a callback. This design offers flexible interface upon which more complex frame processing components can be built. -## Tested cameras - * Logitech C980 - * CANYON CNE-CWC2 - * Logitech C270 +![UVC public API](docs/uvc_public_api.png) + +### Additional information +- [Frequently Asked Questions](docs/FAQ.md) +- [Examples](examples/) +- [Architectural notes](docs/arch_notes.md) diff --git a/host/class/uvc/usb_host_uvc/docs/FAQ.md b/host/class/uvc/usb_host_uvc/docs/FAQ.md new file mode 100644 index 00000000..0a1e9bfe --- /dev/null +++ b/host/class/uvc/usb_host_uvc/docs/FAQ.md @@ -0,0 +1,58 @@ +## FAQ H265 encoding + +Q1: I have two input frames inputI.hevc, which is full Intra-coded frame and a second inputP.hevc which is Predicted frame. How do I decode the second frame to png? + +--- + +### Decoding a P-frame Using an I-frame in HEVC + +To decode a P-frame using the corresponding I-frame, you need to combine both frames into a single stream since a P-frame requires the reference frame (I-frame) to be properly decoded. Here’s how you can do it using FFmpeg: + +#### Step 1: Combine the I-frame and P-frame into a Single Stream + +1. **Concatenate the frames**: Create a text file with the paths to the input HEVC files in the order they should be decoded. + + Create a file `inputs.txt` with the following content: + ```plaintext + file 'inputI.hevc' + file 'inputP.hevc' + ``` + +2. **Concatenate the HEVC files using FFmpeg**: + ```sh + ffmpeg -f concat -safe 0 -i inputs.txt -c copy combined.hevc + ``` + +#### Step 2: Extract and Decode the Second Frame + +1. **Decode the combined HEVC stream and extract the second frame**: + ```sh + ffmpeg -i combined.hevc -vf "select=eq(n\,1)" -vsync vfr second_frame.png + ``` + +#### Explanation + +- The `-f concat -safe 0 -i inputs.txt -c copy combined.hevc` command concatenates the I-frame and P-frame into a single HEVC file. +- The `-vf "select=eq(n\,1)" -vsync vfr second_frame.png` command extracts and decodes the second frame (P-frame) from the combined stream. + +#### Complete Command Sequence + +1. **Create `inputs.txt`**: + ```plaintext + file 'inputI.hevc' + file 'inputP.hevc' + ``` + +2. **Combine the HEVC files**: + ```sh + ffmpeg -f concat -safe 0 -i inputs.txt -c copy combined.hevc + ``` + +3. **Extract and decode the second frame**: + ```sh + ffmpeg -i combined.hevc -vf "select=eq(n\,1)" -vsync vfr second_frame.png + ``` + +By following these steps, you should be able to decode the second frame (P-frame) using the initial I-frame and convert it to PNG. + +--- diff --git a/host/class/uvc/usb_host_uvc/docs/arch_notes.md b/host/class/uvc/usb_host_uvc/docs/arch_notes.md new file mode 100644 index 00000000..ecc94080 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/docs/arch_notes.md @@ -0,0 +1,38 @@ +## Architectural Notes + +This driver utilizes two distinct types of memory buffers, both of which can be configured per UVC stream during stream initialization via the `uvc_host_stream_config_t.advanced` structure. The buffer types are as follows: + +### 1. URB (USB Request Block) +- **Definition:** Provided by the USB Host Library in ESP-IDF. +- **Ownership:** Managed by the USB Host Library. +- **Placement:** Determined by ESP-IDF settings (internal or external RAM). +- **Purpose:** Transfers raw data from the USB device to the ESP host. +- **Behavior:** + - The driver continuously resubmits the URB until streaming stops. + - After submission, the CPU is interrupted when the URB is completed. + - The buffer size impacts interrupt frequency—larger buffers result in fewer interrupts. +- **Recommendation:** Use triple buffering for optimal performance: + - One buffer is processed by the driver. + - One buffer is actively transferring data. + - One buffer is queued for submission. +- **Driver Role:** Processes data from the URB and reconstructs video frames. + +### 2. FB (Frame Buffer) +- **Definition:** Custom buffer type defined within this driver. +- **Ownership:** Dynamic ownership: + - Empty FBs are owned by the driver. + - Once a full frame is reconstructed and stored in the FB, it is passed to the user via `uvc_host_frame_callback_t`. + - After processing the frame, the user must return the FB to the driver, either by: + - Returning `true` from the callback, or + - Explicitly calling `uvc_host_frame_return()`. +- **Recommendation:** Use triple buffering for optimal performance: + - One buffer is used for frame reconstruction. + - One buffer is processed by the user. + - One buffer is queued for use. +- **Frame Size Considerations:** + - UVC cameras report the maximum frame buffer size during stream format negotiation. + - These sizes are often overly large, leading to inefficient RAM usage. + - This driver allows the allocation of smaller FBs to optimize memory usage. + +### Frame buffer state transitions +![Frame buffer state transitions](./uvc_frames_state_transitions.png) diff --git a/host/class/uvc/usb_host_uvc/docs/device_state_transitions.PNG b/host/class/uvc/usb_host_uvc/docs/device_state_transitions.PNG new file mode 100644 index 00000000..3e09041d Binary files /dev/null and b/host/class/uvc/usb_host_uvc/docs/device_state_transitions.PNG differ diff --git a/host/class/uvc/usb_host_uvc/docs/uvc_frames_state_transitions.png b/host/class/uvc/usb_host_uvc/docs/uvc_frames_state_transitions.png new file mode 100644 index 00000000..0e4d4a63 Binary files /dev/null and b/host/class/uvc/usb_host_uvc/docs/uvc_frames_state_transitions.png differ diff --git a/host/class/uvc/usb_host_uvc/docs/uvc_frames_state_transitions.uxf b/host/class/uvc/usb_host_uvc/docs/uvc_frames_state_transitions.uxf new file mode 100644 index 00000000..0341262b --- /dev/null +++ b/host/class/uvc/usb_host_uvc/docs/uvc_frames_state_transitions.uxf @@ -0,0 +1,111 @@ + + + 10 + + UMLState + + 310 + 550 + 180 + 110 + + *Frame in Empty Queue* +-- +Frame is owned +by the driver +-. +There can be more frames +in the Empty Queue +valign=top + + + + + UMLState + + 700 + 550 + 180 + 110 + + *Active Frame* +-- +Frame is owned +by the driver +-. +There can be only +1 active frame +valign=top + + + + + Relation + + 480 + 610 + 240 + 40 + + lt=-> +uvc_frame_get_empty() + 10.0;20.0;220.0;20.0 + + + Relation + + 570 + 470 + 240 + 140 + + lt=-> +uvc_frame_add_data() + 130.0;120.0;50.0;120.0;50.0;20.0;220.0;20.0;220.0;80.0 + + + Relation + + 870 + 610 + 260 + 60 + + lt=-> +uvc_host_frame_callback_t() +<< callback>> + + 10.0;20.0;240.0;20.0 + + + UMLState + + 1110 + 550 + 180 + 110 + + *Process Frame* +-- +Frame is owned +by the user +-. +There can be more frames +that are being processed +valign=top + + + + + Relation + + 380 + 650 + 830 + 110 + + lt=-> +uvc_host_frame_return() + 810.0;10.0;810.0;90.0;10.0;90.0;10.0;10.0 + + diff --git a/host/class/uvc/usb_host_uvc/docs/uvc_public_api.png b/host/class/uvc/usb_host_uvc/docs/uvc_public_api.png new file mode 100644 index 00000000..a25a8d69 Binary files /dev/null and b/host/class/uvc/usb_host_uvc/docs/uvc_public_api.png differ diff --git a/host/class/uvc/usb_host_uvc/docs/uvc_public_api.uxf b/host/class/uvc/usb_host_uvc/docs/uvc_public_api.uxf new file mode 100644 index 00000000..7db5e335 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/docs/uvc_public_api.uxf @@ -0,0 +1,215 @@ + + + 13 + + UMLGeneric + + 390 + 234 + 130 + 39 + + :App + + + + UMLGeneric + + 442 + 390 + 26 + 559 + + +bg=yellow + + + + UMLGeneric + + 1040 + 429 + 208 + 39 + + stream_0:uvc_stream_t + + + + Relation + + 455 + 416 + 611 + 65 + + lt=<. +<<create>> +uvc_host_stream_open() + 450.0;20.0;10.0;20.0 + + + Relation + + 455 + 507 + 702 + 52 + + lt=<<<- +uvc_host_stream_start() + 520.0;20.0;10.0;20.0 + + + Relation + + 1131 + 455 + 39 + 104 + + lt=. + 10.0;10.0;10.0;60.0 + + + UMLGeneric + + 1131 + 533 + 26 + 312 + + +bg=green + + + + UMLGeneric + + 455 + 650 + 26 + 78 + + +bg=red + + + + Relation + + 468 + 624 + 689 + 65 + + lt=<<<- +<<callback>> + + 10.0;20.0;510.0;20.0 + + + Relation + + 468 + 702 + 689 + 52 + + lt=<. +uvc_host_frame_return() + 510.0;20.0;10.0;20.0 + + + Relation + + 455 + 819 + 702 + 52 + + lt=<- +uvc_host_stream_stop() + 520.0;20.0;10.0;20.0 + + + Relation + + 1131 + 832 + 39 + 104 + + lt=. + 10.0;10.0;10.0;60.0 + + + UMLSpecialState + + 1131 + 897 + 26 + 26 + + type=termination + + + + Relation + + 455 + 884 + 715 + 52 + + lt=<- +uvc_host_stream_close() + 530.0;20.0;10.0;20.0 + + + UMLFrame + + 325 + 572 + 884 + 221 + + streaming + + + + Relation + + 442 + 260 + 39 + 65 + + lt=. + 10.0;10.0;10.0;30.0 + + + UMLState + + 403 + 299 + 104 + 65 + + Install +USB library +UVC driver + + + + Relation + + 442 + 351 + 39 + 65 + + lt=. + 10.0;10.0;10.0;30.0 + + diff --git a/host/class/uvc/usb_host_uvc/examples/basic_uvc_stream/CMakeLists.txt b/host/class/uvc/usb_host_uvc/examples/basic_uvc_stream/CMakeLists.txt new file mode 100644 index 00000000..d8c6bbfe --- /dev/null +++ b/host/class/uvc/usb_host_uvc/examples/basic_uvc_stream/CMakeLists.txt @@ -0,0 +1,7 @@ +# The following five lines of boilerplate have to be in your project's +# CMakeLists in this exact order for cmake to work correctly +cmake_minimum_required(VERSION 3.16) + +set(COMPONENTS main) +include($ENV{IDF_PATH}/tools/cmake/project.cmake) +project(basic_uvc_stream) diff --git a/host/class/uvc/usb_host_uvc/examples/basic_uvc_stream/main/CMakeLists.txt b/host/class/uvc/usb_host_uvc/examples/basic_uvc_stream/main/CMakeLists.txt new file mode 100644 index 00000000..ae64a2dc --- /dev/null +++ b/host/class/uvc/usb_host_uvc/examples/basic_uvc_stream/main/CMakeLists.txt @@ -0,0 +1,3 @@ +idf_component_register(SRCS "basic_uvc_stream.c" + REQUIRES fatfs esp_psram + INCLUDE_DIRS ".") diff --git a/host/class/uvc/usb_host_uvc/examples/basic_uvc_stream/main/basic_uvc_stream.c b/host/class/uvc/usb_host_uvc/examples/basic_uvc_stream/main/basic_uvc_stream.c new file mode 100644 index 00000000..86ad66c1 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/examples/basic_uvc_stream/main/basic_uvc_stream.c @@ -0,0 +1,326 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include +#include +#include +#include +#include + +#include +#include "esp_system.h" +#include "esp_log.h" +#include "esp_err.h" + +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "freertos/semphr.h" +#include "freertos/queue.h" + +#include "usb/usb_host.h" +#include "usb/uvc_host.h" + +#define EXAMPLE_USB_HOST_PRIORITY (15) +#define EXAMPLE_USB_DEVICE_VID (UVC_HOST_ANY_VID) +#define EXAMPLE_USB_DEVICE_PID (UVC_HOST_ANY_PID) +#if CONFIG_SPIRAM +#define EXAMPLE_FRAME_COUNT (3) +#else +#define EXAMPLE_FRAME_COUNT (2) +#endif +#define EXAMPLE_STREAM_FPS (15) +#define EXAMPLE_RECORDING_LENGTH_S (5) // The stream(s) is enabled, run for EXAMPLE_RECORDING_LENGTH_S and then stopped +#define EXAMPLE_NUMBER_OF_STREAMS (2) // This example shows how to control multiple UVC streams. Set this to 1 if you camera offers only 1 stream +#define EXAMPLE_USE_SDCARD (0) // SD card on P4 evaluation board will be initialized + +static const char *TAG = "UVC example"; +static QueueHandle_t rx_frames_queue[EXAMPLE_NUMBER_OF_STREAMS]; +static bool dev_connected = false; + +bool frame_callback(const uvc_host_frame_t *frame, void *user_ctx) +{ + assert(frame); + assert(user_ctx); + QueueHandle_t frame_q = *((QueueHandle_t *)user_ctx); + ESP_LOGD(TAG, "Frame callback! data len: %d", frame->data_len); + BaseType_t result = xQueueSendToBack(frame_q, &frame, 0); + if (pdPASS != result) { + ESP_LOGW(TAG, "Queue full, losing frame"); // This should never happen. We allocated queue with the same size as EXAMPLE_FRAME_COUNT + return true; // We will not process this frame, return it immediately + } + return false; // We only passed the frame to Queue, so we must return false and call uvc_host_frame_return() later +} + +static void stream_callback(const uvc_host_stream_event_data_t *event, void *user_ctx) +{ + switch (event->type) { + case UVC_HOST_TRANSFER_ERROR: + ESP_LOGE(TAG, "USB error has occurred, err_no = %i", event->transfer_error.error); + break; + case UVC_HOST_DEVICE_DISCONNECTED: + ESP_LOGI(TAG, "Device suddenly disconnected"); + dev_connected = false; + ESP_ERROR_CHECK(uvc_host_stream_close(event->device_disconnected.stream_hdl)); + break; + case UVC_HOST_FRAME_BUFFER_OVERFLOW: + ESP_LOGW(TAG, "Frame buffer overflow"); + break; + case UVC_HOST_FRAME_BUFFER_UNDERFLOW: + ESP_LOGW(TAG, "Frame buffer underflow"); + break; + default: + abort(); + break; + } +} + +static void usb_lib_task(void *arg) +{ + while (1) { + // Start handling system events + uint32_t event_flags; + usb_host_lib_handle_events(portMAX_DELAY, &event_flags); + if (event_flags & USB_HOST_LIB_EVENT_FLAGS_NO_CLIENTS) { + usb_host_device_free_all(); + } + if (event_flags & USB_HOST_LIB_EVENT_FLAGS_ALL_FREE) { + ESP_LOGI(TAG, "USB: All devices freed"); + // Continue handling USB events to allow device reconnection + } + } +} + +static void frame_handling_task(void *arg) +{ + const uvc_host_stream_config_t *stream_config = (const uvc_host_stream_config_t *)arg; + QueueHandle_t frame_q = *((QueueHandle_t *)(stream_config->user_ctx)); + const int uvc_index = stream_config->usb.uvc_stream_index; + + while (true) { + uvc_host_stream_hdl_t uvc_stream = NULL; + + ESP_LOGI(TAG, "Opening UVC device 0x%04X:0x%04X-%d\n\t%dx%d@%2.1fFPS...", + stream_config->usb.vid, stream_config->usb.pid, uvc_index, stream_config->vs_format.h_res, stream_config->vs_format.v_res, stream_config->vs_format.fps); + esp_err_t err = uvc_host_stream_open(stream_config, pdMS_TO_TICKS(5000), &uvc_stream); + if (ESP_OK != err) { + ESP_LOGI(TAG, "Failed to open device"); + vTaskDelay(pdMS_TO_TICKS(5000)); + continue; + } + //uvc_host_desc_print(uvc_stream); + dev_connected = true; + ESP_LOGI(TAG, "Device 0x%04X:0x%04X-%d OPENED!", stream_config->usb.vid, stream_config->usb.pid, uvc_index); + vTaskDelay(pdMS_TO_TICKS(100)); + unsigned count = 0; + + // This is the main processing loop. It enables the stream for EXAMPLE_RECORDING_LENGTH_S seconds and then closes it + while (true) { + ESP_LOGI(TAG, "Stream %d start. Iteration %u", uvc_index, count); + count++; + uvc_host_stream_start(uvc_stream); + TickType_t timeout_ticks = pdMS_TO_TICKS(EXAMPLE_RECORDING_LENGTH_S * 1000); + TimeOut_t stream_timeout; + vTaskSetTimeOutState(&stream_timeout); + + do { + uvc_host_frame_t *frame; + if (xQueueReceive(frame_q, &frame, pdMS_TO_TICKS(1000)) == pdPASS) { + ESP_LOGI(TAG, "Stream %d: New frame! Len: %d", uvc_index, frame->data_len); + + // Process the frame data here!! + + uvc_host_frame_return(uvc_stream, frame); + } else { + ESP_LOGW(TAG, "Stream %d: Frame not received on time", uvc_index); + break; + } + } while (xTaskCheckForTimeOut(&stream_timeout, &timeout_ticks) == pdFALSE); + + if (dev_connected) { + // Stop and wait 2 seconds + ESP_LOGI(TAG, "Stream %d stop", uvc_index); + uvc_host_stream_stop(uvc_stream); + vTaskDelay(pdMS_TO_TICKS(2000)); + } + if (!dev_connected) { + ESP_LOGI(TAG, "device disconnected, breaking"); + break; + } + } + } +} + +static const uvc_host_stream_config_t stream_mjpeg_config = { + .event_cb = stream_callback, + .frame_cb = frame_callback, + .user_ctx = &rx_frames_queue[0], + .usb = { + .vid = EXAMPLE_USB_DEVICE_VID, + .pid = EXAMPLE_USB_DEVICE_PID, + .uvc_stream_index = 0, + }, + .vs_format = { + .h_res = 720, + .v_res = 1280, + .fps = 15, + .format = UVC_VS_FORMAT_MJPEG, + }, + .advanced = { + .number_of_frame_buffers = EXAMPLE_FRAME_COUNT, + .frame_size = 0, + .number_of_urbs = 4, + .urb_size = 10 * 1024, + }, +}; + +#if EXAMPLE_NUMBER_OF_STREAMS > 1 +static const uvc_host_stream_config_t stream_h265_config = { + .event_cb = stream_callback, + .frame_cb = frame_callback, + .user_ctx = &rx_frames_queue[1], + .usb = { + .vid = EXAMPLE_USB_DEVICE_VID, + .pid = EXAMPLE_USB_DEVICE_PID, + .uvc_stream_index = 1, + }, + .vs_format = { + .h_res = 1280, + .v_res = 720, + .fps = 15, + .format = UVC_VS_FORMAT_H265, + }, + .advanced = { + .number_of_frame_buffers = EXAMPLE_FRAME_COUNT, + .frame_size = 0, + .number_of_urbs = 4, + .urb_size = 10 * 1024, + }, +}; +#endif // EXAMPLE_NUMBER_OF_STREAMS > 1 + +#if EXAMPLE_USE_SDCARD +#define MOUNT_POINT "/sdcard" +#include "esp_vfs_fat.h" +#include "sdmmc_cmd.h" +#include "driver/sdmmc_host.h" +#include "sd_pwr_ctrl_by_on_chip_ldo.h" +void app_init_sdcard(void) +{ + esp_err_t ret; + // Options for mounting the filesystem. + // If format_if_mount_failed is set to true, SD card will be partitioned and + // formatted in case when mounting fails. + esp_vfs_fat_sdmmc_mount_config_t mount_config = { + .format_if_mount_failed = true, + .max_files = 5, + .allocation_unit_size = 64 * 1024 + }; + sdmmc_card_t *card; + const char mount_point[] = MOUNT_POINT; + ESP_LOGI(TAG, "Initializing SD card"); + + // Use settings defined above to initialize SD card and mount FAT filesystem. + // Note: esp_vfs_fat_sdmmc/sdspi_mount is all-in-one convenience functions. + // Please check its source code and implement error recovery when developing + // production applications. + + ESP_LOGI(TAG, "Using SDMMC peripheral"); + + // By default, SD card frequency is initialized to SDMMC_FREQ_DEFAULT (20MHz) + // For setting a specific frequency, use host.max_freq_khz (range 400kHz - 40MHz for SDMMC) + // Example: for fixed frequency of 10MHz, use host.max_freq_khz = 10000; + sdmmc_host_t host = SDMMC_HOST_DEFAULT(); + + // For SoCs where the SD power can be supplied both via an internal or external (e.g. on-board LDO) power supply. + // When using specific IO pins (which can be used for ultra high-speed SDMMC) to connect to the SD card + // and the internal LDO power supply, we need to initialize the power supply first. + sd_pwr_ctrl_ldo_config_t ldo_config = { + .ldo_chan_id = 4, + }; + sd_pwr_ctrl_handle_t pwr_ctrl_handle = NULL; + + ret = sd_pwr_ctrl_new_on_chip_ldo(&ldo_config, &pwr_ctrl_handle); + if (ret != ESP_OK) { + ESP_LOGE(TAG, "Failed to create a new on-chip LDO power control driver"); + return; + } + host.pwr_ctrl_handle = pwr_ctrl_handle; + host.max_freq_khz = SDMMC_FREQ_HIGHSPEED; + + // This initializes the slot without card detect (CD) and write protect (WP) signals. + // Modify slot_config.gpio_cd and slot_config.gpio_wp if your board has these signals. + sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT(); + + slot_config.width = 4; + slot_config.clk = 43; + slot_config.cmd = 44; + slot_config.d0 = 39; + slot_config.d1 = 40; + slot_config.d2 = 41; + slot_config.d3 = 42; + slot_config.flags |= SDMMC_SLOT_FLAG_INTERNAL_PULLUP; + + ESP_LOGI(TAG, "Mounting filesystem"); + ret = esp_vfs_fat_sdmmc_mount(mount_point, &host, &slot_config, &mount_config, &card); + + if (ret != ESP_OK) { + if (ret == ESP_FAIL) { + ESP_LOGE(TAG, "Failed to mount filesystem. " + "If you want the card to be formatted, set the EXAMPLE_FORMAT_IF_MOUNT_FAILED menuconfig option."); + } else { + ESP_LOGE(TAG, "Failed to initialize the card (%s). " + "Make sure SD card lines have pull-up resistors in place.", esp_err_to_name(ret)); + } + return; + } +} +#endif // EXAMPLE_USE_SDCARD + +/** + * @brief Main application + */ +void app_main(void) +{ + for (int i = 0; i < EXAMPLE_NUMBER_OF_STREAMS; i++) { + rx_frames_queue[i] = xQueueCreate(EXAMPLE_FRAME_COUNT, sizeof(uvc_host_frame_t *)); + assert(rx_frames_queue[i]); + } + +#if EXAMPLE_USE_SDCARD + app_init_sdcard(); +#endif // EXAMPLE_USE_SDCARD + + // Install USB Host driver. Should only be called once in entire application + ESP_LOGI(TAG, "Installing USB Host"); + const usb_host_config_t host_config = { + .skip_phy_setup = false, + .intr_flags = ESP_INTR_FLAG_LEVEL1, + }; + ESP_ERROR_CHECK(usb_host_install(&host_config)); + + // Create a task that will handle USB library events + BaseType_t task_created = xTaskCreatePinnedToCore(usb_lib_task, "usb_lib", 4096, NULL, EXAMPLE_USB_HOST_PRIORITY, NULL, tskNO_AFFINITY); + assert(task_created == pdTRUE); + + ESP_LOGI(TAG, "Installing UVC driver"); + const uvc_host_driver_config_t uvc_driver_config = { + .driver_task_stack_size = 4 * 1024, + .driver_task_priority = EXAMPLE_USB_HOST_PRIORITY + 1, + .xCoreID = tskNO_AFFINITY, + .create_background_task = true, + }; + ESP_ERROR_CHECK(uvc_host_install(&uvc_driver_config)); + + task_created = xTaskCreatePinnedToCore(frame_handling_task, "mjpeg_handling", 4096, (void *)&stream_mjpeg_config, EXAMPLE_USB_HOST_PRIORITY - 2, NULL, tskNO_AFFINITY); + assert(task_created == pdTRUE); + +#if EXAMPLE_NUMBER_OF_STREAMS > 1 + vTaskDelay(pdMS_TO_TICKS(1000)); + task_created = xTaskCreatePinnedToCore(frame_handling_task, "h265_handling", 4096, (void *)&stream_h265_config, EXAMPLE_USB_HOST_PRIORITY - 3, NULL, tskNO_AFFINITY); + assert(task_created == pdTRUE); +#endif // EXAMPLE_USE_SDCARD +} diff --git a/host/class/uvc/usb_host_uvc/examples/basic_uvc_stream/main/idf_component.yml b/host/class/uvc/usb_host_uvc/examples/basic_uvc_stream/main/idf_component.yml new file mode 100644 index 00000000..3a11a613 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/examples/basic_uvc_stream/main/idf_component.yml @@ -0,0 +1,6 @@ +## IDF Component Manager Manifest File +dependencies: + idf: ">=5.0" + usb_host_uvc: + version: "*" + override_path: "../../.." diff --git a/host/class/uvc/usb_host_uvc/examples/basic_uvc_stream/sdkconfig.defaults b/host/class/uvc/usb_host_uvc/examples/basic_uvc_stream/sdkconfig.defaults new file mode 100644 index 00000000..e7f51bad --- /dev/null +++ b/host/class/uvc/usb_host_uvc/examples/basic_uvc_stream/sdkconfig.defaults @@ -0,0 +1,15 @@ +# This file was generated using idf.py save-defconfig. It can be edited manually. +# Espressif IoT Development Framework (ESP-IDF) 5.4.0 Project Minimal Configuration +# +CONFIG_IDF_TARGET="esp32p4" +CONFIG_BOOTLOADER_LOG_COLORS=y +CONFIG_ESP32P4_REV_MIN_0=y +CONFIG_RTC_CLK_SRC_EXT_CRYS=y +CONFIG_RTC_CLK_CAL_CYCLES=1024 +CONFIG_SPIRAM=y +CONFIG_SPIRAM_SPEED_200M=y +CONFIG_LOG_COLORS=y +CONFIG_USB_HOST_CONTROL_TRANSFER_MAX_SIZE=4096 +CONFIG_USB_HOST_HW_BUFFER_BIAS_IN=y +CONFIG_USB_HOST_HUBS_SUPPORTED=y +CONFIG_IDF_EXPERIMENTAL_FEATURES=y diff --git a/host/class/uvc/usb_host_uvc/examples/camera_display/CMakeLists.txt b/host/class/uvc/usb_host_uvc/examples/camera_display/CMakeLists.txt new file mode 100644 index 00000000..c0013acc --- /dev/null +++ b/host/class/uvc/usb_host_uvc/examples/camera_display/CMakeLists.txt @@ -0,0 +1,7 @@ +# The following five lines of boilerplate have to be in your project's +# CMakeLists in this exact order for cmake to work correctly +cmake_minimum_required(VERSION 3.16) + +set(COMPONENTS main) +include($ENV{IDF_PATH}/tools/cmake/project.cmake) +project(camera_display) diff --git a/host/class/uvc/usb_host_uvc/examples/camera_display/main/CMakeLists.txt b/host/class/uvc/usb_host_uvc/examples/camera_display/main/CMakeLists.txt new file mode 100644 index 00000000..5d640894 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/examples/camera_display/main/CMakeLists.txt @@ -0,0 +1,3 @@ +idf_component_register(SRCS "camera_display.c" "yuy2.c" "ra8875_init.c" + REQUIRES usb + INCLUDE_DIRS ".") diff --git a/host/class/uvc/usb_host_uvc/examples/camera_display/main/camera_display.c b/host/class/uvc/usb_host_uvc/examples/camera_display/main/camera_display.c new file mode 100644 index 00000000..91793665 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/examples/camera_display/main/camera_display.c @@ -0,0 +1,252 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include "sdkconfig.h" +#include "esp_err.h" +#include "esp_log.h" +#include "esp_heap_caps.h" +#include "esp_lcd_panel_ops.h" + +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "freertos/semphr.h" +#include "freertos/queue.h" + +#include "display.h" +#include "jpeg_decoder.h" +#include "usb/usb_host.h" +#include "usb/uvc_host.h" + +#define FRAME_H_RES 480 +#define FRAME_V_RES 320 +#define FRAME_FORMAT UVC_VS_FORMAT_MJPEG +#define FRAME_FPS 15 +#define DECODE_EVERY_XTH_FRAME 2 // Every 2nd frame will be decoded and send to display. This save CPU time +#define DECODE_WORKING_BUFFER_SIZE 4000 // We must increase JPEG decoder working buffer size + +#if CONFIG_SPIRAM +#define NUMBER_OF_FRAME_BUFFERS 3 // Number of frames from the camera +#else +#define NUMBER_OF_FRAME_BUFFERS 2 // Number of frames from the camera +#endif + +//@todo make the LCD feature optional + +static uint16_t *fb = NULL; // Framebuffer for decoded data (to LCD) +static const char *TAG = "example"; +static esp_lcd_panel_handle_t display_panel; +static QueueHandle_t frame_q = NULL; // Queue of received frames that are passed to processing task +static SemaphoreHandle_t device_disconnected_sem; +static uvc_host_stream_hdl_t stream; + +void yuy2_to_rgb565(const uint8_t *yuy2, uint16_t *rgb565, int width, int height); + +void stream_callback(const uvc_host_stream_event_data_t *event, void *user_ctx) +{ + switch (event->type) { + case UVC_HOST_TRANSFER_ERROR: + ESP_LOGE(TAG, "USB error"); + break; + case UVC_HOST_DEVICE_DISCONNECTED: + ESP_LOGW(TAG, "Device disconnected"); + ESP_ERROR_CHECK(uvc_host_stream_close(event->device_disconnected.stream_hdl)); + xSemaphoreGive(device_disconnected_sem); + break; + case UVC_HOST_FRAME_BUFFER_OVERFLOW: + ESP_LOGW(TAG, "Frame buffer overflow"); + break; + case UVC_HOST_FRAME_BUFFER_UNDERFLOW: + ESP_LOGW(TAG, "Frame buffer underflow"); + break; + default: + abort(); + break; + } +} + +bool frame_callback(const uvc_host_frame_t *frame, void *user_ctx) +{ + bool frame_processed = false; // If we return false from this callback, we must return the frame with uvc_host_frame_return(stream, frame); + + switch (frame->vs_format.format) { + case UVC_VS_FORMAT_YUY2: { + ESP_LOGD(TAG, "YUY2 frame %dx%d", frame->vs_format.h_res, frame->vs_format.v_res); + if (fb) { + yuy2_to_rgb565(frame->data, fb, frame->vs_format.h_res, frame->vs_format.v_res); + esp_lcd_panel_draw_bitmap(display_panel, 0, 0, frame->vs_format.h_res, frame->vs_format.v_res, (const void *)fb); + } + frame_processed = true; + break; + } + case UVC_VS_FORMAT_H264: + case UVC_VS_FORMAT_H265: + case UVC_VS_FORMAT_MJPEG: { + // Attempt to put the new frame into the queue without checking if it is full. + // If successful, we save processing time since we avoid the overhead of a full check for every frame. + BaseType_t frame_put_to_queue = xQueueSendToBack(frame_q, &frame, 0); + + // Adding the frame to our queue should never fail, because our frame_q has the same length as the UVC driver queue (NUMBER_OF_FRAME_BUFFERS) + assert(frame_put_to_queue == pdPASS); + break; + } + default: + ESP_LOGI(TAG, "Unsupported format!"); + break; + } + return frame_processed; +} + +static void processing_task(void *pvParameters) +{ + uvc_host_frame_t *frame; + uint8_t *jpeg_working_buffer = malloc(DECODE_WORKING_BUFFER_SIZE); + assert(jpeg_working_buffer); + + while (1) { + xQueueReceive(frame_q, &frame, portMAX_DELAY); + ESP_LOGD(TAG, "MJPEG frame %dx%d %d bytes", frame->vs_format.h_res, frame->vs_format.v_res, frame->data_len); + + static int frame_i = 0; + if (fb && ((frame_i % DECODE_EVERY_XTH_FRAME) == 0)) { + frame_i = 0; + esp_jpeg_image_cfg_t jpeg_cfg = { + .indata = (uint8_t *)frame->data, + .indata_size = frame->data_len, + .outbuf = (uint8_t *)fb, + .outbuf_size = FRAME_H_RES * FRAME_V_RES * 2, + .out_format = JPEG_IMAGE_FORMAT_RGB565, + .out_scale = JPEG_IMAGE_SCALE_0, + .flags = { + .swap_color_bytes = 0, + }, + .advanced = { + .working_buffer = jpeg_working_buffer, + .working_buffer_size = DECODE_WORKING_BUFFER_SIZE, + }, + }; + esp_jpeg_image_output_t outimg; + + if (ESP_OK == esp_jpeg_decode(&jpeg_cfg, &outimg)) { + esp_lcd_panel_draw_bitmap(display_panel, 0, 0, outimg.width, outimg.height, (const void *)fb); + } else { + ESP_LOGW(TAG, "Decoding failed"); + } + } else { + ESP_LOGI(TAG, "Skipping decoding of received MJPEG frame"); + } + frame_i++; + + uvc_host_frame_return(stream, frame); + } + + // This code should never be reached. Leaving it here for completeness + free(jpeg_working_buffer); + vTaskDelete(NULL); +} + +static void usb_lib_task(void *arg) +{ + while (1) { + // Start handling system events + uint32_t event_flags; + usb_host_lib_handle_events(portMAX_DELAY, &event_flags); + if (event_flags & USB_HOST_LIB_EVENT_FLAGS_NO_CLIENTS) { + usb_host_device_free_all(); + } + if (event_flags & USB_HOST_LIB_EVENT_FLAGS_ALL_FREE) { + ESP_LOGI(TAG, "USB: All devices freed"); + // Continue handling USB events to allow device reconnection + } + } +} + +void app_main(void) +{ + // BSP stuff + esp_lcd_panel_io_handle_t display_io; + const bsp_display_config_t config = { + .max_transfer_sz = BSP_LCD_H_RES * BSP_LCD_V_RES * 2, + }; + bsp_display_new(&config, &display_panel, &display_io); + + //@todo does not work in PSRAM... :'( + fb = heap_caps_aligned_alloc(64, FRAME_H_RES * FRAME_V_RES * 2, MALLOC_CAP_INTERNAL); + if (fb == NULL) { + ESP_LOGW(TAG, "Insufficient memory for LCD frame buffer. LCD output disabled."); + } + + frame_q = xQueueCreate(NUMBER_OF_FRAME_BUFFERS, sizeof (uvc_host_frame_t *)); + device_disconnected_sem = xSemaphoreCreateBinary(); + assert(device_disconnected_sem && frame_q); + + // Install USB Host driver. Should only be called once in entire application + ESP_LOGI(TAG, "Installing USB Host"); + const usb_host_config_t host_config = { + .skip_phy_setup = false, + .intr_flags = ESP_INTR_FLAG_LEVEL1, + }; + ESP_ERROR_CHECK(usb_host_install(&host_config)); + + // Create a task that will handle USB library events + if (xTaskCreate(usb_lib_task, "usb_lib", 4096, NULL, 10, NULL) != pdTRUE) { + ESP_LOGE(TAG, "Creating USB host lib task failed"); + abort(); + } + + // UVC driver install + const uvc_host_driver_config_t uvc_driver_config = { + .driver_task_stack_size = 6 * 1024, + .driver_task_priority = 6, + .xCoreID = tskNO_AFFINITY, + .create_background_task = true, + }; + ESP_ERROR_CHECK(uvc_host_install(&uvc_driver_config)); + + // UVC Stream init + const uvc_host_stream_config_t uvc_stream_config = { + .event_cb = stream_callback, + .frame_cb = frame_callback, + .user_ctx = NULL, + .usb = { + .vid = 0, + .pid = 0, + .uvc_stream_index = 0, + }, + .vs_format = { + .h_res = FRAME_H_RES, + .v_res = FRAME_V_RES, + .fps = FRAME_FPS, + .format = FRAME_FORMAT, + }, + .advanced = { + .number_of_frame_buffers = NUMBER_OF_FRAME_BUFFERS, + .frame_size = 30 * 1024, +#if CONFIG_SPIRAM + .frame_heap_caps = MALLOC_CAP_SPIRAM, +#else + .frame_heap_caps = 0, +#endif + .number_of_urbs = 3, + .urb_size = 4 * 1024, + }, + }; + + BaseType_t ret = xTaskCreate(processing_task, "frame_process", 4 * 1024, NULL, 2, NULL); + assert(ret == pdPASS); + + while (true) { + ESP_LOGI(TAG, "Opening the stream..."); + esp_err_t err = uvc_host_stream_open(&uvc_stream_config, pdMS_TO_TICKS(5000), &stream); + if (ESP_OK != err) { + ESP_LOGI(TAG, "Failed to open device"); + continue; + } + + ESP_ERROR_CHECK(uvc_host_stream_start(stream)); + xSemaphoreTake(device_disconnected_sem, portMAX_DELAY); + } +} diff --git a/host/class/uvc/usb_host_uvc/examples/camera_display/main/display.h b/host/class/uvc/usb_host_uvc/examples/camera_display/main/display.h new file mode 100644 index 00000000..7a315378 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/examples/camera_display/main/display.h @@ -0,0 +1,77 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * @file + * @brief BSP LCD + * + * This file offers API for basic LCD control. + * It is useful for users who want to use the LCD without the default Graphical Library LVGL. + * + * For standard LCD initialization with LVGL graphical library, you can call all-in-one function bsp_display_start(). + */ + +#pragma once + +#include "esp_err.h" +#include "esp_lcd_types.h" + +/* LCD color formats */ +#define ESP_LCD_COLOR_FORMAT_RGB565 (1) +#define ESP_LCD_COLOR_FORMAT_RGB888 (2) + +/* LCD display color format */ +#define BSP_LCD_COLOR_FORMAT (ESP_LCD_COLOR_FORMAT_RGB565) +/* LCD display color bytes endianness */ +#define BSP_LCD_BIGENDIAN (1) +/* LCD display color bits */ +#define BSP_LCD_BITS_PER_PIXEL (16) +/* LCD display color space */ +#define BSP_LCD_COLOR_SPACE (ESP_LCD_COLOR_SPACE_BGR) +/* LCD definition */ +#define BSP_LCD_H_RES (800) +#define BSP_LCD_V_RES (480) + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief BSP display configuration structure + * + */ +typedef struct { + int max_transfer_sz; /*!< Maximum transfer size, in bytes. */ +} bsp_display_config_t; + +/** + * @brief Create new display panel + * + * For maximum flexibility, this function performs only reset and initialization of the display. + * You must turn on the display explicitly by calling esp_lcd_panel_disp_on_off(). + * The display's backlight is not turned on either. You can use bsp_display_backlight_on/off(), + * bsp_display_brightness_set() (on supported boards) or implement your own backlight control. + * + * If you want to free resources allocated by this function, you can use esp_lcd API, ie.: + * + * \code{.c} + * esp_lcd_panel_del(panel); + * esp_lcd_panel_io_del(io); + * spi_bus_free(spi_num_from_configuration); + * \endcode + * + * @param[in] config display configuration + * @param[out] ret_panel esp_lcd panel handle + * @param[out] ret_io esp_lcd IO handle + * @return + * - ESP_OK On success + * - Else esp_lcd failure + */ +esp_err_t bsp_display_new(const bsp_display_config_t *config, esp_lcd_panel_handle_t *ret_panel, esp_lcd_panel_io_handle_t *ret_io); + +#ifdef __cplusplus +} +#endif diff --git a/host/class/uvc/usb_host_uvc/examples/camera_display/main/idf_component.yml b/host/class/uvc/usb_host_uvc/examples/camera_display/main/idf_component.yml new file mode 100644 index 00000000..9a47829e --- /dev/null +++ b/host/class/uvc/usb_host_uvc/examples/camera_display/main/idf_component.yml @@ -0,0 +1,8 @@ +## IDF Component Manager Manifest File +dependencies: + idf: ">=5.3" + espressif/esp_lcd_ra8875: "*" + espressif/esp_jpeg: "~1.2" + usb_host_uvc: + version: "*" + override_path: "../../.." diff --git a/host/class/uvc/usb_host_uvc/examples/camera_display/main/ra8875_init.c b/host/class/uvc/usb_host_uvc/examples/camera_display/main/ra8875_init.c new file mode 100644 index 00000000..4b456d88 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/examples/camera_display/main/ra8875_init.c @@ -0,0 +1,136 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include "esp_err.h" +#include "esp_log.h" +#include "esp_check.h" +#include "esp_lcd_panel_io.h" +#include "esp_lcd_panel_vendor.h" +#include "esp_lcd_panel_ops.h" +#include "esp_lcd_ra8875.h" +#include "display.h" + +/* Display */ +#define BSP_LCD_DB0 (13) +#define BSP_LCD_DB1 (12) +#define BSP_LCD_DB2 (11) +#define BSP_LCD_DB3 (10) +#define BSP_LCD_DB4 (9) +#define BSP_LCD_DB5 (46) +#define BSP_LCD_DB6 (3) +#define BSP_LCD_DB7 (8) +#define BSP_LCD_DB8 (18) +#define BSP_LCD_DB9 (17) +#define BSP_LCD_DB10 (16) +#define BSP_LCD_DB11 (15) +#define BSP_LCD_DB12 (7) +#define BSP_LCD_DB13 (6) +#define BSP_LCD_DB14 (5) +#define BSP_LCD_DB15 (4) +#define BSP_LCD_CS (-1) +#define BSP_LCD_DC (37) +#define BSP_LCD_WR (38) +#define BSP_LCD_RD (-1) +#define BSP_LCD_RST (39) +#define BSP_LCD_WAIT (1) +#define BSP_LCD_BL (-1) +#define BSP_LCD_TP_INT (2) + +// Bit number used to represent command and parameter +#define LCD_CMD_BITS 16 +#define LCD_PARAM_BITS 8 +#define BSP_LCD_PIXEL_CLOCK_HZ (20 * 1000 * 1000) +#define BSP_LCD_WIDTH (16) + +static const char *TAG = "display"; + +esp_err_t bsp_display_new(const bsp_display_config_t *config, esp_lcd_panel_handle_t *ret_panel, esp_lcd_panel_io_handle_t *ret_io) +{ + esp_err_t ret = ESP_OK; + + ESP_LOGD(TAG, "Initialize Intel 8080 bus"); + /* Init Intel 8080 bus */ + esp_lcd_i80_bus_handle_t i80_bus = NULL; + esp_lcd_i80_bus_config_t bus_config = { + .clk_src = LCD_CLK_SRC_PLL160M, + .dc_gpio_num = BSP_LCD_DC, + .wr_gpio_num = BSP_LCD_WR, + .data_gpio_nums = { + BSP_LCD_DB0, + BSP_LCD_DB1, + BSP_LCD_DB2, + BSP_LCD_DB3, + BSP_LCD_DB4, + BSP_LCD_DB5, + BSP_LCD_DB6, + BSP_LCD_DB7, + BSP_LCD_DB8, + BSP_LCD_DB9, + BSP_LCD_DB10, + BSP_LCD_DB11, + BSP_LCD_DB12, + BSP_LCD_DB13, + BSP_LCD_DB14, + BSP_LCD_DB15, + }, + .bus_width = BSP_LCD_WIDTH, + .max_transfer_bytes = config->max_transfer_sz, + .dma_burst_size = 64, + }; + ESP_RETURN_ON_ERROR(esp_lcd_new_i80_bus(&bus_config, &i80_bus), TAG, "I80 init failed"); + + ESP_LOGD(TAG, "Install panel IO"); + esp_lcd_panel_io_i80_config_t io_config = { + .cs_gpio_num = BSP_LCD_CS, + .pclk_hz = BSP_LCD_PIXEL_CLOCK_HZ, + .trans_queue_depth = 10, + .dc_levels = { + .dc_idle_level = 0, + .dc_cmd_level = 1, + .dc_dummy_level = 0, + .dc_data_level = 0, + }, + .flags = { + .swap_color_bytes = 1, + .pclk_idle_low = 0, + }, + .lcd_cmd_bits = LCD_CMD_BITS, + .lcd_param_bits = LCD_PARAM_BITS, + }; + ESP_GOTO_ON_ERROR(esp_lcd_new_panel_io_i80(i80_bus, &io_config, ret_io), err, TAG, "New panel IO failed"); + + ESP_LOGD(TAG, "Install LCD driver of RA8875"); + const esp_lcd_panel_ra8875_config_t vendor_config = { + .wait_gpio_num = BSP_LCD_WAIT, + .lcd_width = BSP_LCD_H_RES, + .lcd_height = BSP_LCD_V_RES, + .mcu_bit_interface = BSP_LCD_WIDTH, + }; + esp_lcd_panel_dev_config_t panel_config = { + .reset_gpio_num = BSP_LCD_RST, + .color_space = ESP_LCD_COLOR_SPACE_RGB, + .bits_per_pixel = 16, + .vendor_config = (void *) &vendor_config, + }; + ESP_GOTO_ON_ERROR(esp_lcd_new_panel_ra8875(*ret_io, &panel_config, ret_panel), err, TAG, "New panel RA8875 failed"); + + ESP_GOTO_ON_ERROR(esp_lcd_panel_reset(*ret_panel), err, TAG, ""); + ESP_GOTO_ON_ERROR(esp_lcd_panel_init(*ret_panel), err, TAG, ""); + ESP_GOTO_ON_ERROR(esp_lcd_panel_disp_on_off(*ret_panel, true), err, TAG, ""); + return ret; + +err: + if (*ret_panel) { + esp_lcd_panel_del(*ret_panel); + } + if (*ret_io) { + esp_lcd_panel_io_del(*ret_io); + } + if (i80_bus) { + esp_lcd_del_i80_bus(i80_bus); + } + return ret; +} diff --git a/host/class/uvc/usb_host_uvc/examples/camera_display/main/yuy2.c b/host/class/uvc/usb_host_uvc/examples/camera_display/main/yuy2.c new file mode 100644 index 00000000..49896c0e --- /dev/null +++ b/host/class/uvc/usb_host_uvc/examples/camera_display/main/yuy2.c @@ -0,0 +1,50 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +#include +#include "esp_attr.h" + +// Clamp the value between 0 and 255 +static uint8_t clamp(int value) +{ + if (value < 0) { + return 0; + } + if (value > 255) { + return 255; + } + return (uint8_t)value; +} + +// Convert YUV to RGB +void IRAM_ATTR yuy2_to_rgb565(const uint8_t *yuy2, uint16_t *rgb565, int width, int height) +{ + int size = width * height; + + for (int i = 0; i < size; i += 2) { + int y0 = yuy2[i * 2 + 0]; + int u = yuy2[i * 2 + 1]; + int y1 = yuy2[i * 2 + 2]; + int v = yuy2[i * 2 + 3]; + + // Convert YUV to RGB for the first pixel + int c0 = y0 - 16; + int c1 = y1 - 16; + int d = u - 128; + int e = v - 128; + + int r0 = clamp((298 * c0 + 409 * e + 128) >> 8); + int g0 = clamp((298 * c0 - 100 * d - 208 * e + 128) >> 8); + int b0 = clamp((298 * c0 + 516 * d + 128) >> 8); + + int r1 = clamp((298 * c1 + 409 * e + 128) >> 8); + int g1 = clamp((298 * c1 - 100 * d - 208 * e + 128) >> 8); + int b1 = clamp((298 * c1 + 516 * d + 128) >> 8); + + // Convert RGB888 to RGB565 for both pixels + rgb565[i] = ((r0 >> 3) << 11) | ((g0 >> 2) << 5) | (b0 >> 3); + rgb565[i + 1] = ((r1 >> 3) << 11) | ((g1 >> 2) << 5) | (b1 >> 3); + } +} diff --git a/host/class/uvc/usb_host_uvc/examples/camera_display/sdkconfig.defaults b/host/class/uvc/usb_host_uvc/examples/camera_display/sdkconfig.defaults new file mode 100644 index 00000000..ba48f696 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/examples/camera_display/sdkconfig.defaults @@ -0,0 +1,18 @@ +# This file was generated using idf.py save-defconfig. It can be edited manually. +# Espressif IoT Development Framework (ESP-IDF) 5.5.0 Project Minimal Configuration +# +CONFIG_IDF_TARGET="esp32s3" +CONFIG_BOOTLOADER_FLASH_DC_AWARE=y +CONFIG_ESPTOOLPY_FLASHMODE_QIO=y +CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y +CONFIG_COMPILER_OPTIMIZATION_PERF=y +CONFIG_SPIRAM=y +CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=1024 +CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y +CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y +CONFIG_ESP_CONSOLE_SECONDARY_NONE=y +CONFIG_USB_HOST_CONTROL_TRANSFER_MAX_SIZE=3000 +CONFIG_USB_HOST_HW_BUFFER_BIAS_IN=y +CONFIG_JD_USE_ROM=n +CONFIG_JD_FORMAT_RGB565=y +CONFIG_JD_DEFAULT_HUFFMAN=y diff --git a/host/class/uvc/usb_host_uvc/host_test/CMakeLists.txt b/host/class/uvc/usb_host_uvc/host_test/CMakeLists.txt index 0347c762..06edd36a 100644 --- a/host/class/uvc/usb_host_uvc/host_test/CMakeLists.txt +++ b/host/class/uvc/usb_host_uvc/host_test/CMakeLists.txt @@ -5,7 +5,6 @@ set(COMPONENTS main) list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/mocks/usb/" - "$ENV{IDF_PATH}/tools/mocks/freertos/" ) - +add_definitions("-DCMOCK_MEM_DYNAMIC") # We need a lot of memory for our frame buffers project(host_test_usb_uvc) diff --git a/host/class/uvc/usb_host_uvc/host_test/README.md b/host/class/uvc/usb_host_uvc/host_test/README.md index 32ab66fe..35948e7d 100644 --- a/host/class/uvc/usb_host_uvc/host_test/README.md +++ b/host/class/uvc/usb_host_uvc/host_test/README.md @@ -4,7 +4,8 @@ # Description This directory contains test code for `USB Host UVC` driver. Namely: -* Simple public API call with mocked USB component to test Linux build and Cmock run for this class driver +* Descriptor parsing +* Frame transfers handling Tests are written using [Catch2](https://github.com/catchorg/Catch2) test framework, use CMock, so you must install Ruby on your machine to run them. diff --git a/host/class/uvc/usb_host_uvc/host_test/main/CMakeLists.txt b/host/class/uvc/usb_host_uvc/host_test/main/CMakeLists.txt index 6fa86b66..cc75fa3e 100644 --- a/host/class/uvc/usb_host_uvc/host_test/main/CMakeLists.txt +++ b/host/class/uvc/usb_host_uvc/host_test/main/CMakeLists.txt @@ -1,9 +1,9 @@ -idf_component_register(SRC_DIRS . +idf_component_register(SRC_DIRS . parsing streaming REQUIRES cmock usb - INCLUDE_DIRS . + INCLUDE_DIRS . parsing streaming PRIV_INCLUDE_DIRS "../../private_include" WHOLE_ARCHIVE) # Currently 'main' for IDF_TARGET=linux is defined in freertos component. # Since we are using a freertos mock here, need to let Catch2 provide 'main'. -target_link_libraries(${COMPONENT_LIB} PRIVATE Catch2WithMain) +# target_link_libraries(${COMPONENT_LIB} PRIVATE Catch2WithMain) # We don't mock FreeRTOS for now diff --git a/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/anker_powerconf_c200.hpp b/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/anker_powerconf_c200.hpp new file mode 100644 index 00000000..fef81d01 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/anker_powerconf_c200.hpp @@ -0,0 +1,1809 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include + +/* + ======================== USB Device ======================== + + +++++++++++++++++ Device Information ++++++++++++++++++ +Device Description : USB Composite Device +Device ID : USB\VID_291A&PID_3369\ACNV9P0D12366611 +Hardware IDs : USB\VID_291A&PID_3369&REV_0105 USB\VID_291A&PID_3369 +Driver KeyName : {36fc9e60-c465-11cf-8056-444553540000}\0097 (GUID_DEVCLASS_USB) +Driver : \SystemRoot\System32\drivers\usbccgp.sys (Version: 10.0.19041.4474 Date: 2024-06-13) +Driver Inf : C:\Windows\inf\usb.inf +Legacy BusType : PNPBus +Class : USB +Class GUID : {36fc9e60-c465-11cf-8056-444553540000} (GUID_DEVCLASS_USB) +Service : usbccgp +Enumerator : USB +Location Info : Port_#0002.Hub_#0012 +Location IDs : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(4)#USB(2), ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(4)#USB(2) +Container ID : {1311548a-a58a-5e7e-8a3d-947dad1a9988} +Manufacturer Info : (Standard USB Host Controller) +Capabilities : 0x94 (Removable, UniqueID, SurpriseRemovalOK) +Status : 0x0180600A (DN_DRIVER_LOADED, DN_STARTED, DN_DISABLEABLE, DN_REMOVABLE, DN_NT_ENUMERATOR, DN_NT_DRIVER) +Problem Code : 0 +Address : 2 +HcDisableSelectiveSuspend: 0 +EnableSelectiveSuspend : 0 +SelectiveSuspendEnabled : 0 +EnhancedPowerMgmtEnabled : 0 +IdleInWorkingState : 0 +WakeFromSleepState : 0 +Power State : D0 (supported: D0, D3, wake from D0) + Child Device 1 : Anker PowerConf C200 (USB Video Device) + Device Path 1 : \\?\USB#VID_291A&PID_3369&MI_00#a&1dd8ee0f&0&0000#{6994ad05-93ef-11d0-a3cc-00a0c9223196}\global (AM_KSCATEGORY_VIDEO) + Device Path 2 : \\?\USB#VID_291A&PID_3369&MI_00#a&1dd8ee0f&0&0000#{6994ad05-93ef-11d0-a3cc-00a0c9223196}\global (AM_KSCATEGORY_VIDEO) + Kernel Name : \Device\00000316 + Device ID : USB\VID_291A&PID_3369&MI_00\A&1DD8EE0F&0&0000 + Class : Camera + Driver KeyName : {ca3e7ab9-b4c3-4ae6-8251-579ef933890f}\0007 (GUID_DEVCLASS_CAMERA) + Service : usbvideo + Location : 0005.0000.0004.001.003.004.002.000.000 + LocationPaths : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(4)#USB(2)#USBMI(0) PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(4)#USB(2)#USB(2) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(4)#USB(2)#USBMI(0) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(4)#USB(2)#USB(2) + Child Device 2 : Anker PowerConf C200 (USB Audio Device) + Device Path 1 : \\?\USB#VID_291A&PID_3369&MI_02#a&1dd8ee0f&0&0002#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global (AM_KSCATEGORY_CAPTURE) + Device Path 2 : \\?\USB#VID_291A&PID_3369&MI_02#a&1dd8ee0f&0&0002#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global (AM_KSCATEGORY_CAPTURE) + Kernel Name : \Device\00000317 + Device ID : USB\VID_291A&PID_3369&MI_02\A&1DD8EE0F&0&0002 + Class : MEDIA + Driver KeyName : {4d36e96c-e325-11ce-bfc1-08002be10318}\0009 (GUID_DEVCLASS_MEDIA) + Service : usbaudio + Location : 0005.0000.0004.001.003.004.002.000.000 + LocationPaths : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(4)#USB(2)#USBMI(2) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(4)#USB(2)#USBMI(2) + Child Device 1 : Microphone (Anker PowerConf C200) (Audio Endpoint) + Device ID : SWD\MMDEVAPI\{0.0.1.00000000}.{998B6389-80E3-4E24-9511-1AFDEA804715} + Class : AudioEndpoint + Driver KeyName : {c166523c-fe0c-4a94-a586-f1a80cfbbf3e}\0038 (AUDIOENDPOINT_CLASS_UUID) + Child Device 3 : USB Input Device + Device ID : USB\VID_291A&PID_3369&MI_04\A&1DD8EE0F&0&0004 + Class : HIDClass + Driver KeyName : {745a17a0-74d3-11d0-b6fe-00a0c90f57da}\0042 (GUID_DEVCLASS_HIDCLASS) + Service : HidUsb + Location : 0005.0000.0004.001.003.004.002.000.000 + LocationPaths : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(4)#USB(2)#USBMI(4) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(4)#USB(2)#USBMI(4) + Child Device 1 : HID-compliant device + Device Path : \\?\HID#VID_291A&PID_3369&MI_04#b&20947516&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030} (GUID_DEVINTERFACE_HID) + Kernel Name : \Device\0000031b + Device ID : HID\VID_291A&PID_3369&MI_04\B&20947516&0&0000 + Class : HIDClass + Driver KeyName : {745a17a0-74d3-11d0-b6fe-00a0c90f57da}\0043 (GUID_DEVCLASS_HIDCLASS) + + +++++++++++++++++ Registry USB Flags +++++++++++++++++ +HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags\291A33690105 + osvc : REG_BINARY 00 00 + + ---------------- Connection Information --------------- +Connection Index : 0x02 (Port 2) +Connection Status : 0x01 (DeviceConnected) +Current Config Value : 0x01 (Configuration 1) +Device Address : 0x09 (9) +Is Hub : 0x00 (no) +Device Bus Speed : 0x02 (High-Speed) +Number Of Open Pipes : 0x03 (3 pipes to data endpoints) +Pipe[0] : EndpointID=1 Direction=IN ScheduleOffset=0 Type=Interrupt +Pipe[1] : EndpointID=3 Direction=IN ScheduleOffset=0 Type=Interrupt +Pipe[2] : EndpointID=1 Direction=OUT ScheduleOffset=0 Type=Interrupt +Data (HexDump) : 02 00 00 00 12 01 00 02 EF 02 01 40 1A 29 69 33 ...........@.)i3 + 05 01 01 02 03 01 01 02 00 09 00 03 00 00 00 01 ................ + 00 00 00 07 05 81 03 10 00 08 00 00 00 00 07 05 ................ + 83 03 00 04 04 00 00 00 00 07 05 01 03 00 04 04 ................ + 00 00 00 00 .... + + --------------- Connection Information V2 ------------- +Connection Index : 0x02 (2) +Length : 0x10 (16 bytes) +SupportedUsbProtocols : 0x03 + Usb110 : 1 (yes, port supports USB 1.1) + Usb200 : 1 (yes, port supports USB 2.0) + Usb300 : 0 (no, port not supports USB 3.0) + ReservedMBZ : 0x00 +Flags : 0x00 + DevIsOpAtSsOrHigher : 0 (Device is not operating at SuperSpeed or higher) + DevIsSsCapOrHigher : 0 (Device is not SuperSpeed capable or higher) + DevIsOpAtSsPlusOrHigher : 0 (Device is not operating at SuperSpeedPlus or higher) + DevIsSsPlusCapOrHigher : 0 (Device is not SuperSpeedPlus capable or higher) + ReservedMBZ : 0x00 +Data (HexDump) : 02 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 ................ + + ---------------------- Device Descriptor ---------------------- +bLength : 0x12 (18 bytes) +bDescriptorType : 0x01 (Device Descriptor) +bcdUSB : 0x200 (USB Version 2.00) +bDeviceClass : 0xEF (Miscellaneous) +bDeviceSubClass : 0x02 +bDeviceProtocol : 0x01 (IAD - Interface Association Descriptor) +bMaxPacketSize0 : 0x40 (64 bytes) +idVendor : 0x291A (Anker Innovations Limited) +idProduct : 0x3369 +bcdDevice : 0x0105 +iManufacturer : 0x01 (String Descriptor 1) + Language 0x0409 : "Anker PowerConf C200" +iProduct : 0x02 (String Descriptor 2) + Language 0x0409 : "Anker PowerConf C200" +iSerialNumber : 0x03 (String Descriptor 3) + Language 0x0409 : "ACNV9P0D12366611" +bNumConfigurations : 0x01 (1 Configuration) +Data (HexDump) : 12 01 00 02 EF 02 01 40 1A 29 69 33 05 01 01 02 .......@.)i3.... + 03 01 .. + + ------------------ Configuration Descriptor ------------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x02 (Configuration Descriptor) +wTotalLength : 0x0349 (841 bytes) +bNumInterfaces : 0x05 (5 Interfaces) +bConfigurationValue : 0x01 (Configuration 1) +iConfiguration : 0x00 (No String Descriptor) +bmAttributes : 0xC0 + D7: Reserved, set 1 : 0x01 + D6: Self Powered : 0x01 (yes) + D5: Remote Wakeup : 0x00 (no) + D4..0: Reserved, set 0 : 0x00 +MaxPower : 0x64 (200 mA) +Data (HexDump) : 09 02 49 03 05 01 00 C0 64 08 0B 00 02 0E 03 00 ..I.....d....... + 04 09 04 00 00 01 0E 01 00 04 0D 24 01 10 01 50 ...........$...P + 00 00 6C DC 02 01 01 12 24 02 01 01 02 00 00 00 ..l.....$....... + 00 00 00 00 00 03 2A 8A 02 0C 24 05 02 01 00 40 ......*...$....@ + 02 7F 14 00 00 1C 24 06 06 A2 9E 76 41 DE 04 47 ......$....vA..G + E3 8B 2B F4 34 1A FF 00 3B 0F 01 02 03 00 F8 27 ..+.4...;......' + 00 09 24 03 03 01 01 00 04 00 07 05 81 03 10 00 ..$............. + 08 05 25 03 10 00 09 04 01 00 00 0E 02 00 00 10 ..%............. + 24 01 03 2E 02 88 00 03 02 01 01 01 00 04 00 0B $............... + 24 06 01 06 00 01 00 00 00 00 1E 24 07 01 00 00 $..........$.... + 0A A0 05 00 00 65 04 00 00 65 04 00 80 70 00 15 .....e...e...p.. + 16 05 00 01 15 16 05 00 1E 24 07 02 00 80 07 38 .........$.....8 + 04 00 D0 78 02 00 D0 78 02 00 48 3F 00 15 16 05 ...x...x..H?.... + 00 01 15 16 05 00 1E 24 07 03 00 00 05 D0 02 00 .......$........ + 40 19 01 00 40 19 01 00 20 1C 00 15 16 05 00 01 @...@... ....... + 15 16 05 00 1E 24 07 04 00 80 02 E0 01 00 C0 5D .....$.........] + 00 00 C0 5D 00 00 60 09 00 15 16 05 00 01 15 16 ...]..`......... + 05 00 1E 24 07 05 00 80 02 68 01 00 50 46 00 00 ...$.....h..PF.. + 50 46 00 00 08 07 00 15 16 05 00 01 15 16 05 00 PF.............. + 1E 24 07 06 00 40 01 F0 00 00 70 17 00 00 70 17 .$...@....p...p. + 00 00 58 02 00 15 16 05 00 01 15 16 05 00 0A 24 ..X............$ + 03 00 01 80 07 38 04 00 1B 24 04 02 03 59 55 59 .....8...$...YUY + 32 00 00 10 00 80 00 00 AA 00 38 9B 71 10 01 00 2.........8.q... + 00 00 00 1E 24 05 01 00 80 02 E0 01 00 C0 5D 00 ....$.........]. + 00 C0 5D 00 00 60 09 00 15 16 05 00 01 15 16 05 ..]..`.......... + 00 1E 24 05 02 00 80 02 68 01 00 50 46 00 00 50 ..$.....h..PF..P + 46 00 00 08 07 00 15 16 05 00 01 15 16 05 00 1E F............... + 24 05 03 00 40 01 F0 00 00 70 17 00 00 70 17 00 $...@....p...p.. + 00 58 02 00 15 16 05 00 01 15 16 05 00 0A 24 03 .X............$. + 00 01 80 07 38 04 00 1C 24 10 03 06 48 32 36 34 ....8...$...H264 + 00 00 10 00 80 00 00 AA 00 38 9B 71 10 01 00 00 .........8.q.... + 00 00 01 1E 24 11 01 00 00 0A A0 05 00 80 32 02 ....$.........2. + 00 80 32 02 15 16 05 00 01 00 00 00 00 15 16 05 ..2............. + 00 1E 24 11 02 00 80 07 38 04 00 68 3C 01 00 68 ..$.....8..h<..h + 3C 01 15 16 05 00 01 00 00 00 00 15 16 05 00 1E <............... + 24 11 03 00 00 05 D0 02 00 A0 8C 00 00 A0 8C 00 $............... + 15 16 05 00 01 00 00 00 00 15 16 05 00 1E 24 11 ..............$. + 04 00 80 02 E0 01 00 E0 2E 00 00 E0 2E 00 15 16 ................ + 05 00 01 00 00 00 00 15 16 05 00 1E 24 11 05 00 ............$... + 80 02 68 01 00 28 23 00 00 28 23 00 15 16 05 00 ..h..(#..(#..... + 01 00 00 00 00 15 16 05 00 1E 24 11 06 00 40 01 ..........$...@. + F0 00 00 B8 0B 00 00 B8 0B 00 15 16 05 00 01 00 ................ + 00 00 00 15 16 05 00 06 24 0D 01 01 04 09 04 01 ........$....... + 01 01 0E 02 00 00 07 05 88 05 00 0C 01 08 0B 02 ................ + 02 01 00 00 05 09 04 02 00 00 01 01 00 05 09 24 ...............$ + 01 00 01 27 00 01 03 0C 24 02 02 01 02 00 02 03 ...'....$....... + 00 00 00 09 24 03 04 01 01 00 06 00 09 24 06 06 ....$........$.. + 02 02 03 00 00 09 04 03 00 00 01 02 00 00 09 04 ................ + 03 01 01 01 02 00 00 07 24 01 04 01 01 00 0B 24 ........$......$ + 02 01 02 02 10 01 80 BB 00 09 05 82 0D C0 00 04 ................ + 00 00 07 25 01 01 01 01 00 09 04 04 00 02 03 00 ...%............ + 00 06 09 21 01 01 00 01 22 23 00 07 05 83 03 00 ...!...."#...... + 04 04 07 05 01 03 00 04 04 ......... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x00 +bInterfaceCount : 0x02 +bFunctionClass : 0x0E (Video) +bFunctionSubClass : 0x03 (Video Interface Collection) +bFunctionProtocol : 0x00 (PC_PROTOCOL_UNDEFINED protocol) +iFunction : 0x04 (String Descriptor 4) + Language 0x0409 : "Anker PowerConf C200" +Data (HexDump) : 08 0B 00 02 0E 03 00 04 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x00 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x01 (Video Control) +bInterfaceProtocol : 0x00 +iInterface : 0x04 (String Descriptor 4) + Language 0x0409 : "Anker PowerConf C200" +Data (HexDump) : 09 04 00 00 01 0E 01 00 04 ......... + + ------- Video Control Interface Header Descriptor ----- +bLength : 0x0D (13 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x01 (Video Control Header) +bcdUVC : 0x0110 (UVC Version 1.10) +wTotalLength : 0x0050 (80 bytes) +dwClockFreq : 0x02DC6C00 (48 MHz) +bInCollection : 0x01 (1 VideoStreaming interface) +baInterfaceNr[1] : 0x01 +Data (HexDump) : 0D 24 01 10 01 50 00 00 6C DC 02 01 01 .$...P..l.... + + -------- Video Control Input Terminal Descriptor ------ +bLength : 0x12 (18 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (ITT_CAMERA) +bAssocTerminal : 0x00 (Not associated with an Output Terminal) +iTerminal : 0x00 +Camera Input Terminal Data: +wObjectiveFocalLengthMin : 0x0000 +wObjectiveFocalLengthMax : 0x0000 +wOcularFocalLength : 0x0000 +bControlSize : 0x03 +bmControls : 0x2A, 0x8A, 0x02 + D0 : 0 no - Scanning Mode + D1 : 1 yes - Auto-Exposure Mode + D2 : 0 no - Auto-Exposure Priority + D3 : 1 yes - Exposure Time (Absolute) + D4 : 0 no - Exposure Time (Relative) + D5 : 1 yes - Focus (Absolute) + D6 : 0 no - Focus (Relative) + D7 : 0 no - Iris (Absolute) + D8 : 0 no - Iris (Relative) + D9 : 1 yes - Zoom (Absolute) + D10 : 0 no - Zoom (Relative) + D11 : 1 yes - Pan (Absolute) + D12 : 0 no - Pan (Relative) + D13 : 0 no - Roll (Absolute) + D14 : 0 no - Roll (Relative) + D15 : 1 yes - Tilt (Absolute) + D16 : 0 no - Tilt (Relative) + D17 : 1 yes - Focus Auto + D18 : 0 no - Reserved + D19 : 0 no - Reserved + D20 : 0 no - Reserved + D21 : 0 no - Reserved + D22 : 0 no - Reserved + D23 : 0 no - Reserved +Data (HexDump) : 12 24 02 01 01 02 00 00 00 00 00 00 00 00 03 2A .$.............* + 8A 02 .. + + -------- Video Control Processing Unit Descriptor ----- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x05 (Processing Unit) +bUnitID : 0x02 +bSourceID : 0x01 +wMaxMultiplier : 0x4000 (163.84x Zoom) +bControlSize : 0x02 +bmControls : 0x7F, 0x14 + D0 : 1 yes - Brightness + D1 : 1 yes - Contrast + D2 : 1 yes - Hue + D3 : 1 yes - Saturation + D4 : 1 yes - Sharpness + D5 : 1 yes - Gamma + D6 : 1 yes - White Balance Temperature + D7 : 0 no - White Balance Component + D8 : 0 no - Backlight Compensation + D9 : 0 no - Gain + D10 : 1 yes - Power Line Frequency + D11 : 0 no - Hue, Auto + D12 : 1 yes - White Balance Temperature, Auto + D13 : 0 no - White Balance Component, Auto + D14 : 0 no - Digital Multiplier + D15 : 0 no - Digital Multiplier Limit +iProcessing : 0x00 +bmVideoStandards : 0x00 + D0 : 0 no - None + D1 : 0 no - NTSC - 525/60 + D2 : 0 no - PAL - 625/50 + D3 : 0 no - SECAM - 625/50 + D4 : 0 no - NTSC - 625/50 + D5 : 0 no - PAL - 525/60 + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Data (HexDump) : 0C 24 05 02 01 00 40 02 7F 14 00 00 .$....@..... + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1C (28 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x06 +guidExtensionCode : {41769EA2-04DE-E347-8B2B-F4341AFF003B} +bNumControls : 0x0F +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x02 +bControlSize : 0x03 +bmControls : 0x00, 0xF8, 0x27 + D0 : 0 no - Vendor-Specific (Optional) + D1 : 0 no - Vendor-Specific (Optional) + D2 : 0 no - Vendor-Specific (Optional) + D3 : 0 no - Vendor-Specific (Optional) + D4 : 0 no - Vendor-Specific (Optional) + D5 : 0 no - Vendor-Specific (Optional) + D6 : 0 no - Vendor-Specific (Optional) + D7 : 0 no - Vendor-Specific (Optional) + D8 : 0 no - Vendor-Specific (Optional) + D9 : 0 no - Vendor-Specific (Optional) + D10 : 0 no - Vendor-Specific (Optional) + D11 : 1 yes - Vendor-Specific (Optional) + D12 : 1 yes - Vendor-Specific (Optional) + D13 : 1 yes - Vendor-Specific (Optional) + D14 : 1 yes - Vendor-Specific (Optional) + D15 : 1 yes - Vendor-Specific (Optional) + D16 : 1 yes - Vendor-Specific (Optional) + D17 : 1 yes - Vendor-Specific (Optional) + D18 : 1 yes - Vendor-Specific (Optional) + D19 : 0 no - Vendor-Specific (Optional) + D20 : 0 no - Vendor-Specific (Optional) + D21 : 1 yes - Vendor-Specific (Optional) + D22 : 0 no - Vendor-Specific (Optional) + D23 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1C 24 06 06 A2 9E 76 41 DE 04 47 E3 8B 2B F4 34 .$....vA..G..+.4 + 1A FF 00 3B 0F 01 02 03 00 F8 27 00 ...;......'. + + ------- Video Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x03 +wTerminalType : 0x0101 (TT_STREAMING) +bAssocTerminal : 0x00 (Not associated with an Input Terminal) +bSourceID : 0x04 +iTerminal : 0x00 +Data (HexDump) : 09 24 03 03 01 01 00 04 00 .$....... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x03 (TransferType=Interrupt) +wMaxPacketSize : 0x0010 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x10 (16 bytes per packet) +bInterval : 0x08 (8 ms) +Data (HexDump) : 07 05 81 03 10 00 08 ....... + + --- Class-specific VC Interrupt Endpoint Descriptor --- +bLength : 0x05 (5 bytes) +bDescriptorType : 0x25 (Video Control Endpoint) +bDescriptorSubtype : 0x03 (Interrupt) +wMaxTransferSize : 0x0010 (16 bytes) +Data (HexDump) : 05 25 03 10 00 .%... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 00 00 0E 02 00 00 ......... + + ---- VC-Specific VS Video Input Header Descriptor ----- +bLength : 0x10 (16 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x01 (Input Header) +bNumFormats : 0x03 +wTotalLength : 0x022E (558 bytes) +bEndpointAddress : 0x88 (Direction=IN EndpointID=8) +bmInfo : 0x00 (Dynamic Format Change not supported) +bTerminalLink : 0x03 +bStillCaptureMethod : 0x02 (Still Capture Method 2) +nbTriggerSupport : 0x01 (Hardware Triggering is supported) +bTriggerUsage : 0x01 (Host will notify client application of button event) +nbControlSize : 0x01 +Video Payload Format 1 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Video Payload Format 2 : 0x04 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 1 yes - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Video Payload Format 3 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Data (HexDump) : 10 24 01 03 2E 02 88 00 03 02 01 01 01 00 04 00 .$.............. + + ----- Video Streaming MJPEG Format Type Descriptor ---- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x06 (Format MJPEG) +bFormatIndex : 0x01 (1) +bNumFrameDescriptors : 0x06 (6) +bmFlags : 0x00 (Sample size is not fixed) +bDefaultFrameIndex : 0x01 (1) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +*!*ERROR: no Color Matching Descriptor for this format +Data (HexDump) : 0B 24 06 01 06 00 01 00 00 00 00 .$......... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +---> This is the Default (optimum) Frame index +bLength : 0x1E (30 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x0A00 (2560) +wHeight : 0x05A0 (1440) +dwMinBitRate : 0x04650000 (73728000 bps -> 9.216 MB/s) +dwMaxBitRate : 0x04650000 (73728000 bps -> 9.216 MB/s) +dwMaxVideoFrameBufferSize: 0x00708000 (7372800 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x01 (1 discrete frame interval supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +Data (HexDump) : 1E 24 07 01 00 00 0A A0 05 00 00 65 04 00 00 65 .$.........e...e + 04 00 80 70 00 15 16 05 00 01 15 16 05 00 ...p.......... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x1E (30 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x00 +wWidth : 0x0780 (1920) +wHeight : 0x0438 (1080) +dwMinBitRate : 0x0278D000 (41472000 bps -> 5.184 MB/s) +dwMaxBitRate : 0x0278D000 (41472000 bps -> 5.184 MB/s) +dwMaxVideoFrameBufferSize: 0x003F4800 (4147200 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x01 (1 discrete frame interval supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +Data (HexDump) : 1E 24 07 02 00 80 07 38 04 00 D0 78 02 00 D0 78 .$.....8...x...x + 02 00 48 3F 00 15 16 05 00 01 15 16 05 00 ..H?.......... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x1E (30 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x00 +wWidth : 0x0500 (1280) +wHeight : 0x02D0 (720) +dwMinBitRate : 0x01194000 (18432000 bps -> 2.304 MB/s) +dwMaxBitRate : 0x01194000 (18432000 bps -> 2.304 MB/s) +dwMaxVideoFrameBufferSize: 0x001C2000 (1843200 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x01 (1 discrete frame interval supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +Data (HexDump) : 1E 24 07 03 00 00 05 D0 02 00 40 19 01 00 40 19 .$........@...@. + 01 00 20 1C 00 15 16 05 00 01 15 16 05 00 .. ........... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x1E (30 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x005DC000 (6144000 bps -> 768 KB/s) +dwMaxBitRate : 0x005DC000 (6144000 bps -> 768 KB/s) +dwMaxVideoFrameBufferSize: 0x00096000 (614400 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x01 (1 discrete frame interval supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +Data (HexDump) : 1E 24 07 04 00 80 02 E0 01 00 C0 5D 00 00 C0 5D .$.........]...] + 00 00 60 09 00 15 16 05 00 01 15 16 05 00 ..`........... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x1E (30 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x05 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x0168 (360) +dwMinBitRate : 0x00465000 (4608000 bps -> 576 KB/s) +dwMaxBitRate : 0x00465000 (4608000 bps -> 576 KB/s) +dwMaxVideoFrameBufferSize: 0x00070800 (460800 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x01 (1 discrete frame interval supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +Data (HexDump) : 1E 24 07 05 00 80 02 68 01 00 50 46 00 00 50 46 .$.....h..PF..PF + 00 00 08 07 00 15 16 05 00 01 15 16 05 00 .............. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x1E (30 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x06 +bmCapabilities : 0x00 +wWidth : 0x0140 (320) +wHeight : 0x00F0 (240) +dwMinBitRate : 0x00177000 (1536000 bps -> 192 KB/s) +dwMaxBitRate : 0x00177000 (1536000 bps -> 192 KB/s) +dwMaxVideoFrameBufferSize: 0x00025800 (153600 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x01 (1 discrete frame interval supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +Data (HexDump) : 1E 24 07 06 00 40 01 F0 00 00 70 17 00 00 70 17 .$...@....p...p. + 00 00 58 02 00 15 16 05 00 01 15 16 05 00 ..X........... + + ---------- Still Image Frame Type Descriptor ---------- +bLength : 0x0A (10 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x03 (Still Image Frame Type) +bEndpointAddress : 0x00 (no endpoint) +bNumImageSizePatterns : 0x01 (1 Image Size Patterns) +1: wWidth x wHeight : 0x0780 x 0x0438 (1920 x 1080) +bNumCompressionPattern : 0x00 +Data (HexDump) : 0A 24 03 00 01 80 07 38 04 00 .$.....8.. + + ------- VS Uncompressed Format Type Descriptor -------- +bLength : 0x1B (27 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x04 (Uncompressed Format Type) +bFormatIndex : 0x02 (2) +bNumFrameDescriptors : 0x03 (3) +guidFormat : {32595559-0000-0010-8000-00AA00389B71} (YUY2) +bBitsPerPixel : 0x10 (16 bits) +bDefaultFrameIndex : 0x01 (1) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +Data (HexDump) : 1B 24 04 02 03 59 55 59 32 00 00 10 00 80 00 00 .$...YUY2....... + AA 00 38 9B 71 10 01 00 00 00 00 ..8.q...... + + -------- VS Uncompressed Frame Type Descriptor -------- +---> This is the Default (optimum) Frame index +bLength : 0x1E (30 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x005DC000 (6144000 bps -> 768 KB/s) +dwMaxBitRate : 0x005DC000 (6144000 bps -> 768 KB/s) +dwMaxVideoFrameBufferSize: 0x00096000 (614400 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x01 (1 discrete frame interval supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +Data (HexDump) : 1E 24 05 01 00 80 02 E0 01 00 C0 5D 00 00 C0 5D .$.........]...] + 00 00 60 09 00 15 16 05 00 01 15 16 05 00 ..`........... + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x1E (30 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x0168 (360) +dwMinBitRate : 0x00465000 (4608000 bps -> 576 KB/s) +dwMaxBitRate : 0x00465000 (4608000 bps -> 576 KB/s) +dwMaxVideoFrameBufferSize: 0x00070800 (460800 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x01 (1 discrete frame interval supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +Data (HexDump) : 1E 24 05 02 00 80 02 68 01 00 50 46 00 00 50 46 .$.....h..PF..PF + 00 00 08 07 00 15 16 05 00 01 15 16 05 00 .............. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x1E (30 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x00 +wWidth : 0x0140 (320) +wHeight : 0x00F0 (240) +dwMinBitRate : 0x00177000 (1536000 bps -> 192 KB/s) +dwMaxBitRate : 0x00177000 (1536000 bps -> 192 KB/s) +dwMaxVideoFrameBufferSize: 0x00025800 (153600 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x01 (1 discrete frame interval supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +Data (HexDump) : 1E 24 05 03 00 40 01 F0 00 00 70 17 00 00 70 17 .$...@....p...p. + 00 00 58 02 00 15 16 05 00 01 15 16 05 00 ..X........... + + ---------- Still Image Frame Type Descriptor ---------- +bLength : 0x0A (10 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x03 (Still Image Frame Type) +bEndpointAddress : 0x00 (no endpoint) +bNumImageSizePatterns : 0x01 (1 Image Size Patterns) +1: wWidth x wHeight : 0x0780 x 0x0438 (1920 x 1080) +bNumCompressionPattern : 0x00 +Data (HexDump) : 0A 24 03 00 01 80 07 38 04 00 .$.....8.. + + ---- VS Frame Based Payload Format Type Descriptor ---- +bLength : 0x1C (28 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x10 (Frame Based Format Type) +bFormatIndex : 0x03 (3) +bNumFrameDescriptors : 0x06 (6) +guidFormat : {34363248-0000-0010-8000-00AA00389B71} (H264) +bBitsPerPixel : 0x10 (16 bits) +bDefaultFrameIndex : 0x01 (1) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +bVariableSize : 0x01 (Variable Size) +Data (HexDump) : 1C 24 10 03 06 48 32 36 34 00 00 10 00 80 00 00 .$...H264....... + AA 00 38 9B 71 10 01 00 00 00 00 01 ..8.q....... + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x1E (30 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x0A00 (2560) +wHeight : 0x05A0 (1440) +dwMinBitRate : 0x02328000 (36864000 bps -> 4.608 MB/s) +dwMaxBitRate : 0x02328000 (36864000 bps -> 4.608 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x01 (1 discrete frame interval supported) +dwBytesPerLine : 0x00 (0 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +Data (HexDump) : 1E 24 11 01 00 00 0A A0 05 00 80 32 02 00 80 32 .$.........2...2 + 02 15 16 05 00 01 00 00 00 00 15 16 05 00 .............. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x1E (30 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x00 +wWidth : 0x0780 (1920) +wHeight : 0x0438 (1080) +dwMinBitRate : 0x013C6800 (20736000 bps -> 2.592 MB/s) +dwMaxBitRate : 0x013C6800 (20736000 bps -> 2.592 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x01 (1 discrete frame interval supported) +dwBytesPerLine : 0x00 (0 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +Data (HexDump) : 1E 24 11 02 00 80 07 38 04 00 68 3C 01 00 68 3C .$.....8..h<..h< + 01 15 16 05 00 01 00 00 00 00 15 16 05 00 .............. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x1E (30 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x00 +wWidth : 0x0500 (1280) +wHeight : 0x02D0 (720) +dwMinBitRate : 0x008CA000 (9216000 bps -> 1.152 MB/s) +dwMaxBitRate : 0x008CA000 (9216000 bps -> 1.152 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x01 (1 discrete frame interval supported) +dwBytesPerLine : 0x00 (0 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +Data (HexDump) : 1E 24 11 03 00 00 05 D0 02 00 A0 8C 00 00 A0 8C .$.............. + 00 15 16 05 00 01 00 00 00 00 15 16 05 00 .............. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x1E (30 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x002EE000 (3072000 bps -> 384 KB/s) +dwMaxBitRate : 0x002EE000 (3072000 bps -> 384 KB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x01 (1 discrete frame interval supported) +dwBytesPerLine : 0x00 (0 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +Data (HexDump) : 1E 24 11 04 00 80 02 E0 01 00 E0 2E 00 00 E0 2E .$.............. + 00 15 16 05 00 01 00 00 00 00 15 16 05 00 .............. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x1E (30 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x05 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x0168 (360) +dwMinBitRate : 0x00232800 (2304000 bps -> 288 KB/s) +dwMaxBitRate : 0x00232800 (2304000 bps -> 288 KB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x01 (1 discrete frame interval supported) +dwBytesPerLine : 0x00 (0 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +Data (HexDump) : 1E 24 11 05 00 80 02 68 01 00 28 23 00 00 28 23 .$.....h..(#..(# + 00 15 16 05 00 01 00 00 00 00 15 16 05 00 .............. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x1E (30 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x06 +bmCapabilities : 0x00 +wWidth : 0x0140 (320) +wHeight : 0x00F0 (240) +dwMinBitRate : 0x000BB800 (768000 bps -> 96 KB/s) +dwMaxBitRate : 0x000BB800 (768000 bps -> 96 KB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x01 (1 discrete frame interval supported) +dwBytesPerLine : 0x00 (0 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +Data (HexDump) : 1E 24 11 06 00 40 01 F0 00 00 B8 0B 00 00 B8 0B .$...@.......... + 00 15 16 05 00 01 00 00 00 00 15 16 05 00 .............. + + ------- VS Color Matching Descriptor Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x0D (Color Matching) +bColorPrimaries : 0x01 (BT.709, sRGB) +bTransferCharacteristics : 0x01 (BT.709) +bMatrixCoefficients : 0x04 (SMPTE 170M) +Data (HexDump) : 06 24 0D 01 01 04 .$.... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 01 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x88 (Direction=IN EndpointID=8) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0C00 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x01 (1 additional transactions per microframe -> allows 513..1024 byte per packet) + Bits 10..0 : 0x400 (1024 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 88 05 00 0C 01 ....... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x02 +bInterfaceCount : 0x02 +bFunctionClass : 0x01 (Audio) +bFunctionSubClass : 0x00 (undefined) +bFunctionProtocol : 0x00 +iFunction : 0x05 (String Descriptor 5) + Language 0x0409 : "Anker PowerConf C200" +Data (HexDump) : 08 0B 02 02 01 00 00 05 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x02 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x01 (Audio Control) +bInterfaceProtocol : 0x00 +iInterface : 0x05 (String Descriptor 5) + Language 0x0409 : "Anker PowerConf C200" +Data (HexDump) : 09 04 02 00 00 01 01 00 05 ......... + + ------ Audio Control Interface Header Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 (Header) +bcdADC : 0x0100 +wTotalLength : 0x0027 (39 bytes) +bInCollection : 0x01 +baInterfaceNr[1] : 0x03 +Data (HexDump) : 09 24 01 00 01 27 00 01 03 .$...'... + + ------- Audio Control Input Terminal Descriptor ------- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x02 +wTerminalType : 0x0201 (Microphone) +bAssocTerminal : 0x00 +bNrChannels : 0x02 (2 channels) +wChannelConfig : 0x0003 (L, R) +iChannelNames : 0x00 (No String Descriptor) +iTerminal : 0x00 (No String Descriptor) +Data (HexDump) : 0C 24 02 02 01 02 00 02 03 00 00 00 .$.......... + + ------- Audio Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x04 +wTerminalType : 0x0101 (USB streaming) +bAssocTerminal : 0x00 (0) +bSourceID : 0x06 (6) +iTerminal : 0x00 (No String Descriptor) +Data (HexDump) : 09 24 03 04 01 01 00 06 00 .$....... + + -------- Audio Control Feature Unit Descriptor -------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x06 (Feature Unit) +bUnitID : 0x06 (6) +bSourceID : 0x02 (2) +bControlSize : 0x02 (2 bytes per control) +bmaControls[0] : 0x03, 0x00 + D0: Mute : 1 + D1: Volume : 1 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 + D8: Bass Boost : 0 + D9: Loudness : 0 + D10: Reserved : 0 + D11: Reserved : 0 + D12: Reserved : 0 + D13: Reserved : 0 + D14: Reserved : 0 + D15: Reserved : 0 +iFeature : 0x00 (No String Descriptor) +Data (HexDump) : 09 24 06 06 02 02 03 00 00 .$....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 00 00 01 02 00 00 ......... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 01 01 01 02 00 00 ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x04 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 04 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x02 (2 channels) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x01 (supports 1 sample frequency) +tSamFreq[1] : 0x0BB80 (48000 Hz) +Data (HexDump) : 0B 24 02 01 02 02 10 01 80 BB 00 .$......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x82 (Direction=IN EndpointID=2) +bmAttributes : 0x0D (TransferType=Isochronous SyncType=Synchronous EndpointType=Data) +wMaxPacketSize : 0x00C0 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0xC0 (192 bytes per packet) +bInterval : 0x04 (4 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 82 0D C0 00 04 00 00 ......... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x01 (Milliseconds) +wLockDelay : 0x0001 (1 ms) +Data (HexDump) : 07 25 01 01 01 01 00 .%..... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x04 +bAlternateSetting : 0x00 +bNumEndpoints : 0x02 (2 Endpoints) +bInterfaceClass : 0x03 (HID - Human Interface Device) +bInterfaceSubClass : 0x00 (None) +bInterfaceProtocol : 0x00 (None) +iInterface : 0x06 (String Descriptor 6) + Language 0x0409 : "HID Interface" +Data (HexDump) : 09 04 04 00 02 03 00 00 06 ......... + + ------------------- HID Descriptor -------------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x21 (HID Descriptor) +bcdHID : 0x0101 (HID Version 1.01) +bCountryCode : 0x00 (00 = not localized) +bNumDescriptors : 0x01 +Data (HexDump) : 09 21 01 01 00 01 22 23 00 .!...."#. +Descriptor 1: +bDescriptorType : 0x22 (Class=Report) +wDescriptorLength : 0x0023 (35 bytes) +Error reading descriptor : ERROR_INVALID_PARAMETER (due to a obscure limitation of the Win32 USB API, see UsbTreeView.txt) + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x83 (Direction=IN EndpointID=3) +bmAttributes : 0x03 (TransferType=Interrupt) +wMaxPacketSize : 0x0400 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x400 (1024 bytes per packet) +bInterval : 0x04 (4 ms) +Data (HexDump) : 07 05 83 03 00 04 04 ....... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x01 (Direction=OUT EndpointID=1) +bmAttributes : 0x03 (TransferType=Interrupt) +wMaxPacketSize : 0x0400 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x400 (1024 bytes per packet) +bInterval : 0x04 (4 ms) +Data (HexDump) : 07 05 01 03 00 04 04 ....... + + ----------------- Device Qualifier Descriptor ----------------- +bLength : 0x0A (10 bytes) +bDescriptorType : 0x06 (Device_qualifier Descriptor) +bcdUSB : 0x200 (USB Version 2.00) +bDeviceClass : 0xEF (Miscellaneous) +bDeviceSubClass : 0x02 +bDeviceProtocol : 0x01 (IAD - Interface Association Descriptor) +bMaxPacketSize0 : 0x40 (64 Bytes) +bNumConfigurations : 0x01 (1 other-speed configuration) +bReserved : 0x00 +Data (HexDump) : 0A 06 00 02 EF 02 01 40 01 00 .......@.. + + ------------ Other Speed Configuration Descriptor ------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x07 (Other_speed_configuration Descriptor) +wTotalLength : 0x01FD (509 bytes) +bNumInterfaces : 0x05 (5 Interfaces) +bConfigurationValue : 0x01 (Configuration 1) +iConfiguration : 0x00 (No String Descriptor) +bmAttributes : 0xC0 + D7: Reserved, set 1 : 0x01 + D6: Self Powered : 0x01 (yes) + D5: Remote Wakeup : 0x00 (no) + D4..0: Reserved, set 0 : 0x00 +MaxPower : 0x64 (200 mA) +Data (HexDump) : 09 07 FD 01 05 01 00 C0 64 08 0B 00 02 0E 03 00 ........d....... + 04 09 04 00 00 01 0E 01 00 04 0D 24 01 10 01 50 ...........$...P + 00 00 6C DC 02 01 01 12 24 02 01 01 02 00 00 00 ..l.....$....... + 00 00 00 00 00 03 2A 8A 02 0C 24 05 02 01 00 40 ......*...$....@ + 02 7F 14 00 00 1C 24 06 06 A2 9E 76 41 DE 04 47 ......$....vA..G + E3 8B 2B F4 34 1A FF 00 3B 0F 01 02 03 00 F8 27 ..+.4...;......' + 00 09 24 03 03 01 01 00 04 00 07 05 81 03 10 00 ..$............. + 08 05 25 03 10 00 09 04 01 00 00 0E 02 00 00 10 ..%............. + 24 01 03 E2 00 88 00 03 02 01 01 01 00 04 00 1B $............... + 24 04 02 03 59 55 59 32 00 00 10 00 80 00 00 AA $...YUY2........ + 00 38 9B 71 10 01 00 00 00 00 26 24 05 01 00 80 .8.q......&$.... + 02 68 01 00 40 19 01 00 C0 4B 03 00 08 07 00 80 .h..@....K...... + 1A 06 00 03 80 1A 06 00 2A 2C 0A 00 40 42 0F 00 ........*,..@B.. + 1E 24 05 02 00 20 03 58 02 00 00 C2 01 00 00 C2 .$... .X........ + 01 00 20 1C 00 15 16 05 00 01 15 16 05 00 0B 24 .. ............$ + 06 01 06 00 01 00 00 00 00 22 24 07 04 00 00 05 ........."$..... + D0 02 00 00 2F 0D 00 00 5E 1A 00 20 1C 00 15 16 ..../...^.. .... + 05 00 02 15 16 05 00 2A 2C 0A 00 22 24 07 02 00 .......*,.."$... + 00 05 C0 03 00 00 B8 0B 00 00 28 23 00 80 25 00 ..........(#..%. + 15 16 05 00 01 15 16 05 00 2A 2C 0A 00 1E 24 07 .........*,...$. + 01 00 80 07 38 04 00 80 53 3B 00 80 53 3B 00 48 ....8...S;..S;.H + 3F 00 15 16 05 00 01 15 16 05 00 06 24 0D 01 01 ?...........$... + 04 09 04 01 01 01 0E 02 00 00 07 05 88 05 FF 03 ................ + 01 08 0B 02 02 01 00 00 05 09 04 02 00 00 01 01 ................ + 00 05 09 24 01 00 01 27 00 01 03 0C 24 02 02 01 ...$...'....$... + 02 00 02 03 00 00 00 09 24 03 04 01 01 00 06 00 ........$....... + 09 24 06 06 02 02 03 00 00 09 04 03 00 00 01 02 .$.............. + 00 00 09 04 03 01 01 01 02 00 00 07 24 01 04 01 ............$... + 01 00 0B 24 02 01 02 02 10 01 80 BB 00 09 05 82 ...$............ + 0D C0 00 04 00 00 07 25 01 01 01 01 00 09 04 04 .......%........ + 00 02 03 00 00 06 09 21 01 01 00 01 22 23 00 07 .......!...."#.. + 05 83 03 00 04 0A 07 05 01 03 00 04 0A ............. + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x00 +bInterfaceCount : 0x02 +bFunctionClass : 0x0E (Video) +bFunctionSubClass : 0x03 (Video Interface Collection) +bFunctionProtocol : 0x00 (PC_PROTOCOL_UNDEFINED protocol) +iFunction : 0x04 (String Descriptor 4) + Language 0x0409 : "Anker PowerConf C200" +Data (HexDump) : 08 0B 00 02 0E 03 00 04 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x00 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x01 (Video Control) +bInterfaceProtocol : 0x00 +iInterface : 0x04 (String Descriptor 4) + Language 0x0409 : "Anker PowerConf C200" +Data (HexDump) : 09 04 00 00 01 0E 01 00 04 ......... + + ------- Video Control Interface Header Descriptor ----- +bLength : 0x0D (13 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x01 (Video Control Header) +bcdUVC : 0x0110 (UVC Version 1.10) +wTotalLength : 0x0050 (80 bytes) +dwClockFreq : 0x02DC6C00 (48 MHz) +bInCollection : 0x01 (1 VideoStreaming interface) +baInterfaceNr[1] : 0x01 +Data (HexDump) : 0D 24 01 10 01 50 00 00 6C DC 02 01 01 .$...P..l.... + + -------- Video Control Input Terminal Descriptor ------ +bLength : 0x12 (18 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (ITT_CAMERA) +bAssocTerminal : 0x00 (Not associated with an Output Terminal) +iTerminal : 0x00 +Camera Input Terminal Data: +wObjectiveFocalLengthMin : 0x0000 +wObjectiveFocalLengthMax : 0x0000 +wOcularFocalLength : 0x0000 +bControlSize : 0x03 +bmControls : 0x2A, 0x8A, 0x02 + D0 : 0 no - Scanning Mode + D1 : 1 yes - Auto-Exposure Mode + D2 : 0 no - Auto-Exposure Priority + D3 : 1 yes - Exposure Time (Absolute) + D4 : 0 no - Exposure Time (Relative) + D5 : 1 yes - Focus (Absolute) + D6 : 0 no - Focus (Relative) + D7 : 0 no - Iris (Absolute) + D8 : 0 no - Iris (Relative) + D9 : 1 yes - Zoom (Absolute) + D10 : 0 no - Zoom (Relative) + D11 : 1 yes - Pan (Absolute) + D12 : 0 no - Pan (Relative) + D13 : 0 no - Roll (Absolute) + D14 : 0 no - Roll (Relative) + D15 : 1 yes - Tilt (Absolute) + D16 : 0 no - Tilt (Relative) + D17 : 1 yes - Focus Auto + D18 : 0 no - Reserved + D19 : 0 no - Reserved + D20 : 0 no - Reserved + D21 : 0 no - Reserved + D22 : 0 no - Reserved + D23 : 0 no - Reserved +Data (HexDump) : 12 24 02 01 01 02 00 00 00 00 00 00 00 00 03 2A .$.............* + 8A 02 .. + + -------- Video Control Processing Unit Descriptor ----- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x05 (Processing Unit) +bUnitID : 0x02 +bSourceID : 0x01 +wMaxMultiplier : 0x4000 (163.84x Zoom) +bControlSize : 0x02 +bmControls : 0x7F, 0x14 + D0 : 1 yes - Brightness + D1 : 1 yes - Contrast + D2 : 1 yes - Hue + D3 : 1 yes - Saturation + D4 : 1 yes - Sharpness + D5 : 1 yes - Gamma + D6 : 1 yes - White Balance Temperature + D7 : 0 no - White Balance Component + D8 : 0 no - Backlight Compensation + D9 : 0 no - Gain + D10 : 1 yes - Power Line Frequency + D11 : 0 no - Hue, Auto + D12 : 1 yes - White Balance Temperature, Auto + D13 : 0 no - White Balance Component, Auto + D14 : 0 no - Digital Multiplier + D15 : 0 no - Digital Multiplier Limit +iProcessing : 0x00 +bmVideoStandards : 0x00 + D0 : 0 no - None + D1 : 0 no - NTSC - 525/60 + D2 : 0 no - PAL - 625/50 + D3 : 0 no - SECAM - 625/50 + D4 : 0 no - NTSC - 625/50 + D5 : 0 no - PAL - 525/60 + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Data (HexDump) : 0C 24 05 02 01 00 40 02 7F 14 00 00 .$....@..... + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1C (28 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x06 +guidExtensionCode : {41769EA2-04DE-E347-8B2B-F4341AFF003B} +bNumControls : 0x0F +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x02 +bControlSize : 0x03 +bmControls : 0x00, 0xF8, 0x27 + D0 : 0 no - Vendor-Specific (Optional) + D1 : 0 no - Vendor-Specific (Optional) + D2 : 0 no - Vendor-Specific (Optional) + D3 : 0 no - Vendor-Specific (Optional) + D4 : 0 no - Vendor-Specific (Optional) + D5 : 0 no - Vendor-Specific (Optional) + D6 : 0 no - Vendor-Specific (Optional) + D7 : 0 no - Vendor-Specific (Optional) + D8 : 0 no - Vendor-Specific (Optional) + D9 : 0 no - Vendor-Specific (Optional) + D10 : 0 no - Vendor-Specific (Optional) + D11 : 1 yes - Vendor-Specific (Optional) + D12 : 1 yes - Vendor-Specific (Optional) + D13 : 1 yes - Vendor-Specific (Optional) + D14 : 1 yes - Vendor-Specific (Optional) + D15 : 1 yes - Vendor-Specific (Optional) + D16 : 1 yes - Vendor-Specific (Optional) + D17 : 1 yes - Vendor-Specific (Optional) + D18 : 1 yes - Vendor-Specific (Optional) + D19 : 0 no - Vendor-Specific (Optional) + D20 : 0 no - Vendor-Specific (Optional) + D21 : 1 yes - Vendor-Specific (Optional) + D22 : 0 no - Vendor-Specific (Optional) + D23 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1C 24 06 06 A2 9E 76 41 DE 04 47 E3 8B 2B F4 34 .$....vA..G..+.4 + 1A FF 00 3B 0F 01 02 03 00 F8 27 00 ...;......'. + + ------- Video Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x03 +wTerminalType : 0x0101 (TT_STREAMING) +bAssocTerminal : 0x00 (Not associated with an Input Terminal) +bSourceID : 0x04 +iTerminal : 0x00 +Data (HexDump) : 09 24 03 03 01 01 00 04 00 .$....... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x03 (TransferType=Interrupt) +wMaxPacketSize : 0x0010 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x10 (16 bytes per packet) +bInterval : 0x08 (8 ms) +Data (HexDump) : 07 05 81 03 10 00 08 ....... + + --- Class-specific VC Interrupt Endpoint Descriptor --- +bLength : 0x05 (5 bytes) +bDescriptorType : 0x25 (Video Control Endpoint) +bDescriptorSubtype : 0x03 (Interrupt) +wMaxTransferSize : 0x0010 (16 bytes) +Data (HexDump) : 05 25 03 10 00 .%... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 00 00 0E 02 00 00 ......... + + ---- VC-Specific VS Video Input Header Descriptor ----- +bLength : 0x10 (16 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x01 (Input Header) +bNumFormats : 0x03 +wTotalLength : 0x00E2 (226 bytes) +bEndpointAddress : 0x88 (Direction=IN EndpointID=8) +bmInfo : 0x00 (Dynamic Format Change not supported) +bTerminalLink : 0x03 +bStillCaptureMethod : 0x02 (Still Capture Method 2) +nbTriggerSupport : 0x01 (Hardware Triggering is supported) +bTriggerUsage : 0x01 (Host will notify client application of button event) +nbControlSize : 0x01 +Video Payload Format 1 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Video Payload Format 2 : 0x04 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 1 yes - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Video Payload Format 3 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Data (HexDump) : 10 24 01 03 E2 00 88 00 03 02 01 01 01 00 04 00 .$.............. + + ------- VS Uncompressed Format Type Descriptor -------- +bLength : 0x1B (27 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x04 (Uncompressed Format Type) +bFormatIndex : 0x02 (2) +bNumFrameDescriptors : 0x03 (3) +guidFormat : {32595559-0000-0010-8000-00AA00389B71} (YUY2) +bBitsPerPixel : 0x10 (16 bits) +bDefaultFrameIndex : 0x01 (1) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +*!*ERROR: Found 2 frame descriptors (should be 3) +*!*ERROR: no Color Matching Descriptor for this format +Data (HexDump) : 1B 24 04 02 03 59 55 59 32 00 00 10 00 80 00 00 .$...YUY2....... + AA 00 38 9B 71 10 01 00 00 00 00 ..8.q...... + + -------- VS Uncompressed Frame Type Descriptor -------- +---> This is the Default (optimum) Frame index +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x0168 (360) +dwMinBitRate : 0x01194000 (18432000 bps -> 2.304 MB/s) +dwMaxBitRate : 0x034BC000 (55296000 bps -> 6.912 MB/s) +dwMaxVideoFrameBufferSize: 0x00070800 (460800 bytes) +dwDefaultFrameInterval : 0x00061A80 (40.0000 ms -> 25.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[2] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[3] : 0x000F4240 (100.0000 ms -> 10.000 fps) +Data (HexDump) : 26 24 05 01 00 80 02 68 01 00 40 19 01 00 C0 4B &$.....h..@....K + 03 00 08 07 00 80 1A 06 00 03 80 1A 06 00 2A 2C ..............*, + 0A 00 40 42 0F 00 ..@B.. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x1E (30 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x00 +wWidth : 0x0320 (800) +wHeight : 0x0258 (600) +dwMinBitRate : 0x01C20000 (29491200 bps -> 3.686 MB/s) +dwMaxBitRate : 0x01C20000 (29491200 bps -> 3.686 MB/s) +dwMaxVideoFrameBufferSize: 0x001C2000 (1843200 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x01 (1 discrete frame interval supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +Data (HexDump) : 1E 24 05 02 00 20 03 58 02 00 00 C2 01 00 00 C2 .$... .X........ + 01 00 20 1C 00 15 16 05 00 01 15 16 05 00 .. ........... + + ----- Video Streaming MJPEG Format Type Descriptor ---- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x06 (Format MJPEG) +bFormatIndex : 0x01 (1) +bNumFrameDescriptors : 0x06 (6) +bmFlags : 0x00 (Sample size is not fixed) +bDefaultFrameIndex : 0x01 (1) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +*!*ERROR: Found 3 frame descriptors (should be 6) +Data (HexDump) : 0B 24 06 01 06 00 01 00 00 00 00 .$......... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x22 (34 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x00 +wWidth : 0x0500 (1280) +wHeight : 0x02D0 (720) +dwMinBitRate : 0x0D2F0000 (221184000 bps -> 27.648 MB/s) +dwMaxBitRate : 0x1A5E0000 (442368000 bps -> 55.296 MB/s) +dwMaxVideoFrameBufferSize: 0x001C2000 (1843200 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x02 (2 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 22 24 07 04 00 00 05 D0 02 00 00 2F 0D 00 00 5E "$........./...^ + 1A 00 20 1C 00 15 16 05 00 02 15 16 05 00 2A 2C .. ...........*, + 0A 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x22 (34 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x00 +wWidth : 0x0500 (1280) +wHeight : 0x03C0 (960) +dwMinBitRate : 0x0BB80000 (196608000 bps -> 24.576 MB/s) +dwMaxBitRate : 0x23280000 (589824000 bps -> 73.728 MB/s) +dwMaxVideoFrameBufferSize: 0x00258000 (2457600 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x01 (1 discrete frame interval supported) +*!*ERROR: bLength of 34 incorrect, should be 30 +*!*WARNING: if bFrameIntervalType is 1 then dwMinBitRate should equal dwMaxBitRate +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +Data (HexDump) : 22 24 07 02 00 00 05 C0 03 00 00 B8 0B 00 00 28 "$.............( + 23 00 80 25 00 15 16 05 00 01 15 16 05 00 2A 2C #..%..........*, + 0A 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +---> This is the Default (optimum) Frame index +bLength : 0x1E (30 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x0780 (1920) +wHeight : 0x0438 (1080) +dwMinBitRate : 0x3B538000 (995328000 bps -> 124.416 MB/s) +dwMaxBitRate : 0x3B538000 (995328000 bps -> 124.416 MB/s) +dwMaxVideoFrameBufferSize: 0x003F4800 (4147200 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x01 (1 discrete frame interval supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +Data (HexDump) : 1E 24 07 01 00 80 07 38 04 00 80 53 3B 00 80 53 .$.....8...S;..S + 3B 00 48 3F 00 15 16 05 00 01 15 16 05 00 ;.H?.......... + + ------- VS Color Matching Descriptor Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x0D (Color Matching) +bColorPrimaries : 0x01 (BT.709, sRGB) +bTransferCharacteristics : 0x01 (BT.709) +bMatrixCoefficients : 0x04 (SMPTE 170M) +Data (HexDump) : 06 24 0D 01 01 04 .$.... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 01 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x88 (Direction=IN EndpointID=8) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x03FF + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x3FF (1023 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 88 05 FF 03 01 ....... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x02 +bInterfaceCount : 0x02 +bFunctionClass : 0x01 (Audio) +bFunctionSubClass : 0x00 (undefined) +bFunctionProtocol : 0x00 +iFunction : 0x05 (String Descriptor 5) + Language 0x0409 : "Anker PowerConf C200" +Data (HexDump) : 08 0B 02 02 01 00 00 05 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x02 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x01 (Audio Control) +bInterfaceProtocol : 0x00 +iInterface : 0x05 (String Descriptor 5) + Language 0x0409 : "Anker PowerConf C200" +Data (HexDump) : 09 04 02 00 00 01 01 00 05 ......... + + ------ Audio Control Interface Header Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 (Header) +bcdADC : 0x0100 +wTotalLength : 0x0027 (39 bytes) +bInCollection : 0x01 +baInterfaceNr[1] : 0x03 +Data (HexDump) : 09 24 01 00 01 27 00 01 03 .$...'... + + ------- Audio Control Input Terminal Descriptor ------- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x02 +wTerminalType : 0x0201 (Microphone) +bAssocTerminal : 0x00 +bNrChannels : 0x02 (2 channels) +wChannelConfig : 0x0003 (L, R) +iChannelNames : 0x00 (No String Descriptor) +iTerminal : 0x00 (No String Descriptor) +Data (HexDump) : 0C 24 02 02 01 02 00 02 03 00 00 00 .$.......... + + ------- Audio Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x04 +wTerminalType : 0x0101 (USB streaming) +bAssocTerminal : 0x00 (0) +bSourceID : 0x06 (6) +iTerminal : 0x00 (No String Descriptor) +Data (HexDump) : 09 24 03 04 01 01 00 06 00 .$....... + + -------- Audio Control Feature Unit Descriptor -------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x06 (Feature Unit) +bUnitID : 0x06 (6) +bSourceID : 0x02 (2) +bControlSize : 0x02 (2 bytes per control) +bmaControls[0] : 0x03, 0x00 + D0: Mute : 1 + D1: Volume : 1 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 + D8: Bass Boost : 0 + D9: Loudness : 0 + D10: Reserved : 0 + D11: Reserved : 0 + D12: Reserved : 0 + D13: Reserved : 0 + D14: Reserved : 0 + D15: Reserved : 0 +iFeature : 0x00 (No String Descriptor) +Data (HexDump) : 09 24 06 06 02 02 03 00 00 .$....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 00 00 01 02 00 00 ......... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 01 01 01 02 00 00 ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x04 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 04 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x02 (2 channels) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x01 (supports 1 sample frequency) +tSamFreq[1] : 0x0BB80 (48000 Hz) +Data (HexDump) : 0B 24 02 01 02 02 10 01 80 BB 00 .$......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x82 (Direction=IN EndpointID=2) +bmAttributes : 0x0D (TransferType=Isochronous SyncType=Synchronous EndpointType=Data) +wMaxPacketSize : 0x00C0 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0xC0 (192 bytes per packet) +bInterval : 0x04 (4 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 82 0D C0 00 04 00 00 ......... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x01 (Milliseconds) +wLockDelay : 0x0001 (1 ms) +Data (HexDump) : 07 25 01 01 01 01 00 .%..... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x04 +bAlternateSetting : 0x00 +bNumEndpoints : 0x02 (2 Endpoints) +bInterfaceClass : 0x03 (HID - Human Interface Device) +bInterfaceSubClass : 0x00 (None) +bInterfaceProtocol : 0x00 (None) +iInterface : 0x06 (String Descriptor 6) + Language 0x0409 : "HID Interface" +Data (HexDump) : 09 04 04 00 02 03 00 00 06 ......... + + ------------------- HID Descriptor -------------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x21 (HID Descriptor) +bcdHID : 0x0101 (HID Version 1.01) +bCountryCode : 0x00 (00 = not localized) +bNumDescriptors : 0x01 +Data (HexDump) : 09 21 01 01 00 01 22 23 00 .!...."#. +Descriptor 1: +bDescriptorType : 0x22 (Class=Report) +wDescriptorLength : 0x0023 (35 bytes) +Error reading descriptor : ERROR_INVALID_PARAMETER (due to a obscure limitation of the Win32 USB API, see UsbTreeView.txt) + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x83 (Direction=IN EndpointID=3) +bmAttributes : 0x03 (TransferType=Interrupt) +wMaxPacketSize : 0x0400 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x400 (1024 bytes per packet) +bInterval : 0x0A (10 ms) +Data (HexDump) : 07 05 83 03 00 04 0A ....... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x01 (Direction=OUT EndpointID=1) +bmAttributes : 0x03 (TransferType=Interrupt) +wMaxPacketSize : 0x0400 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x400 (1024 bytes per packet) +bInterval : 0x0A (10 ms) +Data (HexDump) : 07 05 01 03 00 04 0A ....... + + -------------------- String Descriptors ------------------- + ------ String Descriptor 0 ------ +bLength : 0x04 (4 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language ID[0] : 0x0409 (English - United States) +Data (HexDump) : 04 03 09 04 .... + ------ String Descriptor 1 ------ +bLength : 0x2A (42 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Anker PowerConf C200" +Data (HexDump) : 2A 03 41 00 6E 00 6B 00 65 00 72 00 20 00 50 00 *.A.n.k.e.r. .P. + 6F 00 77 00 65 00 72 00 43 00 6F 00 6E 00 66 00 o.w.e.r.C.o.n.f. + 20 00 43 00 32 00 30 00 30 00 .C.2.0.0. + ------ String Descriptor 2 ------ +bLength : 0x2A (42 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Anker PowerConf C200" +Data (HexDump) : 2A 03 41 00 6E 00 6B 00 65 00 72 00 20 00 50 00 *.A.n.k.e.r. .P. + 6F 00 77 00 65 00 72 00 43 00 6F 00 6E 00 66 00 o.w.e.r.C.o.n.f. + 20 00 43 00 32 00 30 00 30 00 .C.2.0.0. + ------ String Descriptor 3 ------ +bLength : 0x22 (34 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "ACNV9P0D12366611" +Data (HexDump) : 22 03 41 00 43 00 4E 00 56 00 39 00 50 00 30 00 ".A.C.N.V.9.P.0. + 44 00 31 00 32 00 33 00 36 00 36 00 36 00 31 00 D.1.2.3.6.6.6.1. + 31 00 1. + ------ String Descriptor 4 ------ +bLength : 0x2A (42 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Anker PowerConf C200" +Data (HexDump) : 2A 03 41 00 6E 00 6B 00 65 00 72 00 20 00 50 00 *.A.n.k.e.r. .P. + 6F 00 77 00 65 00 72 00 43 00 6F 00 6E 00 66 00 o.w.e.r.C.o.n.f. + 20 00 43 00 32 00 30 00 30 00 .C.2.0.0. + ------ String Descriptor 5 ------ +bLength : 0x2A (42 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Anker PowerConf C200" +Data (HexDump) : 2A 03 41 00 6E 00 6B 00 65 00 72 00 20 00 50 00 *.A.n.k.e.r. .P. + 6F 00 77 00 65 00 72 00 43 00 6F 00 6E 00 66 00 o.w.e.r.C.o.n.f. + 20 00 43 00 32 00 30 00 30 00 .C.2.0.0. + ------ String Descriptor 6 ------ +bLength : 0x1C (28 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "HID Interface" +Data (HexDump) : 1C 03 48 00 49 00 44 00 20 00 49 00 6E 00 74 00 ..H.I.D. .I.n.t. + 65 00 72 00 66 00 61 00 63 00 65 00 e.r.f.a.c.e. +*/ + +namespace anker_powerconf_c200 { +const uint8_t dev_desc[] = { + 0x12, 0x01, 0x00, 0x02, 0xEF, 0x02, 0x01, 0x40, 0x1A, 0x29, 0x69, 0x33, 0x05, 0x01, 0x01, 0x02, + 0x03, 0x01 +}; + +const uint8_t cfg_desc[] = { + 0x09, 0x02, 0x49, 0x03, 0x05, 0x01, 0x00, 0xC0, 0x64, 0x08, 0x0B, 0x00, 0x02, 0x0E, 0x03, 0x00, + 0x04, 0x09, 0x04, 0x00, 0x00, 0x01, 0x0E, 0x01, 0x00, 0x04, 0x0D, 0x24, 0x01, 0x10, 0x01, 0x50, + 0x00, 0x00, 0x6C, 0xDC, 0x02, 0x01, 0x01, 0x12, 0x24, 0x02, 0x01, 0x01, 0x02, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x2A, 0x8A, 0x02, 0x0C, 0x24, 0x05, 0x02, 0x01, 0x00, 0x40, + 0x02, 0x7F, 0x14, 0x00, 0x00, 0x1C, 0x24, 0x06, 0x06, 0xA2, 0x9E, 0x76, 0x41, 0xDE, 0x04, 0x47, + 0xE3, 0x8B, 0x2B, 0xF4, 0x34, 0x1A, 0xFF, 0x00, 0x3B, 0x0F, 0x01, 0x02, 0x03, 0x00, 0xF8, 0x27, + 0x00, 0x09, 0x24, 0x03, 0x03, 0x01, 0x01, 0x00, 0x04, 0x00, 0x07, 0x05, 0x81, 0x03, 0x10, 0x00, + 0x08, 0x05, 0x25, 0x03, 0x10, 0x00, 0x09, 0x04, 0x01, 0x00, 0x00, 0x0E, 0x02, 0x00, 0x00, 0x10, + 0x24, 0x01, 0x03, 0x2E, 0x02, 0x88, 0x00, 0x03, 0x02, 0x01, 0x01, 0x01, 0x00, 0x04, 0x00, 0x0B, + 0x24, 0x06, 0x01, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x24, 0x07, 0x01, 0x00, 0x00, + 0x0A, 0xA0, 0x05, 0x00, 0x00, 0x65, 0x04, 0x00, 0x00, 0x65, 0x04, 0x00, 0x80, 0x70, 0x00, 0x15, + 0x16, 0x05, 0x00, 0x01, 0x15, 0x16, 0x05, 0x00, 0x1E, 0x24, 0x07, 0x02, 0x00, 0x80, 0x07, 0x38, + 0x04, 0x00, 0xD0, 0x78, 0x02, 0x00, 0xD0, 0x78, 0x02, 0x00, 0x48, 0x3F, 0x00, 0x15, 0x16, 0x05, + 0x00, 0x01, 0x15, 0x16, 0x05, 0x00, 0x1E, 0x24, 0x07, 0x03, 0x00, 0x00, 0x05, 0xD0, 0x02, 0x00, + 0x40, 0x19, 0x01, 0x00, 0x40, 0x19, 0x01, 0x00, 0x20, 0x1C, 0x00, 0x15, 0x16, 0x05, 0x00, 0x01, + 0x15, 0x16, 0x05, 0x00, 0x1E, 0x24, 0x07, 0x04, 0x00, 0x80, 0x02, 0xE0, 0x01, 0x00, 0xC0, 0x5D, + 0x00, 0x00, 0xC0, 0x5D, 0x00, 0x00, 0x60, 0x09, 0x00, 0x15, 0x16, 0x05, 0x00, 0x01, 0x15, 0x16, + 0x05, 0x00, 0x1E, 0x24, 0x07, 0x05, 0x00, 0x80, 0x02, 0x68, 0x01, 0x00, 0x50, 0x46, 0x00, 0x00, + 0x50, 0x46, 0x00, 0x00, 0x08, 0x07, 0x00, 0x15, 0x16, 0x05, 0x00, 0x01, 0x15, 0x16, 0x05, 0x00, + 0x1E, 0x24, 0x07, 0x06, 0x00, 0x40, 0x01, 0xF0, 0x00, 0x00, 0x70, 0x17, 0x00, 0x00, 0x70, 0x17, + 0x00, 0x00, 0x58, 0x02, 0x00, 0x15, 0x16, 0x05, 0x00, 0x01, 0x15, 0x16, 0x05, 0x00, 0x0A, 0x24, + 0x03, 0x00, 0x01, 0x80, 0x07, 0x38, 0x04, 0x00, 0x1B, 0x24, 0x04, 0x02, 0x03, 0x59, 0x55, 0x59, + 0x32, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71, 0x10, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x1E, 0x24, 0x05, 0x01, 0x00, 0x80, 0x02, 0xE0, 0x01, 0x00, 0xC0, 0x5D, 0x00, + 0x00, 0xC0, 0x5D, 0x00, 0x00, 0x60, 0x09, 0x00, 0x15, 0x16, 0x05, 0x00, 0x01, 0x15, 0x16, 0x05, + 0x00, 0x1E, 0x24, 0x05, 0x02, 0x00, 0x80, 0x02, 0x68, 0x01, 0x00, 0x50, 0x46, 0x00, 0x00, 0x50, + 0x46, 0x00, 0x00, 0x08, 0x07, 0x00, 0x15, 0x16, 0x05, 0x00, 0x01, 0x15, 0x16, 0x05, 0x00, 0x1E, + 0x24, 0x05, 0x03, 0x00, 0x40, 0x01, 0xF0, 0x00, 0x00, 0x70, 0x17, 0x00, 0x00, 0x70, 0x17, 0x00, + 0x00, 0x58, 0x02, 0x00, 0x15, 0x16, 0x05, 0x00, 0x01, 0x15, 0x16, 0x05, 0x00, 0x0A, 0x24, 0x03, + 0x00, 0x01, 0x80, 0x07, 0x38, 0x04, 0x00, 0x1C, 0x24, 0x10, 0x03, 0x06, 0x48, 0x32, 0x36, 0x34, + 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71, 0x10, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x1E, 0x24, 0x11, 0x01, 0x00, 0x00, 0x0A, 0xA0, 0x05, 0x00, 0x80, 0x32, 0x02, + 0x00, 0x80, 0x32, 0x02, 0x15, 0x16, 0x05, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x15, 0x16, 0x05, + 0x00, 0x1E, 0x24, 0x11, 0x02, 0x00, 0x80, 0x07, 0x38, 0x04, 0x00, 0x68, 0x3C, 0x01, 0x00, 0x68, + 0x3C, 0x01, 0x15, 0x16, 0x05, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x1E, + 0x24, 0x11, 0x03, 0x00, 0x00, 0x05, 0xD0, 0x02, 0x00, 0xA0, 0x8C, 0x00, 0x00, 0xA0, 0x8C, 0x00, + 0x15, 0x16, 0x05, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x1E, 0x24, 0x11, + 0x04, 0x00, 0x80, 0x02, 0xE0, 0x01, 0x00, 0xE0, 0x2E, 0x00, 0x00, 0xE0, 0x2E, 0x00, 0x15, 0x16, + 0x05, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x1E, 0x24, 0x11, 0x05, 0x00, + 0x80, 0x02, 0x68, 0x01, 0x00, 0x28, 0x23, 0x00, 0x00, 0x28, 0x23, 0x00, 0x15, 0x16, 0x05, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x1E, 0x24, 0x11, 0x06, 0x00, 0x40, 0x01, + 0xF0, 0x00, 0x00, 0xB8, 0x0B, 0x00, 0x00, 0xB8, 0x0B, 0x00, 0x15, 0x16, 0x05, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x06, 0x24, 0x0D, 0x01, 0x01, 0x04, 0x09, 0x04, 0x01, + 0x01, 0x01, 0x0E, 0x02, 0x00, 0x00, 0x07, 0x05, 0x88, 0x05, 0x00, 0x0C, 0x01, 0x08, 0x0B, 0x02, + 0x02, 0x01, 0x00, 0x00, 0x05, 0x09, 0x04, 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x05, 0x09, 0x24, + 0x01, 0x00, 0x01, 0x27, 0x00, 0x01, 0x03, 0x0C, 0x24, 0x02, 0x02, 0x01, 0x02, 0x00, 0x02, 0x03, + 0x00, 0x00, 0x00, 0x09, 0x24, 0x03, 0x04, 0x01, 0x01, 0x00, 0x06, 0x00, 0x09, 0x24, 0x06, 0x06, + 0x02, 0x02, 0x03, 0x00, 0x00, 0x09, 0x04, 0x03, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x09, 0x04, + 0x03, 0x01, 0x01, 0x01, 0x02, 0x00, 0x00, 0x07, 0x24, 0x01, 0x04, 0x01, 0x01, 0x00, 0x0B, 0x24, + 0x02, 0x01, 0x02, 0x02, 0x10, 0x01, 0x80, 0xBB, 0x00, 0x09, 0x05, 0x82, 0x0D, 0xC0, 0x00, 0x04, + 0x00, 0x00, 0x07, 0x25, 0x01, 0x01, 0x01, 0x01, 0x00, 0x09, 0x04, 0x04, 0x00, 0x02, 0x03, 0x00, + 0x00, 0x06, 0x09, 0x21, 0x01, 0x01, 0x00, 0x01, 0x22, 0x23, 0x00, 0x07, 0x05, 0x83, 0x03, 0x00, + 0x04, 0x04, 0x07, 0x05, 0x01, 0x03, 0x00, 0x04, 0x04 +}; +} diff --git a/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/customer.hpp b/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/customer.hpp new file mode 100644 index 00000000..59020347 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/customer.hpp @@ -0,0 +1,1429 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include + +/* + ======================== USB Device ======================== + + +++++++++++++++++ Device Information ++++++++++++++++++ +Device Description : USB Composite Device +Device ID : USB\VID_349C&PID_3307\20210901000000 +Hardware IDs : USB\VID_349C&PID_3307&REV_0301 USB\VID_349C&PID_3307 +Driver KeyName : {36fc9e60-c465-11cf-8056-444553540000}\0047 (GUID_DEVCLASS_USB) +Driver : \SystemRoot\System32\drivers\usbccgp.sys (Version: 10.0.19041.4474 Date: 2024-06-13) +Driver Inf : C:\Windows\inf\usb.inf +Legacy BusType : PNPBus +Class : USB +Class GUID : {36fc9e60-c465-11cf-8056-444553540000} (GUID_DEVCLASS_USB) +Service : usbccgp +Enumerator : USB +Location Info : Port_#0006.Hub_#0013 +Location IDs : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(1)#USB(3)#USB(6), ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(1)#USB(3)#USB(6) +Container ID : {6120a654-188f-5ceb-accc-eaff9ba0b47c} +Manufacturer Info : (Standard USB Host Controller) +Capabilities : 0x94 (Removable, UniqueID, SurpriseRemovalOK) +Status : 0x0180600A (DN_DRIVER_LOADED, DN_STARTED, DN_DISABLEABLE, DN_REMOVABLE, DN_NT_ENUMERATOR, DN_NT_DRIVER) +Problem Code : 0 +Address : 6 +HcDisableSelectiveSuspend: 0 +EnableSelectiveSuspend : 0 +SelectiveSuspendEnabled : 0 +EnhancedPowerMgmtEnabled : 0 +IdleInWorkingState : 0 +WakeFromSleepState : 0 +Power State : D0 (supported: D0, D3, wake from D0) + Child Device 1 : HD video (USB Video Device) + Device Path : \\?\USB#VID_349C&PID_3307&MI_00#b&26a56595&0&0000#{6994ad05-93ef-11d0-a3cc-00a0c9223196}\global (AM_KSCATEGORY_VIDEO) + Kernel Name : \Device\0000035e + Device ID : USB\VID_349C&PID_3307&MI_00\B&26A56595&0&0000 + Class : Camera + Driver KeyName : {ca3e7ab9-b4c3-4ae6-8251-579ef933890f}\0004 (GUID_DEVCLASS_CAMERA) + Service : usbvideo + Location : 0005.0000.0004.001.003.001.003.006.000 + LocationPaths : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(1)#USB(3)#USB(6)#USBMI(0) PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(1)#USB(3)#USB(6)#USB(6) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(1)#USB(3)#USB(6)#USBMI(0) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(1)#USB(3)#USB(6)#USB(6) + Child Device 2 : HD audio (USB Audio Device) + Device Path : \\?\USB#VID_349C&PID_3307&MI_02#b&26a56595&0&0002#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\global (AM_KSCATEGORY_AUDIO) + Kernel Name : \Device\0000035f + Device ID : USB\VID_349C&PID_3307&MI_02\B&26A56595&0&0002 + Class : MEDIA + Driver KeyName : {4d36e96c-e325-11ce-bfc1-08002be10318}\0006 (GUID_DEVCLASS_MEDIA) + Service : usbaudio + Location : 0005.0000.0004.001.003.001.003.006.000 + LocationPaths : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(1)#USB(3)#USB(6)#USBMI(2) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(1)#USB(3)#USB(6)#USBMI(2) + Child Device 1 : Speakers (HD audio ) (Audio Endpoint) + Device ID : SWD\MMDEVAPI\{0.0.0.00000000}.{1F0BF8E7-7F03-4A2C-9183-9B9B0979B4DF} + Class : AudioEndpoint + Driver KeyName : {c166523c-fe0c-4a94-a586-f1a80cfbbf3e}\0030 (AUDIOENDPOINT_CLASS_UUID) + Child Device 2 : Microphone (HD audio ) (Audio Endpoint) + Device ID : SWD\MMDEVAPI\{0.0.1.00000000}.{3EBDEB23-D5D6-4B4D-8EED-94904D2B527B} + Class : AudioEndpoint + Driver KeyName : {c166523c-fe0c-4a94-a586-f1a80cfbbf3e}\0036 (AUDIOENDPOINT_CLASS_UUID) + + +++++++++++++++++ Registry USB Flags +++++++++++++++++ +HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags\349C33070301 + osvc : REG_BINARY 00 00 + + ---------------- Connection Information --------------- +Connection Index : 0x06 (Port 6) +Connection Status : 0x01 (DeviceConnected) +Current Config Value : 0x01 (Configuration 1) +Device Address : 0x0F (15) +Is Hub : 0x00 (no) +Device Bus Speed : 0x01 (Full-Speed) +Number Of Open Pipes : 0x02 (2 pipes to data endpoints) +Pipe[0] : EndpointID=4 Direction=IN ScheduleOffset=0 Type=Interrupt +Pipe[1] : EndpointID=1 Direction=IN ScheduleOffset=0 Type=Bulk +Data (HexDump) : 06 00 00 00 12 01 00 02 EF 02 01 40 9C 34 07 33 ...........@.4.3 + 01 03 01 02 03 01 01 01 00 0F 00 02 00 00 00 01 ................ + 00 00 00 07 05 84 03 0A 00 05 00 00 00 00 07 05 ................ + 81 02 40 00 00 00 00 00 00 ..@...... + + --------------- Connection Information V2 ------------- +Connection Index : 0x06 (6) +Length : 0x10 (16 bytes) +SupportedUsbProtocols : 0x03 + Usb110 : 1 (yes, port supports USB 1.1) + Usb200 : 1 (yes, port supports USB 2.0) + Usb300 : 0 (no, port not supports USB 3.0) + ReservedMBZ : 0x00 +Flags : 0x00 + DevIsOpAtSsOrHigher : 0 (Device is not operating at SuperSpeed or higher) + DevIsSsCapOrHigher : 0 (Device is not SuperSpeed capable or higher) + DevIsOpAtSsPlusOrHigher : 0 (Device is not operating at SuperSpeedPlus or higher) + DevIsSsPlusCapOrHigher : 0 (Device is not SuperSpeedPlus capable or higher) + ReservedMBZ : 0x00 +Data (HexDump) : 06 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 ................ + + ---------------------- Device Descriptor ---------------------- +bLength : 0x12 (18 bytes) +bDescriptorType : 0x01 (Device Descriptor) +bcdUSB : 0x200 (USB Version 2.00) +bDeviceClass : 0xEF (Miscellaneous) +bDeviceSubClass : 0x02 +bDeviceProtocol : 0x01 (IAD - Interface Association Descriptor) +bMaxPacketSize0 : 0x40 (64 bytes) +idVendor : 0x349C +idProduct : 0x3307 +bcdDevice : 0x0301 +iManufacturer : 0x01 (String Descriptor 1) + Language 0x0409 : "Generic" +iProduct : 0x02 (String Descriptor 2) + Language 0x0409 : "HD video " +iSerialNumber : 0x03 (String Descriptor 3) + Language 0x0409 : "20210901000000" +bNumConfigurations : 0x01 (1 Configuration) +Data (HexDump) : 12 01 00 02 EF 02 01 40 9C 34 07 33 01 03 01 02 .......@.4.3.... + 03 01 .. + + ------------------ Configuration Descriptor ------------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x02 (Configuration Descriptor) +wTotalLength : 0x01E4 (484 bytes) +bNumInterfaces : 0x05 (5 Interfaces) +bConfigurationValue : 0x01 (Configuration 1) +iConfiguration : 0x00 (No String Descriptor) +bmAttributes : 0x80 + D7: Reserved, set 1 : 0x01 + D6: Self Powered : 0x00 (no) + D5: Remote Wakeup : 0x00 (no) + D4..0: Reserved, set 0 : 0x00 +MaxPower : 0x80 (256 mA) +Data (HexDump) : 09 02 E4 01 05 01 00 80 80 08 0B 00 02 0E 03 00 ................ + 02 09 04 00 00 01 0E 01 00 02 0D 24 01 00 01 33 ...........$...3 + 00 00 36 6E 01 01 01 12 24 02 01 01 02 00 00 00 ..6n....$....... + 00 00 00 00 00 03 00 00 00 0B 24 05 02 01 00 00 ..........$..... + 02 7F 17 00 09 24 03 03 01 01 00 02 00 07 05 84 .....$.......... + 03 0A 00 05 05 25 03 40 00 09 04 01 00 01 0E 02 .....%.@........ + 00 00 07 05 81 02 40 00 00 0E 24 01 01 BD 00 81 ......@...$..... + 00 03 02 01 00 01 00 0B 24 06 01 04 01 01 00 00 ........$....... + 00 00 22 24 07 01 01 00 05 D0 02 00 80 97 06 00 .."$............ + 00 2F 0D 00 20 1C 00 2A 2C 0A 00 02 2A 2C 0A 00 ./.. ..*,...*,.. + 40 42 0F 00 22 24 07 02 01 20 03 E0 01 00 80 A9 @B.."$... ...... + 03 00 00 53 07 00 B8 0B 00 20 A1 07 00 02 20 A1 ...S..... .... . + 07 00 2A 2C 0A 00 22 24 07 03 01 80 02 E0 01 00 ..*,.."$........ + 80 A9 03 00 00 53 07 00 60 09 00 80 1A 06 00 02 .....S..`....... + 80 1A 06 00 2A 2C 0A 00 22 24 07 04 01 E0 01 40 ....*,.."$.....@ + 01 00 C0 D4 01 00 80 A9 03 00 B0 04 00 80 1A 06 ................ + 00 02 80 1A 06 00 2A 2C 0A 00 16 24 03 00 04 00 ......*,...$.... + 05 D0 02 20 03 E0 01 80 02 E0 01 E0 01 40 01 00 ... .........@.. + 06 24 0D 01 01 04 08 0B 02 03 01 00 00 04 09 04 .$.............. + 02 00 00 01 01 00 04 0A 24 01 00 01 45 00 02 03 ........$...E... + 04 0C 24 02 04 01 02 00 01 01 00 00 00 08 24 06 ..$...........$. + 05 04 01 03 00 09 24 03 06 01 01 00 05 00 0C 24 ......$........$ + 02 07 01 01 00 01 01 00 00 00 09 24 06 08 07 01 ...........$.... + 01 02 00 09 24 03 09 01 03 07 08 00 09 04 03 00 ....$........... + 00 01 02 00 00 09 04 03 01 01 01 02 00 00 07 24 ...............$ + 01 06 01 01 00 0B 24 02 01 01 02 10 01 80 3E 00 ......$.......>. + 09 05 82 0D 64 00 01 00 00 07 25 01 01 00 00 00 ....d.....%..... + 09 04 04 00 00 01 02 00 00 09 04 04 01 01 01 02 ................ + 00 00 07 24 01 07 01 01 00 0B 24 02 01 01 02 10 ...$......$..... + 01 80 3E 00 09 05 03 09 64 00 01 00 00 07 25 01 ..>.....d.....%. + 01 01 01 00 .... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x00 +bInterfaceCount : 0x02 +bFunctionClass : 0x0E (Video) +bFunctionSubClass : 0x03 (Video Interface Collection) +bFunctionProtocol : 0x00 (PC_PROTOCOL_UNDEFINED protocol) +iFunction : 0x02 (String Descriptor 2) + Language 0x0409 : "HD video " +Data (HexDump) : 08 0B 00 02 0E 03 00 02 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x00 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x01 (Video Control) +bInterfaceProtocol : 0x00 +iInterface : 0x02 (String Descriptor 2) + Language 0x0409 : "HD video " +Data (HexDump) : 09 04 00 00 01 0E 01 00 02 ......... + + ------- Video Control Interface Header Descriptor ----- +bLength : 0x0D (13 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x01 (Video Control Header) +bcdUVC : 0x0100 (UVC Version 1.00) +wTotalLength : 0x0033 (51 bytes) +dwClockFreq : 0x016E3600 (24 MHz) +bInCollection : 0x01 (1 VideoStreaming interface) +baInterfaceNr[1] : 0x01 +Data (HexDump) : 0D 24 01 00 01 33 00 00 36 6E 01 01 01 .$...3..6n... + + -------- Video Control Input Terminal Descriptor ------ +bLength : 0x12 (18 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (ITT_CAMERA) +bAssocTerminal : 0x00 (Not associated with an Output Terminal) +iTerminal : 0x00 +Camera Input Terminal Data: +wObjectiveFocalLengthMin : 0x0000 +wObjectiveFocalLengthMax : 0x0000 +wOcularFocalLength : 0x0000 +bControlSize : 0x03 +bmControls : 0x00, 0x00, 0x00 + D0 : 0 no - Scanning Mode + D1 : 0 no - Auto-Exposure Mode + D2 : 0 no - Auto-Exposure Priority + D3 : 0 no - Exposure Time (Absolute) + D4 : 0 no - Exposure Time (Relative) + D5 : 0 no - Focus (Absolute) + D6 : 0 no - Focus (Relative) + D7 : 0 no - Iris (Absolute) + D8 : 0 no - Iris (Relative) + D9 : 0 no - Zoom (Absolute) + D10 : 0 no - Zoom (Relative) + D11 : 0 no - Pan (Absolute) + D12 : 0 no - Pan (Relative) + D13 : 0 no - Roll (Absolute) + D14 : 0 no - Roll (Relative) + D15 : 0 no - Tilt (Absolute) + D16 : 0 no - Tilt (Relative) + D17 : 0 no - Focus Auto + D18 : 0 no - Reserved + D19 : 0 no - Reserved + D20 : 0 no - Reserved + D21 : 0 no - Reserved + D22 : 0 no - Reserved + D23 : 0 no - Reserved +Data (HexDump) : 12 24 02 01 01 02 00 00 00 00 00 00 00 00 03 00 .$.............. + 00 00 .. + + -------- Video Control Processing Unit Descriptor ----- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x05 (Processing Unit) +bUnitID : 0x02 +bSourceID : 0x01 +wMaxMultiplier : 0x0000 +bControlSize : 0x02 +bmControls : 0x7F, 0x17 + D0 : 1 yes - Brightness + D1 : 1 yes - Contrast + D2 : 1 yes - Hue + D3 : 1 yes - Saturation + D4 : 1 yes - Sharpness + D5 : 1 yes - Gamma + D6 : 1 yes - White Balance Temperature + D7 : 0 no - White Balance Component + D8 : 1 yes - Backlight Compensation + D9 : 1 yes - Gain + D10 : 1 yes - Power Line Frequency + D11 : 0 no - Hue, Auto + D12 : 1 yes - White Balance Temperature, Auto + D13 : 0 no - White Balance Component, Auto + D14 : 0 no - Digital Multiplier + D15 : 0 no - Digital Multiplier Limit +iProcessing : 0x00 +Data (HexDump) : 0B 24 05 02 01 00 00 02 7F 17 00 .$......... + + ------- Video Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x03 +wTerminalType : 0x0101 (TT_STREAMING) +bAssocTerminal : 0x00 (Not associated with an Input Terminal) +bSourceID : 0x02 +iTerminal : 0x00 +Data (HexDump) : 09 24 03 03 01 01 00 02 00 .$....... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x84 (Direction=IN EndpointID=4) +bmAttributes : 0x03 (TransferType=Interrupt) +wMaxPacketSize : 0x000A (10 bytes) +bInterval : 0x05 (5 ms) +Data (HexDump) : 07 05 84 03 0A 00 05 ....... + + --- Class-specific VC Interrupt Endpoint Descriptor --- +bLength : 0x05 (5 bytes) +bDescriptorType : 0x25 (Video Control Endpoint) +bDescriptorSubtype : 0x03 (Interrupt) +wMaxTransferSize : 0x0040 (64 bytes) +Data (HexDump) : 05 25 03 40 00 .%.@. + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 00 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x02 (TransferType=Bulk) +wMaxPacketSize : 0x0040 (64 bytes) +bInterval : 0x00 (ignored) +Data (HexDump) : 07 05 81 02 40 00 00 ....@.. + + ---- VC-Specific VS Video Input Header Descriptor ----- +bLength : 0x0E (14 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x01 (Input Header) +bNumFormats : 0x01 +wTotalLength : 0x00BD (189 bytes) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmInfo : 0x00 (Dynamic Format Change not supported) +bTerminalLink : 0x03 +bStillCaptureMethod : 0x02 (Still Capture Method 2) +nbTriggerSupport : 0x00 (Hardware Triggering not supported) +bTriggerUsage : 0x00 (Host will initiate still image capture) +nbControlSize : 0x01 +Video Payload Format 1 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Data (HexDump) : 0E 24 01 01 BD 00 81 00 03 02 01 00 01 00 .$............ + + ----- Video Streaming MJPEG Format Type Descriptor ---- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x06 (Format MJPEG) +bFormatIndex : 0x01 (1) +bNumFrameDescriptors : 0x04 (4) +bmFlags : 0x01 (Sample size is fixed) +bDefaultFrameIndex : 0x01 (1) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +Data (HexDump) : 0B 24 06 01 04 01 01 00 00 00 00 .$......... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +---> This is the Default (optimum) Frame index +bLength : 0x22 (34 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x01 +wWidth : 0x0500 (1280) +wHeight : 0x02D0 (720) +dwMinBitRate : 0x06978000 (110592000 bps -> 13.824 MB/s) +dwMaxBitRate : 0x0D2F0000 (221184000 bps -> 27.648 MB/s) +dwMaxVideoFrameBufferSize: 0x001C2000 (1843200 bytes) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x02 (2 discrete frame intervals supported) +adwFrameInterval[1] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[2] : 0x000F4240 (100.0000 ms -> 10.000 fps) +Data (HexDump) : 22 24 07 01 01 00 05 D0 02 00 80 97 06 00 00 2F "$............./ + 0D 00 20 1C 00 2A 2C 0A 00 02 2A 2C 0A 00 40 42 .. ..*,...*,..@B + 0F 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x22 (34 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x01 +wWidth : 0x0320 (800) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x03A98000 (61440000 bps -> 7.680 MB/s) +dwMaxBitRate : 0x07530000 (122880000 bps -> 15.360 MB/s) +dwMaxVideoFrameBufferSize: 0x000BB800 (768000 bytes) +dwDefaultFrameInterval : 0x0007A120 (50.0000 ms -> 20.000 fps) +bFrameIntervalType : 0x02 (2 discrete frame intervals supported) +adwFrameInterval[1] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[2] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 22 24 07 02 01 20 03 E0 01 00 80 A9 03 00 00 53 "$... .........S + 07 00 B8 0B 00 20 A1 07 00 02 20 A1 07 00 2A 2C ..... .... ...*, + 0A 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x22 (34 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x01 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x03A98000 (61440000 bps -> 7.680 MB/s) +dwMaxBitRate : 0x07530000 (122880000 bps -> 15.360 MB/s) +dwMaxVideoFrameBufferSize: 0x00096000 (614400 bytes) +dwDefaultFrameInterval : 0x00061A80 (40.0000 ms -> 25.000 fps) +bFrameIntervalType : 0x02 (2 discrete frame intervals supported) +adwFrameInterval[1] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[2] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 22 24 07 03 01 80 02 E0 01 00 80 A9 03 00 00 53 "$.............S + 07 00 60 09 00 80 1A 06 00 02 80 1A 06 00 2A 2C ..`...........*, + 0A 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x22 (34 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x01 +wWidth : 0x01E0 (480) +wHeight : 0x0140 (320) +dwMinBitRate : 0x01D4C000 (30720000 bps -> 3.840 MB/s) +dwMaxBitRate : 0x03A98000 (61440000 bps -> 7.680 MB/s) +dwMaxVideoFrameBufferSize: 0x0004B000 (307200 bytes) +dwDefaultFrameInterval : 0x00061A80 (40.0000 ms -> 25.000 fps) +bFrameIntervalType : 0x02 (2 discrete frame intervals supported) +adwFrameInterval[1] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[2] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 22 24 07 04 01 E0 01 40 01 00 C0 D4 01 00 80 A9 "$.....@........ + 03 00 B0 04 00 80 1A 06 00 02 80 1A 06 00 2A 2C ..............*, + 0A 00 .. + + ---------- Still Image Frame Type Descriptor ---------- +bLength : 0x16 (22 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x03 (Still Image Frame Type) +bEndpointAddress : 0x00 (no endpoint) +bNumImageSizePatterns : 0x04 (4 Image Size Patterns) +1: wWidth x wHeight : 0x0500 x 0x02D0 (1280 x 720) +2: wWidth x wHeight : 0x0320 x 0x01E0 (800 x 480) +3: wWidth x wHeight : 0x0280 x 0x01E0 (640 x 480) +4: wWidth x wHeight : 0x01E0 x 0x0140 (480 x 320) +bNumCompressionPattern : 0x00 +Data (HexDump) : 16 24 03 00 04 00 05 D0 02 20 03 E0 01 80 02 E0 .$....... ...... + 01 E0 01 40 01 00 ...@.. + + ------- VS Color Matching Descriptor Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x0D (Color Matching) +bColorPrimaries : 0x01 (BT.709, sRGB) +bTransferCharacteristics : 0x01 (BT.709) +bMatrixCoefficients : 0x04 (SMPTE 170M) +Data (HexDump) : 06 24 0D 01 01 04 .$.... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x02 +bInterfaceCount : 0x03 +bFunctionClass : 0x01 (Audio) +bFunctionSubClass : 0x00 (undefined) +bFunctionProtocol : 0x00 +iFunction : 0x04 (String Descriptor 4) + Language 0x0409 : "HD audio " +Data (HexDump) : 08 0B 02 03 01 00 00 04 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x02 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x01 (Audio Control) +bInterfaceProtocol : 0x00 +iInterface : 0x04 (String Descriptor 4) + Language 0x0409 : "HD audio " +Data (HexDump) : 09 04 02 00 00 01 01 00 04 ......... + + ------ Audio Control Interface Header Descriptor ------ +bLength : 0x0A (10 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 (Header) +bcdADC : 0x0100 +wTotalLength : 0x0045 (69 bytes) +bInCollection : 0x02 +baInterfaceNr[1] : 0x03 +baInterfaceNr[2] : 0x04 +Data (HexDump) : 0A 24 01 00 01 45 00 02 03 04 .$...E.... + + ------- Audio Control Input Terminal Descriptor ------- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x04 +wTerminalType : 0x0201 (Microphone) +bAssocTerminal : 0x00 +bNrChannels : 0x01 (1 channel) +wChannelConfig : 0x0001 (L) +iChannelNames : 0x00 (No String Descriptor) +iTerminal : 0x00 (No String Descriptor) +Data (HexDump) : 0C 24 02 04 01 02 00 01 01 00 00 00 .$.......... + + -------- Audio Control Feature Unit Descriptor -------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x06 (Feature Unit) +bUnitID : 0x05 (5) +bSourceID : 0x04 (4) +bControlSize : 0x01 (1 byte per control) +bmaControls[0] : 0x03 + D0: Mute : 1 + D1: Volume : 1 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 +iFeature : 0x00 (No String Descriptor) +Data (HexDump) : 08 24 06 05 04 01 03 00 .$...... + + ------- Audio Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x06 +wTerminalType : 0x0101 (USB streaming) +bAssocTerminal : 0x00 (0) +bSourceID : 0x05 (5) +iTerminal : 0x00 (No String Descriptor) +Data (HexDump) : 09 24 03 06 01 01 00 05 00 .$....... + + ------- Audio Control Input Terminal Descriptor ------- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x07 +wTerminalType : 0x0101 (USB streaming) +bAssocTerminal : 0x00 +bNrChannels : 0x01 (1 channel) +wChannelConfig : 0x0001 (L) +iChannelNames : 0x00 (No String Descriptor) +iTerminal : 0x00 (No String Descriptor) +Data (HexDump) : 0C 24 02 07 01 01 00 01 01 00 00 00 .$.......... + + -------- Audio Control Feature Unit Descriptor -------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x06 (Feature Unit) +bUnitID : 0x08 (8) +bSourceID : 0x07 (7) +bControlSize : 0x01 (1 byte per control) +bmaControls[0] : 0x01 + D0: Mute : 1 + D1: Volume : 0 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 +bmaControls[1] : 0x02 + D0: Mute : 0 + D1: Volume : 1 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 +iFeature : 0x00 (No String Descriptor) +Data (HexDump) : 09 24 06 08 07 01 01 02 00 .$....... + + ------- Audio Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x09 +wTerminalType : 0x0301 (Speaker) +bAssocTerminal : 0x07 (7) +bSourceID : 0x08 (8) +iTerminal : 0x00 (No String Descriptor) +Data (HexDump) : 09 24 03 09 01 03 07 08 00 .$....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 00 00 01 02 00 00 ......... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 01 01 01 02 00 00 ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x06 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 06 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x01 (1 channel) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x01 (supports 1 sample frequency) +tSamFreq[1] : 0x03E80 (16000 Hz) +Data (HexDump) : 0B 24 02 01 01 02 10 01 80 3E 00 .$.......>. + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x82 (Direction=IN EndpointID=2) +bmAttributes : 0x0D (TransferType=Isochronous SyncType=Synchronous EndpointType=Data) +wMaxPacketSize : 0x0064 (100 bytes) +bInterval : 0x01 (1 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 82 0D 64 00 01 00 00 ....d.... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x00 (Undefined) +wLockDelay : 0x0000 +Data (HexDump) : 07 25 01 01 00 00 00 .%..... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x04 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 04 00 00 01 02 00 00 ......... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x04 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 04 01 01 01 02 00 00 ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x07 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 07 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x01 (1 channel) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x01 (supports 1 sample frequency) +tSamFreq[1] : 0x03E80 (16000 Hz) +Data (HexDump) : 0B 24 02 01 01 02 10 01 80 3E 00 .$.......>. + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x03 (Direction=OUT EndpointID=3) +bmAttributes : 0x09 (TransferType=Isochronous SyncType=Adaptive EndpointType=Data) +wMaxPacketSize : 0x0064 (100 bytes) +bInterval : 0x01 (1 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 03 09 64 00 01 00 00 ....d.... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x01 (Milliseconds) +wLockDelay : 0x0001 (1 ms) +Data (HexDump) : 07 25 01 01 01 01 00 .%..... + + ----------------- Device Qualifier Descriptor ----------------- +bLength : 0x0A (10 bytes) +bDescriptorType : 0x06 (Device_qualifier Descriptor) +bcdUSB : 0x200 (USB Version 2.00) +bDeviceClass : 0x00 (defined by the interface descriptors) +bDeviceSubClass : 0x00 +bDeviceProtocol : 0x00 +bMaxPacketSize0 : 0x40 (64 Bytes) +bNumConfigurations : 0x01 (1 other-speed configuration) +bReserved : 0x00 +Data (HexDump) : 0A 06 00 02 00 00 00 40 01 00 .......@.. + + ------------ Other Speed Configuration Descriptor ------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x07 (Other_speed_configuration Descriptor) +wTotalLength : 0x01E4 (484 bytes) +bNumInterfaces : 0x05 (5 Interfaces) +bConfigurationValue : 0x01 (Configuration 1) +iConfiguration : 0x00 (No String Descriptor) +bmAttributes : 0x80 + D7: Reserved, set 1 : 0x01 + D6: Self Powered : 0x00 (no) + D5: Remote Wakeup : 0x00 (no) + D4..0: Reserved, set 0 : 0x00 +MaxPower : 0x80 (256 mA) +Data (HexDump) : 09 07 E4 01 05 01 00 80 80 08 0B 00 02 0E 03 00 ................ + 02 09 04 00 00 01 0E 01 00 02 0D 24 01 00 01 33 ...........$...3 + 00 00 36 6E 01 01 01 12 24 02 01 01 02 00 00 00 ..6n....$....... + 00 00 00 00 00 03 00 00 00 0B 24 05 02 01 00 00 ..........$..... + 02 7F 17 00 09 24 03 03 01 01 00 02 00 07 05 84 .....$.......... + 03 0A 00 05 05 25 03 40 00 09 04 01 00 01 0E 02 .....%.@........ + 00 00 07 05 81 02 40 00 00 0E 24 01 01 BD 00 81 ......@...$..... + 00 03 02 01 00 01 00 0B 24 06 01 04 01 01 00 00 ........$....... + 00 00 22 24 07 01 01 00 05 D0 02 00 80 97 06 00 .."$............ + 00 2F 0D 00 20 1C 00 2A 2C 0A 00 02 2A 2C 0A 00 ./.. ..*,...*,.. + 40 42 0F 00 22 24 07 02 01 20 03 E0 01 00 80 A9 @B.."$... ...... + 03 00 00 53 07 00 B8 0B 00 20 A1 07 00 02 20 A1 ...S..... .... . + 07 00 2A 2C 0A 00 22 24 07 03 01 80 02 E0 01 00 ..*,.."$........ + 80 A9 03 00 00 53 07 00 60 09 00 80 1A 06 00 02 .....S..`....... + 80 1A 06 00 2A 2C 0A 00 22 24 07 04 01 E0 01 40 ....*,.."$.....@ + 01 00 C0 D4 01 00 80 A9 03 00 B0 04 00 80 1A 06 ................ + 00 02 80 1A 06 00 2A 2C 0A 00 16 24 03 00 04 00 ......*,...$.... + 05 D0 02 20 03 E0 01 80 02 E0 01 E0 01 40 01 00 ... .........@.. + 06 24 0D 01 01 04 08 0B 02 03 01 00 00 04 09 04 .$.............. + 02 00 00 01 01 00 04 0A 24 01 00 01 45 00 02 03 ........$...E... + 04 0C 24 02 04 01 02 00 01 01 00 00 00 08 24 06 ..$...........$. + 05 04 01 03 00 09 24 03 06 01 01 00 05 00 0C 24 ......$........$ + 02 07 01 01 00 01 01 00 00 00 09 24 06 08 07 01 ...........$.... + 01 02 00 09 24 03 09 01 03 07 08 00 09 04 03 00 ....$........... + 00 01 02 00 00 09 04 03 01 01 01 02 00 00 07 24 ...............$ + 01 06 01 01 00 0B 24 02 01 01 02 10 01 80 3E 00 ......$.......>. + 09 05 82 0D 64 00 01 00 00 07 25 01 01 00 00 00 ....d.....%..... + 09 04 04 00 00 01 02 00 00 09 04 04 01 01 01 02 ................ + 00 00 07 24 01 07 01 01 00 0B 24 02 01 01 02 10 ...$......$..... + 01 80 3E 00 09 05 03 09 64 00 01 00 00 07 25 01 ..>.....d.....%. + 01 01 01 00 .... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x00 +bInterfaceCount : 0x02 +bFunctionClass : 0x0E (Video) +bFunctionSubClass : 0x03 (Video Interface Collection) +bFunctionProtocol : 0x00 (PC_PROTOCOL_UNDEFINED protocol) +iFunction : 0x02 (String Descriptor 2) + Language 0x0409 : "HD video " +Data (HexDump) : 08 0B 00 02 0E 03 00 02 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x00 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x01 (Video Control) +bInterfaceProtocol : 0x00 +iInterface : 0x02 (String Descriptor 2) + Language 0x0409 : "HD video " +Data (HexDump) : 09 04 00 00 01 0E 01 00 02 ......... + + ------- Video Control Interface Header Descriptor ----- +bLength : 0x0D (13 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x01 (Video Control Header) +bcdUVC : 0x0100 (UVC Version 1.00) +wTotalLength : 0x0033 (51 bytes) +dwClockFreq : 0x016E3600 (24 MHz) +bInCollection : 0x01 (1 VideoStreaming interface) +baInterfaceNr[1] : 0x01 +Data (HexDump) : 0D 24 01 00 01 33 00 00 36 6E 01 01 01 .$...3..6n... + + -------- Video Control Input Terminal Descriptor ------ +bLength : 0x12 (18 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (ITT_CAMERA) +bAssocTerminal : 0x00 (Not associated with an Output Terminal) +iTerminal : 0x00 +Camera Input Terminal Data: +wObjectiveFocalLengthMin : 0x0000 +wObjectiveFocalLengthMax : 0x0000 +wOcularFocalLength : 0x0000 +bControlSize : 0x03 +bmControls : 0x00, 0x00, 0x00 + D0 : 0 no - Scanning Mode + D1 : 0 no - Auto-Exposure Mode + D2 : 0 no - Auto-Exposure Priority + D3 : 0 no - Exposure Time (Absolute) + D4 : 0 no - Exposure Time (Relative) + D5 : 0 no - Focus (Absolute) + D6 : 0 no - Focus (Relative) + D7 : 0 no - Iris (Absolute) + D8 : 0 no - Iris (Relative) + D9 : 0 no - Zoom (Absolute) + D10 : 0 no - Zoom (Relative) + D11 : 0 no - Pan (Absolute) + D12 : 0 no - Pan (Relative) + D13 : 0 no - Roll (Absolute) + D14 : 0 no - Roll (Relative) + D15 : 0 no - Tilt (Absolute) + D16 : 0 no - Tilt (Relative) + D17 : 0 no - Focus Auto + D18 : 0 no - Reserved + D19 : 0 no - Reserved + D20 : 0 no - Reserved + D21 : 0 no - Reserved + D22 : 0 no - Reserved + D23 : 0 no - Reserved +Data (HexDump) : 12 24 02 01 01 02 00 00 00 00 00 00 00 00 03 00 .$.............. + 00 00 .. + + -------- Video Control Processing Unit Descriptor ----- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x05 (Processing Unit) +bUnitID : 0x02 +bSourceID : 0x01 +wMaxMultiplier : 0x0000 +bControlSize : 0x02 +bmControls : 0x7F, 0x17 + D0 : 1 yes - Brightness + D1 : 1 yes - Contrast + D2 : 1 yes - Hue + D3 : 1 yes - Saturation + D4 : 1 yes - Sharpness + D5 : 1 yes - Gamma + D6 : 1 yes - White Balance Temperature + D7 : 0 no - White Balance Component + D8 : 1 yes - Backlight Compensation + D9 : 1 yes - Gain + D10 : 1 yes - Power Line Frequency + D11 : 0 no - Hue, Auto + D12 : 1 yes - White Balance Temperature, Auto + D13 : 0 no - White Balance Component, Auto + D14 : 0 no - Digital Multiplier + D15 : 0 no - Digital Multiplier Limit +iProcessing : 0x00 +Data (HexDump) : 0B 24 05 02 01 00 00 02 7F 17 00 .$......... + + ------- Video Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x03 +wTerminalType : 0x0101 (TT_STREAMING) +bAssocTerminal : 0x00 (Not associated with an Input Terminal) +bSourceID : 0x02 +iTerminal : 0x00 +Data (HexDump) : 09 24 03 03 01 01 00 02 00 .$....... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x84 (Direction=IN EndpointID=4) +bmAttributes : 0x03 (TransferType=Interrupt) +wMaxPacketSize : 0x000A (10 bytes) +bInterval : 0x05 (5 ms) +Data (HexDump) : 07 05 84 03 0A 00 05 ....... + + --- Class-specific VC Interrupt Endpoint Descriptor --- +bLength : 0x05 (5 bytes) +bDescriptorType : 0x25 (Video Control Endpoint) +bDescriptorSubtype : 0x03 (Interrupt) +wMaxTransferSize : 0x0040 (64 bytes) +Data (HexDump) : 05 25 03 40 00 .%.@. + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 00 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x02 (TransferType=Bulk) +wMaxPacketSize : 0x0040 (64 bytes) +bInterval : 0x00 (ignored) +Data (HexDump) : 07 05 81 02 40 00 00 ....@.. + + ---- VC-Specific VS Video Input Header Descriptor ----- +bLength : 0x0E (14 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x01 (Input Header) +bNumFormats : 0x01 +wTotalLength : 0x00BD (189 bytes) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmInfo : 0x00 (Dynamic Format Change not supported) +bTerminalLink : 0x03 +bStillCaptureMethod : 0x02 (Still Capture Method 2) +nbTriggerSupport : 0x00 (Hardware Triggering not supported) +bTriggerUsage : 0x00 (Host will initiate still image capture) +nbControlSize : 0x01 +Video Payload Format 1 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Data (HexDump) : 0E 24 01 01 BD 00 81 00 03 02 01 00 01 00 .$............ + + ----- Video Streaming MJPEG Format Type Descriptor ---- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x06 (Format MJPEG) +bFormatIndex : 0x01 (1) +bNumFrameDescriptors : 0x04 (4) +bmFlags : 0x01 (Sample size is fixed) +bDefaultFrameIndex : 0x01 (1) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +Data (HexDump) : 0B 24 06 01 04 01 01 00 00 00 00 .$......... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +---> This is the Default (optimum) Frame index +bLength : 0x22 (34 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x01 +wWidth : 0x0500 (1280) +wHeight : 0x02D0 (720) +dwMinBitRate : 0x06978000 (110592000 bps -> 13.824 MB/s) +dwMaxBitRate : 0x0D2F0000 (221184000 bps -> 27.648 MB/s) +dwMaxVideoFrameBufferSize: 0x001C2000 (1843200 bytes) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x02 (2 discrete frame intervals supported) +adwFrameInterval[1] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[2] : 0x000F4240 (100.0000 ms -> 10.000 fps) +Data (HexDump) : 22 24 07 01 01 00 05 D0 02 00 80 97 06 00 00 2F "$............./ + 0D 00 20 1C 00 2A 2C 0A 00 02 2A 2C 0A 00 40 42 .. ..*,...*,..@B + 0F 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x22 (34 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x01 +wWidth : 0x0320 (800) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x03A98000 (61440000 bps -> 7.680 MB/s) +dwMaxBitRate : 0x07530000 (122880000 bps -> 15.360 MB/s) +dwMaxVideoFrameBufferSize: 0x000BB800 (768000 bytes) +dwDefaultFrameInterval : 0x0007A120 (50.0000 ms -> 20.000 fps) +bFrameIntervalType : 0x02 (2 discrete frame intervals supported) +adwFrameInterval[1] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[2] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 22 24 07 02 01 20 03 E0 01 00 80 A9 03 00 00 53 "$... .........S + 07 00 B8 0B 00 20 A1 07 00 02 20 A1 07 00 2A 2C ..... .... ...*, + 0A 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x22 (34 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x01 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x03A98000 (61440000 bps -> 7.680 MB/s) +dwMaxBitRate : 0x07530000 (122880000 bps -> 15.360 MB/s) +dwMaxVideoFrameBufferSize: 0x00096000 (614400 bytes) +dwDefaultFrameInterval : 0x00061A80 (40.0000 ms -> 25.000 fps) +bFrameIntervalType : 0x02 (2 discrete frame intervals supported) +adwFrameInterval[1] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[2] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 22 24 07 03 01 80 02 E0 01 00 80 A9 03 00 00 53 "$.............S + 07 00 60 09 00 80 1A 06 00 02 80 1A 06 00 2A 2C ..`...........*, + 0A 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x22 (34 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x01 +wWidth : 0x01E0 (480) +wHeight : 0x0140 (320) +dwMinBitRate : 0x01D4C000 (30720000 bps -> 3.840 MB/s) +dwMaxBitRate : 0x03A98000 (61440000 bps -> 7.680 MB/s) +dwMaxVideoFrameBufferSize: 0x0004B000 (307200 bytes) +dwDefaultFrameInterval : 0x00061A80 (40.0000 ms -> 25.000 fps) +bFrameIntervalType : 0x02 (2 discrete frame intervals supported) +adwFrameInterval[1] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[2] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 22 24 07 04 01 E0 01 40 01 00 C0 D4 01 00 80 A9 "$.....@........ + 03 00 B0 04 00 80 1A 06 00 02 80 1A 06 00 2A 2C ..............*, + 0A 00 .. + + ---------- Still Image Frame Type Descriptor ---------- +bLength : 0x16 (22 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x03 (Still Image Frame Type) +bEndpointAddress : 0x00 (no endpoint) +bNumImageSizePatterns : 0x04 (4 Image Size Patterns) +1: wWidth x wHeight : 0x0500 x 0x02D0 (1280 x 720) +2: wWidth x wHeight : 0x0320 x 0x01E0 (800 x 480) +3: wWidth x wHeight : 0x0280 x 0x01E0 (640 x 480) +4: wWidth x wHeight : 0x01E0 x 0x0140 (480 x 320) +bNumCompressionPattern : 0x00 +Data (HexDump) : 16 24 03 00 04 00 05 D0 02 20 03 E0 01 80 02 E0 .$....... ...... + 01 E0 01 40 01 00 ...@.. + + ------- VS Color Matching Descriptor Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x0D (Color Matching) +bColorPrimaries : 0x01 (BT.709, sRGB) +bTransferCharacteristics : 0x01 (BT.709) +bMatrixCoefficients : 0x04 (SMPTE 170M) +Data (HexDump) : 06 24 0D 01 01 04 .$.... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x02 +bInterfaceCount : 0x03 +bFunctionClass : 0x01 (Audio) +bFunctionSubClass : 0x00 (undefined) +bFunctionProtocol : 0x00 +iFunction : 0x04 (String Descriptor 4) + Language 0x0409 : "HD audio " +Data (HexDump) : 08 0B 02 03 01 00 00 04 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x02 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x01 (Audio Control) +bInterfaceProtocol : 0x00 +iInterface : 0x04 (String Descriptor 4) + Language 0x0409 : "HD audio " +Data (HexDump) : 09 04 02 00 00 01 01 00 04 ......... + + ------ Audio Control Interface Header Descriptor ------ +bLength : 0x0A (10 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 (Header) +bcdADC : 0x0100 +wTotalLength : 0x0045 (69 bytes) +bInCollection : 0x02 +baInterfaceNr[1] : 0x03 +baInterfaceNr[2] : 0x04 +Data (HexDump) : 0A 24 01 00 01 45 00 02 03 04 .$...E.... + + ------- Audio Control Input Terminal Descriptor ------- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x04 +wTerminalType : 0x0201 (Microphone) +bAssocTerminal : 0x00 +bNrChannels : 0x01 (1 channel) +wChannelConfig : 0x0001 (L) +iChannelNames : 0x00 (No String Descriptor) +iTerminal : 0x00 (No String Descriptor) +Data (HexDump) : 0C 24 02 04 01 02 00 01 01 00 00 00 .$.......... + + -------- Audio Control Feature Unit Descriptor -------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x06 (Feature Unit) +bUnitID : 0x05 (5) +bSourceID : 0x04 (4) +bControlSize : 0x01 (1 byte per control) +bmaControls[0] : 0x03 + D0: Mute : 1 + D1: Volume : 1 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 +iFeature : 0x00 (No String Descriptor) +Data (HexDump) : 08 24 06 05 04 01 03 00 .$...... + + ------- Audio Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x06 +wTerminalType : 0x0101 (USB streaming) +bAssocTerminal : 0x00 (0) +bSourceID : 0x05 (5) +iTerminal : 0x00 (No String Descriptor) +Data (HexDump) : 09 24 03 06 01 01 00 05 00 .$....... + + ------- Audio Control Input Terminal Descriptor ------- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x07 +wTerminalType : 0x0101 (USB streaming) +bAssocTerminal : 0x00 +bNrChannels : 0x01 (1 channel) +wChannelConfig : 0x0001 (L) +iChannelNames : 0x00 (No String Descriptor) +iTerminal : 0x00 (No String Descriptor) +Data (HexDump) : 0C 24 02 07 01 01 00 01 01 00 00 00 .$.......... + + -------- Audio Control Feature Unit Descriptor -------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x06 (Feature Unit) +bUnitID : 0x08 (8) +bSourceID : 0x07 (7) +bControlSize : 0x01 (1 byte per control) +bmaControls[0] : 0x01 + D0: Mute : 1 + D1: Volume : 0 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 +bmaControls[1] : 0x02 + D0: Mute : 0 + D1: Volume : 1 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 +iFeature : 0x00 (No String Descriptor) +Data (HexDump) : 09 24 06 08 07 01 01 02 00 .$....... + + ------- Audio Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x09 +wTerminalType : 0x0301 (Speaker) +bAssocTerminal : 0x07 (7) +bSourceID : 0x08 (8) +iTerminal : 0x00 (No String Descriptor) +Data (HexDump) : 09 24 03 09 01 03 07 08 00 .$....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 00 00 01 02 00 00 ......... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 01 01 01 02 00 00 ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x06 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 06 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x01 (1 channel) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x01 (supports 1 sample frequency) +tSamFreq[1] : 0x03E80 (16000 Hz) +Data (HexDump) : 0B 24 02 01 01 02 10 01 80 3E 00 .$.......>. + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x82 (Direction=IN EndpointID=2) +bmAttributes : 0x0D (TransferType=Isochronous SyncType=Synchronous EndpointType=Data) +wMaxPacketSize : 0x0064 (100 bytes) +bInterval : 0x01 (1 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 82 0D 64 00 01 00 00 ....d.... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x00 (Undefined) +wLockDelay : 0x0000 +Data (HexDump) : 07 25 01 01 00 00 00 .%..... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x04 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 04 00 00 01 02 00 00 ......... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x04 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 04 01 01 01 02 00 00 ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x07 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 07 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x01 (1 channel) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x01 (supports 1 sample frequency) +tSamFreq[1] : 0x03E80 (16000 Hz) +Data (HexDump) : 0B 24 02 01 01 02 10 01 80 3E 00 .$.......>. + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x03 (Direction=OUT EndpointID=3) +bmAttributes : 0x09 (TransferType=Isochronous SyncType=Adaptive EndpointType=Data) +wMaxPacketSize : 0x0064 (100 bytes) +bInterval : 0x01 (1 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 03 09 64 00 01 00 00 ....d.... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x01 (Milliseconds) +wLockDelay : 0x0001 (1 ms) +Data (HexDump) : 07 25 01 01 01 01 00 .%..... + + -------------------- String Descriptors ------------------- + ------ String Descriptor 0 ------ +bLength : 0x04 (4 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language ID[0] : 0x0409 (English - United States) +Data (HexDump) : 04 03 09 04 .... + ------ String Descriptor 1 ------ +bLength : 0x10 (16 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Generic" +Data (HexDump) : 10 03 47 00 65 00 6E 00 65 00 72 00 69 00 63 00 ..G.e.n.e.r.i.c. + ------ String Descriptor 2 ------ +bLength : 0x16 (22 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "HD video " *!*CAUTION trailing space characters +Data (HexDump) : 16 03 48 00 44 00 20 00 76 00 69 00 64 00 65 00 ..H.D. .v.i.d.e. + 6F 00 20 00 20 00 o. . . + ------ String Descriptor 3 ------ +bLength : 0x1E (30 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "20210901000000" +Data (HexDump) : 1E 03 32 00 30 00 32 00 31 00 30 00 39 00 30 00 ..2.0.2.1.0.9.0. + 31 00 30 00 30 00 30 00 30 00 30 00 30 00 1.0.0.0.0.0.0. + ------ String Descriptor 4 ------ +bLength : 0x16 (22 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "HD audio " *!*CAUTION trailing space characters +Data (HexDump) : 16 03 48 00 44 00 20 00 61 00 75 00 64 00 69 00 ..H.D. .a.u.d.i. + 6F 00 20 00 20 00 o. . . + +*/ + +namespace customer_camera { +const uint8_t dev_desc[] = { + 0x12, 0x01, 0x00, 0x02, 0xEF, 0x02, 0x01, 0x40, 0x9C, 0x34, 0x07, 0x33, 0x01, 0x03, 0x01, 0x02, + 0x03, 0x01 +}; + +const uint8_t cfg_desc[] = { + 0x09, 0x02, 0xE4, 0x01, 0x05, 0x01, 0x00, 0x80, 0x80, 0x08, 0x0B, 0x00, 0x02, 0x0E, 0x03, 0x00, + 0x02, 0x09, 0x04, 0x00, 0x00, 0x01, 0x0E, 0x01, 0x00, 0x02, 0x0D, 0x24, 0x01, 0x00, 0x01, 0x33, + 0x00, 0x00, 0x36, 0x6E, 0x01, 0x01, 0x01, 0x12, 0x24, 0x02, 0x01, 0x01, 0x02, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0B, 0x24, 0x05, 0x02, 0x01, 0x00, 0x00, + 0x02, 0x7F, 0x17, 0x00, 0x09, 0x24, 0x03, 0x03, 0x01, 0x01, 0x00, 0x02, 0x00, 0x07, 0x05, 0x84, + 0x03, 0x0A, 0x00, 0x05, 0x05, 0x25, 0x03, 0x40, 0x00, 0x09, 0x04, 0x01, 0x00, 0x01, 0x0E, 0x02, + 0x00, 0x00, 0x07, 0x05, 0x81, 0x02, 0x40, 0x00, 0x00, 0x0E, 0x24, 0x01, 0x01, 0xBD, 0x00, 0x81, + 0x00, 0x03, 0x02, 0x01, 0x00, 0x01, 0x00, 0x0B, 0x24, 0x06, 0x01, 0x04, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x22, 0x24, 0x07, 0x01, 0x01, 0x00, 0x05, 0xD0, 0x02, 0x00, 0x80, 0x97, 0x06, 0x00, + 0x00, 0x2F, 0x0D, 0x00, 0x20, 0x1C, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x02, 0x2A, 0x2C, 0x0A, 0x00, + 0x40, 0x42, 0x0F, 0x00, 0x22, 0x24, 0x07, 0x02, 0x01, 0x20, 0x03, 0xE0, 0x01, 0x00, 0x80, 0xA9, + 0x03, 0x00, 0x00, 0x53, 0x07, 0x00, 0xB8, 0x0B, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x02, 0x20, 0xA1, + 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x22, 0x24, 0x07, 0x03, 0x01, 0x80, 0x02, 0xE0, 0x01, 0x00, + 0x80, 0xA9, 0x03, 0x00, 0x00, 0x53, 0x07, 0x00, 0x60, 0x09, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x02, + 0x80, 0x1A, 0x06, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x22, 0x24, 0x07, 0x04, 0x01, 0xE0, 0x01, 0x40, + 0x01, 0x00, 0xC0, 0xD4, 0x01, 0x00, 0x80, 0xA9, 0x03, 0x00, 0xB0, 0x04, 0x00, 0x80, 0x1A, 0x06, + 0x00, 0x02, 0x80, 0x1A, 0x06, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x16, 0x24, 0x03, 0x00, 0x04, 0x00, + 0x05, 0xD0, 0x02, 0x20, 0x03, 0xE0, 0x01, 0x80, 0x02, 0xE0, 0x01, 0xE0, 0x01, 0x40, 0x01, 0x00, + 0x06, 0x24, 0x0D, 0x01, 0x01, 0x04, 0x08, 0x0B, 0x02, 0x03, 0x01, 0x00, 0x00, 0x04, 0x09, 0x04, + 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x04, 0x0A, 0x24, 0x01, 0x00, 0x01, 0x45, 0x00, 0x02, 0x03, + 0x04, 0x0C, 0x24, 0x02, 0x04, 0x01, 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x08, 0x24, 0x06, + 0x05, 0x04, 0x01, 0x03, 0x00, 0x09, 0x24, 0x03, 0x06, 0x01, 0x01, 0x00, 0x05, 0x00, 0x0C, 0x24, + 0x02, 0x07, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x09, 0x24, 0x06, 0x08, 0x07, 0x01, + 0x01, 0x02, 0x00, 0x09, 0x24, 0x03, 0x09, 0x01, 0x03, 0x07, 0x08, 0x00, 0x09, 0x04, 0x03, 0x00, + 0x00, 0x01, 0x02, 0x00, 0x00, 0x09, 0x04, 0x03, 0x01, 0x01, 0x01, 0x02, 0x00, 0x00, 0x07, 0x24, + 0x01, 0x06, 0x01, 0x01, 0x00, 0x0B, 0x24, 0x02, 0x01, 0x01, 0x02, 0x10, 0x01, 0x80, 0x3E, 0x00, + 0x09, 0x05, 0x82, 0x0D, 0x64, 0x00, 0x01, 0x00, 0x00, 0x07, 0x25, 0x01, 0x01, 0x00, 0x00, 0x00, + 0x09, 0x04, 0x04, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x09, 0x04, 0x04, 0x01, 0x01, 0x01, 0x02, + 0x00, 0x00, 0x07, 0x24, 0x01, 0x07, 0x01, 0x01, 0x00, 0x0B, 0x24, 0x02, 0x01, 0x01, 0x02, 0x10, + 0x01, 0x80, 0x3E, 0x00, 0x09, 0x05, 0x03, 0x09, 0x64, 0x00, 0x01, 0x00, 0x00, 0x07, 0x25, 0x01, + 0x01, 0x01, 0x00 +}; +} diff --git a/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/customer_dual.hpp b/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/customer_dual.hpp new file mode 100644 index 00000000..4e785a93 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/customer_dual.hpp @@ -0,0 +1,2722 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include + +/* + ======================== USB Device ======================== + + +++++++++++++++++ Device Information ++++++++++++++++++ +Device Description : USB Composite Device +Device ID : USB\VID_2207&PID_0018\2D312FF4BB1927AF +Hardware IDs : USB\VID_2207&PID_0018&REV_0310 USB\VID_2207&PID_0018 +Driver KeyName : {36fc9e60-c465-11cf-8056-444553540000}\0097 (GUID_DEVCLASS_USB) +Driver : \SystemRoot\System32\drivers\usbccgp.sys (Version: 10.0.19041.4355 Date: 2024-05-01) +Driver Inf : C:\Windows\inf\usb.inf +Legacy BusType : PNPBus +Class : USB +Class GUID : {36fc9e60-c465-11cf-8056-444553540000} (GUID_DEVCLASS_USB) +Service : usbccgp +Enumerator : USB +Location Info : Port_#0002.Hub_#0012 +Location IDs : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(4)#USB(2), ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(4)#USB(2) +Container ID : {c04c3c33-9149-5d5b-8d47-79610abb2768} +Manufacturer Info : (Standard USB Host Controller) +Capabilities : 0x94 (Removable, UniqueID, SurpriseRemovalOK) +Status : 0x0180600A (DN_DRIVER_LOADED, DN_STARTED, DN_DISABLEABLE, DN_REMOVABLE, DN_NT_ENUMERATOR, DN_NT_DRIVER) +Problem Code : 0 +Address : 2 +HcDisableSelectiveSuspend: 0 +EnableSelectiveSuspend : 0 +SelectiveSuspendEnabled : 0 +EnhancedPowerMgmtEnabled : 0 +IdleInWorkingState : 0 +WakeFromSleepState : 0 +Power State : D0 (supported: D0, D3, wake from D0) + Child Device 1 : KAADAS MJPG Carmera + (USB Video Device) + Device Path : \\?\USB#VID_2207&PID_0018&MI_00#a&32306b0d&0&0000#{e5323777-f976-4f5b-9b55-b94699c46e44}\global (STATIC_KSCATEGORY_VIDEO_CAMERA) + Kernel Name : \Device\000001d3 + Device ID : USB\VID_2207&PID_0018&MI_00\A&32306B0D&0&0000 + Class : Camera + Driver KeyName : {ca3e7ab9-b4c3-4ae6-8251-579ef933890f}\0008 (GUID_DEVCLASS_CAMERA) + Service : usbvideo + Location : 0005.0000.0004.001.003.004.002.000.000 + LocationPaths : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(4)#USB(2)#USBMI(0) PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(4)#USB(2)#USB(2) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(4)#USB(2)#USBMI(0) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(4)#USB(2)#USB(2) + Child Device 2 : KAADAS Video Carmera + (USB Video Device) + Device Path : \\?\USB#VID_2207&PID_0018&MI_02#a&32306b0d&0&0002#{6994ad05-93ef-11d0-a3cc-00a0c9223196}\global (AM_KSCATEGORY_VIDEO) + Kernel Name : \Device\000001d4 + Device ID : USB\VID_2207&PID_0018&MI_02\A&32306B0D&0&0002 + Class : Camera + Driver KeyName : {ca3e7ab9-b4c3-4ae6-8251-579ef933890f}\0009 (GUID_DEVCLASS_CAMERA) + Service : usbvideo + Location : 0005.0000.0004.001.003.004.002.000.000 + LocationPaths : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(4)#USB(2)#USBMI(2) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(4)#USB(2)#USBMI(2) + Child Device 3 : USB Serial Device + Device Path : \\?\USB#VID_2207&PID_0018&MI_04#a&32306b0d&0&0004#{86e0d1e0-8089-11d0-9ce4-08003e301f73} (GUID_DEVINTERFACE_COMPORT) + Kernel Name : \Device\000001d5 + Device ID : USB\VID_2207&PID_0018&MI_04\A&32306B0D&0&0004 + Class : Ports + Driver KeyName : {4d36e978-e325-11ce-bfc1-08002be10318}\0007 (GUID_DEVCLASS_PORTS) + Service : usbser + Location : 0005.0000.0004.001.003.004.002.000.000 + LocationPaths : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(4)#USB(2)#USBMI(4) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(4)#USB(2)#USBMI(4) + COM-Port : COM12 (\Device\USBSER000) + Child Device 4 : Source/Sink (USB Audio Device) + Device Path : \\?\USB#VID_2207&PID_0018&MI_06#a&32306b0d&0&0006#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\global (AM_KSCATEGORY_AUDIO) + Kernel Name : \Device\000001d6 + Device ID : USB\VID_2207&PID_0018&MI_06\A&32306B0D&0&0006 + Class : MEDIA + Driver KeyName : {4d36e96c-e325-11ce-bfc1-08002be10318}\0013 (GUID_DEVCLASS_MEDIA) + Service : usbaudio + Location : 0005.0000.0004.001.003.004.002.000.000 + LocationPaths : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(4)#USB(2)#USBMI(6) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(4)#USB(2)#USBMI(6) + Child Device 1 : Speakers (Source/Sink) (Audio Endpoint) + Device ID : SWD\MMDEVAPI\{0.0.0.00000000}.{FB9EA8ED-5B90-4156-8500-5E012F8687F3} + Class : AudioEndpoint + Driver KeyName : {c166523c-fe0c-4a94-a586-f1a80cfbbf3e}\0043 (AUDIOENDPOINT_CLASS_UUID) + Child Device 2 : Capture Input terminal (Source/Sink) (Audio Endpoint) + Device ID : SWD\MMDEVAPI\{0.0.1.00000000}.{2EA6231B-3575-483A-81F1-06E3D25AEFFB} + Class : AudioEndpoint + Driver KeyName : {c166523c-fe0c-4a94-a586-f1a80cfbbf3e}\0040 (AUDIOENDPOINT_CLASS_UUID) + + +++++++++++++++++ Registry USB Flags +++++++++++++++++ +HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags\220700180310 + osvc : REG_BINARY 00 00 + + ---------------- Connection Information --------------- +Connection Index : 0x02 (Port 2) +Connection Status : 0x01 (DeviceConnected) +Current Config Value : 0x01 (Configuration 1) +Device Address : 0x09 (9) +Is Hub : 0x00 (no) +Device Bus Speed : 0x02 (High-Speed) +Number Of Open Pipes : 0x06 (6 pipes to data endpoints) +Pipe[0] : EndpointID=1 Direction=IN ScheduleOffset=0 Type=Interrupt +Pipe[1] : EndpointID=3 Direction=IN ScheduleOffset=0 Type=Interrupt +Pipe[2] : EndpointID=6 Direction=IN ScheduleOffset=0 Type=Interrupt +Pipe[3] : EndpointID=5 Direction=IN ScheduleOffset=0 Type=Bulk +Pipe[4] : EndpointID=1 Direction=OUT ScheduleOffset=0 Type=Bulk +Pipe[5] : EndpointID=7 Direction=IN ScheduleOffset=0 Type=Interrupt +Data (HexDump) : 02 00 00 00 12 01 00 02 EF 02 01 40 07 22 18 00 ...........@.".. + 10 03 01 02 03 01 01 02 00 09 00 06 00 00 00 01 ................ + 00 00 00 07 05 81 03 10 00 08 00 00 00 00 07 05 ................ + 83 03 10 00 08 00 00 00 00 07 05 86 03 0A 00 09 ................ + 00 00 00 00 07 05 85 02 00 02 00 00 00 00 00 07 ................ + 05 01 02 00 02 00 00 00 00 00 07 05 87 03 02 00 ................ + 04 00 00 00 00 ..... + + --------------- Connection Information V2 ------------- +Connection Index : 0x02 (2) +Length : 0x10 (16 bytes) +SupportedUsbProtocols : 0x03 + Usb110 : 1 (yes, port supports USB 1.1) + Usb200 : 1 (yes, port supports USB 2.0) + Usb300 : 0 (no, port not supports USB 3.0) + ReservedMBZ : 0x00 +Flags : 0x00 + DevIsOpAtSsOrHigher : 0 (Device is not operating at SuperSpeed or higher) + DevIsSsCapOrHigher : 0 (Device is not SuperSpeed capable or higher) + DevIsOpAtSsPlusOrHigher : 0 (Device is not operating at SuperSpeedPlus or higher) + DevIsSsPlusCapOrHigher : 0 (Device is not SuperSpeedPlus capable or higher) + ReservedMBZ : 0x00 +Data (HexDump) : 02 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 ................ + + ---------------------- Device Descriptor ---------------------- +bLength : 0x12 (18 bytes) +bDescriptorType : 0x01 (Device Descriptor) +bcdUSB : 0x200 (USB Version 2.00) +bDeviceClass : 0xEF (Miscellaneous) +bDeviceSubClass : 0x02 +bDeviceProtocol : 0x01 (IAD - Interface Association Descriptor) +bMaxPacketSize0 : 0x40 (64 bytes) +idVendor : 0x2207 (Rockchip Electronics Co., Ltd.) +idProduct : 0x0018 +bcdDevice : 0x0310 +iManufacturer : 0x01 (String Descriptor 1) + Language 0x0409 : "rockchip" +iProduct : 0x02 (String Descriptor 2) + Language 0x0409 : "UVC" +iSerialNumber : 0x03 (String Descriptor 3) + Language 0x0409 : "2d312ff4bb1927af" +bNumConfigurations : 0x01 (1 Configuration) +Data (HexDump) : 12 01 00 02 EF 02 01 40 07 22 18 00 10 03 01 02 .......@."...... + 03 01 .. + + ------------------ Configuration Descriptor ------------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x02 (Configuration Descriptor) +wTotalLength : 0x037A (890 bytes) +bNumInterfaces : 0x09 (9 Interfaces) +bConfigurationValue : 0x01 (Configuration 1) +iConfiguration : 0x04 (String Descriptor 4) + Language 0x0409 : "uvc_uac1" +bmAttributes : 0x80 + D7: Reserved, set 1 : 0x01 + D6: Self Powered : 0x00 (no) + D5: Remote Wakeup : 0x00 (no) + D4..0: Reserved, set 0 : 0x00 +MaxPower : 0xFA (500 mA) +Data (HexDump) : 09 02 7A 03 09 01 04 80 FA 08 0B 00 02 0E 03 00 ..z............. + 05 09 04 00 00 01 0E 01 00 05 0D 24 01 00 01 4E ...........$...N + 00 00 6C DC 02 01 01 12 24 02 01 01 02 00 00 00 ..l.....$....... + 00 00 00 00 00 03 02 00 00 0C 24 05 02 01 00 40 ..........$....@ + 02 01 00 00 00 09 24 03 03 01 01 00 02 00 1A 24 ......$........$ + 06 06 A2 9E 76 41 DE 04 47 E3 8B 2B F4 34 1A FF ....vA..G..+.4.. + 00 3B 03 01 02 01 07 00 07 05 81 03 10 00 08 05 .;.............. + 25 03 10 00 09 04 01 00 00 0E 02 00 06 0E 24 01 %.............$. + 01 49 00 82 00 03 00 00 00 01 00 0B 24 06 01 01 .I..........$... + 00 01 00 00 00 00 2A 24 07 01 00 D0 02 00 05 00 ......*$........ + 40 19 01 00 40 19 01 00 20 1C 00 15 16 05 00 04 @...@... ....... + 15 16 05 00 2A 2C 0A 00 40 42 0F 00 80 84 1E 00 ....*,..@B...... + 06 24 0D 01 01 04 09 04 01 01 01 0E 02 00 06 07 .$.............. + 05 82 05 00 0C 01 08 0B 02 02 0E 03 00 08 09 04 ................ + 02 00 01 0E 01 00 08 0D 24 01 00 01 4E 00 00 6C ........$...N..l + DC 02 01 03 12 24 02 01 01 02 00 00 00 00 00 00 .....$.......... + 00 00 03 02 00 00 0C 24 05 02 01 00 40 02 01 00 .......$....@... + 00 00 09 24 03 03 01 01 00 02 00 1A 24 06 06 A2 ...$........$... + 9E 76 41 DE 04 47 E3 8B 2B F4 34 1A FF 00 3B 03 .vA..G..+.4...;. + 01 02 01 07 00 07 05 83 03 10 00 08 05 25 03 10 .............%.. + 00 09 04 03 00 00 0E 02 00 09 0E 24 01 01 02 01 ...........$.... + 84 00 03 00 00 00 01 00 1C 24 10 01 05 48 32 36 .........$...H26 + 35 00 00 10 00 80 00 00 AA 00 38 9B 71 10 01 00 5.........8.q... + 00 00 00 01 2A 24 11 01 00 80 02 E0 01 00 E0 2E ....*$.......... + 00 00 E0 2E 00 2A 2C 0A 00 04 00 00 00 00 15 16 .....*,......... + 05 00 80 1A 06 00 20 A1 07 00 2A 2C 0A 00 2A 24 ...... ...*,..*$ + 11 02 00 00 05 D0 02 00 A0 8C 00 00 A0 8C 00 2A ...............* + 2C 0A 00 04 00 00 00 00 15 16 05 00 80 1A 06 00 ,............... + 20 A1 07 00 2A 2C 0A 00 2A 24 11 03 00 80 07 38 ...*,..*$.....8 + 04 00 68 3C 01 00 68 3C 01 2A 2C 0A 00 04 00 00 ..h<..h<.*,..... + 00 00 15 16 05 00 80 1A 06 00 20 A1 07 00 2A 2C .......... ...*, + 0A 00 2A 24 11 04 00 00 0A A0 05 00 80 32 02 00 ..*$.........2.. + 80 32 02 2A 2C 0A 00 04 00 00 00 00 15 16 05 00 .2.*,........... + 80 1A 06 00 20 A1 07 00 2A 2C 0A 00 2A 24 11 05 .... ...*,..*$.. + 00 00 09 10 05 00 A0 C7 01 00 A0 C7 01 2A 2C 0A .............*,. + 00 04 00 00 00 00 15 16 05 00 80 1A 06 00 20 A1 .............. . + 07 00 2A 2C 0A 00 06 24 0D 01 01 04 09 04 03 01 ..*,...$........ + 01 0E 02 00 09 07 05 84 05 00 0C 01 08 0B 04 02 ................ + 02 02 01 0D 09 04 04 00 01 02 02 01 0B 05 24 00 ..............$. + 10 01 05 24 01 00 05 04 24 02 02 05 24 06 04 05 ...$....$...$... + 07 05 86 03 0A 00 09 09 04 05 00 02 0A 00 00 0C ................ + 07 05 85 02 00 02 00 07 05 01 02 00 02 00 08 0B ................ + 06 03 01 02 00 0F 09 04 06 00 01 01 01 00 10 0A ................ + 24 01 00 01 4A 00 02 07 08 0C 24 02 01 01 01 00 $...J.....$..... + 01 01 00 12 11 09 24 03 03 01 03 00 05 13 0B 24 ......$........$ + 06 05 01 02 03 00 00 00 18 0C 24 02 02 01 02 00 ..........$..... + 01 01 00 15 14 09 24 03 04 01 01 00 06 16 0B 24 ......$........$ + 06 06 02 02 03 00 00 00 17 07 05 87 03 02 00 04 ................ + 09 04 07 00 00 01 02 00 19 09 04 07 01 01 01 02 ................ + 00 1A 07 24 01 01 01 01 00 14 24 02 01 01 02 10 ...$......$..... + 04 40 1F 00 80 3E 00 44 AC 00 80 BB 00 09 05 02 .@...>.D........ + 09 62 00 04 00 00 07 25 01 01 01 01 00 09 04 08 .b.....%........ + 00 00 01 02 00 1B 09 04 08 01 01 01 02 00 1C 07 ................ + 24 01 04 01 01 00 14 24 02 01 01 02 10 04 40 1F $......$......@. + 00 80 3E 00 44 AC 00 80 BB 00 09 05 88 05 62 00 ..>.D.........b. + 04 00 00 07 25 01 01 00 00 00 ....%..... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x00 +bInterfaceCount : 0x02 +bFunctionClass : 0x0E (Video) +bFunctionSubClass : 0x03 (Video Interface Collection) +bFunctionProtocol : 0x00 (PC_PROTOCOL_UNDEFINED protocol) +iFunction : 0x05 (String Descriptor 5) + Language 0x0409 : "KAADAS MJPG Carmera¶" +Data (HexDump) : 08 0B 00 02 0E 03 00 05 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x00 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x01 (Video Control) +bInterfaceProtocol : 0x00 +iInterface : 0x05 (String Descriptor 5) + Language 0x0409 : "KAADAS MJPG Carmera¶" +Data (HexDump) : 09 04 00 00 01 0E 01 00 05 ......... + + ------- Video Control Interface Header Descriptor ----- +bLength : 0x0D (13 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x01 (Video Control Header) +bcdUVC : 0x0100 (UVC Version 1.00) +wTotalLength : 0x004E (78 bytes) +dwClockFreq : 0x02DC6C00 (48 MHz) +bInCollection : 0x01 (1 VideoStreaming interface) +baInterfaceNr[1] : 0x01 +Data (HexDump) : 0D 24 01 00 01 4E 00 00 6C DC 02 01 01 .$...N..l.... + + -------- Video Control Input Terminal Descriptor ------ +bLength : 0x12 (18 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (ITT_CAMERA) +bAssocTerminal : 0x00 (Not associated with an Output Terminal) +iTerminal : 0x00 +Camera Input Terminal Data: +wObjectiveFocalLengthMin : 0x0000 +wObjectiveFocalLengthMax : 0x0000 +wOcularFocalLength : 0x0000 +bControlSize : 0x03 +bmControls : 0x02, 0x00, 0x00 + D0 : 0 no - Scanning Mode + D1 : 1 yes - Auto-Exposure Mode + D2 : 0 no - Auto-Exposure Priority + D3 : 0 no - Exposure Time (Absolute) + D4 : 0 no - Exposure Time (Relative) + D5 : 0 no - Focus (Absolute) + D6 : 0 no - Focus (Relative) + D7 : 0 no - Iris (Absolute) + D8 : 0 no - Iris (Relative) + D9 : 0 no - Zoom (Absolute) + D10 : 0 no - Zoom (Relative) + D11 : 0 no - Pan (Absolute) + D12 : 0 no - Pan (Relative) + D13 : 0 no - Roll (Absolute) + D14 : 0 no - Roll (Relative) + D15 : 0 no - Tilt (Absolute) + D16 : 0 no - Tilt (Relative) + D17 : 0 no - Focus Auto + D18 : 0 no - Reserved + D19 : 0 no - Reserved + D20 : 0 no - Reserved + D21 : 0 no - Reserved + D22 : 0 no - Reserved + D23 : 0 no - Reserved +Data (HexDump) : 12 24 02 01 01 02 00 00 00 00 00 00 00 00 03 02 .$.............. + 00 00 .. + + -------- Video Control Processing Unit Descriptor ----- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x05 (Processing Unit) +bUnitID : 0x02 +bSourceID : 0x01 +wMaxMultiplier : 0x4000 (163.84x Zoom) +bControlSize : 0x02 +bmControls : 0x01, 0x00 + D0 : 1 yes - Brightness + D1 : 0 no - Contrast + D2 : 0 no - Hue + D3 : 0 no - Saturation + D4 : 0 no - Sharpness + D5 : 0 no - Gamma + D6 : 0 no - White Balance Temperature + D7 : 0 no - White Balance Component + D8 : 0 no - Backlight Compensation + D9 : 0 no - Gain + D10 : 0 no - Power Line Frequency + D11 : 0 no - Hue, Auto + D12 : 0 no - White Balance Temperature, Auto + D13 : 0 no - White Balance Component, Auto + D14 : 0 no - Digital Multiplier + D15 : 0 no - Digital Multiplier Limit +iProcessing : 0x00 +*!*ERROR: bLength of 0x0C incorrect, should be 0x0B +Data (HexDump) : 0C 24 05 02 01 00 40 02 01 00 00 00 .$....@..... + + ------- Video Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x03 +wTerminalType : 0x0101 (TT_STREAMING) +bAssocTerminal : 0x00 (Not associated with an Input Terminal) +bSourceID : 0x02 +iTerminal : 0x00 +Data (HexDump) : 09 24 03 03 01 01 00 02 00 .$....... + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1A (26 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x06 +guidExtensionCode : {41769EA2-04DE-E347-8B2B-F4341AFF003B} +bNumControls : 0x03 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x02 +bControlSize : 0x01 +bmControls : 0x07 + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 1 yes - Vendor-Specific (Optional) + D3 : 0 no - Vendor-Specific (Optional) + D4 : 0 no - Vendor-Specific (Optional) + D5 : 0 no - Vendor-Specific (Optional) + D6 : 0 no - Vendor-Specific (Optional) + D7 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1A 24 06 06 A2 9E 76 41 DE 04 47 E3 8B 2B F4 34 .$....vA..G..+.4 + 1A FF 00 3B 03 01 02 01 07 00 ...;...... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x03 (TransferType=Interrupt) +wMaxPacketSize : 0x0010 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x10 (16 bytes per packet) +bInterval : 0x08 (8 ms) +Data (HexDump) : 07 05 81 03 10 00 08 ....... + + --- Class-specific VC Interrupt Endpoint Descriptor --- +bLength : 0x05 (5 bytes) +bDescriptorType : 0x25 (Video Control Endpoint) +bDescriptorSubtype : 0x03 (Interrupt) +wMaxTransferSize : 0x0010 (16 bytes) +Data (HexDump) : 05 25 03 10 00 .%... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x06 (String Descriptor 6) + Language 0x0409 : "Video Streaming" +Data (HexDump) : 09 04 01 00 00 0E 02 00 06 ......... + + ---- VC-Specific VS Video Input Header Descriptor ----- +bLength : 0x0E (14 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x01 (Input Header) +bNumFormats : 0x01 +wTotalLength : 0x0049 (73 bytes) +bEndpointAddress : 0x82 (Direction=IN EndpointID=2) +bmInfo : 0x00 (Dynamic Format Change not supported) +bTerminalLink : 0x03 +bStillCaptureMethod : 0x00 (No Still Capture) +nbTriggerSupport : 0x00 (Hardware Triggering not supported) +bTriggerUsage : 0x00 (Host will initiate still image capture) +nbControlSize : 0x01 +Video Payload Format 1 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Data (HexDump) : 0E 24 01 01 49 00 82 00 03 00 00 00 01 00 .$..I......... + + ----- Video Streaming MJPEG Format Type Descriptor ---- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x06 (Format MJPEG) +bFormatIndex : 0x01 (1) +bNumFrameDescriptors : 0x01 (1) +bmFlags : 0x00 (Sample size is not fixed) +bDefaultFrameIndex : 0x01 (1) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +Data (HexDump) : 0B 24 06 01 01 00 01 00 00 00 00 .$......... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +---> This is the Default (optimum) Frame index +bLength : 0x2A (42 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x02D0 (720) +wHeight : 0x0500 (1280) +dwMinBitRate : 0x01194000 (18432000 bps -> 2.304 MB/s) +dwMaxBitRate : 0x01194000 (18432000 bps -> 2.304 MB/s) +dwMaxVideoFrameBufferSize: 0x001C2000 (1843200 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x04 (4 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[3] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[4] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 2A 24 07 01 00 D0 02 00 05 00 40 19 01 00 40 19 *$........@...@. + 01 00 20 1C 00 15 16 05 00 04 15 16 05 00 2A 2C .. ...........*, + 0A 00 40 42 0F 00 80 84 1E 00 ..@B...... + + ------- VS Color Matching Descriptor Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x0D (Color Matching) +bColorPrimaries : 0x01 (BT.709, sRGB) +bTransferCharacteristics : 0x01 (BT.709) +bMatrixCoefficients : 0x04 (SMPTE 170M) +Data (HexDump) : 06 24 0D 01 01 04 .$.... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x06 (String Descriptor 6) + Language 0x0409 : "Video Streaming" +Data (HexDump) : 09 04 01 01 01 0E 02 00 06 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x82 (Direction=IN EndpointID=2) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0C00 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x01 (1 additional transactions per microframe -> allows 513..1024 byte per packet) + Bits 10..0 : 0x400 (1024 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 82 05 00 0C 01 ....... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x02 +bInterfaceCount : 0x02 +bFunctionClass : 0x0E (Video) +bFunctionSubClass : 0x03 (Video Interface Collection) +bFunctionProtocol : 0x00 (PC_PROTOCOL_UNDEFINED protocol) +iFunction : 0x08 (String Descriptor 8) + Language 0x0409 : "KAADAS Video Carmera¶" +Data (HexDump) : 08 0B 02 02 0E 03 00 08 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x02 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x01 (Video Control) +bInterfaceProtocol : 0x00 +iInterface : 0x08 (String Descriptor 8) + Language 0x0409 : "KAADAS Video Carmera¶" +Data (HexDump) : 09 04 02 00 01 0E 01 00 08 ......... + + ------- Video Control Interface Header Descriptor ----- +bLength : 0x0D (13 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x01 (Video Control Header) +bcdUVC : 0x0100 (UVC Version 1.00) +wTotalLength : 0x004E (78 bytes) +dwClockFreq : 0x02DC6C00 (48 MHz) +bInCollection : 0x01 (1 VideoStreaming interface) +baInterfaceNr[1] : 0x03 +Data (HexDump) : 0D 24 01 00 01 4E 00 00 6C DC 02 01 03 .$...N..l.... + + -------- Video Control Input Terminal Descriptor ------ +bLength : 0x12 (18 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (ITT_CAMERA) +bAssocTerminal : 0x00 (Not associated with an Output Terminal) +iTerminal : 0x00 +Camera Input Terminal Data: +wObjectiveFocalLengthMin : 0x0000 +wObjectiveFocalLengthMax : 0x0000 +wOcularFocalLength : 0x0000 +bControlSize : 0x03 +bmControls : 0x02, 0x00, 0x00 + D0 : 0 no - Scanning Mode + D1 : 1 yes - Auto-Exposure Mode + D2 : 0 no - Auto-Exposure Priority + D3 : 0 no - Exposure Time (Absolute) + D4 : 0 no - Exposure Time (Relative) + D5 : 0 no - Focus (Absolute) + D6 : 0 no - Focus (Relative) + D7 : 0 no - Iris (Absolute) + D8 : 0 no - Iris (Relative) + D9 : 0 no - Zoom (Absolute) + D10 : 0 no - Zoom (Relative) + D11 : 0 no - Pan (Absolute) + D12 : 0 no - Pan (Relative) + D13 : 0 no - Roll (Absolute) + D14 : 0 no - Roll (Relative) + D15 : 0 no - Tilt (Absolute) + D16 : 0 no - Tilt (Relative) + D17 : 0 no - Focus Auto + D18 : 0 no - Reserved + D19 : 0 no - Reserved + D20 : 0 no - Reserved + D21 : 0 no - Reserved + D22 : 0 no - Reserved + D23 : 0 no - Reserved +Data (HexDump) : 12 24 02 01 01 02 00 00 00 00 00 00 00 00 03 02 .$.............. + 00 00 .. + + -------- Video Control Processing Unit Descriptor ----- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x05 (Processing Unit) +bUnitID : 0x02 +bSourceID : 0x01 +wMaxMultiplier : 0x4000 (163.84x Zoom) +bControlSize : 0x02 +bmControls : 0x01, 0x00 + D0 : 1 yes - Brightness + D1 : 0 no - Contrast + D2 : 0 no - Hue + D3 : 0 no - Saturation + D4 : 0 no - Sharpness + D5 : 0 no - Gamma + D6 : 0 no - White Balance Temperature + D7 : 0 no - White Balance Component + D8 : 0 no - Backlight Compensation + D9 : 0 no - Gain + D10 : 0 no - Power Line Frequency + D11 : 0 no - Hue, Auto + D12 : 0 no - White Balance Temperature, Auto + D13 : 0 no - White Balance Component, Auto + D14 : 0 no - Digital Multiplier + D15 : 0 no - Digital Multiplier Limit +iProcessing : 0x00 +*!*ERROR: bLength of 0x0C incorrect, should be 0x0B +Data (HexDump) : 0C 24 05 02 01 00 40 02 01 00 00 00 .$....@..... + + ------- Video Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x03 +wTerminalType : 0x0101 (TT_STREAMING) +bAssocTerminal : 0x00 (Not associated with an Input Terminal) +bSourceID : 0x02 +iTerminal : 0x00 +Data (HexDump) : 09 24 03 03 01 01 00 02 00 .$....... + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1A (26 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x06 +guidExtensionCode : {41769EA2-04DE-E347-8B2B-F4341AFF003B} +bNumControls : 0x03 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x02 +bControlSize : 0x01 +bmControls : 0x07 + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 1 yes - Vendor-Specific (Optional) + D3 : 0 no - Vendor-Specific (Optional) + D4 : 0 no - Vendor-Specific (Optional) + D5 : 0 no - Vendor-Specific (Optional) + D6 : 0 no - Vendor-Specific (Optional) + D7 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1A 24 06 06 A2 9E 76 41 DE 04 47 E3 8B 2B F4 34 .$....vA..G..+.4 + 1A FF 00 3B 03 01 02 01 07 00 ...;...... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x83 (Direction=IN EndpointID=3) +bmAttributes : 0x03 (TransferType=Interrupt) +wMaxPacketSize : 0x0010 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x10 (16 bytes per packet) +bInterval : 0x08 (8 ms) +Data (HexDump) : 07 05 83 03 10 00 08 ....... + + --- Class-specific VC Interrupt Endpoint Descriptor --- +bLength : 0x05 (5 bytes) +bDescriptorType : 0x25 (Video Control Endpoint) +bDescriptorSubtype : 0x03 (Interrupt) +wMaxTransferSize : 0x0010 (16 bytes) +Data (HexDump) : 05 25 03 10 00 .%... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x09 (String Descriptor 9) + Language 0x0409 : "Video Streaming" +Data (HexDump) : 09 04 03 00 00 0E 02 00 09 ......... + + ---- VC-Specific VS Video Input Header Descriptor ----- +bLength : 0x0E (14 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x01 (Input Header) +bNumFormats : 0x01 +wTotalLength : 0x0102 (258 bytes) +bEndpointAddress : 0x84 (Direction=IN EndpointID=4) +bmInfo : 0x00 (Dynamic Format Change not supported) +bTerminalLink : 0x03 +bStillCaptureMethod : 0x00 (No Still Capture) +nbTriggerSupport : 0x00 (Hardware Triggering not supported) +bTriggerUsage : 0x00 (Host will initiate still image capture) +nbControlSize : 0x01 +Video Payload Format 1 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Data (HexDump) : 0E 24 01 01 02 01 84 00 03 00 00 00 01 00 .$............ + + ---- VS Frame Based Payload Format Type Descriptor ---- +*!*ERROR: This format is NOT ALLOWED for UVC 1.0 devices +bLength : 0x1C (28 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x10 (Frame Based Format Type) +bFormatIndex : 0x01 (1) +bNumFrameDescriptors : 0x05 (5) +guidFormat : {35363248-0000-0010-8000-00AA00389B71} (H265) +bBitsPerPixel : 0x10 (16 bits) +bDefaultFrameIndex : 0x01 (1) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +bVariableSize : 0x01 (Variable Size) +Data (HexDump) : 1C 24 10 01 05 48 32 36 35 00 00 10 00 80 00 00 .$...H265....... + AA 00 38 9B 71 10 01 00 00 00 00 01 ..8.q....... + + ----- VS Frame Based Payload Frame Type Descriptor ---- +*!*ERROR bDescriptorSubtype did not exist in UVC 1.0 +bLength : 0x2A (42 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x002EE000 (3072000 bps -> 384 KB/s) +dwMaxBitRate : 0x002EE000 (3072000 bps -> 384 KB/s) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x04 (4 discrete frame intervals supported) +dwBytesPerLine : 0x00 (0 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 2A 24 11 01 00 80 02 E0 01 00 E0 2E 00 00 E0 2E *$.............. + 00 2A 2C 0A 00 04 00 00 00 00 15 16 05 00 80 1A .*,............. + 06 00 20 A1 07 00 2A 2C 0A 00 .. ...*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +*!*ERROR bDescriptorSubtype did not exist in UVC 1.0 +bLength : 0x2A (42 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x00 +wWidth : 0x0500 (1280) +wHeight : 0x02D0 (720) +dwMinBitRate : 0x008CA000 (9216000 bps -> 1.152 MB/s) +dwMaxBitRate : 0x008CA000 (9216000 bps -> 1.152 MB/s) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x04 (4 discrete frame intervals supported) +dwBytesPerLine : 0x00 (0 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 2A 24 11 02 00 00 05 D0 02 00 A0 8C 00 00 A0 8C *$.............. + 00 2A 2C 0A 00 04 00 00 00 00 15 16 05 00 80 1A .*,............. + 06 00 20 A1 07 00 2A 2C 0A 00 .. ...*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +*!*ERROR bDescriptorSubtype did not exist in UVC 1.0 +bLength : 0x2A (42 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x00 +wWidth : 0x0780 (1920) +wHeight : 0x0438 (1080) +dwMinBitRate : 0x013C6800 (20736000 bps -> 2.592 MB/s) +dwMaxBitRate : 0x013C6800 (20736000 bps -> 2.592 MB/s) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x04 (4 discrete frame intervals supported) +dwBytesPerLine : 0x00 (0 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 2A 24 11 03 00 80 07 38 04 00 68 3C 01 00 68 3C *$.....8..h<..h< + 01 2A 2C 0A 00 04 00 00 00 00 15 16 05 00 80 1A .*,............. + 06 00 20 A1 07 00 2A 2C 0A 00 .. ...*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +*!*ERROR bDescriptorSubtype did not exist in UVC 1.0 +bLength : 0x2A (42 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x00 +wWidth : 0x0A00 (2560) +wHeight : 0x05A0 (1440) +dwMinBitRate : 0x02328000 (36864000 bps -> 4.608 MB/s) +dwMaxBitRate : 0x02328000 (36864000 bps -> 4.608 MB/s) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x04 (4 discrete frame intervals supported) +dwBytesPerLine : 0x00 (0 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 2A 24 11 04 00 00 0A A0 05 00 80 32 02 00 80 32 *$.........2...2 + 02 2A 2C 0A 00 04 00 00 00 00 15 16 05 00 80 1A .*,............. + 06 00 20 A1 07 00 2A 2C 0A 00 .. ...*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +*!*ERROR bDescriptorSubtype did not exist in UVC 1.0 +bLength : 0x2A (42 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x05 +bmCapabilities : 0x00 +wWidth : 0x0900 (2304) +wHeight : 0x0510 (1296) +dwMinBitRate : 0x01C7A000 (29859840 bps -> 3.732 MB/s) +dwMaxBitRate : 0x01C7A000 (29859840 bps -> 3.732 MB/s) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x04 (4 discrete frame intervals supported) +dwBytesPerLine : 0x00 (0 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 2A 24 11 05 00 00 09 10 05 00 A0 C7 01 00 A0 C7 *$.............. + 01 2A 2C 0A 00 04 00 00 00 00 15 16 05 00 80 1A .*,............. + 06 00 20 A1 07 00 2A 2C 0A 00 .. ...*,.. + + ------- VS Color Matching Descriptor Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x0D (Color Matching) +bColorPrimaries : 0x01 (BT.709, sRGB) +bTransferCharacteristics : 0x01 (BT.709) +bMatrixCoefficients : 0x04 (SMPTE 170M) +Data (HexDump) : 06 24 0D 01 01 04 .$.... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x09 (String Descriptor 9) + Language 0x0409 : "Video Streaming" +Data (HexDump) : 09 04 03 01 01 0E 02 00 09 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x84 (Direction=IN EndpointID=4) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0C00 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x01 (1 additional transactions per microframe -> allows 513..1024 byte per packet) + Bits 10..0 : 0x400 (1024 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 84 05 00 0C 01 ....... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x04 +bInterfaceCount : 0x02 +bFunctionClass : 0x02 (Communications and CDC Control) +bFunctionSubClass : 0x02 +bFunctionProtocol : 0x01 +iFunction : 0x0D (String Descriptor 13) + Language 0x0409 : "CDC Serial" +Data (HexDump) : 08 0B 04 02 02 02 01 0D ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x04 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x02 (Communications and CDC Control) +bInterfaceSubClass : 0x02 (Abstract Control Model) +bInterfaceProtocol : 0x01 (AT Commands defined by ITU-T V.250 etc) +iInterface : 0x0B (String Descriptor 11) + Language 0x0409 : "CDC Abstract Control Model (ACM)" +Data (HexDump) : 09 04 04 00 01 02 02 01 0B ......... + + -------------- CDC Interface Descriptor --------------- +bFunctionLength : 0x05 (5 bytes) +bDescriptorType : 0x24 (Interface) +bDescriptorSubType : 0x00 (Header Functional Descriptor) +bcdCDC : 0x110 (CDC Version 1.10) +Data (HexDump) : 05 24 00 10 01 .$... + + -------------- CDC Interface Descriptor --------------- +bFunctionLength : 0x05 (5 bytes) +bDescriptorType : 0x24 (Interface) +bDescriptorSubType : 0x01 (Call Management Functional Descriptor) +bmCapabilities : 0x00 + D7..2 : 0x00 (Reserved) + D1 : 0x00 (sends/receives call management information only over the Communication Class interface) + D0 : 0x00 (does not handle call management itself) +bDataInterface : 0x05 +Data (HexDump) : 05 24 01 00 05 .$... + + -------------- CDC Interface Descriptor --------------- +bFunctionLength : 0x04 (4 bytes) +bDescriptorType : 0x24 (Interface) +bDescriptorSubType : 0x02 (Abstract Control Management Functional Descriptor) +bmCapabilities : 0x02 + D7..4 : 0x00 (Reserved) + D3 : 0x00 (not supports the notification Network_Connection) + D2 : 0x00 (not supports the request Send_Break) + D1 : 0x01 (supports the request combination of Set_Line_Coding, Set_Control_Line_State, Get_Line_Coding, and the notification Serial_State) + D0 : 0x00 (not supports the request combination of Set_Comm_Feature, Clear_Comm_Feature, and Get_Comm_Feature) +Data (HexDump) : 04 24 02 02 .$.. + + -------------- CDC Interface Descriptor --------------- +bFunctionLength : 0x05 (5 bytes) +bDescriptorType : 0x24 (Interface) +bDescriptorSubType : 0x06 (Union Functional Descriptor) +bControlInterface : 0x04 +bSubordinateInterface[0] : 0x05 +Data (HexDump) : 05 24 06 04 05 .$... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x86 (Direction=IN EndpointID=6) +bmAttributes : 0x03 (TransferType=Interrupt) +wMaxPacketSize : 0x000A + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x0A (10 bytes per packet) +bInterval : 0x09 (9 ms) +Data (HexDump) : 07 05 86 03 0A 00 09 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x05 +bAlternateSetting : 0x00 +bNumEndpoints : 0x02 (2 Endpoints) +bInterfaceClass : 0x0A (CDC-Data) +bInterfaceSubClass : 0x00 +bInterfaceProtocol : 0x00 +iInterface : 0x0C (String Descriptor 12) + Language 0x0409 : "CDC ACM Data" +Data (HexDump) : 09 04 05 00 02 0A 00 00 0C ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x85 (Direction=IN EndpointID=5) +bmAttributes : 0x02 (TransferType=Bulk) +wMaxPacketSize : 0x0200 (max 512 bytes) +bInterval : 0x00 (never NAKs) +Data (HexDump) : 07 05 85 02 00 02 00 ....... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x01 (Direction=OUT EndpointID=1) +bmAttributes : 0x02 (TransferType=Bulk) +wMaxPacketSize : 0x0200 (max 512 bytes) +bInterval : 0x00 (never NAKs) +Data (HexDump) : 07 05 01 02 00 02 00 ....... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x06 +bInterfaceCount : 0x03 +bFunctionClass : 0x01 (Audio) +bFunctionSubClass : 0x02 (Audio Streaming) +bFunctionProtocol : 0x00 +iFunction : 0x0F (String Descriptor 15) + Language 0x0409 : "Source/Sink" +Data (HexDump) : 08 0B 06 03 01 02 00 0F ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x06 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x01 (Audio Control) +bInterfaceProtocol : 0x00 +iInterface : 0x10 (String Descriptor 16) + Language 0x0409 : "AC Interface" +Data (HexDump) : 09 04 06 00 01 01 01 00 10 ......... + + ------ Audio Control Interface Header Descriptor ------ +bLength : 0x0A (10 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 (Header) +bcdADC : 0x0100 +wTotalLength : 0x004A (74 bytes) +bInCollection : 0x02 +baInterfaceNr[1] : 0x07 +baInterfaceNr[2] : 0x08 +Data (HexDump) : 0A 24 01 00 01 4A 00 02 07 08 .$...J.... + + ------- Audio Control Input Terminal Descriptor ------- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0101 (USB streaming) +bAssocTerminal : 0x00 +bNrChannels : 0x01 (1 channel) +wChannelConfig : 0x0001 (L) +iChannelNames : 0x12 (String Descriptor 18) + Language 0x0409 : "Playback Channels" +iTerminal : 0x11 (String Descriptor 17) + Language 0x0409 : "Playback Input terminal" +Data (HexDump) : 0C 24 02 01 01 01 00 01 01 00 12 11 .$.......... + + ------- Audio Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x03 +wTerminalType : 0x0301 (Speaker) +bAssocTerminal : 0x00 (0) +bSourceID : 0x05 (5) +iTerminal : 0x13 (String Descriptor 19) + Language 0x0409 : "Playback Output terminal" +Data (HexDump) : 09 24 03 03 01 03 00 05 13 .$....... + + -------- Audio Control Feature Unit Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x06 (Feature Unit) +bUnitID : 0x05 (5) +bSourceID : 0x01 (1) +bControlSize : 0x02 (2 bytes per control) +bmaControls[0] : 0x03, 0x00 + D0: Mute : 1 + D1: Volume : 1 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 + D8: Bass Boost : 0 + D9: Loudness : 0 + D10: Reserved : 0 + D11: Reserved : 0 + D12: Reserved : 0 + D13: Reserved : 0 + D14: Reserved : 0 + D15: Reserved : 0 +bmaControls[1] : 0x00, 0x00 + D0: Mute : 0 + D1: Volume : 0 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 + D8: Bass Boost : 0 + D9: Loudness : 0 + D10: Reserved : 0 + D11: Reserved : 0 + D12: Reserved : 0 + D13: Reserved : 0 + D14: Reserved : 0 + D15: Reserved : 0 +iFeature : 0x18 (String Descriptor 24) + Language 0x0409 : "Playback Volume" +Data (HexDump) : 0B 24 06 05 01 02 03 00 00 00 18 .$......... + + ------- Audio Control Input Terminal Descriptor ------- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x02 +wTerminalType : 0x0201 (Microphone) +bAssocTerminal : 0x00 +bNrChannels : 0x01 (1 channel) +wChannelConfig : 0x0001 (L) +iChannelNames : 0x15 (String Descriptor 21) + Language 0x0409 : "Capture Channels" +iTerminal : 0x14 (String Descriptor 20) + Language 0x0409 : "Capture Input terminal" +Data (HexDump) : 0C 24 02 02 01 02 00 01 01 00 15 14 .$.......... + + ------- Audio Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x04 +wTerminalType : 0x0101 (USB streaming) +bAssocTerminal : 0x00 (0) +bSourceID : 0x06 (6) +iTerminal : 0x16 (String Descriptor 22) + Language 0x0409 : "Capture Output terminal" +Data (HexDump) : 09 24 03 04 01 01 00 06 16 .$....... + + -------- Audio Control Feature Unit Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x06 (Feature Unit) +bUnitID : 0x06 (6) +bSourceID : 0x02 (2) +bControlSize : 0x02 (2 bytes per control) +bmaControls[0] : 0x03, 0x00 + D0: Mute : 1 + D1: Volume : 1 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 + D8: Bass Boost : 0 + D9: Loudness : 0 + D10: Reserved : 0 + D11: Reserved : 0 + D12: Reserved : 0 + D13: Reserved : 0 + D14: Reserved : 0 + D15: Reserved : 0 +bmaControls[1] : 0x00, 0x00 + D0: Mute : 0 + D1: Volume : 0 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 + D8: Bass Boost : 0 + D9: Loudness : 0 + D10: Reserved : 0 + D11: Reserved : 0 + D12: Reserved : 0 + D13: Reserved : 0 + D14: Reserved : 0 + D15: Reserved : 0 +iFeature : 0x17 (String Descriptor 23) + Language 0x0409 : "Capture Volume" +Data (HexDump) : 0B 24 06 06 02 02 03 00 00 00 17 .$......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x87 (Direction=IN EndpointID=7) +bmAttributes : 0x03 (TransferType=Interrupt) +wMaxPacketSize : 0x0002 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x02 (2 bytes per packet) +bInterval : 0x04 (4 ms) +Data (HexDump) : 07 05 87 03 02 00 04 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x07 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x19 (String Descriptor 25) + Language 0x0409 : "Playback Inactive" +Data (HexDump) : 09 04 07 00 00 01 02 00 19 ......... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x07 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x1A (String Descriptor 26) + Language 0x0409 : "Playback Active" +Data (HexDump) : 09 04 07 01 01 01 02 00 1A ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x01 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 01 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x14 (20 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x01 (1 channel) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x04 (supports 4 sample frequencies) +tSamFreq[1] : 0x01F40 (8000 Hz) +tSamFreq[2] : 0x03E80 (16000 Hz) +tSamFreq[3] : 0x0AC44 (44100 Hz) +tSamFreq[4] : 0x0BB80 (48000 Hz) +Data (HexDump) : 14 24 02 01 01 02 10 04 40 1F 00 80 3E 00 44 AC .$......@...>.D. + 00 80 BB 00 .... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x02 (Direction=OUT EndpointID=2) +bmAttributes : 0x09 (TransferType=Isochronous SyncType=Adaptive EndpointType=Data) +wMaxPacketSize : 0x0062 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x62 (98 bytes per packet) +bInterval : 0x04 (4 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 02 09 62 00 04 00 00 ....b.... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x01 (Milliseconds) +wLockDelay : 0x0001 (1 ms) +Data (HexDump) : 07 25 01 01 01 01 00 .%..... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x08 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x1B (String Descriptor 27) + Language 0x0409 : "Capture Inactive" +Data (HexDump) : 09 04 08 00 00 01 02 00 1B ......... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x08 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x1C (String Descriptor 28) + Language 0x0409 : "Capture Active" +Data (HexDump) : 09 04 08 01 01 01 02 00 1C ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x04 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 04 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x14 (20 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x01 (1 channel) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x04 (supports 4 sample frequencies) +tSamFreq[1] : 0x01F40 (8000 Hz) +tSamFreq[2] : 0x03E80 (16000 Hz) +tSamFreq[3] : 0x0AC44 (44100 Hz) +tSamFreq[4] : 0x0BB80 (48000 Hz) +Data (HexDump) : 14 24 02 01 01 02 10 04 40 1F 00 80 3E 00 44 AC .$......@...>.D. + 00 80 BB 00 .... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x88 (Direction=IN EndpointID=8) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0062 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x62 (98 bytes per packet) +bInterval : 0x04 (4 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 88 05 62 00 04 00 00 ....b.... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x00 (Undefined) +wLockDelay : 0x0000 +Data (HexDump) : 07 25 01 01 00 00 00 .%..... + + ----------------- Device Qualifier Descriptor ----------------- +bLength : 0x0A (10 bytes) +bDescriptorType : 0x06 (Device_qualifier Descriptor) +bcdUSB : 0x200 (USB Version 2.00) +bDeviceClass : 0xEF (Miscellaneous) +bDeviceSubClass : 0x02 +bDeviceProtocol : 0x01 (IAD - Interface Association Descriptor) +bMaxPacketSize0 : 0x40 (64 Bytes) +bNumConfigurations : 0x01 (1 other-speed configuration) +bReserved : 0x00 +Data (HexDump) : 0A 06 00 02 EF 02 01 40 01 00 .......@.. + + ------------ Other Speed Configuration Descriptor ------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x07 (Other_speed_configuration Descriptor) +wTotalLength : 0x037A (890 bytes) +bNumInterfaces : 0x09 (9 Interfaces) +bConfigurationValue : 0x01 (Configuration 1) +iConfiguration : 0x04 (String Descriptor 4) + Language 0x0409 : "uvc_uac1" +bmAttributes : 0x80 + D7: Reserved, set 1 : 0x01 + D6: Self Powered : 0x00 (no) + D5: Remote Wakeup : 0x00 (no) + D4..0: Reserved, set 0 : 0x00 +MaxPower : 0xFA (500 mA) +Data (HexDump) : 09 07 7A 03 09 01 04 80 FA 08 0B 00 02 0E 03 00 ..z............. + 05 09 04 00 00 01 0E 01 00 05 0D 24 01 00 01 4E ...........$...N + 00 00 6C DC 02 01 01 12 24 02 01 01 02 00 00 00 ..l.....$....... + 00 00 00 00 00 03 02 00 00 0C 24 05 02 01 00 40 ..........$....@ + 02 01 00 00 00 09 24 03 03 01 01 00 02 00 1A 24 ......$........$ + 06 06 A2 9E 76 41 DE 04 47 E3 8B 2B F4 34 1A FF ....vA..G..+.4.. + 00 3B 03 01 02 01 07 00 07 05 81 03 10 00 08 05 .;.............. + 25 03 10 00 09 04 01 00 00 0E 02 00 06 0E 24 01 %.............$. + 01 49 00 82 00 03 00 00 00 01 00 0B 24 06 01 01 .I..........$... + 00 01 00 00 00 00 2A 24 07 01 00 D0 02 00 05 00 ......*$........ + 40 19 01 00 40 19 01 00 20 1C 00 15 16 05 00 04 @...@... ....... + 15 16 05 00 2A 2C 0A 00 40 42 0F 00 80 84 1E 00 ....*,..@B...... + 06 24 0D 01 01 04 09 04 01 01 01 0E 02 00 06 07 .$.............. + 05 82 05 FF 03 01 08 0B 02 02 0E 03 00 08 09 04 ................ + 02 00 01 0E 01 00 08 0D 24 01 00 01 4E 00 00 6C ........$...N..l + DC 02 01 03 12 24 02 01 01 02 00 00 00 00 00 00 .....$.......... + 00 00 03 02 00 00 0C 24 05 02 01 00 40 02 01 00 .......$....@... + 00 00 09 24 03 03 01 01 00 02 00 1A 24 06 06 A2 ...$........$... + 9E 76 41 DE 04 47 E3 8B 2B F4 34 1A FF 00 3B 03 .vA..G..+.4...;. + 01 02 01 07 00 07 05 83 03 10 00 08 05 25 03 10 .............%.. + 00 09 04 03 00 00 0E 02 00 09 0E 24 01 01 02 01 ...........$.... + 84 00 03 00 00 00 01 00 1C 24 10 01 05 48 32 36 .........$...H26 + 35 00 00 10 00 80 00 00 AA 00 38 9B 71 10 01 00 5.........8.q... + 00 00 00 01 2A 24 11 01 00 80 02 E0 01 00 E0 2E ....*$.......... + 00 00 E0 2E 00 2A 2C 0A 00 04 00 00 00 00 15 16 .....*,......... + 05 00 80 1A 06 00 20 A1 07 00 2A 2C 0A 00 2A 24 ...... ...*,..*$ + 11 02 00 00 05 D0 02 00 A0 8C 00 00 A0 8C 00 2A ...............* + 2C 0A 00 04 00 00 00 00 15 16 05 00 80 1A 06 00 ,............... + 20 A1 07 00 2A 2C 0A 00 2A 24 11 03 00 80 07 38 ...*,..*$.....8 + 04 00 68 3C 01 00 68 3C 01 2A 2C 0A 00 04 00 00 ..h<..h<.*,..... + 00 00 15 16 05 00 80 1A 06 00 20 A1 07 00 2A 2C .......... ...*, + 0A 00 2A 24 11 04 00 00 0A A0 05 00 80 32 02 00 ..*$.........2.. + 80 32 02 2A 2C 0A 00 04 00 00 00 00 15 16 05 00 .2.*,........... + 80 1A 06 00 20 A1 07 00 2A 2C 0A 00 2A 24 11 05 .... ...*,..*$.. + 00 00 09 10 05 00 A0 C7 01 00 A0 C7 01 2A 2C 0A .............*,. + 00 04 00 00 00 00 15 16 05 00 80 1A 06 00 20 A1 .............. . + 07 00 2A 2C 0A 00 06 24 0D 01 01 04 09 04 03 01 ..*,...$........ + 01 0E 02 00 09 07 05 84 05 FF 03 01 08 0B 04 02 ................ + 02 02 01 0D 09 04 04 00 01 02 02 01 0B 05 24 00 ..............$. + 10 01 05 24 01 00 05 04 24 02 02 05 24 06 04 05 ...$....$...$... + 07 05 86 03 0A 00 20 09 04 05 00 02 0A 00 00 0C ...... ......... + 07 05 85 02 40 00 00 07 05 01 02 40 00 00 08 0B ....@......@.... + 06 03 01 02 00 0F 09 04 06 00 01 01 01 00 10 0A ................ + 24 01 00 01 4A 00 02 07 08 0C 24 02 01 01 01 00 $...J.....$..... + 01 01 00 12 11 09 24 03 03 01 03 00 05 13 0B 24 ......$........$ + 06 05 01 02 03 00 00 00 18 0C 24 02 02 01 02 00 ..........$..... + 01 01 00 15 14 09 24 03 04 01 01 00 06 16 0B 24 ......$........$ + 06 06 02 02 03 00 00 00 17 07 05 87 03 02 00 01 ................ + 09 04 07 00 00 01 02 00 19 09 04 07 01 01 01 02 ................ + 00 1A 07 24 01 01 01 01 00 14 24 02 01 01 02 10 ...$......$..... + 04 40 1F 00 80 3E 00 44 AC 00 80 BB 00 09 05 02 .@...>.D........ + 09 62 00 01 00 00 07 25 01 01 01 01 00 09 04 08 .b.....%........ + 00 00 01 02 00 1B 09 04 08 01 01 01 02 00 1C 07 ................ + 24 01 04 01 01 00 14 24 02 01 01 02 10 04 40 1F $......$......@. + 00 80 3E 00 44 AC 00 80 BB 00 09 05 88 05 62 00 ..>.D.........b. + 01 00 00 07 25 01 01 00 00 00 ....%..... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x00 +bInterfaceCount : 0x02 +bFunctionClass : 0x0E (Video) +bFunctionSubClass : 0x03 (Video Interface Collection) +bFunctionProtocol : 0x00 (PC_PROTOCOL_UNDEFINED protocol) +iFunction : 0x05 (String Descriptor 5) + Language 0x0409 : "KAADAS MJPG Carmera¶" +Data (HexDump) : 08 0B 00 02 0E 03 00 05 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x00 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x01 (Video Control) +bInterfaceProtocol : 0x00 +iInterface : 0x05 (String Descriptor 5) + Language 0x0409 : "KAADAS MJPG Carmera¶" +Data (HexDump) : 09 04 00 00 01 0E 01 00 05 ......... + + ------- Video Control Interface Header Descriptor ----- +bLength : 0x0D (13 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x01 (Video Control Header) +bcdUVC : 0x0100 (UVC Version 1.00) +wTotalLength : 0x004E (78 bytes) +dwClockFreq : 0x02DC6C00 (48 MHz) +bInCollection : 0x01 (1 VideoStreaming interface) +baInterfaceNr[1] : 0x01 +Data (HexDump) : 0D 24 01 00 01 4E 00 00 6C DC 02 01 01 .$...N..l.... + + -------- Video Control Input Terminal Descriptor ------ +bLength : 0x12 (18 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (ITT_CAMERA) +bAssocTerminal : 0x00 (Not associated with an Output Terminal) +iTerminal : 0x00 +Camera Input Terminal Data: +wObjectiveFocalLengthMin : 0x0000 +wObjectiveFocalLengthMax : 0x0000 +wOcularFocalLength : 0x0000 +bControlSize : 0x03 +bmControls : 0x02, 0x00, 0x00 + D0 : 0 no - Scanning Mode + D1 : 1 yes - Auto-Exposure Mode + D2 : 0 no - Auto-Exposure Priority + D3 : 0 no - Exposure Time (Absolute) + D4 : 0 no - Exposure Time (Relative) + D5 : 0 no - Focus (Absolute) + D6 : 0 no - Focus (Relative) + D7 : 0 no - Iris (Absolute) + D8 : 0 no - Iris (Relative) + D9 : 0 no - Zoom (Absolute) + D10 : 0 no - Zoom (Relative) + D11 : 0 no - Pan (Absolute) + D12 : 0 no - Pan (Relative) + D13 : 0 no - Roll (Absolute) + D14 : 0 no - Roll (Relative) + D15 : 0 no - Tilt (Absolute) + D16 : 0 no - Tilt (Relative) + D17 : 0 no - Focus Auto + D18 : 0 no - Reserved + D19 : 0 no - Reserved + D20 : 0 no - Reserved + D21 : 0 no - Reserved + D22 : 0 no - Reserved + D23 : 0 no - Reserved +Data (HexDump) : 12 24 02 01 01 02 00 00 00 00 00 00 00 00 03 02 .$.............. + 00 00 .. + + -------- Video Control Processing Unit Descriptor ----- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x05 (Processing Unit) +bUnitID : 0x02 +bSourceID : 0x01 +wMaxMultiplier : 0x4000 (163.84x Zoom) +bControlSize : 0x02 +bmControls : 0x01, 0x00 + D0 : 1 yes - Brightness + D1 : 0 no - Contrast + D2 : 0 no - Hue + D3 : 0 no - Saturation + D4 : 0 no - Sharpness + D5 : 0 no - Gamma + D6 : 0 no - White Balance Temperature + D7 : 0 no - White Balance Component + D8 : 0 no - Backlight Compensation + D9 : 0 no - Gain + D10 : 0 no - Power Line Frequency + D11 : 0 no - Hue, Auto + D12 : 0 no - White Balance Temperature, Auto + D13 : 0 no - White Balance Component, Auto + D14 : 0 no - Digital Multiplier + D15 : 0 no - Digital Multiplier Limit +iProcessing : 0x00 +*!*ERROR: bLength of 0x0C incorrect, should be 0x0B +Data (HexDump) : 0C 24 05 02 01 00 40 02 01 00 00 00 .$....@..... + + ------- Video Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x03 +wTerminalType : 0x0101 (TT_STREAMING) +bAssocTerminal : 0x00 (Not associated with an Input Terminal) +bSourceID : 0x02 +iTerminal : 0x00 +Data (HexDump) : 09 24 03 03 01 01 00 02 00 .$....... + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1A (26 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x06 +guidExtensionCode : {41769EA2-04DE-E347-8B2B-F4341AFF003B} +bNumControls : 0x03 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x02 +bControlSize : 0x01 +bmControls : 0x07 + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 1 yes - Vendor-Specific (Optional) + D3 : 0 no - Vendor-Specific (Optional) + D4 : 0 no - Vendor-Specific (Optional) + D5 : 0 no - Vendor-Specific (Optional) + D6 : 0 no - Vendor-Specific (Optional) + D7 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1A 24 06 06 A2 9E 76 41 DE 04 47 E3 8B 2B F4 34 .$....vA..G..+.4 + 1A FF 00 3B 03 01 02 01 07 00 ...;...... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x03 (TransferType=Interrupt) +wMaxPacketSize : 0x0010 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x10 (16 bytes per packet) +bInterval : 0x08 (8 ms) +Data (HexDump) : 07 05 81 03 10 00 08 ....... + + --- Class-specific VC Interrupt Endpoint Descriptor --- +bLength : 0x05 (5 bytes) +bDescriptorType : 0x25 (Video Control Endpoint) +bDescriptorSubtype : 0x03 (Interrupt) +wMaxTransferSize : 0x0010 (16 bytes) +Data (HexDump) : 05 25 03 10 00 .%... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x06 (String Descriptor 6) + Language 0x0409 : "Video Streaming" +Data (HexDump) : 09 04 01 00 00 0E 02 00 06 ......... + + ---- VC-Specific VS Video Input Header Descriptor ----- +bLength : 0x0E (14 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x01 (Input Header) +bNumFormats : 0x01 +wTotalLength : 0x0049 (73 bytes) +bEndpointAddress : 0x82 (Direction=IN EndpointID=2) +bmInfo : 0x00 (Dynamic Format Change not supported) +bTerminalLink : 0x03 +bStillCaptureMethod : 0x00 (No Still Capture) +nbTriggerSupport : 0x00 (Hardware Triggering not supported) +bTriggerUsage : 0x00 (Host will initiate still image capture) +nbControlSize : 0x01 +Video Payload Format 1 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Data (HexDump) : 0E 24 01 01 49 00 82 00 03 00 00 00 01 00 .$..I......... + + ----- Video Streaming MJPEG Format Type Descriptor ---- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x06 (Format MJPEG) +bFormatIndex : 0x01 (1) +bNumFrameDescriptors : 0x01 (1) +bmFlags : 0x00 (Sample size is not fixed) +bDefaultFrameIndex : 0x01 (1) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +Data (HexDump) : 0B 24 06 01 01 00 01 00 00 00 00 .$......... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +---> This is the Default (optimum) Frame index +bLength : 0x2A (42 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x02D0 (720) +wHeight : 0x0500 (1280) +dwMinBitRate : 0x01194000 (18432000 bps -> 2.304 MB/s) +dwMaxBitRate : 0x01194000 (18432000 bps -> 2.304 MB/s) +dwMaxVideoFrameBufferSize: 0x001C2000 (1843200 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x04 (4 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[3] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[4] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 2A 24 07 01 00 D0 02 00 05 00 40 19 01 00 40 19 *$........@...@. + 01 00 20 1C 00 15 16 05 00 04 15 16 05 00 2A 2C .. ...........*, + 0A 00 40 42 0F 00 80 84 1E 00 ..@B...... + + ------- VS Color Matching Descriptor Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x0D (Color Matching) +bColorPrimaries : 0x01 (BT.709, sRGB) +bTransferCharacteristics : 0x01 (BT.709) +bMatrixCoefficients : 0x04 (SMPTE 170M) +Data (HexDump) : 06 24 0D 01 01 04 .$.... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x06 (String Descriptor 6) + Language 0x0409 : "Video Streaming" +Data (HexDump) : 09 04 01 01 01 0E 02 00 06 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x82 (Direction=IN EndpointID=2) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x03FF + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x3FF (1023 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 82 05 FF 03 01 ....... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x02 +bInterfaceCount : 0x02 +bFunctionClass : 0x0E (Video) +bFunctionSubClass : 0x03 (Video Interface Collection) +bFunctionProtocol : 0x00 (PC_PROTOCOL_UNDEFINED protocol) +iFunction : 0x08 (String Descriptor 8) + Language 0x0409 : "KAADAS Video Carmera¶" +Data (HexDump) : 08 0B 02 02 0E 03 00 08 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x02 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x01 (Video Control) +bInterfaceProtocol : 0x00 +iInterface : 0x08 (String Descriptor 8) + Language 0x0409 : "KAADAS Video Carmera¶" +Data (HexDump) : 09 04 02 00 01 0E 01 00 08 ......... + + ------- Video Control Interface Header Descriptor ----- +bLength : 0x0D (13 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x01 (Video Control Header) +bcdUVC : 0x0100 (UVC Version 1.00) +wTotalLength : 0x004E (78 bytes) +dwClockFreq : 0x02DC6C00 (48 MHz) +bInCollection : 0x01 (1 VideoStreaming interface) +baInterfaceNr[1] : 0x03 +Data (HexDump) : 0D 24 01 00 01 4E 00 00 6C DC 02 01 03 .$...N..l.... + + -------- Video Control Input Terminal Descriptor ------ +bLength : 0x12 (18 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (ITT_CAMERA) +bAssocTerminal : 0x00 (Not associated with an Output Terminal) +iTerminal : 0x00 +Camera Input Terminal Data: +wObjectiveFocalLengthMin : 0x0000 +wObjectiveFocalLengthMax : 0x0000 +wOcularFocalLength : 0x0000 +bControlSize : 0x03 +bmControls : 0x02, 0x00, 0x00 + D0 : 0 no - Scanning Mode + D1 : 1 yes - Auto-Exposure Mode + D2 : 0 no - Auto-Exposure Priority + D3 : 0 no - Exposure Time (Absolute) + D4 : 0 no - Exposure Time (Relative) + D5 : 0 no - Focus (Absolute) + D6 : 0 no - Focus (Relative) + D7 : 0 no - Iris (Absolute) + D8 : 0 no - Iris (Relative) + D9 : 0 no - Zoom (Absolute) + D10 : 0 no - Zoom (Relative) + D11 : 0 no - Pan (Absolute) + D12 : 0 no - Pan (Relative) + D13 : 0 no - Roll (Absolute) + D14 : 0 no - Roll (Relative) + D15 : 0 no - Tilt (Absolute) + D16 : 0 no - Tilt (Relative) + D17 : 0 no - Focus Auto + D18 : 0 no - Reserved + D19 : 0 no - Reserved + D20 : 0 no - Reserved + D21 : 0 no - Reserved + D22 : 0 no - Reserved + D23 : 0 no - Reserved +Data (HexDump) : 12 24 02 01 01 02 00 00 00 00 00 00 00 00 03 02 .$.............. + 00 00 .. + + -------- Video Control Processing Unit Descriptor ----- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x05 (Processing Unit) +bUnitID : 0x02 +bSourceID : 0x01 +wMaxMultiplier : 0x4000 (163.84x Zoom) +bControlSize : 0x02 +bmControls : 0x01, 0x00 + D0 : 1 yes - Brightness + D1 : 0 no - Contrast + D2 : 0 no - Hue + D3 : 0 no - Saturation + D4 : 0 no - Sharpness + D5 : 0 no - Gamma + D6 : 0 no - White Balance Temperature + D7 : 0 no - White Balance Component + D8 : 0 no - Backlight Compensation + D9 : 0 no - Gain + D10 : 0 no - Power Line Frequency + D11 : 0 no - Hue, Auto + D12 : 0 no - White Balance Temperature, Auto + D13 : 0 no - White Balance Component, Auto + D14 : 0 no - Digital Multiplier + D15 : 0 no - Digital Multiplier Limit +iProcessing : 0x00 +*!*ERROR: bLength of 0x0C incorrect, should be 0x0B +Data (HexDump) : 0C 24 05 02 01 00 40 02 01 00 00 00 .$....@..... + + ------- Video Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x03 +wTerminalType : 0x0101 (TT_STREAMING) +bAssocTerminal : 0x00 (Not associated with an Input Terminal) +bSourceID : 0x02 +iTerminal : 0x00 +Data (HexDump) : 09 24 03 03 01 01 00 02 00 .$....... + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1A (26 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x06 +guidExtensionCode : {41769EA2-04DE-E347-8B2B-F4341AFF003B} +bNumControls : 0x03 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x02 +bControlSize : 0x01 +bmControls : 0x07 + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 1 yes - Vendor-Specific (Optional) + D3 : 0 no - Vendor-Specific (Optional) + D4 : 0 no - Vendor-Specific (Optional) + D5 : 0 no - Vendor-Specific (Optional) + D6 : 0 no - Vendor-Specific (Optional) + D7 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1A 24 06 06 A2 9E 76 41 DE 04 47 E3 8B 2B F4 34 .$....vA..G..+.4 + 1A FF 00 3B 03 01 02 01 07 00 ...;...... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x83 (Direction=IN EndpointID=3) +bmAttributes : 0x03 (TransferType=Interrupt) +wMaxPacketSize : 0x0010 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x10 (16 bytes per packet) +bInterval : 0x08 (8 ms) +Data (HexDump) : 07 05 83 03 10 00 08 ....... + + --- Class-specific VC Interrupt Endpoint Descriptor --- +bLength : 0x05 (5 bytes) +bDescriptorType : 0x25 (Video Control Endpoint) +bDescriptorSubtype : 0x03 (Interrupt) +wMaxTransferSize : 0x0010 (16 bytes) +Data (HexDump) : 05 25 03 10 00 .%... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x09 (String Descriptor 9) + Language 0x0409 : "Video Streaming" +Data (HexDump) : 09 04 03 00 00 0E 02 00 09 ......... + + ---- VC-Specific VS Video Input Header Descriptor ----- +bLength : 0x0E (14 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x01 (Input Header) +bNumFormats : 0x01 +wTotalLength : 0x0102 (258 bytes) +bEndpointAddress : 0x84 (Direction=IN EndpointID=4) +bmInfo : 0x00 (Dynamic Format Change not supported) +bTerminalLink : 0x03 +bStillCaptureMethod : 0x00 (No Still Capture) +nbTriggerSupport : 0x00 (Hardware Triggering not supported) +bTriggerUsage : 0x00 (Host will initiate still image capture) +nbControlSize : 0x01 +Video Payload Format 1 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Data (HexDump) : 0E 24 01 01 02 01 84 00 03 00 00 00 01 00 .$............ + + ---- VS Frame Based Payload Format Type Descriptor ---- +*!*ERROR: This format is NOT ALLOWED for UVC 1.0 devices +bLength : 0x1C (28 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x10 (Frame Based Format Type) +bFormatIndex : 0x01 (1) +bNumFrameDescriptors : 0x05 (5) +guidFormat : {35363248-0000-0010-8000-00AA00389B71} (H265) +bBitsPerPixel : 0x10 (16 bits) +bDefaultFrameIndex : 0x01 (1) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +bVariableSize : 0x01 (Variable Size) +Data (HexDump) : 1C 24 10 01 05 48 32 36 35 00 00 10 00 80 00 00 .$...H265....... + AA 00 38 9B 71 10 01 00 00 00 00 01 ..8.q....... + + ----- VS Frame Based Payload Frame Type Descriptor ---- +*!*ERROR bDescriptorSubtype did not exist in UVC 1.0 +bLength : 0x2A (42 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x002EE000 (3072000 bps -> 384 KB/s) +dwMaxBitRate : 0x002EE000 (3072000 bps -> 384 KB/s) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x04 (4 discrete frame intervals supported) +dwBytesPerLine : 0x00 (0 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 2A 24 11 01 00 80 02 E0 01 00 E0 2E 00 00 E0 2E *$.............. + 00 2A 2C 0A 00 04 00 00 00 00 15 16 05 00 80 1A .*,............. + 06 00 20 A1 07 00 2A 2C 0A 00 .. ...*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +*!*ERROR bDescriptorSubtype did not exist in UVC 1.0 +bLength : 0x2A (42 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x00 +wWidth : 0x0500 (1280) +wHeight : 0x02D0 (720) +dwMinBitRate : 0x008CA000 (9216000 bps -> 1.152 MB/s) +dwMaxBitRate : 0x008CA000 (9216000 bps -> 1.152 MB/s) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x04 (4 discrete frame intervals supported) +dwBytesPerLine : 0x00 (0 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 2A 24 11 02 00 00 05 D0 02 00 A0 8C 00 00 A0 8C *$.............. + 00 2A 2C 0A 00 04 00 00 00 00 15 16 05 00 80 1A .*,............. + 06 00 20 A1 07 00 2A 2C 0A 00 .. ...*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +*!*ERROR bDescriptorSubtype did not exist in UVC 1.0 +bLength : 0x2A (42 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x00 +wWidth : 0x0780 (1920) +wHeight : 0x0438 (1080) +dwMinBitRate : 0x013C6800 (20736000 bps -> 2.592 MB/s) +dwMaxBitRate : 0x013C6800 (20736000 bps -> 2.592 MB/s) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x04 (4 discrete frame intervals supported) +dwBytesPerLine : 0x00 (0 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 2A 24 11 03 00 80 07 38 04 00 68 3C 01 00 68 3C *$.....8..h<..h< + 01 2A 2C 0A 00 04 00 00 00 00 15 16 05 00 80 1A .*,............. + 06 00 20 A1 07 00 2A 2C 0A 00 .. ...*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +*!*ERROR bDescriptorSubtype did not exist in UVC 1.0 +bLength : 0x2A (42 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x00 +wWidth : 0x0A00 (2560) +wHeight : 0x05A0 (1440) +dwMinBitRate : 0x02328000 (36864000 bps -> 4.608 MB/s) +dwMaxBitRate : 0x02328000 (36864000 bps -> 4.608 MB/s) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x04 (4 discrete frame intervals supported) +dwBytesPerLine : 0x00 (0 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 2A 24 11 04 00 00 0A A0 05 00 80 32 02 00 80 32 *$.........2...2 + 02 2A 2C 0A 00 04 00 00 00 00 15 16 05 00 80 1A .*,............. + 06 00 20 A1 07 00 2A 2C 0A 00 .. ...*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +*!*ERROR bDescriptorSubtype did not exist in UVC 1.0 +bLength : 0x2A (42 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x05 +bmCapabilities : 0x00 +wWidth : 0x0900 (2304) +wHeight : 0x0510 (1296) +dwMinBitRate : 0x01C7A000 (29859840 bps -> 3.732 MB/s) +dwMaxBitRate : 0x01C7A000 (29859840 bps -> 3.732 MB/s) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x04 (4 discrete frame intervals supported) +dwBytesPerLine : 0x00 (0 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 2A 24 11 05 00 00 09 10 05 00 A0 C7 01 00 A0 C7 *$.............. + 01 2A 2C 0A 00 04 00 00 00 00 15 16 05 00 80 1A .*,............. + 06 00 20 A1 07 00 2A 2C 0A 00 .. ...*,.. + + ------- VS Color Matching Descriptor Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x0D (Color Matching) +bColorPrimaries : 0x01 (BT.709, sRGB) +bTransferCharacteristics : 0x01 (BT.709) +bMatrixCoefficients : 0x04 (SMPTE 170M) +Data (HexDump) : 06 24 0D 01 01 04 .$.... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x09 (String Descriptor 9) + Language 0x0409 : "Video Streaming" +Data (HexDump) : 09 04 03 01 01 0E 02 00 09 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x84 (Direction=IN EndpointID=4) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x03FF + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x3FF (1023 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 84 05 FF 03 01 ....... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x04 +bInterfaceCount : 0x02 +bFunctionClass : 0x02 (Communications and CDC Control) +bFunctionSubClass : 0x02 +bFunctionProtocol : 0x01 +iFunction : 0x0D (String Descriptor 13) + Language 0x0409 : "CDC Serial" +Data (HexDump) : 08 0B 04 02 02 02 01 0D ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x04 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x02 (Communications and CDC Control) +bInterfaceSubClass : 0x02 (Abstract Control Model) +bInterfaceProtocol : 0x01 (AT Commands defined by ITU-T V.250 etc) +iInterface : 0x0B (String Descriptor 11) + Language 0x0409 : "CDC Abstract Control Model (ACM)" +Data (HexDump) : 09 04 04 00 01 02 02 01 0B ......... + + -------------- CDC Interface Descriptor --------------- +bFunctionLength : 0x05 (5 bytes) +bDescriptorType : 0x24 (Interface) +bDescriptorSubType : 0x00 (Header Functional Descriptor) +bcdCDC : 0x110 (CDC Version 1.10) +Data (HexDump) : 05 24 00 10 01 .$... + + -------------- CDC Interface Descriptor --------------- +bFunctionLength : 0x05 (5 bytes) +bDescriptorType : 0x24 (Interface) +bDescriptorSubType : 0x01 (Call Management Functional Descriptor) +bmCapabilities : 0x00 + D7..2 : 0x00 (Reserved) + D1 : 0x00 (sends/receives call management information only over the Communication Class interface) + D0 : 0x00 (does not handle call management itself) +bDataInterface : 0x05 +Data (HexDump) : 05 24 01 00 05 .$... + + -------------- CDC Interface Descriptor --------------- +bFunctionLength : 0x04 (4 bytes) +bDescriptorType : 0x24 (Interface) +bDescriptorSubType : 0x02 (Abstract Control Management Functional Descriptor) +bmCapabilities : 0x02 + D7..4 : 0x00 (Reserved) + D3 : 0x00 (not supports the notification Network_Connection) + D2 : 0x00 (not supports the request Send_Break) + D1 : 0x01 (supports the request combination of Set_Line_Coding, Set_Control_Line_State, Get_Line_Coding, and the notification Serial_State) + D0 : 0x00 (not supports the request combination of Set_Comm_Feature, Clear_Comm_Feature, and Get_Comm_Feature) +Data (HexDump) : 04 24 02 02 .$.. + + -------------- CDC Interface Descriptor --------------- +bFunctionLength : 0x05 (5 bytes) +bDescriptorType : 0x24 (Interface) +bDescriptorSubType : 0x06 (Union Functional Descriptor) +bControlInterface : 0x04 +bSubordinateInterface[0] : 0x05 +Data (HexDump) : 05 24 06 04 05 .$... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x86 (Direction=IN EndpointID=6) +bmAttributes : 0x03 (TransferType=Interrupt) +wMaxPacketSize : 0x000A + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x0A (10 bytes per packet) +bInterval : 0x20 (32 ms) +Data (HexDump) : 07 05 86 03 0A 00 20 ...... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x05 +bAlternateSetting : 0x00 +bNumEndpoints : 0x02 (2 Endpoints) +bInterfaceClass : 0x0A (CDC-Data) +bInterfaceSubClass : 0x00 +bInterfaceProtocol : 0x00 +iInterface : 0x0C (String Descriptor 12) + Language 0x0409 : "CDC ACM Data" +Data (HexDump) : 09 04 05 00 02 0A 00 00 0C ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x85 (Direction=IN EndpointID=5) +bmAttributes : 0x02 (TransferType=Bulk) +wMaxPacketSize : 0x0040 (max 64 bytes) +bInterval : 0x00 (never NAKs) +Data (HexDump) : 07 05 85 02 40 00 00 ....@.. + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x01 (Direction=OUT EndpointID=1) +bmAttributes : 0x02 (TransferType=Bulk) +wMaxPacketSize : 0x0040 (max 64 bytes) +bInterval : 0x00 (never NAKs) +Data (HexDump) : 07 05 01 02 40 00 00 ....@.. + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x06 +bInterfaceCount : 0x03 +bFunctionClass : 0x01 (Audio) +bFunctionSubClass : 0x02 (Audio Streaming) +bFunctionProtocol : 0x00 +iFunction : 0x0F (String Descriptor 15) + Language 0x0409 : "Source/Sink" +Data (HexDump) : 08 0B 06 03 01 02 00 0F ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x06 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x01 (Audio Control) +bInterfaceProtocol : 0x00 +iInterface : 0x10 (String Descriptor 16) + Language 0x0409 : "AC Interface" +Data (HexDump) : 09 04 06 00 01 01 01 00 10 ......... + + ------ Audio Control Interface Header Descriptor ------ +bLength : 0x0A (10 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 (Header) +bcdADC : 0x0100 +wTotalLength : 0x004A (74 bytes) +bInCollection : 0x02 +baInterfaceNr[1] : 0x07 +baInterfaceNr[2] : 0x08 +Data (HexDump) : 0A 24 01 00 01 4A 00 02 07 08 .$...J.... + + ------- Audio Control Input Terminal Descriptor ------- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0101 (USB streaming) +bAssocTerminal : 0x00 +bNrChannels : 0x01 (1 channel) +wChannelConfig : 0x0001 (L) +iChannelNames : 0x12 (String Descriptor 18) + Language 0x0409 : "Playback Channels" +iTerminal : 0x11 (String Descriptor 17) + Language 0x0409 : "Playback Input terminal" +Data (HexDump) : 0C 24 02 01 01 01 00 01 01 00 12 11 .$.......... + + ------- Audio Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x03 +wTerminalType : 0x0301 (Speaker) +bAssocTerminal : 0x00 (0) +bSourceID : 0x05 (5) +iTerminal : 0x13 (String Descriptor 19) + Language 0x0409 : "Playback Output terminal" +Data (HexDump) : 09 24 03 03 01 03 00 05 13 .$....... + + -------- Audio Control Feature Unit Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x06 (Feature Unit) +bUnitID : 0x05 (5) +bSourceID : 0x01 (1) +bControlSize : 0x02 (2 bytes per control) +bmaControls[0] : 0x03, 0x00 + D0: Mute : 1 + D1: Volume : 1 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 + D8: Bass Boost : 0 + D9: Loudness : 0 + D10: Reserved : 0 + D11: Reserved : 0 + D12: Reserved : 0 + D13: Reserved : 0 + D14: Reserved : 0 + D15: Reserved : 0 +bmaControls[1] : 0x00, 0x00 + D0: Mute : 0 + D1: Volume : 0 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 + D8: Bass Boost : 0 + D9: Loudness : 0 + D10: Reserved : 0 + D11: Reserved : 0 + D12: Reserved : 0 + D13: Reserved : 0 + D14: Reserved : 0 + D15: Reserved : 0 +iFeature : 0x18 (String Descriptor 24) + Language 0x0409 : "Playback Volume" +Data (HexDump) : 0B 24 06 05 01 02 03 00 00 00 18 .$......... + + ------- Audio Control Input Terminal Descriptor ------- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x02 +wTerminalType : 0x0201 (Microphone) +bAssocTerminal : 0x00 +bNrChannels : 0x01 (1 channel) +wChannelConfig : 0x0001 (L) +iChannelNames : 0x15 (String Descriptor 21) + Language 0x0409 : "Capture Channels" +iTerminal : 0x14 (String Descriptor 20) + Language 0x0409 : "Capture Input terminal" +Data (HexDump) : 0C 24 02 02 01 02 00 01 01 00 15 14 .$.......... + + ------- Audio Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x04 +wTerminalType : 0x0101 (USB streaming) +bAssocTerminal : 0x00 (0) +bSourceID : 0x06 (6) +iTerminal : 0x16 (String Descriptor 22) + Language 0x0409 : "Capture Output terminal" +Data (HexDump) : 09 24 03 04 01 01 00 06 16 .$....... + + -------- Audio Control Feature Unit Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x06 (Feature Unit) +bUnitID : 0x06 (6) +bSourceID : 0x02 (2) +bControlSize : 0x02 (2 bytes per control) +bmaControls[0] : 0x03, 0x00 + D0: Mute : 1 + D1: Volume : 1 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 + D8: Bass Boost : 0 + D9: Loudness : 0 + D10: Reserved : 0 + D11: Reserved : 0 + D12: Reserved : 0 + D13: Reserved : 0 + D14: Reserved : 0 + D15: Reserved : 0 +bmaControls[1] : 0x00, 0x00 + D0: Mute : 0 + D1: Volume : 0 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 + D8: Bass Boost : 0 + D9: Loudness : 0 + D10: Reserved : 0 + D11: Reserved : 0 + D12: Reserved : 0 + D13: Reserved : 0 + D14: Reserved : 0 + D15: Reserved : 0 +iFeature : 0x17 (String Descriptor 23) + Language 0x0409 : "Capture Volume" +Data (HexDump) : 0B 24 06 06 02 02 03 00 00 00 17 .$......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x87 (Direction=IN EndpointID=7) +bmAttributes : 0x03 (TransferType=Interrupt) +wMaxPacketSize : 0x0002 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x02 (2 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 87 03 02 00 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x07 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x19 (String Descriptor 25) + Language 0x0409 : "Playback Inactive" +Data (HexDump) : 09 04 07 00 00 01 02 00 19 ......... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x07 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x1A (String Descriptor 26) + Language 0x0409 : "Playback Active" +Data (HexDump) : 09 04 07 01 01 01 02 00 1A ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x01 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 01 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x14 (20 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x01 (1 channel) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x04 (supports 4 sample frequencies) +tSamFreq[1] : 0x01F40 (8000 Hz) +tSamFreq[2] : 0x03E80 (16000 Hz) +tSamFreq[3] : 0x0AC44 (44100 Hz) +tSamFreq[4] : 0x0BB80 (48000 Hz) +Data (HexDump) : 14 24 02 01 01 02 10 04 40 1F 00 80 3E 00 44 AC .$......@...>.D. + 00 80 BB 00 .... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x02 (Direction=OUT EndpointID=2) +bmAttributes : 0x09 (TransferType=Isochronous SyncType=Adaptive EndpointType=Data) +wMaxPacketSize : 0x0062 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x62 (98 bytes per packet) +bInterval : 0x01 (1 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 02 09 62 00 01 00 00 ....b.... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x01 (Milliseconds) +wLockDelay : 0x0001 (1 ms) +Data (HexDump) : 07 25 01 01 01 01 00 .%..... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x08 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x1B (String Descriptor 27) + Language 0x0409 : "Capture Inactive" +Data (HexDump) : 09 04 08 00 00 01 02 00 1B ......... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x08 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x1C (String Descriptor 28) + Language 0x0409 : "Capture Active" +Data (HexDump) : 09 04 08 01 01 01 02 00 1C ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x04 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 04 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x14 (20 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x01 (1 channel) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x04 (supports 4 sample frequencies) +tSamFreq[1] : 0x01F40 (8000 Hz) +tSamFreq[2] : 0x03E80 (16000 Hz) +tSamFreq[3] : 0x0AC44 (44100 Hz) +tSamFreq[4] : 0x0BB80 (48000 Hz) +Data (HexDump) : 14 24 02 01 01 02 10 04 40 1F 00 80 3E 00 44 AC .$......@...>.D. + 00 80 BB 00 .... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x88 (Direction=IN EndpointID=8) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0062 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x62 (98 bytes per packet) +bInterval : 0x01 (1 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 88 05 62 00 01 00 00 ....b.... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x00 (Undefined) +wLockDelay : 0x0000 +Data (HexDump) : 07 25 01 01 00 00 00 .%..... + + -------------------- String Descriptors ------------------- + ------ String Descriptor 0 ------ +bLength : 0x04 (4 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language ID[0] : 0x0409 (English - United States) +Data (HexDump) : 04 03 09 04 .... + ------ String Descriptor 1 ------ +bLength : 0x12 (18 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "rockchip" +Data (HexDump) : 12 03 72 00 6F 00 63 00 6B 00 63 00 68 00 69 00 ..r.o.c.k.c.h.i. + 70 00 p. + ------ String Descriptor 2 ------ +bLength : 0x08 (8 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "UVC" +Data (HexDump) : 08 03 55 00 56 00 43 00 ..U.V.C. + ------ String Descriptor 3 ------ +bLength : 0x22 (34 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "2d312ff4bb1927af" +Data (HexDump) : 22 03 32 00 64 00 33 00 31 00 32 00 66 00 66 00 ".2.d.3.1.2.f.f. + 34 00 62 00 62 00 31 00 39 00 32 00 37 00 61 00 4.b.b.1.9.2.7.a. + 66 00 f. + ------ String Descriptor 4 ------ +bLength : 0x12 (18 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "uvc_uac1" +Data (HexDump) : 12 03 75 00 76 00 63 00 5F 00 75 00 61 00 63 00 ..u.v.c._.u.a.c. + 31 00 1. + ------ String Descriptor 5 ------ +bLength : 0x2A (42 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "KAADAS MJPG Carmera¶" *!*CAUTION contains character below 0x20 +Data (HexDump) : 2A 03 4B 00 41 00 41 00 44 00 41 00 53 00 20 00 *.K.A.A.D.A.S. . + 4D 00 4A 00 50 00 47 00 20 00 43 00 61 00 72 00 M.J.P.G. .C.a.r. + 6D 00 65 00 72 00 61 00 0A 00 m.e.r.a... + ------ String Descriptor 6 ------ +bLength : 0x20 (32 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Video Streaming" +Data (HexDump) : 20 03 56 00 69 00 64 00 65 00 6F 00 20 00 53 00 .V.i.d.e.o. .S. + 74 00 72 00 65 00 61 00 6D 00 69 00 6E 00 67 00 t.r.e.a.m.i.n.g. + ------ String Descriptor 8 ------ +bLength : 0x2C (44 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "KAADAS Video Carmera¶" *!*CAUTION contains character below 0x20 +Data (HexDump) : 2C 03 4B 00 41 00 41 00 44 00 41 00 53 00 20 00 ,.K.A.A.D.A.S. . + 56 00 69 00 64 00 65 00 6F 00 20 00 43 00 61 00 V.i.d.e.o. .C.a. + 72 00 6D 00 65 00 72 00 61 00 0A 00 r.m.e.r.a... + ------ String Descriptor 9 ------ +bLength : 0x20 (32 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Video Streaming" +Data (HexDump) : 20 03 56 00 69 00 64 00 65 00 6F 00 20 00 53 00 .V.i.d.e.o. .S. + 74 00 72 00 65 00 61 00 6D 00 69 00 6E 00 67 00 t.r.e.a.m.i.n.g. + ------ String Descriptor 11 ------ +bLength : 0x42 (66 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "CDC Abstract Control Model (ACM)" +Data (HexDump) : 42 03 43 00 44 00 43 00 20 00 41 00 62 00 73 00 B.C.D.C. .A.b.s. + 74 00 72 00 61 00 63 00 74 00 20 00 43 00 6F 00 t.r.a.c.t. .C.o. + 6E 00 74 00 72 00 6F 00 6C 00 20 00 4D 00 6F 00 n.t.r.o.l. .M.o. + 64 00 65 00 6C 00 20 00 28 00 41 00 43 00 4D 00 d.e.l. .(.A.C.M. + 29 00 ). + ------ String Descriptor 12 ------ +bLength : 0x1A (26 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "CDC ACM Data" +Data (HexDump) : 1A 03 43 00 44 00 43 00 20 00 41 00 43 00 4D 00 ..C.D.C. .A.C.M. + 20 00 44 00 61 00 74 00 61 00 .D.a.t.a. + ------ String Descriptor 13 ------ +bLength : 0x16 (22 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "CDC Serial" +Data (HexDump) : 16 03 43 00 44 00 43 00 20 00 53 00 65 00 72 00 ..C.D.C. .S.e.r. + 69 00 61 00 6C 00 i.a.l. + ------ String Descriptor 15 ------ +bLength : 0x18 (24 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Source/Sink" +Data (HexDump) : 18 03 53 00 6F 00 75 00 72 00 63 00 65 00 2F 00 ..S.o.u.r.c.e./. + 53 00 69 00 6E 00 6B 00 S.i.n.k. + ------ String Descriptor 16 ------ +bLength : 0x1A (26 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "AC Interface" +Data (HexDump) : 1A 03 41 00 43 00 20 00 49 00 6E 00 74 00 65 00 ..A.C. .I.n.t.e. + 72 00 66 00 61 00 63 00 65 00 r.f.a.c.e. + ------ String Descriptor 17 ------ +bLength : 0x30 (48 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Playback Input terminal" +Data (HexDump) : 30 03 50 00 6C 00 61 00 79 00 62 00 61 00 63 00 0.P.l.a.y.b.a.c. + 6B 00 20 00 49 00 6E 00 70 00 75 00 74 00 20 00 k. .I.n.p.u.t. . + 74 00 65 00 72 00 6D 00 69 00 6E 00 61 00 6C 00 t.e.r.m.i.n.a.l. + ------ String Descriptor 18 ------ +bLength : 0x24 (36 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Playback Channels" +Data (HexDump) : 24 03 50 00 6C 00 61 00 79 00 62 00 61 00 63 00 $.P.l.a.y.b.a.c. + 6B 00 20 00 43 00 68 00 61 00 6E 00 6E 00 65 00 k. .C.h.a.n.n.e. + 6C 00 73 00 l.s. + ------ String Descriptor 19 ------ +bLength : 0x32 (50 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Playback Output terminal" +Data (HexDump) : 32 03 50 00 6C 00 61 00 79 00 62 00 61 00 63 00 2.P.l.a.y.b.a.c. + 6B 00 20 00 4F 00 75 00 74 00 70 00 75 00 74 00 k. .O.u.t.p.u.t. + 20 00 74 00 65 00 72 00 6D 00 69 00 6E 00 61 00 .t.e.r.m.i.n.a. + 6C 00 l. + ------ String Descriptor 20 ------ +bLength : 0x2E (46 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Capture Input terminal" +Data (HexDump) : 2E 03 43 00 61 00 70 00 74 00 75 00 72 00 65 00 ..C.a.p.t.u.r.e. + 20 00 49 00 6E 00 70 00 75 00 74 00 20 00 74 00 .I.n.p.u.t. .t. + 65 00 72 00 6D 00 69 00 6E 00 61 00 6C 00 e.r.m.i.n.a.l. + ------ String Descriptor 21 ------ +bLength : 0x22 (34 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Capture Channels" +Data (HexDump) : 22 03 43 00 61 00 70 00 74 00 75 00 72 00 65 00 ".C.a.p.t.u.r.e. + 20 00 43 00 68 00 61 00 6E 00 6E 00 65 00 6C 00 .C.h.a.n.n.e.l. + 73 00 s. + ------ String Descriptor 22 ------ +bLength : 0x30 (48 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Capture Output terminal" +Data (HexDump) : 30 03 43 00 61 00 70 00 74 00 75 00 72 00 65 00 0.C.a.p.t.u.r.e. + 20 00 4F 00 75 00 74 00 70 00 75 00 74 00 20 00 .O.u.t.p.u.t. . + 74 00 65 00 72 00 6D 00 69 00 6E 00 61 00 6C 00 t.e.r.m.i.n.a.l. + ------ String Descriptor 23 ------ +bLength : 0x1E (30 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Capture Volume" +Data (HexDump) : 1E 03 43 00 61 00 70 00 74 00 75 00 72 00 65 00 ..C.a.p.t.u.r.e. + 20 00 56 00 6F 00 6C 00 75 00 6D 00 65 00 .V.o.l.u.m.e. + ------ String Descriptor 24 ------ +bLength : 0x20 (32 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Playback Volume" +Data (HexDump) : 20 03 50 00 6C 00 61 00 79 00 62 00 61 00 63 00 .P.l.a.y.b.a.c. + 6B 00 20 00 56 00 6F 00 6C 00 75 00 6D 00 65 00 k. .V.o.l.u.m.e. + ------ String Descriptor 25 ------ +bLength : 0x24 (36 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Playback Inactive" +Data (HexDump) : 24 03 50 00 6C 00 61 00 79 00 62 00 61 00 63 00 $.P.l.a.y.b.a.c. + 6B 00 20 00 49 00 6E 00 61 00 63 00 74 00 69 00 k. .I.n.a.c.t.i. + 76 00 65 00 v.e. + ------ String Descriptor 26 ------ +bLength : 0x20 (32 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Playback Active" +Data (HexDump) : 20 03 50 00 6C 00 61 00 79 00 62 00 61 00 63 00 .P.l.a.y.b.a.c. + 6B 00 20 00 41 00 63 00 74 00 69 00 76 00 65 00 k. .A.c.t.i.v.e. + ------ String Descriptor 27 ------ +bLength : 0x22 (34 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Capture Inactive" +Data (HexDump) : 22 03 43 00 61 00 70 00 74 00 75 00 72 00 65 00 ".C.a.p.t.u.r.e. + 20 00 49 00 6E 00 61 00 63 00 74 00 69 00 76 00 .I.n.a.c.t.i.v. + 65 00 e. + ------ String Descriptor 28 ------ +bLength : 0x1E (30 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Capture Active" +Data (HexDump) : 1E 03 43 00 61 00 70 00 74 00 75 00 72 00 65 00 ..C.a.p.t.u.r.e. + 20 00 41 00 63 00 74 00 69 00 76 00 65 00 .A.c.t.i.v.e. +*/ + +namespace customer_camera_dual { +const uint8_t dev_desc[] = { + 0x12, 0x01, 0x00, 0x02, 0xEF, 0x02, 0x01, 0x40, 0x07, 0x22, 0x18, 0x00, 0x10, 0x03, 0x01, 0x02, + 0x03, 0x01 +}; + +const uint8_t cfg_desc[] = { + 0x09, 0x02, 0x7A, 0x03, 0x09, 0x01, 0x04, 0x80, 0xFA, 0x08, 0x0B, 0x00, 0x02, 0x0E, 0x03, 0x00, + 0x05, 0x09, 0x04, 0x00, 0x00, 0x01, 0x0E, 0x01, 0x00, 0x05, 0x0D, 0x24, 0x01, 0x00, 0x01, 0x4E, + 0x00, 0x00, 0x6C, 0xDC, 0x02, 0x01, 0x01, 0x12, 0x24, 0x02, 0x01, 0x01, 0x02, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x02, 0x00, 0x00, 0x0C, 0x24, 0x05, 0x02, 0x01, 0x00, 0x40, + 0x02, 0x01, 0x00, 0x00, 0x00, 0x09, 0x24, 0x03, 0x03, 0x01, 0x01, 0x00, 0x02, 0x00, 0x1A, 0x24, + 0x06, 0x06, 0xA2, 0x9E, 0x76, 0x41, 0xDE, 0x04, 0x47, 0xE3, 0x8B, 0x2B, 0xF4, 0x34, 0x1A, 0xFF, + 0x00, 0x3B, 0x03, 0x01, 0x02, 0x01, 0x07, 0x00, 0x07, 0x05, 0x81, 0x03, 0x10, 0x00, 0x08, 0x05, + 0x25, 0x03, 0x10, 0x00, 0x09, 0x04, 0x01, 0x00, 0x00, 0x0E, 0x02, 0x00, 0x06, 0x0E, 0x24, 0x01, + 0x01, 0x49, 0x00, 0x82, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0B, 0x24, 0x06, 0x01, 0x01, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x24, 0x07, 0x01, 0x00, 0xD0, 0x02, 0x00, 0x05, 0x00, + 0x40, 0x19, 0x01, 0x00, 0x40, 0x19, 0x01, 0x00, 0x20, 0x1C, 0x00, 0x15, 0x16, 0x05, 0x00, 0x04, + 0x15, 0x16, 0x05, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, + 0x06, 0x24, 0x0D, 0x01, 0x01, 0x04, 0x09, 0x04, 0x01, 0x01, 0x01, 0x0E, 0x02, 0x00, 0x06, 0x07, + 0x05, 0x82, 0x05, 0x00, 0x0C, 0x01, 0x08, 0x0B, 0x02, 0x02, 0x0E, 0x03, 0x00, 0x08, 0x09, 0x04, + 0x02, 0x00, 0x01, 0x0E, 0x01, 0x00, 0x08, 0x0D, 0x24, 0x01, 0x00, 0x01, 0x4E, 0x00, 0x00, 0x6C, + 0xDC, 0x02, 0x01, 0x03, 0x12, 0x24, 0x02, 0x01, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x02, 0x00, 0x00, 0x0C, 0x24, 0x05, 0x02, 0x01, 0x00, 0x40, 0x02, 0x01, 0x00, + 0x00, 0x00, 0x09, 0x24, 0x03, 0x03, 0x01, 0x01, 0x00, 0x02, 0x00, 0x1A, 0x24, 0x06, 0x06, 0xA2, + 0x9E, 0x76, 0x41, 0xDE, 0x04, 0x47, 0xE3, 0x8B, 0x2B, 0xF4, 0x34, 0x1A, 0xFF, 0x00, 0x3B, 0x03, + 0x01, 0x02, 0x01, 0x07, 0x00, 0x07, 0x05, 0x83, 0x03, 0x10, 0x00, 0x08, 0x05, 0x25, 0x03, 0x10, + 0x00, 0x09, 0x04, 0x03, 0x00, 0x00, 0x0E, 0x02, 0x00, 0x09, 0x0E, 0x24, 0x01, 0x01, 0x02, 0x01, + 0x84, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1C, 0x24, 0x10, 0x01, 0x05, 0x48, 0x32, 0x36, + 0x35, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71, 0x10, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x2A, 0x24, 0x11, 0x01, 0x00, 0x80, 0x02, 0xE0, 0x01, 0x00, 0xE0, 0x2E, + 0x00, 0x00, 0xE0, 0x2E, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x15, 0x16, + 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x2A, 0x24, + 0x11, 0x02, 0x00, 0x00, 0x05, 0xD0, 0x02, 0x00, 0xA0, 0x8C, 0x00, 0x00, 0xA0, 0x8C, 0x00, 0x2A, + 0x2C, 0x0A, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, + 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x2A, 0x24, 0x11, 0x03, 0x00, 0x80, 0x07, 0x38, + 0x04, 0x00, 0x68, 0x3C, 0x01, 0x00, 0x68, 0x3C, 0x01, 0x2A, 0x2C, 0x0A, 0x00, 0x04, 0x00, 0x00, + 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, + 0x0A, 0x00, 0x2A, 0x24, 0x11, 0x04, 0x00, 0x00, 0x0A, 0xA0, 0x05, 0x00, 0x80, 0x32, 0x02, 0x00, + 0x80, 0x32, 0x02, 0x2A, 0x2C, 0x0A, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, + 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x2A, 0x24, 0x11, 0x05, + 0x00, 0x00, 0x09, 0x10, 0x05, 0x00, 0xA0, 0xC7, 0x01, 0x00, 0xA0, 0xC7, 0x01, 0x2A, 0x2C, 0x0A, + 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, + 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x06, 0x24, 0x0D, 0x01, 0x01, 0x04, 0x09, 0x04, 0x03, 0x01, + 0x01, 0x0E, 0x02, 0x00, 0x09, 0x07, 0x05, 0x84, 0x05, 0x00, 0x0C, 0x01, 0x08, 0x0B, 0x04, 0x02, + 0x02, 0x02, 0x01, 0x0D, 0x09, 0x04, 0x04, 0x00, 0x01, 0x02, 0x02, 0x01, 0x0B, 0x05, 0x24, 0x00, + 0x10, 0x01, 0x05, 0x24, 0x01, 0x00, 0x05, 0x04, 0x24, 0x02, 0x02, 0x05, 0x24, 0x06, 0x04, 0x05, + 0x07, 0x05, 0x86, 0x03, 0x0A, 0x00, 0x09, 0x09, 0x04, 0x05, 0x00, 0x02, 0x0A, 0x00, 0x00, 0x0C, + 0x07, 0x05, 0x85, 0x02, 0x00, 0x02, 0x00, 0x07, 0x05, 0x01, 0x02, 0x00, 0x02, 0x00, 0x08, 0x0B, + 0x06, 0x03, 0x01, 0x02, 0x00, 0x0F, 0x09, 0x04, 0x06, 0x00, 0x01, 0x01, 0x01, 0x00, 0x10, 0x0A, + 0x24, 0x01, 0x00, 0x01, 0x4A, 0x00, 0x02, 0x07, 0x08, 0x0C, 0x24, 0x02, 0x01, 0x01, 0x01, 0x00, + 0x01, 0x01, 0x00, 0x12, 0x11, 0x09, 0x24, 0x03, 0x03, 0x01, 0x03, 0x00, 0x05, 0x13, 0x0B, 0x24, + 0x06, 0x05, 0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0x18, 0x0C, 0x24, 0x02, 0x02, 0x01, 0x02, 0x00, + 0x01, 0x01, 0x00, 0x15, 0x14, 0x09, 0x24, 0x03, 0x04, 0x01, 0x01, 0x00, 0x06, 0x16, 0x0B, 0x24, + 0x06, 0x06, 0x02, 0x02, 0x03, 0x00, 0x00, 0x00, 0x17, 0x07, 0x05, 0x87, 0x03, 0x02, 0x00, 0x04, + 0x09, 0x04, 0x07, 0x00, 0x00, 0x01, 0x02, 0x00, 0x19, 0x09, 0x04, 0x07, 0x01, 0x01, 0x01, 0x02, + 0x00, 0x1A, 0x07, 0x24, 0x01, 0x01, 0x01, 0x01, 0x00, 0x14, 0x24, 0x02, 0x01, 0x01, 0x02, 0x10, + 0x04, 0x40, 0x1F, 0x00, 0x80, 0x3E, 0x00, 0x44, 0xAC, 0x00, 0x80, 0xBB, 0x00, 0x09, 0x05, 0x02, + 0x09, 0x62, 0x00, 0x04, 0x00, 0x00, 0x07, 0x25, 0x01, 0x01, 0x01, 0x01, 0x00, 0x09, 0x04, 0x08, + 0x00, 0x00, 0x01, 0x02, 0x00, 0x1B, 0x09, 0x04, 0x08, 0x01, 0x01, 0x01, 0x02, 0x00, 0x1C, 0x07, + 0x24, 0x01, 0x04, 0x01, 0x01, 0x00, 0x14, 0x24, 0x02, 0x01, 0x01, 0x02, 0x10, 0x04, 0x40, 0x1F, + 0x00, 0x80, 0x3E, 0x00, 0x44, 0xAC, 0x00, 0x80, 0xBB, 0x00, 0x09, 0x05, 0x88, 0x05, 0x62, 0x00, + 0x04, 0x00, 0x00, 0x07, 0x25, 0x01, 0x01, 0x00, 0x00, 0x00 +}; +} diff --git a/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/dual_tusb.hpp b/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/dual_tusb.hpp new file mode 100644 index 00000000..e282f713 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/dual_tusb.hpp @@ -0,0 +1,559 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include + +/* + ======================== USB Device ======================== + + +++++++++++++++++ Device Information ++++++++++++++++++ +Device Description : USB Composite Device +Device Path : \\?\USB#VID_303A&PID_8000#12345678#{a5dcbf10-6530-11d2-901f-00c04fb951ed} (GUID_DEVINTERFACE_USB_DEVICE) +Kernel Name : \Device\USBPDO-19 +Device ID : USB\VID_303A&PID_8000\12345678 +Hardware IDs : USB\VID_303A&PID_8000&REV_0100 USB\VID_303A&PID_8000 +Driver KeyName : {36fc9e60-c465-11cf-8056-444553540000}\0067 (GUID_DEVCLASS_USB) +Driver : \SystemRoot\System32\drivers\usbccgp.sys (Version: 10.0.19041.4355 Date: 2024-05-01) +Driver Inf : C:\Windows\inf\usb.inf +Legacy BusType : PNPBus +Class : USB +Class GUID : {36fc9e60-c465-11cf-8056-444553540000} (GUID_DEVCLASS_USB) +Service : usbccgp +Enumerator : USB +Location Info : Port_#0003.Hub_#0010 +Location IDs : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(3), ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(3) +Container ID : {ddab37e9-bf1d-5d60-87aa-5cdee04ae009} +Manufacturer Info : (Standard USB Host Controller) +Capabilities : 0x94 (Removable, UniqueID, SurpriseRemovalOK) +Status : 0x0180600A (DN_DRIVER_LOADED, DN_STARTED, DN_DISABLEABLE, DN_REMOVABLE, DN_NT_ENUMERATOR, DN_NT_DRIVER) +Problem Code : 0 +Address : 3 +HcDisableSelectiveSuspend: 0 +EnableSelectiveSuspend : 0 +SelectiveSuspendEnabled : 0 +EnhancedPowerMgmtEnabled : 0 +IdleInWorkingState : 0 +WakeFromSleepState : 0 +Power State : D0 (supported: D0, D3, wake from D0) + Child Device 1 : UVC CAM1 (USB Video Device) + Device Path 1 : \\?\USB#VID_303A&PID_8000&MI_00#b&cf21808&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global (AM_KSCATEGORY_CAPTURE) + Device Path 2 : \\?\USB#VID_303A&PID_8000&MI_00#b&cf21808&0&0000#{e5323777-f976-4f5b-9b55-b94699c46e44}\global (STATIC_KSCATEGORY_VIDEO_CAMERA) + Device Path 3 : \\?\USB#VID_303A&PID_8000&MI_00#b&cf21808&0&0000#{6994ad05-93ef-11d0-a3cc-00a0c9223196}\global (AM_KSCATEGORY_VIDEO) + Kernel Name : \Device\000001c2 + Device ID : USB\VID_303A&PID_8000&MI_00\B&CF21808&0&0000 + Class : Camera + Driver KeyName : {ca3e7ab9-b4c3-4ae6-8251-579ef933890f}\0005 (GUID_DEVCLASS_CAMERA) + Service : usbvideo + Location : 0005.0000.0004.001.003.003.000.000.000 + LocationPaths : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(3)#USBMI(0) PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(3)#USB(3) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(3)#USBMI(0) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(3)#USB(3) + Child Device 2 : UVC CAM2 (USB Video Device) + Device Path 1 : \\?\USB#VID_303A&PID_8000&MI_02#b&cf21808&0&0002#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global (AM_KSCATEGORY_CAPTURE) + Device Path 2 : \\?\USB#VID_303A&PID_8000&MI_02#b&cf21808&0&0002#{e5323777-f976-4f5b-9b55-b94699c46e44}\global (STATIC_KSCATEGORY_VIDEO_CAMERA) + Device Path 3 : \\?\USB#VID_303A&PID_8000&MI_02#b&cf21808&0&0002#{6994ad05-93ef-11d0-a3cc-00a0c9223196}\global (AM_KSCATEGORY_VIDEO) + Kernel Name : \Device\000001c3 + Device ID : USB\VID_303A&PID_8000&MI_02\B&CF21808&0&0002 + Class : Camera + Driver KeyName : {ca3e7ab9-b4c3-4ae6-8251-579ef933890f}\0006 (GUID_DEVCLASS_CAMERA) + Service : usbvideo + Location : 0005.0000.0004.001.003.003.000.000.000 + LocationPaths : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(3)#USBMI(2) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(3)#USBMI(2) + + +++++++++++++++++ Registry USB Flags +++++++++++++++++ +HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags\303A80000100 + osvc : REG_BINARY 00 00 + + ---------------- Connection Information --------------- +Connection Index : 0x03 (Port 3) +Connection Status : 0x01 (DeviceConnected) +Current Config Value : 0x01 (Configuration 1) +Device Address : 0x09 (9) +Is Hub : 0x00 (no) +Device Bus Speed : 0x02 (High-Speed) +Number Of Open Pipes : 0x02 (2 pipes to data endpoints) +Pipe[0] : EndpointID=1 Direction=IN ScheduleOffset=0 Type=Bulk +Pipe[1] : EndpointID=2 Direction=IN ScheduleOffset=0 Type=Bulk +Data (HexDump) : 03 00 00 00 12 01 00 02 EF 02 01 40 3A 30 00 80 ...........@:0.. + 00 01 01 02 03 01 01 02 00 09 00 02 00 00 00 01 ................ + 00 00 00 07 05 81 02 00 02 01 00 00 00 00 07 05 ................ + 82 02 00 02 01 00 00 00 00 ......... + + --------------- Connection Information V2 ------------- +Connection Index : 0x03 (3) +Length : 0x10 (16 bytes) +SupportedUsbProtocols : 0x03 + Usb110 : 1 (yes, port supports USB 1.1) + Usb200 : 1 (yes, port supports USB 2.0) + Usb300 : 0 (no, port not supports USB 3.0) + ReservedMBZ : 0x00 +Flags : 0x00 + DevIsOpAtSsOrHigher : 0 (Device is not operating at SuperSpeed or higher) + DevIsSsCapOrHigher : 0 (Device is not SuperSpeed capable or higher) + DevIsOpAtSsPlusOrHigher : 0 (Device is not operating at SuperSpeedPlus or higher) + DevIsSsPlusCapOrHigher : 0 (Device is not SuperSpeedPlus capable or higher) + ReservedMBZ : 0x00 +Data (HexDump) : 03 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 ................ + + ---------------------- Device Descriptor ---------------------- +bLength : 0x12 (18 bytes) +bDescriptorType : 0x01 (Device Descriptor) +bcdUSB : 0x200 (USB Version 2.00) +bDeviceClass : 0xEF (Miscellaneous) +bDeviceSubClass : 0x02 +bDeviceProtocol : 0x01 (IAD - Interface Association Descriptor) +bMaxPacketSize0 : 0x40 (64 bytes) +idVendor : 0x303A (Espressif Incorporated) +idProduct : 0x8000 +bcdDevice : 0x0100 +iManufacturer : 0x01 (String Descriptor 1) + *!*ERROR String descriptor not found +iProduct : 0x02 (String Descriptor 2) + *!*ERROR String descriptor not found +iSerialNumber : 0x03 (String Descriptor 3) + *!*ERROR String descriptor not found +bNumConfigurations : 0x01 (1 Configuration) +Data (HexDump) : 12 01 00 02 EF 02 01 40 3A 30 00 80 00 01 01 02 .......@:0...... + 03 01 .. + + ------------------ Configuration Descriptor ------------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x02 (Configuration Descriptor) +wTotalLength : 0x0125 (293 bytes) +bNumInterfaces : 0x04 (4 Interfaces) +bConfigurationValue : 0x01 (Configuration 1) +iConfiguration : 0x00 (No String Descriptor) +bmAttributes : 0x80 + D7: Reserved, set 1 : 0x01 + D6: Self Powered : 0x00 (no) + D5: Remote Wakeup : 0x00 (no) + D4..0: Reserved, set 0 : 0x00 +MaxPower : 0xFA (500 mA) +Data (HexDump) : 09 02 25 01 04 01 00 80 FA 08 0B 00 02 0E 03 00 ..%............. + 04 09 04 00 00 00 0E 01 01 04 0D 24 01 50 01 28 ...........$.P.( + 00 C0 FC 9B 01 01 01 12 24 02 01 01 02 00 00 00 ........$....... + 00 00 00 00 00 03 00 00 00 09 24 03 02 01 01 00 ..........$..... + 01 00 09 04 01 00 01 0E 02 01 04 0E 24 01 01 45 ............$..E + 00 81 00 02 00 00 00 01 00 0B 24 06 01 01 00 01 ..........$..... + 00 00 00 00 26 24 07 01 00 E0 01 0E 01 00 A4 1F ....&$.......... + 00 00 D0 78 02 80 F4 03 00 20 A1 07 00 00 20 A1 ...x..... .... . + 07 00 20 A1 07 00 20 A1 07 00 06 24 0D 01 01 04 .. ... ....$.... + 07 05 81 02 00 02 01 08 0B 02 02 0E 03 00 05 09 ................ + 04 02 00 00 0E 01 01 05 0D 24 01 50 01 28 00 C0 .........$.P.(.. + FC 9B 01 01 03 12 24 02 01 01 02 00 00 00 00 00 ......$......... + 00 00 00 03 00 00 00 09 24 03 02 01 01 00 01 00 ........$....... + 09 04 03 00 01 0E 02 01 05 0E 24 01 01 45 00 82 ..........$..E.. + 00 02 00 00 00 01 00 0B 24 06 01 01 00 01 00 00 ........$....... + 00 00 26 24 07 01 00 00 05 D0 02 00 00 E1 00 00 ..&$............ + 00 2F 0D 00 20 1C 00 2A 2C 0A 00 00 2A 2C 0A 00 ./.. ..*,...*,.. + 2A 2C 0A 00 2A 2C 0A 00 06 24 0D 01 01 04 07 05 *,..*,...$...... + 82 02 00 02 01 ..... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x00 +bInterfaceCount : 0x02 +bFunctionClass : 0x0E (Video) +bFunctionSubClass : 0x03 (Video Interface Collection) +bFunctionProtocol : 0x00 (PC_PROTOCOL_UNDEFINED protocol) +iFunction : 0x04 (String Descriptor 4) + *!*ERROR String descriptor not found +Data (HexDump) : 08 0B 00 02 0E 03 00 04 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x00 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x01 (Video Control) +bInterfaceProtocol : 0x01 *!*ERROR must be 0 for this class +iInterface : 0x04 (String Descriptor 4) + *!*ERROR String descriptor not found +Data (HexDump) : 09 04 00 00 00 0E 01 01 04 ......... + + ------- Video Control Interface Header Descriptor ----- +bLength : 0x0D (13 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x01 (Video Control Header) +bcdUVC : 0x0150 (UVC Version 1.50) +wTotalLength : 0x0028 (40 bytes) +dwClockFreq : 0x019BFCC0 (27 MHz) +bInCollection : 0x01 (1 VideoStreaming interface) +baInterfaceNr[1] : 0x01 +Data (HexDump) : 0D 24 01 50 01 28 00 C0 FC 9B 01 01 01 .$.P.(....... + + -------- Video Control Input Terminal Descriptor ------ +bLength : 0x12 (18 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (ITT_CAMERA) +bAssocTerminal : 0x00 (Not associated with an Output Terminal) +iTerminal : 0x00 +Camera Input Terminal Data: +wObjectiveFocalLengthMin : 0x0000 +wObjectiveFocalLengthMax : 0x0000 +wOcularFocalLength : 0x0000 +bControlSize : 0x03 +bmControls : 0x00, 0x00, 0x00 + D0 : 0 no - Scanning Mode + D1 : 0 no - Auto-Exposure Mode + D2 : 0 no - Auto-Exposure Priority + D3 : 0 no - Exposure Time (Absolute) + D4 : 0 no - Exposure Time (Relative) + D5 : 0 no - Focus (Absolute) + D6 : 0 no - Focus (Relative) + D7 : 0 no - Iris (Absolute) + D8 : 0 no - Iris (Relative) + D9 : 0 no - Zoom (Absolute) + D10 : 0 no - Zoom (Relative) + D11 : 0 no - Pan (Absolute) + D12 : 0 no - Pan (Relative) + D13 : 0 no - Roll (Absolute) + D14 : 0 no - Roll (Relative) + D15 : 0 no - Tilt (Absolute) + D16 : 0 no - Tilt (Relative) + D17 : 0 no - Focus Auto + D18 : 0 no - Reserved + D19 : 0 no - Reserved + D20 : 0 no - Reserved + D21 : 0 no - Reserved + D22 : 0 no - Reserved + D23 : 0 no - Reserved +Data (HexDump) : 12 24 02 01 01 02 00 00 00 00 00 00 00 00 03 00 .$.............. + 00 00 .. + + ------- Video Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x02 +wTerminalType : 0x0101 (TT_STREAMING) +bAssocTerminal : 0x00 (Not associated with an Input Terminal) +bSourceID : 0x01 +iTerminal : 0x00 +Data (HexDump) : 09 24 03 02 01 01 00 01 00 .$....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x01 *!*ERROR must be 0 for this class +iInterface : 0x04 (String Descriptor 4) + *!*ERROR String descriptor not found +Data (HexDump) : 09 04 01 00 01 0E 02 01 04 ......... + + ---- VC-Specific VS Video Input Header Descriptor ----- +bLength : 0x0E (14 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x01 (Input Header) +bNumFormats : 0x01 +wTotalLength : 0x0045 (69 bytes) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmInfo : 0x00 (Dynamic Format Change not supported) +bTerminalLink : 0x02 +bStillCaptureMethod : 0x00 (No Still Capture) +nbTriggerSupport : 0x00 (Hardware Triggering not supported) +bTriggerUsage : 0x00 (Host will initiate still image capture) +nbControlSize : 0x01 +Video Payload Format 1 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Data (HexDump) : 0E 24 01 01 45 00 81 00 02 00 00 00 01 00 .$..E......... + + ----- Video Streaming MJPEG Format Type Descriptor ---- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x06 (Format MJPEG) +bFormatIndex : 0x01 (1) +bNumFrameDescriptors : 0x01 (1) +bmFlags : 0x00 (Sample size is not fixed) +bDefaultFrameIndex : 0x01 (1) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +Data (HexDump) : 0B 24 06 01 01 00 01 00 00 00 00 .$......... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +---> This is the Default (optimum) Frame index +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x01E0 (480) +wHeight : 0x010E (270) +dwMinBitRate : 0x001FA400 (2073600 bps -> 259.125 KB/s) +dwMaxBitRate : 0x0278D000 (41472000 bps -> 5.184 MB/s) +dwMaxVideoFrameBufferSize: 0x0003F480 (259200 bytes) +dwDefaultFrameInterval : 0x0007A120 (50.0000 ms -> 20.000 fps) +bFrameIntervalType : 0x00 (0 discrete frame intervals supported) +dwMinFrameInterval : 0x0007A120 (50.0000 ms -> 20.000 fps) +dwMaxFrameInterval : 0x0007A120 (50.0000 ms -> 20.000 fps) +dwFrameIntervalStep : 0x0007A120 +*!*WARNING: dwMinFrameInterval + dwFrameIntervalStep is greater than dwMaxFrameInterval, this could cause problems +Data (HexDump) : 26 24 07 01 00 E0 01 0E 01 00 A4 1F 00 00 D0 78 &$.............x + 02 80 F4 03 00 20 A1 07 00 00 20 A1 07 00 20 A1 ..... .... ... . + 07 00 20 A1 07 00 .. ... + + ------- VS Color Matching Descriptor Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x0D (Color Matching) +bColorPrimaries : 0x01 (BT.709, sRGB) +bTransferCharacteristics : 0x01 (BT.709) +bMatrixCoefficients : 0x04 (SMPTE 170M) +Data (HexDump) : 06 24 0D 01 01 04 .$.... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x02 (TransferType=Bulk) +wMaxPacketSize : 0x0200 (max 512 bytes) +bInterval : 0x01 (at most 1 NAK each 1 microframes) +Data (HexDump) : 07 05 81 02 00 02 01 ....... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x02 +bInterfaceCount : 0x02 +bFunctionClass : 0x0E (Video) +bFunctionSubClass : 0x03 (Video Interface Collection) +bFunctionProtocol : 0x00 (PC_PROTOCOL_UNDEFINED protocol) +iFunction : 0x05 (String Descriptor 5) + *!*ERROR String descriptor not found +Data (HexDump) : 08 0B 02 02 0E 03 00 05 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x02 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x01 (Video Control) +bInterfaceProtocol : 0x01 *!*ERROR must be 0 for this class +iInterface : 0x05 (String Descriptor 5) + *!*ERROR String descriptor not found +Data (HexDump) : 09 04 02 00 00 0E 01 01 05 ......... + + ------- Video Control Interface Header Descriptor ----- +bLength : 0x0D (13 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x01 (Video Control Header) +bcdUVC : 0x0150 (UVC Version 1.50) +wTotalLength : 0x0028 (40 bytes) +dwClockFreq : 0x019BFCC0 (27 MHz) +bInCollection : 0x01 (1 VideoStreaming interface) +baInterfaceNr[1] : 0x03 +Data (HexDump) : 0D 24 01 50 01 28 00 C0 FC 9B 01 01 03 .$.P.(....... + + -------- Video Control Input Terminal Descriptor ------ +bLength : 0x12 (18 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (ITT_CAMERA) +bAssocTerminal : 0x00 (Not associated with an Output Terminal) +iTerminal : 0x00 +Camera Input Terminal Data: +wObjectiveFocalLengthMin : 0x0000 +wObjectiveFocalLengthMax : 0x0000 +wOcularFocalLength : 0x0000 +bControlSize : 0x03 +bmControls : 0x00, 0x00, 0x00 + D0 : 0 no - Scanning Mode + D1 : 0 no - Auto-Exposure Mode + D2 : 0 no - Auto-Exposure Priority + D3 : 0 no - Exposure Time (Absolute) + D4 : 0 no - Exposure Time (Relative) + D5 : 0 no - Focus (Absolute) + D6 : 0 no - Focus (Relative) + D7 : 0 no - Iris (Absolute) + D8 : 0 no - Iris (Relative) + D9 : 0 no - Zoom (Absolute) + D10 : 0 no - Zoom (Relative) + D11 : 0 no - Pan (Absolute) + D12 : 0 no - Pan (Relative) + D13 : 0 no - Roll (Absolute) + D14 : 0 no - Roll (Relative) + D15 : 0 no - Tilt (Absolute) + D16 : 0 no - Tilt (Relative) + D17 : 0 no - Focus Auto + D18 : 0 no - Reserved + D19 : 0 no - Reserved + D20 : 0 no - Reserved + D21 : 0 no - Reserved + D22 : 0 no - Reserved + D23 : 0 no - Reserved +Data (HexDump) : 12 24 02 01 01 02 00 00 00 00 00 00 00 00 03 00 .$.............. + 00 00 .. + + ------- Video Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x02 +wTerminalType : 0x0101 (TT_STREAMING) +bAssocTerminal : 0x00 (Not associated with an Input Terminal) +bSourceID : 0x01 +iTerminal : 0x00 +Data (HexDump) : 09 24 03 02 01 01 00 01 00 .$....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x01 *!*ERROR must be 0 for this class +iInterface : 0x05 (String Descriptor 5) + *!*ERROR String descriptor not found +Data (HexDump) : 09 04 03 00 01 0E 02 01 05 ......... + + ---- VC-Specific VS Video Input Header Descriptor ----- +bLength : 0x0E (14 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x01 (Input Header) +bNumFormats : 0x01 +wTotalLength : 0x0045 (69 bytes) +bEndpointAddress : 0x82 (Direction=IN EndpointID=2) +bmInfo : 0x00 (Dynamic Format Change not supported) +bTerminalLink : 0x02 +bStillCaptureMethod : 0x00 (No Still Capture) +nbTriggerSupport : 0x00 (Hardware Triggering not supported) +bTriggerUsage : 0x00 (Host will initiate still image capture) +nbControlSize : 0x01 +Video Payload Format 1 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Data (HexDump) : 0E 24 01 01 45 00 82 00 02 00 00 00 01 00 .$..E......... + + ----- Video Streaming MJPEG Format Type Descriptor ---- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x06 (Format MJPEG) +bFormatIndex : 0x01 (1) +bNumFrameDescriptors : 0x01 (1) +bmFlags : 0x00 (Sample size is not fixed) +bDefaultFrameIndex : 0x01 (1) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +Data (HexDump) : 0B 24 06 01 01 00 01 00 00 00 00 .$......... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +---> This is the Default (optimum) Frame index +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x0500 (1280) +wHeight : 0x02D0 (720) +dwMinBitRate : 0x00E10000 (14745600 bps -> 1.843 MB/s) +dwMaxBitRate : 0x0D2F0000 (221184000 bps -> 27.648 MB/s) +dwMaxVideoFrameBufferSize: 0x001C2000 (1843200 bytes) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x00 (0 discrete frame intervals supported) +dwMinFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +dwMaxFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +dwFrameIntervalStep : 0x000A2C2A +*!*WARNING: dwMinFrameInterval + dwFrameIntervalStep is greater than dwMaxFrameInterval, this could cause problems +Data (HexDump) : 26 24 07 01 00 00 05 D0 02 00 00 E1 00 00 00 2F &$............./ + 0D 00 20 1C 00 2A 2C 0A 00 00 2A 2C 0A 00 2A 2C .. ..*,...*,..*, + 0A 00 2A 2C 0A 00 ..*,.. + + ------- VS Color Matching Descriptor Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x0D (Color Matching) +bColorPrimaries : 0x01 (BT.709, sRGB) +bTransferCharacteristics : 0x01 (BT.709) +bMatrixCoefficients : 0x04 (SMPTE 170M) +Data (HexDump) : 06 24 0D 01 01 04 .$.... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x82 (Direction=IN EndpointID=2) +bmAttributes : 0x02 (TransferType=Bulk) +wMaxPacketSize : 0x0200 (max 512 bytes) +bInterval : 0x01 (at most 1 NAK each 1 microframes) +Data (HexDump) : 07 05 82 02 00 02 01 ....... + + ----------------- Device Qualifier Descriptor ----------------- +Error : ERROR_GEN_FAILURE + + -------------------- String Descriptors ------------------- +none +*/ + +namespace dual_tusb { +const uint8_t dev_desc[] = { + 0x12, 0x01, 0x00, 0x02, 0xEF, 0x02, 0x01, 0x40, 0x3A, 0x30, 0x00, 0x80, 0x00, 0x01, 0x01, 0x02, + 0x03, 0x01 +}; + +const uint8_t cfg_desc[] = { + 0x09, 0x02, 0x25, 0x01, 0x04, 0x01, 0x00, 0x80, 0xFA, 0x08, 0x0B, 0x00, 0x02, 0x0E, 0x03, 0x00, + 0x04, 0x09, 0x04, 0x00, 0x00, 0x00, 0x0E, 0x01, 0x01, 0x04, 0x0D, 0x24, 0x01, 0x50, 0x01, 0x28, + 0x00, 0xC0, 0xFC, 0x9B, 0x01, 0x01, 0x01, 0x12, 0x24, 0x02, 0x01, 0x01, 0x02, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x09, 0x24, 0x03, 0x02, 0x01, 0x01, 0x00, + 0x01, 0x00, 0x09, 0x04, 0x01, 0x00, 0x01, 0x0E, 0x02, 0x01, 0x04, 0x0E, 0x24, 0x01, 0x01, 0x45, + 0x00, 0x81, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0B, 0x24, 0x06, 0x01, 0x01, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x26, 0x24, 0x07, 0x01, 0x00, 0xE0, 0x01, 0x0E, 0x01, 0x00, 0xA4, 0x1F, + 0x00, 0x00, 0xD0, 0x78, 0x02, 0x80, 0xF4, 0x03, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x00, 0x20, 0xA1, + 0x07, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x06, 0x24, 0x0D, 0x01, 0x01, 0x04, + 0x07, 0x05, 0x81, 0x02, 0x00, 0x02, 0x01, 0x08, 0x0B, 0x02, 0x02, 0x0E, 0x03, 0x00, 0x05, 0x09, + 0x04, 0x02, 0x00, 0x00, 0x0E, 0x01, 0x01, 0x05, 0x0D, 0x24, 0x01, 0x50, 0x01, 0x28, 0x00, 0xC0, + 0xFC, 0x9B, 0x01, 0x01, 0x03, 0x12, 0x24, 0x02, 0x01, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x09, 0x24, 0x03, 0x02, 0x01, 0x01, 0x00, 0x01, 0x00, + 0x09, 0x04, 0x03, 0x00, 0x01, 0x0E, 0x02, 0x01, 0x05, 0x0E, 0x24, 0x01, 0x01, 0x45, 0x00, 0x82, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0B, 0x24, 0x06, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x26, 0x24, 0x07, 0x01, 0x00, 0x00, 0x05, 0xD0, 0x02, 0x00, 0x00, 0xE1, 0x00, 0x00, + 0x00, 0x2F, 0x0D, 0x00, 0x20, 0x1C, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x00, 0x2A, 0x2C, 0x0A, 0x00, + 0x2A, 0x2C, 0x0A, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x06, 0x24, 0x0D, 0x01, 0x01, 0x04, 0x07, 0x05, + 0x82, 0x02, 0x00, 0x02, 0x01 +}; +} diff --git a/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/elp_h264.hpp b/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/elp_h264.hpp new file mode 100644 index 00000000..faf335a0 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/elp_h264.hpp @@ -0,0 +1,1752 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include + +/* + ======================== USB Device ======================== + + +++++++++++++++++ Device Information ++++++++++++++++++ +Device Description : USB Composite Device +Device ID : USB\VID_32E4&PID_9422\2020032801 +Hardware IDs : USB\VID_32E4&PID_9422&REV_0100 USB\VID_32E4&PID_9422 +Driver KeyName : {36fc9e60-c465-11cf-8056-444553540000}\0082 (GUID_DEVCLASS_USB) +Driver : \SystemRoot\System32\drivers\usbccgp.sys (Version: 10.0.19041.4474 Date: 2024-06-13) +Driver Inf : C:\Windows\inf\usb.inf +Legacy BusType : PNPBus +Class : USB +Class GUID : {36fc9e60-c465-11cf-8056-444553540000} (GUID_DEVCLASS_USB) +Service : usbccgp +Enumerator : USB +Location Info : Port_#0006.Hub_#0013 +Location IDs : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(1)#USB(3)#USB(6), ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(1)#USB(3)#USB(6) +Container ID : {068caf32-6f04-5def-b70f-1dfab2acdd8e} +Manufacturer Info : (Standard USB Host Controller) +Capabilities : 0x94 (Removable, UniqueID, SurpriseRemovalOK) +Status : 0x0180600A (DN_DRIVER_LOADED, DN_STARTED, DN_DISABLEABLE, DN_REMOVABLE, DN_NT_ENUMERATOR, DN_NT_DRIVER) +Problem Code : 0 +Address : 6 +HcDisableSelectiveSuspend: 0 +EnableSelectiveSuspend : 0 +SelectiveSuspendEnabled : 0 +EnhancedPowerMgmtEnabled : 0 +IdleInWorkingState : 0 +WakeFromSleepState : 0 +Power State : D0 (supported: D0, D3, wake from D0) + Child Device 1 : USB Camera (USB Video Device) + Device Path : \\?\USB#VID_32E4&PID_9422&MI_00#b&149655b1&0&0000#{6994ad05-93ef-11d0-a3cc-00a0c9223196}\global (AM_KSCATEGORY_VIDEO) + Kernel Name : \Device\00000365 + Device ID : USB\VID_32E4&PID_9422&MI_00\B&149655B1&0&0000 + Class : Camera + Driver KeyName : {ca3e7ab9-b4c3-4ae6-8251-579ef933890f}\0005 (GUID_DEVCLASS_CAMERA) + Service : usbvideo + Location : 0005.0000.0004.001.003.001.003.006.000 + LocationPaths : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(1)#USB(3)#USB(6)#USBMI(0) PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(1)#USB(3)#USB(6)#USB(6) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(1)#USB(3)#USB(6)#USBMI(0) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(1)#USB(3)#USB(6)#USB(6) + Child Device 2 : H264 USB Camera (USB Audio Device) + Device Path : \\?\USB#VID_32E4&PID_9422&MI_03#b&149655b1&0&0003#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\global (AM_KSCATEGORY_AUDIO) + Kernel Name : \Device\00000366 + Device ID : USB\VID_32E4&PID_9422&MI_03\B&149655B1&0&0003 + Class : MEDIA + Driver KeyName : {4d36e96c-e325-11ce-bfc1-08002be10318}\0008 (GUID_DEVCLASS_MEDIA) + Service : usbaudio + Location : 0005.0000.0004.001.003.001.003.006.000 + LocationPaths : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(1)#USB(3)#USB(6)#USBMI(3) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(1)#USB(3)#USB(6)#USBMI(3) + Child Device 1 : Microphone (H264 USB Camera) (Audio Endpoint) + Device ID : SWD\MMDEVAPI\{0.0.1.00000000}.{BBBA02A7-B137-4252-B0CF-EF0F84C1D0B7} + Class : AudioEndpoint + Driver KeyName : {c166523c-fe0c-4a94-a586-f1a80cfbbf3e}\0037 (AUDIOENDPOINT_CLASS_UUID) + + +++++++++++++++++ Registry USB Flags +++++++++++++++++ +HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags\32E494220100 + osvc : REG_BINARY 00 00 + NewInterfaceUsage : REG_DWORD 00000000 (0) + + ---------------- Connection Information --------------- +Connection Index : 0x06 (Port 6) +Connection Status : 0x01 (DeviceConnected) +Current Config Value : 0x01 (Configuration 1) +Device Address : 0x0F (15) +Is Hub : 0x00 (no) +Device Bus Speed : 0x02 (High-Speed) +Number Of Open Pipes : 0x01 (1 pipe to data endpoints) +Pipe[0] : EndpointID=3 Direction=IN ScheduleOffset=0 Type=Interrupt +Data (HexDump) : 06 00 00 00 12 01 00 02 EF 02 01 40 E4 32 22 94 ...........@.2". + 00 01 02 01 03 01 01 02 00 0F 00 01 00 00 00 01 ................ + 00 00 00 07 05 83 03 10 00 06 00 00 00 00 .............. + + --------------- Connection Information V2 ------------- +Connection Index : 0x06 (6) +Length : 0x10 (16 bytes) +SupportedUsbProtocols : 0x03 + Usb110 : 1 (yes, port supports USB 1.1) + Usb200 : 1 (yes, port supports USB 2.0) + Usb300 : 0 (no, port not supports USB 3.0) + ReservedMBZ : 0x00 +Flags : 0x00 + DevIsOpAtSsOrHigher : 0 (Device is not operating at SuperSpeed or higher) + DevIsSsCapOrHigher : 0 (Device is not SuperSpeed capable or higher) + DevIsOpAtSsPlusOrHigher : 0 (Device is not operating at SuperSpeedPlus or higher) + DevIsSsPlusCapOrHigher : 0 (Device is not SuperSpeedPlus capable or higher) + ReservedMBZ : 0x00 +Data (HexDump) : 06 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 ................ + + ---------------------- Device Descriptor ---------------------- +bLength : 0x12 (18 bytes) +bDescriptorType : 0x01 (Device Descriptor) +bcdUSB : 0x200 (USB Version 2.00) +bDeviceClass : 0xEF (Miscellaneous) +bDeviceSubClass : 0x02 +bDeviceProtocol : 0x01 (IAD - Interface Association Descriptor) +bMaxPacketSize0 : 0x40 (64 bytes) +idVendor : 0x32E4 (Ailipu Technology Co., Ltd.) +idProduct : 0x9422 +bcdDevice : 0x0100 +iManufacturer : 0x02 (String Descriptor 2) + Language 0x0409 : "H264 USB Camera" +iProduct : 0x01 (String Descriptor 1) + Language 0x0409 : "H264 USB Camera" +iSerialNumber : 0x03 (String Descriptor 3) + Language 0x0409 : "2020032801" +bNumConfigurations : 0x01 (1 Configuration) +Data (HexDump) : 12 01 00 02 EF 02 01 40 E4 32 22 94 00 01 02 01 .......@.2"..... + 03 01 .. + + ------------------ Configuration Descriptor ------------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x02 (Configuration Descriptor) +wTotalLength : 0x0592 (1426 bytes) +bNumInterfaces : 0x05 (5 Interfaces) +bConfigurationValue : 0x01 (Configuration 1) +iConfiguration : 0x00 (No String Descriptor) +bmAttributes : 0x80 + D7: Reserved, set 1 : 0x01 + D6: Self Powered : 0x00 (no) + D5: Remote Wakeup : 0x00 (no) + D4..0: Reserved, set 0 : 0x00 +MaxPower : 0xFA (500 mA) +Data (HexDump) : 09 02 92 05 05 01 00 80 FA 08 0B 00 03 0E 03 00 ................ + 05 09 04 00 00 01 0E 01 00 05 0E 24 01 00 01 73 ...........$...s + 00 C0 E1 E4 00 02 01 02 09 24 03 05 01 01 00 04 .........$...... + 00 1C 24 06 03 70 33 F0 28 11 63 2E 4A BA 2C 68 ..$..p3.(.c.J.,h + 90 EB 33 40 16 18 01 02 03 FF FF FF 00 1A 24 06 ..3@..........$. + 04 94 73 DF DD 3E 97 27 47 BE D9 04 ED 64 26 DC ..s..>.'G....d&. + 67 08 01 03 01 FF 00 12 24 02 01 01 02 00 00 00 g.......$....... + 00 00 00 00 00 03 0E 20 00 0B 24 05 02 01 00 00 ....... ..$..... + 02 7F 17 00 09 24 03 06 01 01 00 04 00 07 05 83 .....$.......... + 03 10 00 06 05 25 03 40 00 09 04 01 00 00 0E 02 .....%.@........ + 00 00 0F 24 01 02 47 02 81 00 05 00 00 00 01 00 ...$..G......... + 00 0B 24 06 01 08 00 01 00 00 00 00 26 24 07 01 ..$.........&$.. + 00 80 07 38 04 00 C0 A9 1D 00 80 53 3B 4D 4A 3F ...8.......S;MJ? + 00 15 16 05 00 03 15 16 05 00 80 1A 06 00 2A 2C ..............*, + 0A 00 26 24 07 02 00 00 05 D0 02 00 00 2F 0D 00 ..&$........./.. + 00 5E 1A 4D 22 1C 00 15 16 05 00 03 15 16 05 00 .^.M"........... + 80 1A 06 00 2A 2C 0A 00 26 24 07 03 00 20 03 58 ....*,..&$... .X + 02 00 D0 DD 06 00 A0 BB 0D 4D A8 0E 00 15 16 05 .........M...... + 00 03 15 16 05 00 80 1A 06 00 2A 2C 0A 00 26 24 ..........*,..&$ + 07 04 00 80 02 E0 01 00 00 65 04 00 00 CA 08 4D .........e.....M + 62 09 00 15 16 05 00 03 15 16 05 00 80 1A 06 00 b............... + 2A 2C 0A 00 26 24 07 05 00 80 02 68 01 00 C0 4B *,..&$.....h...K + 03 00 80 97 06 4D 0A 07 00 15 16 05 00 03 15 16 .....M.......... + 05 00 80 1A 06 00 2A 2C 0A 00 26 24 07 06 00 60 ......*,..&$...` + 01 20 01 00 40 73 01 00 80 E6 02 4D 1A 03 00 15 . ..@s.....M.... + 16 05 00 03 15 16 05 00 80 1A 06 00 2A 2C 0A 00 ............*,.. + 26 24 07 07 00 40 01 F0 00 00 40 19 01 00 80 32 &$...@....@....2 + 02 4D 5A 02 00 15 16 05 00 03 15 16 05 00 80 1A .MZ............. + 06 00 2A 2C 0A 00 26 24 07 08 00 80 07 38 04 00 ..*,..&$.....8.. + C0 A9 1D 00 80 53 3B 4D 4A 3F 00 15 16 05 00 03 .....S;MJ?...... + 15 16 05 00 80 1A 06 00 2A 2C 0A 00 1B 24 04 02 ........*,...$.. + 06 59 55 59 32 00 00 10 00 80 00 00 AA 00 38 9B .YUY2.........8. + 71 10 01 00 00 00 00 26 24 05 01 00 80 02 E0 01 q......&$....... + 00 00 65 04 00 00 CA 08 00 60 09 00 15 16 05 00 ..e......`...... + 03 15 16 05 00 80 1A 06 00 2A 2C 0A 00 1E 24 05 .........*,...$. + 02 00 20 03 58 02 00 D0 DD 06 00 D0 DD 06 00 A6 .. .X........... + 0E 00 2A 2C 0A 00 01 2A 2C 0A 00 26 24 05 03 00 ..*,...*,..&$... + 80 02 68 01 00 C0 4B 03 00 80 97 06 00 08 07 00 ..h...K......... + 15 16 05 00 03 15 16 05 00 80 1A 06 00 2A 2C 0A .............*,. + 00 26 24 05 04 00 60 01 20 01 00 40 73 01 00 80 .&$...`. ..@s... + E6 02 00 18 03 00 15 16 05 00 03 15 16 05 00 80 ................ + 1A 06 00 2A 2C 0A 00 26 24 05 05 00 40 01 F0 00 ...*,..&$...@... + 00 40 19 01 00 80 32 02 00 58 02 00 15 16 05 00 .@....2..X...... + 03 15 16 05 00 80 1A 06 00 2A 2C 0A 00 26 24 05 .........*,..&$. + 06 00 80 02 E0 01 00 00 65 04 00 00 CA 08 00 60 ........e......` + 09 00 15 16 05 00 03 15 16 05 00 80 1A 06 00 2A ...............* + 2C 0A 00 06 24 0D 01 01 04 09 04 01 01 01 0E 02 ,...$........... + 00 00 07 05 81 05 80 00 01 09 04 01 02 01 0E 02 ................ + 00 00 07 05 81 05 00 01 01 09 04 01 03 01 0E 02 ................ + 00 00 07 05 81 05 20 03 01 09 04 01 04 01 0E 02 ...... ......... + 00 00 07 05 81 05 20 0B 01 09 04 01 05 01 0E 02 ...... ......... + 00 00 07 05 81 05 20 13 01 09 04 01 06 01 0E 02 ...... ......... + 00 00 07 05 81 05 00 14 01 09 04 02 00 00 0E 02 ................ + 00 00 0E 24 01 01 60 01 82 00 06 00 00 00 01 00 ...$..`......... + 1C 24 10 01 08 48 32 36 34 00 00 10 00 80 00 00 .$...H264....... + AA 00 38 9B 71 10 01 00 00 00 00 01 26 24 11 01 ..8.q.......&$.. + 00 80 07 38 04 00 40 E3 09 00 80 C6 13 15 16 05 ...8..@......... + 00 03 00 00 00 00 15 16 05 00 80 1A 06 00 2A 2C ..............*, + 0A 00 26 24 11 02 00 00 05 D0 02 00 00 65 04 00 ..&$.........e.. + 00 CA 08 15 16 05 00 03 00 00 00 00 15 16 05 00 ................ + 80 1A 06 00 2A 2C 0A 00 26 24 11 03 00 20 03 58 ....*,..&$... .X + 02 00 F0 49 02 00 E0 93 04 15 16 05 00 03 00 00 ...I............ + 00 00 15 16 05 00 80 1A 06 00 2A 2C 0A 00 26 24 ..........*,..&$ + 11 04 00 80 02 E0 01 00 00 77 01 00 00 EE 02 15 .........w...... + 16 05 00 03 00 00 00 00 15 16 05 00 80 1A 06 00 ................ + 2A 2C 0A 00 26 24 11 05 00 80 02 68 01 00 40 19 *,..&$.....h..@. + 01 00 80 32 02 15 16 05 00 03 00 00 00 00 15 16 ...2............ + 05 00 80 1A 06 00 2A 2C 0A 00 26 24 11 06 00 60 ......*,..&$...` + 01 20 01 00 C0 7B 00 00 80 F7 00 15 16 05 00 03 . ...{.......... + 00 00 00 00 15 16 05 00 80 1A 06 00 2A 2C 0A 00 ............*,.. + 26 24 11 07 00 40 01 F0 00 00 C0 5D 00 00 80 BB &$...@.....].... + 00 15 16 05 00 03 00 00 00 00 15 16 05 00 80 1A ................ + 06 00 2A 2C 0A 00 26 24 11 08 00 80 07 38 04 00 ..*,..&$.....8.. + 40 E3 09 00 80 C6 13 15 16 05 00 03 00 00 00 00 @............... + 15 16 05 00 80 1A 06 00 2A 2C 0A 00 06 24 0D 01 ........*,...$.. + 01 04 09 04 02 01 01 0E 02 00 00 07 05 82 05 80 ................ + 00 01 09 04 02 02 01 0E 02 00 00 07 05 82 05 00 ................ + 01 01 09 04 02 03 01 0E 02 00 00 07 05 82 05 20 ............... + 03 01 09 04 02 04 01 0E 02 00 00 07 05 82 05 20 ............... + 0B 01 09 04 02 05 01 0E 02 00 00 07 05 82 05 20 ............... + 13 01 09 04 02 06 01 0E 02 00 00 07 05 82 05 00 ................ + 14 01 08 0B 03 02 01 00 00 00 09 04 03 00 00 01 ................ + 01 00 00 09 24 01 00 01 29 00 01 04 0C 24 02 01 ....$...)....$.. + 01 02 00 01 00 00 00 00 0B 24 06 02 01 02 01 00 .........$...... + 02 00 00 09 24 03 03 01 01 00 02 00 09 04 04 00 ....$........... + 00 01 02 00 00 09 04 04 01 01 01 02 00 00 07 24 ...............$ + 01 03 01 01 00 1D 24 02 01 01 02 10 07 40 1F 00 ......$......@.. + 11 2B 00 80 3E 00 22 56 00 C0 5D 00 44 AC 00 80 .+..>."V..].D... + BB 00 09 05 84 05 92 01 04 00 00 07 25 01 01 00 ............%... + 92 01 .. + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x00 +bInterfaceCount : 0x03 +bFunctionClass : 0x0E (Video) +bFunctionSubClass : 0x03 (Video Interface Collection) +bFunctionProtocol : 0x00 (PC_PROTOCOL_UNDEFINED protocol) +iFunction : 0x05 (String Descriptor 5) + Language 0x0409 : "USB Camera" +Data (HexDump) : 08 0B 00 03 0E 03 00 05 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x00 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x01 (Video Control) +bInterfaceProtocol : 0x00 +iInterface : 0x05 (String Descriptor 5) + Language 0x0409 : "USB Camera" +Data (HexDump) : 09 04 00 00 01 0E 01 00 05 ......... + + ------- Video Control Interface Header Descriptor ----- +bLength : 0x0E (14 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x01 (Video Control Header) +bcdUVC : 0x0100 (UVC Version 1.00) +wTotalLength : 0x0073 (115 bytes) +dwClockFreq : 0x00E4E1C0 (15 MHz) +bInCollection : 0x02 (2 VideoStreaming interfaces) +baInterfaceNr[1] : 0x01 +baInterfaceNr[2] : 0x02 +Data (HexDump) : 0E 24 01 00 01 73 00 C0 E1 E4 00 02 01 02 .$...s........ + + ------- Video Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x05 +wTerminalType : 0x0101 (TT_STREAMING) +bAssocTerminal : 0x00 (Not associated with an Input Terminal) +bSourceID : 0x04 +iTerminal : 0x00 +Data (HexDump) : 09 24 03 05 01 01 00 04 00 .$....... + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1C (28 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x03 +guidExtensionCode : {28F03370-6311-4A2E-BA2C-6890EB334016} +bNumControls : 0x18 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x02 +bControlSize : 0x03 +bmControls : 0xFF, 0xFF, 0xFF + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 1 yes - Vendor-Specific (Optional) + D3 : 1 yes - Vendor-Specific (Optional) + D4 : 1 yes - Vendor-Specific (Optional) + D5 : 1 yes - Vendor-Specific (Optional) + D6 : 1 yes - Vendor-Specific (Optional) + D7 : 1 yes - Vendor-Specific (Optional) + D8 : 1 yes - Vendor-Specific (Optional) + D9 : 1 yes - Vendor-Specific (Optional) + D10 : 1 yes - Vendor-Specific (Optional) + D11 : 1 yes - Vendor-Specific (Optional) + D12 : 1 yes - Vendor-Specific (Optional) + D13 : 1 yes - Vendor-Specific (Optional) + D14 : 1 yes - Vendor-Specific (Optional) + D15 : 1 yes - Vendor-Specific (Optional) + D16 : 1 yes - Vendor-Specific (Optional) + D17 : 1 yes - Vendor-Specific (Optional) + D18 : 1 yes - Vendor-Specific (Optional) + D19 : 1 yes - Vendor-Specific (Optional) + D20 : 1 yes - Vendor-Specific (Optional) + D21 : 1 yes - Vendor-Specific (Optional) + D22 : 1 yes - Vendor-Specific (Optional) + D23 : 1 yes - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1C 24 06 03 70 33 F0 28 11 63 2E 4A BA 2C 68 90 .$..p3.(.c.J.,h. + EB 33 40 16 18 01 02 03 FF FF FF 00 .3@......... + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1A (26 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x04 +guidExtensionCode : {DDDF7394-973E-4727-BED9-04ED6426DC67} +bNumControls : 0x08 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x03 +bControlSize : 0x01 +bmControls : 0xFF + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 1 yes - Vendor-Specific (Optional) + D3 : 1 yes - Vendor-Specific (Optional) + D4 : 1 yes - Vendor-Specific (Optional) + D5 : 1 yes - Vendor-Specific (Optional) + D6 : 1 yes - Vendor-Specific (Optional) + D7 : 1 yes - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1A 24 06 04 94 73 DF DD 3E 97 27 47 BE D9 04 ED .$...s..>.'G.... + 64 26 DC 67 08 01 03 01 FF 00 d&.g...... + + -------- Video Control Input Terminal Descriptor ------ +bLength : 0x12 (18 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (ITT_CAMERA) +bAssocTerminal : 0x00 (Not associated with an Output Terminal) +iTerminal : 0x00 +Camera Input Terminal Data: +wObjectiveFocalLengthMin : 0x0000 +wObjectiveFocalLengthMax : 0x0000 +wOcularFocalLength : 0x0000 +bControlSize : 0x03 +bmControls : 0x0E, 0x20, 0x00 + D0 : 0 no - Scanning Mode + D1 : 1 yes - Auto-Exposure Mode + D2 : 1 yes - Auto-Exposure Priority + D3 : 1 yes - Exposure Time (Absolute) + D4 : 0 no - Exposure Time (Relative) + D5 : 0 no - Focus (Absolute) + D6 : 0 no - Focus (Relative) + D7 : 0 no - Iris (Absolute) + D8 : 0 no - Iris (Relative) + D9 : 0 no - Zoom (Absolute) + D10 : 0 no - Zoom (Relative) + D11 : 0 no - Pan (Absolute) + D12 : 0 no - Pan (Relative) + D13 : 1 yes - Roll (Absolute) + D14 : 0 no - Roll (Relative) + D15 : 0 no - Tilt (Absolute) + D16 : 0 no - Tilt (Relative) + D17 : 0 no - Focus Auto + D18 : 0 no - Reserved + D19 : 0 no - Reserved + D20 : 0 no - Reserved + D21 : 0 no - Reserved + D22 : 0 no - Reserved + D23 : 0 no - Reserved +Data (HexDump) : 12 24 02 01 01 02 00 00 00 00 00 00 00 00 03 0E .$.............. + 20 00 . + + -------- Video Control Processing Unit Descriptor ----- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x05 (Processing Unit) +bUnitID : 0x02 +bSourceID : 0x01 +wMaxMultiplier : 0x0000 +bControlSize : 0x02 +bmControls : 0x7F, 0x17 + D0 : 1 yes - Brightness + D1 : 1 yes - Contrast + D2 : 1 yes - Hue + D3 : 1 yes - Saturation + D4 : 1 yes - Sharpness + D5 : 1 yes - Gamma + D6 : 1 yes - White Balance Temperature + D7 : 0 no - White Balance Component + D8 : 1 yes - Backlight Compensation + D9 : 1 yes - Gain + D10 : 1 yes - Power Line Frequency + D11 : 0 no - Hue, Auto + D12 : 1 yes - White Balance Temperature, Auto + D13 : 0 no - White Balance Component, Auto + D14 : 0 no - Digital Multiplier + D15 : 0 no - Digital Multiplier Limit +iProcessing : 0x00 +Data (HexDump) : 0B 24 05 02 01 00 00 02 7F 17 00 .$......... + + ------- Video Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x06 +wTerminalType : 0x0101 (TT_STREAMING) +bAssocTerminal : 0x00 (Not associated with an Input Terminal) +bSourceID : 0x04 +iTerminal : 0x00 +Data (HexDump) : 09 24 03 06 01 01 00 04 00 .$....... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x83 (Direction=IN EndpointID=3) +bmAttributes : 0x03 (TransferType=Interrupt) +wMaxPacketSize : 0x0010 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x10 (16 bytes per packet) +bInterval : 0x06 (6 ms) +Data (HexDump) : 07 05 83 03 10 00 06 ....... + + --- Class-specific VC Interrupt Endpoint Descriptor --- +bLength : 0x05 (5 bytes) +bDescriptorType : 0x25 (Video Control Endpoint) +bDescriptorSubtype : 0x03 (Interrupt) +wMaxTransferSize : 0x0040 (64 bytes) +Data (HexDump) : 05 25 03 40 00 .%.@. + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 00 00 0E 02 00 00 ......... + + ---- VC-Specific VS Video Input Header Descriptor ----- +bLength : 0x0F (15 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x01 (Input Header) +bNumFormats : 0x02 +wTotalLength : 0x0247 (583 bytes) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmInfo : 0x00 (Dynamic Format Change not supported) +bTerminalLink : 0x05 +bStillCaptureMethod : 0x00 (No Still Capture) +nbTriggerSupport : 0x00 (Hardware Triggering not supported) +bTriggerUsage : 0x00 (Host will initiate still image capture) +nbControlSize : 0x01 +Video Payload Format 1 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Video Payload Format 2 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Data (HexDump) : 0F 24 01 02 47 02 81 00 05 00 00 00 01 00 00 .$..G.......... + + ----- Video Streaming MJPEG Format Type Descriptor ---- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x06 (Format MJPEG) +bFormatIndex : 0x01 (1) +bNumFrameDescriptors : 0x08 (8) +bmFlags : 0x00 (Sample size is not fixed) +bDefaultFrameIndex : 0x01 (1) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +*!*ERROR: no Color Matching Descriptor for this format +Data (HexDump) : 0B 24 06 01 08 00 01 00 00 00 00 .$......... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +---> This is the Default (optimum) Frame index +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x0780 (1920) +wHeight : 0x0438 (1080) +dwMinBitRate : 0x1DA9C000 (497664000 bps -> 62.208 MB/s) +dwMaxBitRate : 0x3B538000 (995328000 bps -> 124.416 MB/s) +dwMaxVideoFrameBufferSize: 0x003F4A4D (4147789 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 07 01 00 80 07 38 04 00 C0 A9 1D 00 80 53 &$.....8.......S + 3B 4D 4A 3F 00 15 16 05 00 03 15 16 05 00 80 1A ;MJ?............ + 06 00 2A 2C 0A 00 ..*,.. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x00 +wWidth : 0x0500 (1280) +wHeight : 0x02D0 (720) +dwMinBitRate : 0x0D2F0000 (221184000 bps -> 27.648 MB/s) +dwMaxBitRate : 0x1A5E0000 (442368000 bps -> 55.296 MB/s) +dwMaxVideoFrameBufferSize: 0x001C224D (1843789 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 07 02 00 00 05 D0 02 00 00 2F 0D 00 00 5E &$........./...^ + 1A 4D 22 1C 00 15 16 05 00 03 15 16 05 00 80 1A .M"............. + 06 00 2A 2C 0A 00 ..*,.. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x00 +wWidth : 0x0320 (800) +wHeight : 0x0258 (600) +dwMinBitRate : 0x06DDD000 (115200000 bps -> 14.400 MB/s) +dwMaxBitRate : 0x0DBBA000 (230400000 bps -> 28.800 MB/s) +dwMaxVideoFrameBufferSize: 0x000EA84D (960589 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 07 03 00 20 03 58 02 00 D0 DD 06 00 A0 BB &$... .X........ + 0D 4D A8 0E 00 15 16 05 00 03 15 16 05 00 80 1A .M.............. + 06 00 2A 2C 0A 00 ..*,.. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x04650000 (73728000 bps -> 9.216 MB/s) +dwMaxBitRate : 0x08CA0000 (147456000 bps -> 18.432 MB/s) +dwMaxVideoFrameBufferSize: 0x0009624D (614989 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 07 04 00 80 02 E0 01 00 00 65 04 00 00 CA &$.........e.... + 08 4D 62 09 00 15 16 05 00 03 15 16 05 00 80 1A .Mb............. + 06 00 2A 2C 0A 00 ..*,.. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x05 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x0168 (360) +dwMinBitRate : 0x034BC000 (55296000 bps -> 6.912 MB/s) +dwMaxBitRate : 0x06978000 (110592000 bps -> 13.824 MB/s) +dwMaxVideoFrameBufferSize: 0x00070A4D (461389 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 07 05 00 80 02 68 01 00 C0 4B 03 00 80 97 &$.....h...K.... + 06 4D 0A 07 00 15 16 05 00 03 15 16 05 00 80 1A .M.............. + 06 00 2A 2C 0A 00 ..*,.. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x06 +bmCapabilities : 0x00 +wWidth : 0x0160 (352) +wHeight : 0x0120 (288) +dwMinBitRate : 0x01734000 (24330240 bps -> 3.41 MB/s) +dwMaxBitRate : 0x02E68000 (48660480 bps -> 6.82 MB/s) +dwMaxVideoFrameBufferSize: 0x00031A4D (203341 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 07 06 00 60 01 20 01 00 40 73 01 00 80 E6 &$...`. ..@s.... + 02 4D 1A 03 00 15 16 05 00 03 15 16 05 00 80 1A .M.............. + 06 00 2A 2C 0A 00 ..*,.. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x07 +bmCapabilities : 0x00 +wWidth : 0x0140 (320) +wHeight : 0x00F0 (240) +dwMinBitRate : 0x01194000 (18432000 bps -> 2.304 MB/s) +dwMaxBitRate : 0x02328000 (36864000 bps -> 4.608 MB/s) +dwMaxVideoFrameBufferSize: 0x00025A4D (154189 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 07 07 00 40 01 F0 00 00 40 19 01 00 80 32 &$...@....@....2 + 02 4D 5A 02 00 15 16 05 00 03 15 16 05 00 80 1A .MZ............. + 06 00 2A 2C 0A 00 ..*,.. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x08 +bmCapabilities : 0x00 +wWidth : 0x0780 (1920) +wHeight : 0x0438 (1080) +dwMinBitRate : 0x1DA9C000 (497664000 bps -> 62.208 MB/s) +dwMaxBitRate : 0x3B538000 (995328000 bps -> 124.416 MB/s) +dwMaxVideoFrameBufferSize: 0x003F4A4D (4147789 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 07 08 00 80 07 38 04 00 C0 A9 1D 00 80 53 &$.....8.......S + 3B 4D 4A 3F 00 15 16 05 00 03 15 16 05 00 80 1A ;MJ?............ + 06 00 2A 2C 0A 00 ..*,.. + + ------- VS Uncompressed Format Type Descriptor -------- +bLength : 0x1B (27 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x04 (Uncompressed Format Type) +bFormatIndex : 0x02 (2) +bNumFrameDescriptors : 0x06 (6) +guidFormat : {32595559-0000-0010-8000-00AA00389B71} (YUY2) +bBitsPerPixel : 0x10 (16 bits) +bDefaultFrameIndex : 0x01 (1) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +Data (HexDump) : 1B 24 04 02 06 59 55 59 32 00 00 10 00 80 00 00 .$...YUY2....... + AA 00 38 9B 71 10 01 00 00 00 00 ..8.q...... + + -------- VS Uncompressed Frame Type Descriptor -------- +---> This is the Default (optimum) Frame index +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x04650000 (73728000 bps -> 9.216 MB/s) +dwMaxBitRate : 0x08CA0000 (147456000 bps -> 18.432 MB/s) +dwMaxVideoFrameBufferSize: 0x00096000 (614400 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 05 01 00 80 02 E0 01 00 00 65 04 00 00 CA &$.........e.... + 08 00 60 09 00 15 16 05 00 03 15 16 05 00 80 1A ..`............. + 06 00 2A 2C 0A 00 ..*,.. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x1E (30 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x00 +wWidth : 0x0320 (800) +wHeight : 0x0258 (600) +dwMinBitRate : 0x06DDD000 (115200000 bps -> 14.400 MB/s) +dwMaxBitRate : 0x06DDD000 (115200000 bps -> 14.400 MB/s) +dwMaxVideoFrameBufferSize: 0x000EA600 (960000 bytes) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x01 (1 discrete frame interval supported) +adwFrameInterval[1] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 1E 24 05 02 00 20 03 58 02 00 D0 DD 06 00 D0 DD .$... .X........ + 06 00 A6 0E 00 2A 2C 0A 00 01 2A 2C 0A 00 .....*,...*,.. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x0168 (360) +dwMinBitRate : 0x034BC000 (55296000 bps -> 6.912 MB/s) +dwMaxBitRate : 0x06978000 (110592000 bps -> 13.824 MB/s) +dwMaxVideoFrameBufferSize: 0x00070800 (460800 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 05 03 00 80 02 68 01 00 C0 4B 03 00 80 97 &$.....h...K.... + 06 00 08 07 00 15 16 05 00 03 15 16 05 00 80 1A ................ + 06 00 2A 2C 0A 00 ..*,.. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x00 +wWidth : 0x0160 (352) +wHeight : 0x0120 (288) +dwMinBitRate : 0x01734000 (24330240 bps -> 3.41 MB/s) +dwMaxBitRate : 0x02E68000 (48660480 bps -> 6.82 MB/s) +dwMaxVideoFrameBufferSize: 0x00031800 (202752 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 05 04 00 60 01 20 01 00 40 73 01 00 80 E6 &$...`. ..@s.... + 02 00 18 03 00 15 16 05 00 03 15 16 05 00 80 1A ................ + 06 00 2A 2C 0A 00 ..*,.. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x05 +bmCapabilities : 0x00 +wWidth : 0x0140 (320) +wHeight : 0x00F0 (240) +dwMinBitRate : 0x01194000 (18432000 bps -> 2.304 MB/s) +dwMaxBitRate : 0x02328000 (36864000 bps -> 4.608 MB/s) +dwMaxVideoFrameBufferSize: 0x00025800 (153600 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 05 05 00 40 01 F0 00 00 40 19 01 00 80 32 &$...@....@....2 + 02 00 58 02 00 15 16 05 00 03 15 16 05 00 80 1A ..X............. + 06 00 2A 2C 0A 00 ..*,.. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x06 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x04650000 (73728000 bps -> 9.216 MB/s) +dwMaxBitRate : 0x08CA0000 (147456000 bps -> 18.432 MB/s) +dwMaxVideoFrameBufferSize: 0x00096000 (614400 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 05 06 00 80 02 E0 01 00 00 65 04 00 00 CA &$.........e.... + 08 00 60 09 00 15 16 05 00 03 15 16 05 00 80 1A ..`............. + 06 00 2A 2C 0A 00 ..*,.. + + ------- VS Color Matching Descriptor Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x0D (Color Matching) +bColorPrimaries : 0x01 (BT.709, sRGB) +bTransferCharacteristics : 0x01 (BT.709) +bMatrixCoefficients : 0x04 (SMPTE 170M) +Data (HexDump) : 06 24 0D 01 01 04 .$.... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 01 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0080 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x80 (128 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 80 00 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x02 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 02 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0100 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x100 (256 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 00 01 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x03 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 03 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0320 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x320 (800 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 20 03 01 .... .. + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x04 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 04 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0B20 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x01 (1 additional transactions per microframe -> allows 513..1024 byte per packet) + Bits 10..0 : 0x320 (800 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 20 0B 01 .... .. + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x05 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 05 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x1320 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x02 (2 additional transactions per microframe -> allows 683..1024 bytes per packet) + Bits 10..0 : 0x320 (800 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 20 13 01 .... .. + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x06 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 06 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x1400 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x02 (2 additional transactions per microframe -> allows 683..1024 bytes per packet) + Bits 10..0 : 0x400 (1024 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 00 14 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x02 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 02 00 00 0E 02 00 00 ......... + + ---- VC-Specific VS Video Input Header Descriptor ----- +bLength : 0x0E (14 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x01 (Input Header) +bNumFormats : 0x01 +wTotalLength : 0x0160 (352 bytes) +bEndpointAddress : 0x82 (Direction=IN EndpointID=2) +bmInfo : 0x00 (Dynamic Format Change not supported) +bTerminalLink : 0x06 +bStillCaptureMethod : 0x00 (No Still Capture) +nbTriggerSupport : 0x00 (Hardware Triggering not supported) +bTriggerUsage : 0x00 (Host will initiate still image capture) +nbControlSize : 0x01 +Video Payload Format 1 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Data (HexDump) : 0E 24 01 01 60 01 82 00 06 00 00 00 01 00 .$..`......... + + ---- VS Frame Based Payload Format Type Descriptor ---- +*!*ERROR: This format is NOT ALLOWED for UVC 1.0 devices +bLength : 0x1C (28 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x10 (Frame Based Format Type) +bFormatIndex : 0x01 (1) +bNumFrameDescriptors : 0x08 (8) +guidFormat : {34363248-0000-0010-8000-00AA00389B71} (H264) +bBitsPerPixel : 0x10 (16 bits) +bDefaultFrameIndex : 0x01 (1) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +bVariableSize : 0x01 (Variable Size) +Data (HexDump) : 1C 24 10 01 08 48 32 36 34 00 00 10 00 80 00 00 .$...H264....... + AA 00 38 9B 71 10 01 00 00 00 00 01 ..8.q....... + + ----- VS Frame Based Payload Frame Type Descriptor ---- +*!*ERROR bDescriptorSubtype did not exist in UVC 1.0 +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x0780 (1920) +wHeight : 0x0438 (1080) +dwMinBitRate : 0x09E34000 (165888000 bps -> 20.736 MB/s) +dwMaxBitRate : 0x13C68000 (331776000 bps -> 41.472 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0x00 (0 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 01 00 80 07 38 04 00 40 E3 09 00 80 C6 &$.....8..@..... + 13 15 16 05 00 03 00 00 00 00 15 16 05 00 80 1A ................ + 06 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +*!*ERROR bDescriptorSubtype did not exist in UVC 1.0 +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x00 +wWidth : 0x0500 (1280) +wHeight : 0x02D0 (720) +dwMinBitRate : 0x04650000 (73728000 bps -> 9.216 MB/s) +dwMaxBitRate : 0x08CA0000 (147456000 bps -> 18.432 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0x00 (0 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 02 00 00 05 D0 02 00 00 65 04 00 00 CA &$.........e.... + 08 15 16 05 00 03 00 00 00 00 15 16 05 00 80 1A ................ + 06 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +*!*ERROR bDescriptorSubtype did not exist in UVC 1.0 +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x00 +wWidth : 0x0320 (800) +wHeight : 0x0258 (600) +dwMinBitRate : 0x0249F000 (38400000 bps -> 4.800 MB/s) +dwMaxBitRate : 0x0493E000 (76800000 bps -> 9.600 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0x00 (0 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 03 00 20 03 58 02 00 F0 49 02 00 E0 93 &$... .X...I.... + 04 15 16 05 00 03 00 00 00 00 15 16 05 00 80 1A ................ + 06 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +*!*ERROR bDescriptorSubtype did not exist in UVC 1.0 +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x01770000 (24576000 bps -> 3.72 MB/s) +dwMaxBitRate : 0x02EE0000 (49152000 bps -> 6.144 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0x00 (0 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 04 00 80 02 E0 01 00 00 77 01 00 00 EE &$.........w.... + 02 15 16 05 00 03 00 00 00 00 15 16 05 00 80 1A ................ + 06 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +*!*ERROR bDescriptorSubtype did not exist in UVC 1.0 +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x05 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x0168 (360) +dwMinBitRate : 0x01194000 (18432000 bps -> 2.304 MB/s) +dwMaxBitRate : 0x02328000 (36864000 bps -> 4.608 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0x00 (0 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 05 00 80 02 68 01 00 40 19 01 00 80 32 &$.....h..@....2 + 02 15 16 05 00 03 00 00 00 00 15 16 05 00 80 1A ................ + 06 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +*!*ERROR bDescriptorSubtype did not exist in UVC 1.0 +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x06 +bmCapabilities : 0x00 +wWidth : 0x0160 (352) +wHeight : 0x0120 (288) +dwMinBitRate : 0x007BC000 (8110080 bps -> 1.13 MB/s) +dwMaxBitRate : 0x00F78000 (16220160 bps -> 2.27 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0x00 (0 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 06 00 60 01 20 01 00 C0 7B 00 00 80 F7 &$...`. ...{.... + 00 15 16 05 00 03 00 00 00 00 15 16 05 00 80 1A ................ + 06 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +*!*ERROR bDescriptorSubtype did not exist in UVC 1.0 +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x07 +bmCapabilities : 0x00 +wWidth : 0x0140 (320) +wHeight : 0x00F0 (240) +dwMinBitRate : 0x005DC000 (6144000 bps -> 768 KB/s) +dwMaxBitRate : 0x00BB8000 (12288000 bps -> 1.536 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0x00 (0 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 07 00 40 01 F0 00 00 C0 5D 00 00 80 BB &$...@.....].... + 00 15 16 05 00 03 00 00 00 00 15 16 05 00 80 1A ................ + 06 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +*!*ERROR bDescriptorSubtype did not exist in UVC 1.0 +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x08 +bmCapabilities : 0x00 +wWidth : 0x0780 (1920) +wHeight : 0x0438 (1080) +dwMinBitRate : 0x09E34000 (165888000 bps -> 20.736 MB/s) +dwMaxBitRate : 0x13C68000 (331776000 bps -> 41.472 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0x00 (0 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 08 00 80 07 38 04 00 40 E3 09 00 80 C6 &$.....8..@..... + 13 15 16 05 00 03 00 00 00 00 15 16 05 00 80 1A ................ + 06 00 2A 2C 0A 00 ..*,.. + + ------- VS Color Matching Descriptor Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x0D (Color Matching) +bColorPrimaries : 0x01 (BT.709, sRGB) +bTransferCharacteristics : 0x01 (BT.709) +bMatrixCoefficients : 0x04 (SMPTE 170M) +Data (HexDump) : 06 24 0D 01 01 04 .$.... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x02 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 02 01 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x82 (Direction=IN EndpointID=2) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0080 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x80 (128 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 82 05 80 00 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x02 +bAlternateSetting : 0x02 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 02 02 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x82 (Direction=IN EndpointID=2) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0100 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x100 (256 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 82 05 00 01 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x02 +bAlternateSetting : 0x03 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 02 03 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x82 (Direction=IN EndpointID=2) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0320 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x320 (800 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 82 05 20 03 01 .... .. + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x02 +bAlternateSetting : 0x04 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 02 04 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x82 (Direction=IN EndpointID=2) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0B20 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x01 (1 additional transactions per microframe -> allows 513..1024 byte per packet) + Bits 10..0 : 0x320 (800 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 82 05 20 0B 01 .... .. + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x02 +bAlternateSetting : 0x05 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 02 05 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x82 (Direction=IN EndpointID=2) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x1320 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x02 (2 additional transactions per microframe -> allows 683..1024 bytes per packet) + Bits 10..0 : 0x320 (800 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 82 05 20 13 01 .... .. + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x02 +bAlternateSetting : 0x06 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 02 06 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x82 (Direction=IN EndpointID=2) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x1400 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x02 (2 additional transactions per microframe -> allows 683..1024 bytes per packet) + Bits 10..0 : 0x400 (1024 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 82 05 00 14 01 ....... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x03 +bInterfaceCount : 0x02 +bFunctionClass : 0x01 (Audio) +bFunctionSubClass : 0x00 (undefined) +bFunctionProtocol : 0x00 +iFunction : 0x00 (No String Descriptor) +Data (HexDump) : 08 0B 03 02 01 00 00 00 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x01 (Audio Control) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 00 00 01 01 00 00 ......... + + ------ Audio Control Interface Header Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 (Header) +bcdADC : 0x0100 +wTotalLength : 0x0029 (41 bytes) +bInCollection : 0x01 +baInterfaceNr[1] : 0x04 +Data (HexDump) : 09 24 01 00 01 29 00 01 04 .$...)... + + ------- Audio Control Input Terminal Descriptor ------- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (Microphone) +bAssocTerminal : 0x00 +bNrChannels : 0x01 (1 channel) +wChannelConfig : 0x0000 (-) +iChannelNames : 0x00 (No String Descriptor) +iTerminal : 0x00 (No String Descriptor) +Data (HexDump) : 0C 24 02 01 01 02 00 01 00 00 00 00 .$.......... + + -------- Audio Control Feature Unit Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x06 (Feature Unit) +bUnitID : 0x02 (2) +bSourceID : 0x01 (1) +bControlSize : 0x02 (2 bytes per control) +bmaControls[0] : 0x01, 0x00 + D0: Mute : 1 + D1: Volume : 0 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 + D8: Bass Boost : 0 + D9: Loudness : 0 + D10: Reserved : 0 + D11: Reserved : 0 + D12: Reserved : 0 + D13: Reserved : 0 + D14: Reserved : 0 + D15: Reserved : 0 +bmaControls[1] : 0x02, 0x00 + D0: Mute : 0 + D1: Volume : 1 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 + D8: Bass Boost : 0 + D9: Loudness : 0 + D10: Reserved : 0 + D11: Reserved : 0 + D12: Reserved : 0 + D13: Reserved : 0 + D14: Reserved : 0 + D15: Reserved : 0 +iFeature : 0x00 (No String Descriptor) +Data (HexDump) : 0B 24 06 02 01 02 01 00 02 00 00 .$......... + + ------- Audio Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x03 +wTerminalType : 0x0101 (USB streaming) +bAssocTerminal : 0x00 (0) +bSourceID : 0x02 (2) +iTerminal : 0x00 (No String Descriptor) +Data (HexDump) : 09 24 03 03 01 01 00 02 00 .$....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x04 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 04 00 00 01 02 00 00 ......... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x04 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 04 01 01 01 02 00 00 ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x03 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 03 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x1D (29 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x01 (1 channel) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x07 (supports 7 sample frequencies) +tSamFreq[1] : 0x01F40 (8000 Hz) +tSamFreq[2] : 0x02B11 (11025 Hz) +tSamFreq[3] : 0x03E80 (16000 Hz) +tSamFreq[4] : 0x05622 (22050 Hz) +tSamFreq[5] : 0x05DC0 (24000 Hz) +tSamFreq[6] : 0x0AC44 (44100 Hz) +tSamFreq[7] : 0x0BB80 (48000 Hz) +Data (HexDump) : 1D 24 02 01 01 02 10 07 40 1F 00 11 2B 00 80 3E .$......@...+..> + 00 22 56 00 C0 5D 00 44 AC 00 80 BB 00 ."V..].D..... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x84 (Direction=IN EndpointID=4) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0192 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x192 (402 bytes per packet) +bInterval : 0x04 (4 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 84 05 92 01 04 00 00 ......... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x00 (Undefined) +wLockDelay : 0x0192 +Data (HexDump) : 07 25 01 01 00 92 01 .%..... + + ----------------- Device Qualifier Descriptor ----------------- +bLength : 0x0A (10 bytes) +bDescriptorType : 0x06 (Device_qualifier Descriptor) +bcdUSB : 0x200 (USB Version 2.00) +bDeviceClass : 0xEF (Miscellaneous) +bDeviceSubClass : 0x02 +bDeviceProtocol : 0x01 (IAD - Interface Association Descriptor) +bMaxPacketSize0 : 0x40 (64 Bytes) +bNumConfigurations : 0x01 (1 other-speed configuration) +bReserved : 0x00 +Data (HexDump) : 0A 06 00 02 EF 02 01 40 01 00 .......@.. + + ------------ Other Speed Configuration Descriptor ------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x07 (Other_speed_configuration Descriptor) +wTotalLength : 0x0040 (64 bytes) +bNumInterfaces : 0x01 (1 Interface) +bConfigurationValue : 0x01 (Configuration 1) +iConfiguration : 0x00 (No String Descriptor) +bmAttributes : 0x80 + D7: Reserved, set 1 : 0x01 + D6: Self Powered : 0x00 (no) + D5: Remote Wakeup : 0x00 (no) + D4..0: Reserved, set 0 : 0x00 +MaxPower : 0xFA (500 mA) +Data (HexDump) : 09 07 40 00 01 01 00 80 FA 08 0B 00 01 0E 03 00 ..@............. + 01 09 04 00 00 00 0E 01 00 01 0C 24 01 00 01 26 ...........$...& + 00 80 8D 5B 00 00 09 24 03 05 01 01 00 02 00 11 ...[...$........ + 24 02 01 01 02 00 00 00 00 00 00 00 00 02 00 00 $............... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x00 +bInterfaceCount : 0x01 +*!*ERROR bInterfaceCount must be greater than 1 +bFunctionClass : 0x0E (Video) +bFunctionSubClass : 0x03 (Video Interface Collection) +bFunctionProtocol : 0x00 (PC_PROTOCOL_UNDEFINED protocol) +iFunction : 0x01 (String Descriptor 1) + Language 0x0409 : "H264 USB Camera" +Data (HexDump) : 08 0B 00 01 0E 03 00 01 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x00 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x01 (Video Control) +bInterfaceProtocol : 0x00 +iInterface : 0x01 (String Descriptor 1) + Language 0x0409 : "H264 USB Camera" +Data (HexDump) : 09 04 00 00 00 0E 01 00 01 ......... + + ------- Video Control Interface Header Descriptor ----- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x01 (Video Control Header) +bcdUVC : 0x0100 (UVC Version 1.00) +wTotalLength : 0x0026 (38 bytes) +dwClockFreq : 0x005B8D80 (6 MHz) +bInCollection : 0x00 (0 VideoStreaming interface) +Data (HexDump) : 0C 24 01 00 01 26 00 80 8D 5B 00 00 .$...&...[.. + + ------- Video Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x05 +wTerminalType : 0x0101 (TT_STREAMING) +bAssocTerminal : 0x00 (Not associated with an Input Terminal) +bSourceID : 0x02 +iTerminal : 0x00 +Data (HexDump) : 09 24 03 05 01 01 00 02 00 .$....... + + -------- Video Control Input Terminal Descriptor ------ +bLength : 0x11 (17 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (ITT_CAMERA) +bAssocTerminal : 0x00 (Not associated with an Output Terminal) +iTerminal : 0x00 +Camera Input Terminal Data: +wObjectiveFocalLengthMin : 0x0000 +wObjectiveFocalLengthMax : 0x0000 +wOcularFocalLength : 0x0000 +bControlSize : 0x02 +bmControls : 0x00, 0x00 + D0 : 0 no - Scanning Mode + D1 : 0 no - Auto-Exposure Mode + D2 : 0 no - Auto-Exposure Priority + D3 : 0 no - Exposure Time (Absolute) + D4 : 0 no - Exposure Time (Relative) + D5 : 0 no - Focus (Absolute) + D6 : 0 no - Focus (Relative) + D7 : 0 no - Iris (Absolute) + D8 : 0 no - Iris (Relative) + D9 : 0 no - Zoom (Absolute) + D10 : 0 no - Zoom (Relative) + D11 : 0 no - Pan (Absolute) + D12 : 0 no - Pan (Relative) + D13 : 0 no - Roll (Absolute) + D14 : 0 no - Roll (Relative) + D15 : 0 no - Tilt (Absolute) +Data (HexDump) : 11 24 02 01 01 02 00 00 00 00 00 00 00 00 02 00 .$.............. + 00 . + + -------------------- String Descriptors ------------------- + ------ String Descriptor 0 ------ +bLength : 0x04 (4 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language ID[0] : 0x0409 (English - United States) +Data (HexDump) : 04 03 09 04 .... + ------ String Descriptor 1 ------ +bLength : 0x20 (32 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "H264 USB Camera" +Data (HexDump) : 20 03 48 00 32 00 36 00 34 00 20 00 55 00 53 00 .H.2.6.4. .U.S. + 42 00 20 00 43 00 61 00 6D 00 65 00 72 00 61 00 B. .C.a.m.e.r.a. + ------ String Descriptor 2 ------ +bLength : 0x20 (32 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "H264 USB Camera" +Data (HexDump) : 20 03 48 00 32 00 36 00 34 00 20 00 55 00 53 00 .H.2.6.4. .U.S. + 42 00 20 00 43 00 61 00 6D 00 65 00 72 00 61 00 B. .C.a.m.e.r.a. + ------ String Descriptor 3 ------ +bLength : 0x16 (22 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "2020032801" +Data (HexDump) : 16 03 32 00 30 00 32 00 30 00 30 00 33 00 32 00 ..2.0.2.0.0.3.2. + 38 00 30 00 31 00 8.0.1. + ------ String Descriptor 5 ------ +bLength : 0x16 (22 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "USB Camera" +Data (HexDump) : 16 03 55 00 53 00 42 00 20 00 43 00 61 00 6D 00 ..U.S.B. .C.a.m. + 65 00 72 00 61 00 e.r.a. +*/ + +namespace elp_h264 { +const uint8_t dev_desc[] = { + 0x12, 0x01, 0x00, 0x02, 0xEF, 0x02, 0x01, 0x40, 0xE4, 0x32, 0x22, 0x94, 0x00, 0x01, 0x02, 0x01, + 0x03, 0x01 +}; +const uint8_t cfg_desc[] = { + 0x09, 0x02, 0x92, 0x05, 0x05, 0x01, 0x00, 0x80, 0xFA, 0x08, 0x0B, 0x00, 0x03, 0x0E, 0x03, 0x00, + 0x05, 0x09, 0x04, 0x00, 0x00, 0x01, 0x0E, 0x01, 0x00, 0x05, 0x0E, 0x24, 0x01, 0x00, 0x01, 0x73, + 0x00, 0xC0, 0xE1, 0xE4, 0x00, 0x02, 0x01, 0x02, 0x09, 0x24, 0x03, 0x05, 0x01, 0x01, 0x00, 0x04, + 0x00, 0x1C, 0x24, 0x06, 0x03, 0x70, 0x33, 0xF0, 0x28, 0x11, 0x63, 0x2E, 0x4A, 0xBA, 0x2C, 0x68, + 0x90, 0xEB, 0x33, 0x40, 0x16, 0x18, 0x01, 0x02, 0x03, 0xFF, 0xFF, 0xFF, 0x00, 0x1A, 0x24, 0x06, + 0x04, 0x94, 0x73, 0xDF, 0xDD, 0x3E, 0x97, 0x27, 0x47, 0xBE, 0xD9, 0x04, 0xED, 0x64, 0x26, 0xDC, + 0x67, 0x08, 0x01, 0x03, 0x01, 0xFF, 0x00, 0x12, 0x24, 0x02, 0x01, 0x01, 0x02, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0E, 0x20, 0x00, 0x0B, 0x24, 0x05, 0x02, 0x01, 0x00, 0x00, + 0x02, 0x7F, 0x17, 0x00, 0x09, 0x24, 0x03, 0x06, 0x01, 0x01, 0x00, 0x04, 0x00, 0x07, 0x05, 0x83, + 0x03, 0x10, 0x00, 0x06, 0x05, 0x25, 0x03, 0x40, 0x00, 0x09, 0x04, 0x01, 0x00, 0x00, 0x0E, 0x02, + 0x00, 0x00, 0x0F, 0x24, 0x01, 0x02, 0x47, 0x02, 0x81, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, + 0x00, 0x0B, 0x24, 0x06, 0x01, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x26, 0x24, 0x07, 0x01, + 0x00, 0x80, 0x07, 0x38, 0x04, 0x00, 0xC0, 0xA9, 0x1D, 0x00, 0x80, 0x53, 0x3B, 0x4D, 0x4A, 0x3F, + 0x00, 0x15, 0x16, 0x05, 0x00, 0x03, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x2A, 0x2C, + 0x0A, 0x00, 0x26, 0x24, 0x07, 0x02, 0x00, 0x00, 0x05, 0xD0, 0x02, 0x00, 0x00, 0x2F, 0x0D, 0x00, + 0x00, 0x5E, 0x1A, 0x4D, 0x22, 0x1C, 0x00, 0x15, 0x16, 0x05, 0x00, 0x03, 0x15, 0x16, 0x05, 0x00, + 0x80, 0x1A, 0x06, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x07, 0x03, 0x00, 0x20, 0x03, 0x58, + 0x02, 0x00, 0xD0, 0xDD, 0x06, 0x00, 0xA0, 0xBB, 0x0D, 0x4D, 0xA8, 0x0E, 0x00, 0x15, 0x16, 0x05, + 0x00, 0x03, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, + 0x07, 0x04, 0x00, 0x80, 0x02, 0xE0, 0x01, 0x00, 0x00, 0x65, 0x04, 0x00, 0x00, 0xCA, 0x08, 0x4D, + 0x62, 0x09, 0x00, 0x15, 0x16, 0x05, 0x00, 0x03, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, + 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x07, 0x05, 0x00, 0x80, 0x02, 0x68, 0x01, 0x00, 0xC0, 0x4B, + 0x03, 0x00, 0x80, 0x97, 0x06, 0x4D, 0x0A, 0x07, 0x00, 0x15, 0x16, 0x05, 0x00, 0x03, 0x15, 0x16, + 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x07, 0x06, 0x00, 0x60, + 0x01, 0x20, 0x01, 0x00, 0x40, 0x73, 0x01, 0x00, 0x80, 0xE6, 0x02, 0x4D, 0x1A, 0x03, 0x00, 0x15, + 0x16, 0x05, 0x00, 0x03, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x2A, 0x2C, 0x0A, 0x00, + 0x26, 0x24, 0x07, 0x07, 0x00, 0x40, 0x01, 0xF0, 0x00, 0x00, 0x40, 0x19, 0x01, 0x00, 0x80, 0x32, + 0x02, 0x4D, 0x5A, 0x02, 0x00, 0x15, 0x16, 0x05, 0x00, 0x03, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, + 0x06, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x07, 0x08, 0x00, 0x80, 0x07, 0x38, 0x04, 0x00, + 0xC0, 0xA9, 0x1D, 0x00, 0x80, 0x53, 0x3B, 0x4D, 0x4A, 0x3F, 0x00, 0x15, 0x16, 0x05, 0x00, 0x03, + 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x1B, 0x24, 0x04, 0x02, + 0x06, 0x59, 0x55, 0x59, 0x32, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, + 0x71, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x26, 0x24, 0x05, 0x01, 0x00, 0x80, 0x02, 0xE0, 0x01, + 0x00, 0x00, 0x65, 0x04, 0x00, 0x00, 0xCA, 0x08, 0x00, 0x60, 0x09, 0x00, 0x15, 0x16, 0x05, 0x00, + 0x03, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x1E, 0x24, 0x05, + 0x02, 0x00, 0x20, 0x03, 0x58, 0x02, 0x00, 0xD0, 0xDD, 0x06, 0x00, 0xD0, 0xDD, 0x06, 0x00, 0xA6, + 0x0E, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x01, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x05, 0x03, 0x00, + 0x80, 0x02, 0x68, 0x01, 0x00, 0xC0, 0x4B, 0x03, 0x00, 0x80, 0x97, 0x06, 0x00, 0x08, 0x07, 0x00, + 0x15, 0x16, 0x05, 0x00, 0x03, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x2A, 0x2C, 0x0A, + 0x00, 0x26, 0x24, 0x05, 0x04, 0x00, 0x60, 0x01, 0x20, 0x01, 0x00, 0x40, 0x73, 0x01, 0x00, 0x80, + 0xE6, 0x02, 0x00, 0x18, 0x03, 0x00, 0x15, 0x16, 0x05, 0x00, 0x03, 0x15, 0x16, 0x05, 0x00, 0x80, + 0x1A, 0x06, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x05, 0x05, 0x00, 0x40, 0x01, 0xF0, 0x00, + 0x00, 0x40, 0x19, 0x01, 0x00, 0x80, 0x32, 0x02, 0x00, 0x58, 0x02, 0x00, 0x15, 0x16, 0x05, 0x00, + 0x03, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x05, + 0x06, 0x00, 0x80, 0x02, 0xE0, 0x01, 0x00, 0x00, 0x65, 0x04, 0x00, 0x00, 0xCA, 0x08, 0x00, 0x60, + 0x09, 0x00, 0x15, 0x16, 0x05, 0x00, 0x03, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x2A, + 0x2C, 0x0A, 0x00, 0x06, 0x24, 0x0D, 0x01, 0x01, 0x04, 0x09, 0x04, 0x01, 0x01, 0x01, 0x0E, 0x02, + 0x00, 0x00, 0x07, 0x05, 0x81, 0x05, 0x80, 0x00, 0x01, 0x09, 0x04, 0x01, 0x02, 0x01, 0x0E, 0x02, + 0x00, 0x00, 0x07, 0x05, 0x81, 0x05, 0x00, 0x01, 0x01, 0x09, 0x04, 0x01, 0x03, 0x01, 0x0E, 0x02, + 0x00, 0x00, 0x07, 0x05, 0x81, 0x05, 0x20, 0x03, 0x01, 0x09, 0x04, 0x01, 0x04, 0x01, 0x0E, 0x02, + 0x00, 0x00, 0x07, 0x05, 0x81, 0x05, 0x20, 0x0B, 0x01, 0x09, 0x04, 0x01, 0x05, 0x01, 0x0E, 0x02, + 0x00, 0x00, 0x07, 0x05, 0x81, 0x05, 0x20, 0x13, 0x01, 0x09, 0x04, 0x01, 0x06, 0x01, 0x0E, 0x02, + 0x00, 0x00, 0x07, 0x05, 0x81, 0x05, 0x00, 0x14, 0x01, 0x09, 0x04, 0x02, 0x00, 0x00, 0x0E, 0x02, + 0x00, 0x00, 0x0E, 0x24, 0x01, 0x01, 0x60, 0x01, 0x82, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, + 0x1C, 0x24, 0x10, 0x01, 0x08, 0x48, 0x32, 0x36, 0x34, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, + 0xAA, 0x00, 0x38, 0x9B, 0x71, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x26, 0x24, 0x11, 0x01, + 0x00, 0x80, 0x07, 0x38, 0x04, 0x00, 0x40, 0xE3, 0x09, 0x00, 0x80, 0xC6, 0x13, 0x15, 0x16, 0x05, + 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x2A, 0x2C, + 0x0A, 0x00, 0x26, 0x24, 0x11, 0x02, 0x00, 0x00, 0x05, 0xD0, 0x02, 0x00, 0x00, 0x65, 0x04, 0x00, + 0x00, 0xCA, 0x08, 0x15, 0x16, 0x05, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, + 0x80, 0x1A, 0x06, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x11, 0x03, 0x00, 0x20, 0x03, 0x58, + 0x02, 0x00, 0xF0, 0x49, 0x02, 0x00, 0xE0, 0x93, 0x04, 0x15, 0x16, 0x05, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, + 0x11, 0x04, 0x00, 0x80, 0x02, 0xE0, 0x01, 0x00, 0x00, 0x77, 0x01, 0x00, 0x00, 0xEE, 0x02, 0x15, + 0x16, 0x05, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, + 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x11, 0x05, 0x00, 0x80, 0x02, 0x68, 0x01, 0x00, 0x40, 0x19, + 0x01, 0x00, 0x80, 0x32, 0x02, 0x15, 0x16, 0x05, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x15, 0x16, + 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x11, 0x06, 0x00, 0x60, + 0x01, 0x20, 0x01, 0x00, 0xC0, 0x7B, 0x00, 0x00, 0x80, 0xF7, 0x00, 0x15, 0x16, 0x05, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x2A, 0x2C, 0x0A, 0x00, + 0x26, 0x24, 0x11, 0x07, 0x00, 0x40, 0x01, 0xF0, 0x00, 0x00, 0xC0, 0x5D, 0x00, 0x00, 0x80, 0xBB, + 0x00, 0x15, 0x16, 0x05, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, + 0x06, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x11, 0x08, 0x00, 0x80, 0x07, 0x38, 0x04, 0x00, + 0x40, 0xE3, 0x09, 0x00, 0x80, 0xC6, 0x13, 0x15, 0x16, 0x05, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x06, 0x24, 0x0D, 0x01, + 0x01, 0x04, 0x09, 0x04, 0x02, 0x01, 0x01, 0x0E, 0x02, 0x00, 0x00, 0x07, 0x05, 0x82, 0x05, 0x80, + 0x00, 0x01, 0x09, 0x04, 0x02, 0x02, 0x01, 0x0E, 0x02, 0x00, 0x00, 0x07, 0x05, 0x82, 0x05, 0x00, + 0x01, 0x01, 0x09, 0x04, 0x02, 0x03, 0x01, 0x0E, 0x02, 0x00, 0x00, 0x07, 0x05, 0x82, 0x05, 0x20, + 0x03, 0x01, 0x09, 0x04, 0x02, 0x04, 0x01, 0x0E, 0x02, 0x00, 0x00, 0x07, 0x05, 0x82, 0x05, 0x20, + 0x0B, 0x01, 0x09, 0x04, 0x02, 0x05, 0x01, 0x0E, 0x02, 0x00, 0x00, 0x07, 0x05, 0x82, 0x05, 0x20, + 0x13, 0x01, 0x09, 0x04, 0x02, 0x06, 0x01, 0x0E, 0x02, 0x00, 0x00, 0x07, 0x05, 0x82, 0x05, 0x00, + 0x14, 0x01, 0x08, 0x0B, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x09, 0x04, 0x03, 0x00, 0x00, 0x01, + 0x01, 0x00, 0x00, 0x09, 0x24, 0x01, 0x00, 0x01, 0x29, 0x00, 0x01, 0x04, 0x0C, 0x24, 0x02, 0x01, + 0x01, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x24, 0x06, 0x02, 0x01, 0x02, 0x01, 0x00, + 0x02, 0x00, 0x00, 0x09, 0x24, 0x03, 0x03, 0x01, 0x01, 0x00, 0x02, 0x00, 0x09, 0x04, 0x04, 0x00, + 0x00, 0x01, 0x02, 0x00, 0x00, 0x09, 0x04, 0x04, 0x01, 0x01, 0x01, 0x02, 0x00, 0x00, 0x07, 0x24, + 0x01, 0x03, 0x01, 0x01, 0x00, 0x1D, 0x24, 0x02, 0x01, 0x01, 0x02, 0x10, 0x07, 0x40, 0x1F, 0x00, + 0x11, 0x2B, 0x00, 0x80, 0x3E, 0x00, 0x22, 0x56, 0x00, 0xC0, 0x5D, 0x00, 0x44, 0xAC, 0x00, 0x80, + 0xBB, 0x00, 0x09, 0x05, 0x84, 0x05, 0x92, 0x01, 0x04, 0x00, 0x00, 0x07, 0x25, 0x01, 0x01, 0x00, + 0x92, 0x01 +}; +} diff --git a/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/elp_h265.hpp b/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/elp_h265.hpp new file mode 100644 index 00000000..5976ce37 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/elp_h265.hpp @@ -0,0 +1,2434 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include + +/* + ======================== USB Device ======================== + + +++++++++++++++++ Device Information ++++++++++++++++++ +Device Description : USB Composite Device +Device Path : \\?\USB#VID_32E4&PID_9415#10ac120458586223#{a5dcbf10-6530-11d2-901f-00c04fb951ed} (GUID_DEVINTERFACE_USB_DEVICE) +Kernel Name : \Device\USBPDO-36 +Device ID : USB\VID_32E4&PID_9415\10AC120458586223 +Hardware IDs : USB\VID_32E4&PID_9415&REV_0419 USB\VID_32E4&PID_9415 +Driver KeyName : {36fc9e60-c465-11cf-8056-444553540000}\0100 (GUID_DEVCLASS_USB) +Driver : \SystemRoot\System32\drivers\usbccgp.sys (Version: 10.0.19041.4355 Date: 2024-05-01) +Driver Inf : C:\Windows\inf\usb.inf +Legacy BusType : PNPBus +Class : USB +Class GUID : {36fc9e60-c465-11cf-8056-444553540000} (GUID_DEVCLASS_USB) +Service : usbccgp +Enumerator : USB +Location Info : Port_#0003.Hub_#0019 +Location IDs : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(2)#USB(1)#USB(3), ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(2)#USB(1)#USB(3) +Container ID : {a14fe21c-3879-5b34-a760-46be5e7e733a} +Manufacturer Info : (Standard USB Host Controller) +Capabilities : 0x94 (Removable, UniqueID, SurpriseRemovalOK) +Status : 0x0180600A (DN_DRIVER_LOADED, DN_STARTED, DN_DISABLEABLE, DN_REMOVABLE, DN_NT_ENUMERATOR, DN_NT_DRIVER) +Problem Code : 0 +Address : 3 +HcDisableSelectiveSuspend: 0 +EnableSelectiveSuspend : 0 +SelectiveSuspendEnabled : 0 +EnhancedPowerMgmtEnabled : 0 +IdleInWorkingState : 0 +WakeFromSleepState : 0 +Power State : D0 (supported: D0, D3, wake from D0) + Child Device 1 : HDMI USB Camera (USB Video Device) + Device Path : \\?\USB#VID_32E4&PID_9415&MI_00#b&288ef1eb&0&0000#{e5323777-f976-4f5b-9b55-b94699c46e44}\global (STATIC_KSCATEGORY_VIDEO_CAMERA) + Kernel Name : \Device\000002dc + Device ID : USB\VID_32E4&PID_9415&MI_00\B&288EF1EB&0&0000 + Class : Camera + Driver KeyName : {ca3e7ab9-b4c3-4ae6-8251-579ef933890f}\0010 (GUID_DEVCLASS_CAMERA) + Service : usbvideo + Location : 0005.0000.0004.001.003.002.001.003.000 + LocationPaths : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(2)#USB(1)#USB(3)#USBMI(0) PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(2)#USB(1)#USB(3)#USB(3) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(2)#USB(1)#USB(3)#USBMI(0) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(2)#USB(1)#USB(3)#USB(3) + + +++++++++++++++++ Registry USB Flags +++++++++++++++++ +HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags\32E494150419 + osvc : REG_BINARY 00 00 + + ---------------- Connection Information --------------- +Connection Index : 0x03 (Port 3) +Connection Status : 0x01 (DeviceConnected) +Current Config Value : 0x01 (Configuration 1) +Device Address : 0x11 (17) +Is Hub : 0x00 (no) +Device Bus Speed : 0x02 (High-Speed) +Number Of Open Pipes : 0x00 (0 pipes to data endpoints) +Data (HexDump) : 03 00 00 00 12 01 00 02 EF 02 01 40 E4 32 15 94 ...........@.2.. + 19 04 01 02 03 01 01 02 00 11 00 00 00 00 00 01 ................ + 00 00 00 ... + + --------------- Connection Information V2 ------------- +Connection Index : 0x03 (3) +Length : 0x10 (16 bytes) +SupportedUsbProtocols : 0x03 + Usb110 : 1 (yes, port supports USB 1.1) + Usb200 : 1 (yes, port supports USB 2.0) + Usb300 : 0 (no, port not supports USB 3.0) + ReservedMBZ : 0x00 +Flags : 0x00 + DevIsOpAtSsOrHigher : 0 (Device is not operating at SuperSpeed or higher) + DevIsSsCapOrHigher : 0 (Device is not SuperSpeed capable or higher) + DevIsOpAtSsPlusOrHigher : 0 (Device is not operating at SuperSpeedPlus or higher) + DevIsSsPlusCapOrHigher : 0 (Device is not SuperSpeedPlus capable or higher) + ReservedMBZ : 0x00 +Data (HexDump) : 03 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 ................ + + ---------------------- Device Descriptor ---------------------- +bLength : 0x12 (18 bytes) +bDescriptorType : 0x01 (Device Descriptor) +bcdUSB : 0x200 (USB Version 2.00) +bDeviceClass : 0xEF (Miscellaneous) +bDeviceSubClass : 0x02 +bDeviceProtocol : 0x01 (IAD - Interface Association Descriptor) +bMaxPacketSize0 : 0x40 (64 bytes) +idVendor : 0x32E4 (Ailipu Technology Co., Ltd.) +idProduct : 0x9415 +bcdDevice : 0x0419 +iManufacturer : 0x01 (String Descriptor 1) + *!*ERROR String descriptor not found +iProduct : 0x02 (String Descriptor 2) + *!*ERROR String descriptor not found +iSerialNumber : 0x03 (String Descriptor 3) + *!*ERROR String descriptor not found +bNumConfigurations : 0x01 (1 Configuration) +Data (HexDump) : 12 01 00 02 EF 02 01 40 E4 32 15 94 19 04 01 02 .......@.2...... + 03 01 .. + + ------------------ Configuration Descriptor ------------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x02 (Configuration Descriptor) +wTotalLength : 0x05B0 (1456 bytes) +bNumInterfaces : 0x02 (2 Interfaces) +bConfigurationValue : 0x01 (Configuration 1) +iConfiguration : 0x04 (String Descriptor 4) + *!*ERROR String descriptor not found +bmAttributes : 0x80 + D7: Reserved, set 1 : 0x01 + D6: Self Powered : 0x00 (no) + D5: Remote Wakeup : 0x00 (no) + D4..0: Reserved, set 0 : 0x00 +MaxPower : 0xFA (500 mA) +Data (HexDump) : 09 02 B0 05 02 01 04 80 FA 08 0B 00 02 0E 03 00 ................ + 05 09 04 00 00 00 0E 01 00 08 0D 24 01 10 01 68 ...........$...h + 00 00 6C DC 02 01 01 12 24 02 01 01 02 00 00 00 ..l.....$....... + 00 00 00 00 00 03 0E 22 00 0C 24 05 02 01 00 40 ......."..$....@ + 02 7F 17 00 00 1A 24 06 03 18 20 2E 30 11 63 2E ......$... .0.c. + 4A BA 2C 68 90 EB 33 40 16 02 01 02 01 03 06 1A J.,h..3@........ + 24 06 04 A4 FB CB 33 26 FD E4 4C 90 76 A1 93 1F $.....3&..L.v... + E7 4C 5E 02 01 02 01 03 07 09 24 03 04 01 01 00 .L^.......$..... + 03 00 09 04 01 00 00 0E 02 00 09 11 24 01 04 E5 ............$... + 04 85 00 04 00 00 00 01 00 00 00 00 0B 24 06 01 .............$.. + 08 00 08 00 00 00 00 26 24 07 01 00 80 02 68 01 .......&$.....h. + 00 D0 78 02 00 A0 F1 04 00 46 05 00 15 16 05 00 ..x......F...... + 03 15 16 05 00 20 A1 07 00 2A 2C 0A 00 26 24 07 ..... ...*,..&$. + 02 00 80 02 E0 01 00 C0 4B 03 00 80 97 06 00 08 ........K....... + 07 00 15 16 05 00 03 15 16 05 00 20 A1 07 00 2A ........... ...* + 2C 0A 00 26 24 07 03 00 C0 03 1C 02 00 D4 8F 05 ,..&$........... + 00 A8 1F 0B 80 DD 0B 00 15 16 05 00 03 15 16 05 ................ + 00 20 A1 07 00 2A 2C 0A 00 26 24 07 04 00 00 04 . ...*,..&$..... + 40 02 00 00 54 06 00 00 A8 0C 00 80 0D 00 15 16 @...T........... + 05 00 03 15 16 05 00 20 A1 07 00 2A 2C 0A 00 26 ....... ...*,..& + 24 07 05 00 00 05 D0 02 00 40 E3 09 00 80 C6 13 $........@...... + 00 18 15 00 15 16 05 00 03 15 16 05 00 20 A1 07 ............. .. + 00 2A 2C 0A 00 26 24 07 06 00 80 07 38 04 00 50 .*,..&$.....8..P + 3F 16 00 A0 7E 2C 00 76 2F 00 15 16 05 00 03 15 ?...~,.v/....... + 16 05 00 20 A1 07 00 2A 2C 0A 00 26 24 07 07 00 ... ...*,..&$... + 00 0A A0 05 00 00 8D 27 00 00 1A 4F 00 60 54 00 .......'...O.`T. + 15 16 05 00 03 15 16 05 00 20 A1 07 00 2A 2C 0A ......... ...*,. + 00 26 24 07 08 00 00 0F 70 08 00 40 FD 58 00 80 .&$.....p..@.X.. + FA B1 00 D8 BD 00 15 16 05 00 03 15 16 05 00 20 ............... + A1 07 00 2A 2C 0A 00 1C 24 10 02 08 48 32 36 34 ...*,...$...H264 + 00 00 10 00 80 00 00 AA 00 38 9B 71 10 08 00 00 .........8.q.... + 00 00 01 26 24 11 01 00 80 02 68 01 00 D0 78 02 ...&$.....h...x. + 00 A0 F1 04 15 16 05 00 03 2C 0A 00 00 15 16 05 .........,...... + 00 20 A1 07 00 2A 2C 0A 00 26 24 11 02 00 80 02 . ...*,..&$..... + E0 01 00 C0 4B 03 00 80 97 06 15 16 05 00 03 2C ....K.........., + 0A 00 00 15 16 05 00 20 A1 07 00 2A 2C 0A 00 26 ....... ...*,..& + 24 11 03 00 C0 03 1C 02 00 D4 8F 05 00 A8 1F 0B $............... + 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 07 .....,....... .. + 00 2A 2C 0A 00 26 24 11 04 00 00 04 40 02 00 00 .*,..&$.....@... + 54 06 00 00 A8 0C 15 16 05 00 03 2C 0A 00 00 15 T..........,.... + 16 05 00 20 A1 07 00 2A 2C 0A 00 26 24 11 05 00 ... ...*,..&$... + 00 05 D0 02 00 40 E3 09 00 80 C6 13 15 16 05 00 .....@.......... + 03 2C 0A 00 00 15 16 05 00 20 A1 07 00 2A 2C 0A .,....... ...*,. + 00 26 24 11 06 00 80 07 38 04 00 50 3F 16 00 A0 .&$.....8..P?... + 7E 2C 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 ~,.....,....... + A1 07 00 2A 2C 0A 00 26 24 11 07 00 00 0A A0 05 ...*,..&$....... + 00 00 8D 27 00 00 1A 4F 15 16 05 00 03 2C 0A 00 ...'...O.....,.. + 00 15 16 05 00 20 A1 07 00 2A 2C 0A 00 26 24 11 ..... ...*,..&$. + 08 00 00 0F 70 08 00 40 FD 58 00 80 FA B1 15 16 ....p..@.X...... + 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 07 00 2A ...,....... ...* + 2C 0A 00 1C 24 10 03 08 48 32 36 35 00 00 10 00 ,...$...H265.... + 80 00 00 AA 00 38 9B 71 10 08 00 00 00 00 01 26 .....8.q.......& + 24 11 01 00 80 02 68 01 00 D0 78 02 00 A0 F1 04 $.....h...x..... + 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 07 .....,....... .. + 00 2A 2C 0A 00 26 24 11 02 00 80 02 E0 01 00 C0 .*,..&$......... + 4B 03 00 80 97 06 15 16 05 00 03 2C 0A 00 00 15 K..........,.... + 16 05 00 20 A1 07 00 2A 2C 0A 00 26 24 11 03 00 ... ...*,..&$... + C0 03 1C 02 00 D4 8F 05 00 A8 1F 0B 15 16 05 00 ................ + 03 2C 0A 00 00 15 16 05 00 20 A1 07 00 2A 2C 0A .,....... ...*,. + 00 26 24 11 04 00 00 04 40 02 00 00 54 06 00 00 .&$.....@...T... + A8 0C 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 .......,....... + A1 07 00 2A 2C 0A 00 26 24 11 05 00 00 05 D0 02 ...*,..&$....... + 00 40 E3 09 00 80 C6 13 15 16 05 00 03 2C 0A 00 .@...........,.. + 00 15 16 05 00 20 A1 07 00 2A 2C 0A 00 26 24 11 ..... ...*,..&$. + 06 00 80 07 38 04 00 50 3F 16 00 A0 7E 2C 15 16 ....8..P?...~,.. + 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 07 00 2A ...,....... ...* + 2C 0A 00 26 24 11 07 00 00 0A A0 05 00 00 8D 27 ,..&$..........' + 00 00 1A 4F 15 16 05 00 03 2C 0A 00 00 15 16 05 ...O.....,...... + 00 20 A1 07 00 2A 2C 0A 00 26 24 11 08 00 00 0F . ...*,..&$..... + 70 08 00 40 FD 58 00 80 FA B1 15 16 05 00 03 2C p..@.X........., + 0A 00 00 15 16 05 00 20 A1 07 00 2A 2C 0A 00 1B ....... ...*,... + 24 04 04 06 59 55 59 32 00 00 10 00 80 00 00 AA $...YUY2........ + 00 38 9B 71 10 06 00 00 00 00 26 24 05 01 00 80 .8.q......&$.... + 02 68 01 00 C0 4B 03 00 80 97 06 00 08 07 00 15 .h...K.......... + 16 05 00 03 15 16 05 00 20 A1 07 00 2A 2C 0A 00 ........ ...*,.. + 26 24 05 02 00 80 02 E0 01 00 00 65 04 00 00 CA &$.........e.... + 08 00 60 09 00 15 16 05 00 03 15 16 05 00 20 A1 ..`........... . + 07 00 2A 2C 0A 00 26 24 05 03 00 C0 03 1C 02 00 ..*,..&$........ + D0 78 02 00 70 6A 07 00 D2 0F 00 2A 2C 0A 00 03 .x..pj.....*,... + 2A 2C 0A 00 40 42 0F 00 80 84 1E 00 26 24 05 04 *,..@B......&$.. + 00 00 04 40 02 00 00 D0 02 00 00 70 08 00 00 12 ...@.......p.... + 00 2A 2C 0A 00 03 2A 2C 0A 00 40 42 0F 00 80 84 .*,...*,..@B.... + 1E 00 26 24 05 05 00 00 05 D0 02 00 00 C2 01 00 ..&$............ + 00 CA 08 00 20 1C 00 40 42 0F 00 03 40 42 0F 00 .... ..@B...@B.. + 80 84 1E 00 40 4B 4C 00 22 24 05 06 00 80 07 38 ....@KL."$.....8 + 04 00 80 F4 03 00 40 E3 09 00 48 3F 00 80 84 1E ......@...H?.... + 00 02 80 84 1E 00 40 4B 4C 00 06 24 0D 01 01 04 ......@KL..$.... + 09 04 01 01 01 0E 02 00 0A 07 05 85 05 00 02 01 ................ + 09 04 01 02 01 0E 02 00 0B 07 05 85 05 00 04 01 ................ + 09 04 01 03 01 0E 02 00 0C 07 05 85 05 00 0C 01 ................ + 09 04 01 04 01 0E 02 00 0D 07 05 85 05 00 14 01 ................ + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x00 +bInterfaceCount : 0x02 +bFunctionClass : 0x0E (Video) +bFunctionSubClass : 0x03 (Video Interface Collection) +bFunctionProtocol : 0x00 (PC_PROTOCOL_UNDEFINED protocol) +iFunction : 0x05 (String Descriptor 5) + *!*ERROR String descriptor not found +Data (HexDump) : 08 0B 00 02 0E 03 00 05 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x00 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x01 (Video Control) +bInterfaceProtocol : 0x00 +iInterface : 0x08 (String Descriptor 8) + *!*ERROR String descriptor not found +Data (HexDump) : 09 04 00 00 00 0E 01 00 08 ......... + + ------- Video Control Interface Header Descriptor ----- +bLength : 0x0D (13 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x01 (Video Control Header) +bcdUVC : 0x0110 (UVC Version 1.10) +wTotalLength : 0x0068 (104 bytes) +dwClockFreq : 0x02DC6C00 (48 MHz) +bInCollection : 0x01 (1 VideoStreaming interface) +baInterfaceNr[1] : 0x01 +Data (HexDump) : 0D 24 01 10 01 68 00 00 6C DC 02 01 01 .$...h..l.... + + -------- Video Control Input Terminal Descriptor ------ +bLength : 0x12 (18 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (ITT_CAMERA) +bAssocTerminal : 0x00 (Not associated with an Output Terminal) +iTerminal : 0x00 +Camera Input Terminal Data: +wObjectiveFocalLengthMin : 0x0000 +wObjectiveFocalLengthMax : 0x0000 +wOcularFocalLength : 0x0000 +bControlSize : 0x03 +bmControls : 0x0E, 0x22, 0x00 + D0 : 0 no - Scanning Mode + D1 : 1 yes - Auto-Exposure Mode + D2 : 1 yes - Auto-Exposure Priority + D3 : 1 yes - Exposure Time (Absolute) + D4 : 0 no - Exposure Time (Relative) + D5 : 0 no - Focus (Absolute) + D6 : 0 no - Focus (Relative) + D7 : 0 no - Iris (Absolute) + D8 : 0 no - Iris (Relative) + D9 : 1 yes - Zoom (Absolute) + D10 : 0 no - Zoom (Relative) + D11 : 0 no - Pan (Absolute) + D12 : 0 no - Pan (Relative) + D13 : 1 yes - Roll (Absolute) + D14 : 0 no - Roll (Relative) + D15 : 0 no - Tilt (Absolute) + D16 : 0 no - Tilt (Relative) + D17 : 0 no - Focus Auto + D18 : 0 no - Reserved + D19 : 0 no - Reserved + D20 : 0 no - Reserved + D21 : 0 no - Reserved + D22 : 0 no - Reserved + D23 : 0 no - Reserved +Data (HexDump) : 12 24 02 01 01 02 00 00 00 00 00 00 00 00 03 0E .$.............. + 22 00 ". + + -------- Video Control Processing Unit Descriptor ----- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x05 (Processing Unit) +bUnitID : 0x02 +bSourceID : 0x01 +wMaxMultiplier : 0x4000 (163.84x Zoom) +bControlSize : 0x02 +bmControls : 0x7F, 0x17 + D0 : 1 yes - Brightness + D1 : 1 yes - Contrast + D2 : 1 yes - Hue + D3 : 1 yes - Saturation + D4 : 1 yes - Sharpness + D5 : 1 yes - Gamma + D6 : 1 yes - White Balance Temperature + D7 : 0 no - White Balance Component + D8 : 1 yes - Backlight Compensation + D9 : 1 yes - Gain + D10 : 1 yes - Power Line Frequency + D11 : 0 no - Hue, Auto + D12 : 1 yes - White Balance Temperature, Auto + D13 : 0 no - White Balance Component, Auto + D14 : 0 no - Digital Multiplier + D15 : 0 no - Digital Multiplier Limit +iProcessing : 0x00 +bmVideoStandards : 0x00 + D0 : 0 no - None + D1 : 0 no - NTSC - 525/60 + D2 : 0 no - PAL - 625/50 + D3 : 0 no - SECAM - 625/50 + D4 : 0 no - NTSC - 625/50 + D5 : 0 no - PAL - 525/60 + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Data (HexDump) : 0C 24 05 02 01 00 40 02 7F 17 00 00 .$....@..... + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1A (26 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x03 +guidExtensionCode : {302E2018-6311-4A2E-BA2C-6890EB334016} +bNumControls : 0x02 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x02 +bControlSize : 0x01 +bmControls : 0x03 + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 0 no - Vendor-Specific (Optional) + D3 : 0 no - Vendor-Specific (Optional) + D4 : 0 no - Vendor-Specific (Optional) + D5 : 0 no - Vendor-Specific (Optional) + D6 : 0 no - Vendor-Specific (Optional) + D7 : 0 no - Vendor-Specific (Optional) +iExtension : 0x06 + *!*ERROR String descriptor not found +Data (HexDump) : 1A 24 06 03 18 20 2E 30 11 63 2E 4A BA 2C 68 90 .$... .0.c.J.,h. + EB 33 40 16 02 01 02 01 03 06 .3@....... + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1A (26 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x04 +guidExtensionCode : {33CBFBA4-FD26-4CE4-9076-A1931FE74C5E} +bNumControls : 0x02 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x02 +bControlSize : 0x01 +bmControls : 0x03 + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 0 no - Vendor-Specific (Optional) + D3 : 0 no - Vendor-Specific (Optional) + D4 : 0 no - Vendor-Specific (Optional) + D5 : 0 no - Vendor-Specific (Optional) + D6 : 0 no - Vendor-Specific (Optional) + D7 : 0 no - Vendor-Specific (Optional) +iExtension : 0x07 + *!*ERROR String descriptor not found +Data (HexDump) : 1A 24 06 04 A4 FB CB 33 26 FD E4 4C 90 76 A1 93 .$.....3&..L.v.. + 1F E7 4C 5E 02 01 02 01 03 07 ..L^...... + + ------- Video Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x04 +wTerminalType : 0x0101 (TT_STREAMING) +bAssocTerminal : 0x00 (Not associated with an Input Terminal) +bSourceID : 0x03 +iTerminal : 0x00 +Data (HexDump) : 09 24 03 04 01 01 00 03 00 .$....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x09 (String Descriptor 9) + *!*ERROR String descriptor not found +Data (HexDump) : 09 04 01 00 00 0E 02 00 09 ......... + + ---- VC-Specific VS Video Input Header Descriptor ----- +bLength : 0x11 (17 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x01 (Input Header) +bNumFormats : 0x04 +wTotalLength : 0x04E5 (1253 bytes) +bEndpointAddress : 0x85 (Direction=IN EndpointID=5) +bmInfo : 0x00 (Dynamic Format Change not supported) +bTerminalLink : 0x04 +bStillCaptureMethod : 0x00 (No Still Capture) +nbTriggerSupport : 0x00 (Hardware Triggering not supported) +bTriggerUsage : 0x00 (Host will initiate still image capture) +nbControlSize : 0x01 +Video Payload Format 1 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Video Payload Format 2 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Video Payload Format 3 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Video Payload Format 4 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Data (HexDump) : 11 24 01 04 E5 04 85 00 04 00 00 00 01 00 00 00 .$.............. + 00 . + + ----- Video Streaming MJPEG Format Type Descriptor ---- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x06 (Format MJPEG) +bFormatIndex : 0x01 (1) +bNumFrameDescriptors : 0x08 (8) +bmFlags : 0x00 (Sample size is not fixed) +bDefaultFrameIndex : 0x08 (8) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +*!*ERROR: no Color Matching Descriptor for this format +Data (HexDump) : 0B 24 06 01 08 00 08 00 00 00 00 .$......... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x0168 (360) +dwMinBitRate : 0x0278D000 (41472000 bps -> 5.184 MB/s) +dwMaxBitRate : 0x04F1A000 (82944000 bps -> 10.368 MB/s) +dwMaxVideoFrameBufferSize: 0x00054600 (345600 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 07 01 00 80 02 68 01 00 D0 78 02 00 A0 F1 &$.....h...x.... + 04 00 46 05 00 15 16 05 00 03 15 16 05 00 20 A1 ..F........... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x034BC000 (55296000 bps -> 6.912 MB/s) +dwMaxBitRate : 0x06978000 (110592000 bps -> 13.824 MB/s) +dwMaxVideoFrameBufferSize: 0x00070800 (460800 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 07 02 00 80 02 E0 01 00 C0 4B 03 00 80 97 &$.........K.... + 06 00 08 07 00 15 16 05 00 03 15 16 05 00 20 A1 .............. . + 07 00 2A 2C 0A 00 ..*,.. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x00 +wWidth : 0x03C0 (960) +wHeight : 0x021C (540) +dwMinBitRate : 0x058FD400 (93312000 bps -> 11.664 MB/s) +dwMaxBitRate : 0x0B1FA800 (186624000 bps -> 23.328 MB/s) +dwMaxVideoFrameBufferSize: 0x000BDD80 (777600 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 07 03 00 C0 03 1C 02 00 D4 8F 05 00 A8 1F &$.............. + 0B 80 DD 0B 00 15 16 05 00 03 15 16 05 00 20 A1 .............. . + 07 00 2A 2C 0A 00 ..*,.. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x00 +wWidth : 0x0400 (1024) +wHeight : 0x0240 (576) +dwMinBitRate : 0x06540000 (106168320 bps -> 13.271 MB/s) +dwMaxBitRate : 0x0CA80000 (212336640 bps -> 26.542 MB/s) +dwMaxVideoFrameBufferSize: 0x000D8000 (884736 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 07 04 00 00 04 40 02 00 00 54 06 00 00 A8 &$.....@...T.... + 0C 00 80 0D 00 15 16 05 00 03 15 16 05 00 20 A1 .............. . + 07 00 2A 2C 0A 00 ..*,.. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x05 +bmCapabilities : 0x00 +wWidth : 0x0500 (1280) +wHeight : 0x02D0 (720) +dwMinBitRate : 0x09E34000 (165888000 bps -> 20.736 MB/s) +dwMaxBitRate : 0x13C68000 (331776000 bps -> 41.472 MB/s) +dwMaxVideoFrameBufferSize: 0x00151800 (1382400 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 07 05 00 00 05 D0 02 00 40 E3 09 00 80 C6 &$........@..... + 13 00 18 15 00 15 16 05 00 03 15 16 05 00 20 A1 .............. . + 07 00 2A 2C 0A 00 ..*,.. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x06 +bmCapabilities : 0x00 +wWidth : 0x0780 (1920) +wHeight : 0x0438 (1080) +dwMinBitRate : 0x163F5000 (373248000 bps -> 46.656 MB/s) +dwMaxBitRate : 0x2C7EA000 (746496000 bps -> 93.312 MB/s) +dwMaxVideoFrameBufferSize: 0x002F7600 (3110400 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 07 06 00 80 07 38 04 00 50 3F 16 00 A0 7E &$.....8..P?...~ + 2C 00 76 2F 00 15 16 05 00 03 15 16 05 00 20 A1 ,.v/.......... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x07 +bmCapabilities : 0x00 +wWidth : 0x0A00 (2560) +wHeight : 0x05A0 (1440) +dwMinBitRate : 0x278D0000 (663552000 bps -> 82.944 MB/s) +dwMaxBitRate : 0x4F1A0000 (1327104000 bps -> 165.888 MB/s) +dwMaxVideoFrameBufferSize: 0x00546000 (5529600 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 07 07 00 00 0A A0 05 00 00 8D 27 00 00 1A &$..........'... + 4F 00 60 54 00 15 16 05 00 03 15 16 05 00 20 A1 O.`T.......... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +---> This is the Default (optimum) Frame index +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x08 +bmCapabilities : 0x00 +wWidth : 0x0F00 (3840) +wHeight : 0x0870 (2160) +dwMinBitRate : 0x58FD4000 (1492992000 bps -> 186.624 MB/s) +dwMaxBitRate : 0xB1FA8000 (2985984000 bps -> 373.248 MB/s) +dwMaxVideoFrameBufferSize: 0x00BDD800 (12441600 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 07 08 00 00 0F 70 08 00 40 FD 58 00 80 FA &$.....p..@.X... + B1 00 D8 BD 00 15 16 05 00 03 15 16 05 00 20 A1 .............. . + 07 00 2A 2C 0A 00 ..*,.. + + ---- VS Frame Based Payload Format Type Descriptor ---- +bLength : 0x1C (28 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x10 (Frame Based Format Type) +bFormatIndex : 0x02 (2) +bNumFrameDescriptors : 0x08 (8) +guidFormat : {34363248-0000-0010-8000-00AA00389B71} (H264) +bBitsPerPixel : 0x10 (16 bits) +bDefaultFrameIndex : 0x08 (8) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +bVariableSize : 0x01 (Variable Size) +*!*ERROR: Found 16 frame descriptors (should be 8) +*!*ERROR: no Color Matching Descriptor for this format +Data (HexDump) : 1C 24 10 02 08 48 32 36 34 00 00 10 00 80 00 00 .$...H264....... + AA 00 38 9B 71 10 08 00 00 00 00 01 ..8.q....... + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x0168 (360) +dwMinBitRate : 0x0278D000 (41472000 bps -> 5.184 MB/s) +dwMaxBitRate : 0x04F1A000 (82944000 bps -> 10.368 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 01 00 80 02 68 01 00 D0 78 02 00 A0 F1 &$.....h...x.... + 04 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ......,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x034BC000 (55296000 bps -> 6.912 MB/s) +dwMaxBitRate : 0x06978000 (110592000 bps -> 13.824 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 02 00 80 02 E0 01 00 C0 4B 03 00 80 97 &$.........K.... + 06 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ......,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x00 +wWidth : 0x03C0 (960) +wHeight : 0x021C (540) +dwMinBitRate : 0x058FD400 (93312000 bps -> 11.664 MB/s) +dwMaxBitRate : 0x0B1FA800 (186624000 bps -> 23.328 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 03 00 C0 03 1C 02 00 D4 8F 05 00 A8 1F &$.............. + 0B 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ......,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x00 +wWidth : 0x0400 (1024) +wHeight : 0x0240 (576) +dwMinBitRate : 0x06540000 (106168320 bps -> 13.271 MB/s) +dwMaxBitRate : 0x0CA80000 (212336640 bps -> 26.542 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 04 00 00 04 40 02 00 00 54 06 00 00 A8 &$.....@...T.... + 0C 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ......,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x05 +bmCapabilities : 0x00 +wWidth : 0x0500 (1280) +wHeight : 0x02D0 (720) +dwMinBitRate : 0x09E34000 (165888000 bps -> 20.736 MB/s) +dwMaxBitRate : 0x13C68000 (331776000 bps -> 41.472 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 05 00 00 05 D0 02 00 40 E3 09 00 80 C6 &$........@..... + 13 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ......,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x06 +bmCapabilities : 0x00 +wWidth : 0x0780 (1920) +wHeight : 0x0438 (1080) +dwMinBitRate : 0x163F5000 (373248000 bps -> 46.656 MB/s) +dwMaxBitRate : 0x2C7EA000 (746496000 bps -> 93.312 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 06 00 80 07 38 04 00 50 3F 16 00 A0 7E &$.....8..P?...~ + 2C 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ,.....,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x07 +bmCapabilities : 0x00 +wWidth : 0x0A00 (2560) +wHeight : 0x05A0 (1440) +dwMinBitRate : 0x278D0000 (663552000 bps -> 82.944 MB/s) +dwMaxBitRate : 0x4F1A0000 (1327104000 bps -> 165.888 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 07 00 00 0A A0 05 00 00 8D 27 00 00 1A &$..........'... + 4F 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 O.....,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x08 +bmCapabilities : 0x00 +wWidth : 0x0F00 (3840) +wHeight : 0x0870 (2160) +dwMinBitRate : 0x58FD4000 (1492992000 bps -> 186.624 MB/s) +dwMaxBitRate : 0xB1FA8000 (2985984000 bps -> 373.248 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 08 00 00 0F 70 08 00 40 FD 58 00 80 FA &$.....p..@.X... + B1 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ......,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ---- VS Frame Based Payload Format Type Descriptor ---- +bLength : 0x1C (28 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x10 (Frame Based Format Type) +bFormatIndex : 0x03 (3) +bNumFrameDescriptors : 0x08 (8) +guidFormat : {35363248-0000-0010-8000-00AA00389B71} (H265) +bBitsPerPixel : 0x10 (16 bits) +bDefaultFrameIndex : 0x08 (8) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +bVariableSize : 0x01 (Variable Size) +*!*ERROR: no Color Matching Descriptor for this format +Data (HexDump) : 1C 24 10 03 08 48 32 36 35 00 00 10 00 80 00 00 .$...H265....... + AA 00 38 9B 71 10 08 00 00 00 00 01 ..8.q....... + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x0168 (360) +dwMinBitRate : 0x0278D000 (41472000 bps -> 5.184 MB/s) +dwMaxBitRate : 0x04F1A000 (82944000 bps -> 10.368 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 01 00 80 02 68 01 00 D0 78 02 00 A0 F1 &$.....h...x.... + 04 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ......,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x034BC000 (55296000 bps -> 6.912 MB/s) +dwMaxBitRate : 0x06978000 (110592000 bps -> 13.824 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 02 00 80 02 E0 01 00 C0 4B 03 00 80 97 &$.........K.... + 06 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ......,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x00 +wWidth : 0x03C0 (960) +wHeight : 0x021C (540) +dwMinBitRate : 0x058FD400 (93312000 bps -> 11.664 MB/s) +dwMaxBitRate : 0x0B1FA800 (186624000 bps -> 23.328 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 03 00 C0 03 1C 02 00 D4 8F 05 00 A8 1F &$.............. + 0B 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ......,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x00 +wWidth : 0x0400 (1024) +wHeight : 0x0240 (576) +dwMinBitRate : 0x06540000 (106168320 bps -> 13.271 MB/s) +dwMaxBitRate : 0x0CA80000 (212336640 bps -> 26.542 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 04 00 00 04 40 02 00 00 54 06 00 00 A8 &$.....@...T.... + 0C 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ......,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x05 +bmCapabilities : 0x00 +wWidth : 0x0500 (1280) +wHeight : 0x02D0 (720) +dwMinBitRate : 0x09E34000 (165888000 bps -> 20.736 MB/s) +dwMaxBitRate : 0x13C68000 (331776000 bps -> 41.472 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 05 00 00 05 D0 02 00 40 E3 09 00 80 C6 &$........@..... + 13 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ......,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x06 +bmCapabilities : 0x00 +wWidth : 0x0780 (1920) +wHeight : 0x0438 (1080) +dwMinBitRate : 0x163F5000 (373248000 bps -> 46.656 MB/s) +dwMaxBitRate : 0x2C7EA000 (746496000 bps -> 93.312 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 06 00 80 07 38 04 00 50 3F 16 00 A0 7E &$.....8..P?...~ + 2C 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ,.....,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x07 +bmCapabilities : 0x00 +wWidth : 0x0A00 (2560) +wHeight : 0x05A0 (1440) +dwMinBitRate : 0x278D0000 (663552000 bps -> 82.944 MB/s) +dwMaxBitRate : 0x4F1A0000 (1327104000 bps -> 165.888 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 07 00 00 0A A0 05 00 00 8D 27 00 00 1A &$..........'... + 4F 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 O.....,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x08 +bmCapabilities : 0x00 +wWidth : 0x0F00 (3840) +wHeight : 0x0870 (2160) +dwMinBitRate : 0x58FD4000 (1492992000 bps -> 186.624 MB/s) +dwMaxBitRate : 0xB1FA8000 (2985984000 bps -> 373.248 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 08 00 00 0F 70 08 00 40 FD 58 00 80 FA &$.....p..@.X... + B1 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ......,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ------- VS Uncompressed Format Type Descriptor -------- +bLength : 0x1B (27 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x04 (Uncompressed Format Type) +bFormatIndex : 0x04 (4) +bNumFrameDescriptors : 0x06 (6) +guidFormat : {32595559-0000-0010-8000-00AA00389B71} (YUY2) +bBitsPerPixel : 0x10 (16 bits) +bDefaultFrameIndex : 0x06 (6) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +Data (HexDump) : 1B 24 04 04 06 59 55 59 32 00 00 10 00 80 00 00 .$...YUY2....... + AA 00 38 9B 71 10 06 00 00 00 00 ..8.q...... + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x0168 (360) +dwMinBitRate : 0x034BC000 (55296000 bps -> 6.912 MB/s) +dwMaxBitRate : 0x06978000 (110592000 bps -> 13.824 MB/s) +dwMaxVideoFrameBufferSize: 0x00070800 (460800 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 05 01 00 80 02 68 01 00 C0 4B 03 00 80 97 &$.....h...K.... + 06 00 08 07 00 15 16 05 00 03 15 16 05 00 20 A1 .............. . + 07 00 2A 2C 0A 00 ..*,.. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x04650000 (73728000 bps -> 9.216 MB/s) +dwMaxBitRate : 0x08CA0000 (147456000 bps -> 18.432 MB/s) +dwMaxVideoFrameBufferSize: 0x00096000 (614400 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 05 02 00 80 02 E0 01 00 00 65 04 00 00 CA &$.........e.... + 08 00 60 09 00 15 16 05 00 03 15 16 05 00 20 A1 ..`........... . + 07 00 2A 2C 0A 00 ..*,.. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x00 +wWidth : 0x03C0 (960) +wHeight : 0x021C (540) +dwMinBitRate : 0x0278D000 (41472000 bps -> 5.184 MB/s) +dwMaxBitRate : 0x076A7000 (124416000 bps -> 15.552 MB/s) +dwMaxVideoFrameBufferSize: 0x000FD200 (1036800 bytes) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[2] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 26 24 05 03 00 C0 03 1C 02 00 D0 78 02 00 70 6A &$.........x..pj + 07 00 D2 0F 00 2A 2C 0A 00 03 2A 2C 0A 00 40 42 .....*,...*,..@B + 0F 00 80 84 1E 00 ...... + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x00 +wWidth : 0x0400 (1024) +wHeight : 0x0240 (576) +dwMinBitRate : 0x02D00000 (47185920 bps -> 5.898 MB/s) +dwMaxBitRate : 0x08700000 (141557760 bps -> 17.694 MB/s) +dwMaxVideoFrameBufferSize: 0x00120000 (1179648 bytes) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[2] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 26 24 05 04 00 00 04 40 02 00 00 D0 02 00 00 70 &$.....@.......p + 08 00 00 12 00 2A 2C 0A 00 03 2A 2C 0A 00 40 42 .....*,...*,..@B + 0F 00 80 84 1E 00 ...... + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x05 +bmCapabilities : 0x00 +wWidth : 0x0500 (1280) +wHeight : 0x02D0 (720) +dwMinBitRate : 0x01C20000 (29491200 bps -> 3.686 MB/s) +dwMaxBitRate : 0x08CA0000 (147456000 bps -> 18.432 MB/s) +dwMaxVideoFrameBufferSize: 0x001C2000 (1843200 bytes) +dwDefaultFrameInterval : 0x000F4240 (100.0000 ms -> 10.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[2] : 0x001E8480 (200.0000 ms -> 5.000 fps) +adwFrameInterval[3] : 0x004C4B40 (500.0000 ms -> 2.000 fps) +Data (HexDump) : 26 24 05 05 00 00 05 D0 02 00 00 C2 01 00 00 CA &$.............. + 08 00 20 1C 00 40 42 0F 00 03 40 42 0F 00 80 84 .. ..@B...@B.... + 1E 00 40 4B 4C 00 ..@KL. + + -------- VS Uncompressed Frame Type Descriptor -------- +---> This is the Default (optimum) Frame index +bLength : 0x22 (34 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x06 +bmCapabilities : 0x00 +wWidth : 0x0780 (1920) +wHeight : 0x0438 (1080) +dwMinBitRate : 0x03F48000 (66355200 bps -> 8.294 MB/s) +dwMaxBitRate : 0x09E34000 (165888000 bps -> 20.736 MB/s) +dwMaxVideoFrameBufferSize: 0x003F4800 (4147200 bytes) +dwDefaultFrameInterval : 0x001E8480 (200.0000 ms -> 5.000 fps) +bFrameIntervalType : 0x02 (2 discrete frame intervals supported) +adwFrameInterval[1] : 0x001E8480 (200.0000 ms -> 5.000 fps) +adwFrameInterval[2] : 0x004C4B40 (500.0000 ms -> 2.000 fps) +Data (HexDump) : 22 24 05 06 00 80 07 38 04 00 80 F4 03 00 40 E3 "$.....8......@. + 09 00 48 3F 00 80 84 1E 00 02 80 84 1E 00 40 4B ..H?..........@K + 4C 00 L. + + ------- VS Color Matching Descriptor Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x0D (Color Matching) +bColorPrimaries : 0x01 (BT.709, sRGB) +bTransferCharacteristics : 0x01 (BT.709) +bMatrixCoefficients : 0x04 (SMPTE 170M) +Data (HexDump) : 06 24 0D 01 01 04 .$.... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x0A (String Descriptor 10) + *!*ERROR String descriptor not found +Data (HexDump) : 09 04 01 01 01 0E 02 00 0A ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x85 (Direction=IN EndpointID=5) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0200 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x200 (512 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 85 05 00 02 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x02 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x0B (String Descriptor 11) + *!*ERROR String descriptor not found +Data (HexDump) : 09 04 01 02 01 0E 02 00 0B ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x85 (Direction=IN EndpointID=5) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0400 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x400 (1024 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 85 05 00 04 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x03 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x0C (String Descriptor 12) + *!*ERROR String descriptor not found +Data (HexDump) : 09 04 01 03 01 0E 02 00 0C ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x85 (Direction=IN EndpointID=5) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0C00 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x01 (1 additional transactions per microframe -> allows 513..1024 byte per packet) + Bits 10..0 : 0x400 (1024 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 85 05 00 0C 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x04 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x0D (String Descriptor 13) + *!*ERROR String descriptor not found +Data (HexDump) : 09 04 01 04 01 0E 02 00 0D ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x85 (Direction=IN EndpointID=5) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x1400 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x02 (2 additional transactions per microframe -> allows 683..1024 bytes per packet) + Bits 10..0 : 0x400 (1024 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 85 05 00 14 01 ....... + + ----------------- Device Qualifier Descriptor ----------------- +bLength : 0x0A (10 bytes) +bDescriptorType : 0x06 (Device_qualifier Descriptor) +bcdUSB : 0x200 (USB Version 2.00) +bDeviceClass : 0xEF (Miscellaneous) +bDeviceSubClass : 0x02 +bDeviceProtocol : 0x01 (IAD - Interface Association Descriptor) +bMaxPacketSize0 : 0x40 (64 Bytes) +bNumConfigurations : 0x01 (1 other-speed configuration) +bReserved : 0x00 +Data (HexDump) : 0A 06 00 02 EF 02 01 40 01 00 .......@.. + + ------------ Other Speed Configuration Descriptor ------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x07 (Other_speed_configuration Descriptor) +wTotalLength : 0x0580 (1408 bytes) +bNumInterfaces : 0x02 (2 Interfaces) +bConfigurationValue : 0x01 (Configuration 1) +iConfiguration : 0x04 (String Descriptor 4) + *!*ERROR String descriptor not found +bmAttributes : 0x80 + D7: Reserved, set 1 : 0x01 + D6: Self Powered : 0x00 (no) + D5: Remote Wakeup : 0x00 (no) + D4..0: Reserved, set 0 : 0x00 +MaxPower : 0xFA (500 mA) +Data (HexDump) : 09 07 80 05 02 01 04 80 FA 08 0B 00 02 0E 03 00 ................ + 05 09 04 00 00 00 0E 01 00 08 0D 24 01 10 01 68 ...........$...h + 00 00 6C DC 02 01 01 12 24 02 01 01 02 00 00 00 ..l.....$....... + 00 00 00 00 00 03 0E 22 00 0C 24 05 02 01 00 40 ......."..$....@ + 02 7F 17 00 00 1A 24 06 03 18 20 2E 30 11 63 2E ......$... .0.c. + 4A BA 2C 68 90 EB 33 40 16 02 01 02 01 03 06 1A J.,h..3@........ + 24 06 04 A4 FB CB 33 26 FD E4 4C 90 76 A1 93 1F $.....3&..L.v... + E7 4C 5E 02 01 02 01 03 07 09 24 03 04 01 01 00 .L^.......$..... + 03 00 09 04 01 00 00 0E 02 00 09 11 24 01 04 E5 ............$... + 04 85 00 04 00 00 00 01 00 00 00 00 0B 24 06 01 .............$.. + 08 00 08 00 00 00 00 26 24 07 01 00 80 02 68 01 .......&$.....h. + 00 D0 78 02 00 A0 F1 04 00 46 05 00 15 16 05 00 ..x......F...... + 03 15 16 05 00 20 A1 07 00 2A 2C 0A 00 26 24 07 ..... ...*,..&$. + 02 00 80 02 E0 01 00 C0 4B 03 00 80 97 06 00 08 ........K....... + 07 00 15 16 05 00 03 15 16 05 00 20 A1 07 00 2A ........... ...* + 2C 0A 00 26 24 07 03 00 C0 03 1C 02 00 D4 8F 05 ,..&$........... + 00 A8 1F 0B 80 DD 0B 00 15 16 05 00 03 15 16 05 ................ + 00 20 A1 07 00 2A 2C 0A 00 26 24 07 04 00 00 04 . ...*,..&$..... + 40 02 00 00 54 06 00 00 A8 0C 00 80 0D 00 15 16 @...T........... + 05 00 03 15 16 05 00 20 A1 07 00 2A 2C 0A 00 26 ....... ...*,..& + 24 07 05 00 00 05 D0 02 00 40 E3 09 00 80 C6 13 $........@...... + 00 18 15 00 15 16 05 00 03 15 16 05 00 20 A1 07 ............. .. + 00 2A 2C 0A 00 26 24 07 06 00 80 07 38 04 00 50 .*,..&$.....8..P + 3F 16 00 A0 7E 2C 00 76 2F 00 15 16 05 00 03 15 ?...~,.v/....... + 16 05 00 20 A1 07 00 2A 2C 0A 00 26 24 07 07 00 ... ...*,..&$... + 00 0A A0 05 00 00 8D 27 00 00 1A 4F 00 60 54 00 .......'...O.`T. + 15 16 05 00 03 15 16 05 00 20 A1 07 00 2A 2C 0A ......... ...*,. + 00 26 24 07 08 00 00 0F 70 08 00 40 FD 58 00 80 .&$.....p..@.X.. + FA B1 00 D8 BD 00 15 16 05 00 03 15 16 05 00 20 ............... + A1 07 00 2A 2C 0A 00 1C 24 10 02 08 48 32 36 34 ...*,...$...H264 + 00 00 10 00 80 00 00 AA 00 38 9B 71 10 08 00 00 .........8.q.... + 00 00 01 26 24 11 01 00 80 02 68 01 00 D0 78 02 ...&$.....h...x. + 00 A0 F1 04 15 16 05 00 03 2C 0A 00 00 15 16 05 .........,...... + 00 20 A1 07 00 2A 2C 0A 00 26 24 11 02 00 80 02 . ...*,..&$..... + E0 01 00 C0 4B 03 00 80 97 06 15 16 05 00 03 2C ....K.........., + 0A 00 00 15 16 05 00 20 A1 07 00 2A 2C 0A 00 26 ....... ...*,..& + 24 11 03 00 C0 03 1C 02 00 D4 8F 05 00 A8 1F 0B $............... + 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 07 .....,....... .. + 00 2A 2C 0A 00 26 24 11 04 00 00 04 40 02 00 00 .*,..&$.....@... + 54 06 00 00 A8 0C 15 16 05 00 03 2C 0A 00 00 15 T..........,.... + 16 05 00 20 A1 07 00 2A 2C 0A 00 26 24 11 05 00 ... ...*,..&$... + 00 05 D0 02 00 40 E3 09 00 80 C6 13 15 16 05 00 .....@.......... + 03 2C 0A 00 00 15 16 05 00 20 A1 07 00 2A 2C 0A .,....... ...*,. + 00 26 24 11 06 00 80 07 38 04 00 50 3F 16 00 A0 .&$.....8..P?... + 7E 2C 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 ~,.....,....... + A1 07 00 2A 2C 0A 00 26 24 11 07 00 00 0A A0 05 ...*,..&$....... + 00 00 8D 27 00 00 1A 4F 15 16 05 00 03 2C 0A 00 ...'...O.....,.. + 00 15 16 05 00 20 A1 07 00 2A 2C 0A 00 26 24 11 ..... ...*,..&$. + 08 00 00 0F 70 08 00 40 FD 58 00 80 FA B1 15 16 ....p..@.X...... + 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 07 00 2A ...,....... ...* + 2C 0A 00 1C 24 10 03 08 48 32 36 35 00 00 10 00 ,...$...H265.... + 80 00 00 AA 00 38 9B 71 10 08 00 00 00 00 01 26 .....8.q.......& + 24 11 01 00 80 02 68 01 00 D0 78 02 00 A0 F1 04 $.....h...x..... + 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 07 .....,....... .. + 00 2A 2C 0A 00 26 24 11 02 00 80 02 E0 01 00 C0 .*,..&$......... + 4B 03 00 80 97 06 15 16 05 00 03 2C 0A 00 00 15 K..........,.... + 16 05 00 20 A1 07 00 2A 2C 0A 00 26 24 11 03 00 ... ...*,..&$... + C0 03 1C 02 00 D4 8F 05 00 A8 1F 0B 15 16 05 00 ................ + 03 2C 0A 00 00 15 16 05 00 20 A1 07 00 2A 2C 0A .,....... ...*,. + 00 26 24 11 04 00 00 04 40 02 00 00 54 06 00 00 .&$.....@...T... + A8 0C 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 .......,....... + A1 07 00 2A 2C 0A 00 26 24 11 05 00 00 05 D0 02 ...*,..&$....... + 00 40 E3 09 00 80 C6 13 15 16 05 00 03 2C 0A 00 .@...........,.. + 00 15 16 05 00 20 A1 07 00 2A 2C 0A 00 26 24 11 ..... ...*,..&$. + 06 00 80 07 38 04 00 50 3F 16 00 A0 7E 2C 15 16 ....8..P?...~,.. + 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 07 00 2A ...,....... ...* + 2C 0A 00 26 24 11 07 00 00 0A A0 05 00 00 8D 27 ,..&$..........' + 00 00 1A 4F 15 16 05 00 03 2C 0A 00 00 15 16 05 ...O.....,...... + 00 20 A1 07 00 2A 2C 0A 00 26 24 11 08 00 00 0F . ...*,..&$..... + 70 08 00 40 FD 58 00 80 FA B1 15 16 05 00 03 2C p..@.X........., + 0A 00 00 15 16 05 00 20 A1 07 00 2A 2C 0A 00 1B ....... ...*,... + 24 04 04 06 59 55 59 32 00 00 10 00 80 00 00 AA $...YUY2........ + 00 38 9B 71 10 06 00 00 00 00 26 24 05 01 00 80 .8.q......&$.... + 02 68 01 00 C0 4B 03 00 80 97 06 00 08 07 00 15 .h...K.......... + 16 05 00 03 15 16 05 00 20 A1 07 00 2A 2C 0A 00 ........ ...*,.. + 26 24 05 02 00 80 02 E0 01 00 00 65 04 00 00 CA &$.........e.... + 08 00 60 09 00 15 16 05 00 03 15 16 05 00 20 A1 ..`........... . + 07 00 2A 2C 0A 00 26 24 05 03 00 C0 03 1C 02 00 ..*,..&$........ + D0 78 02 00 70 6A 07 00 D2 0F 00 2A 2C 0A 00 03 .x..pj.....*,... + 2A 2C 0A 00 40 42 0F 00 80 84 1E 00 26 24 05 04 *,..@B......&$.. + 00 00 04 40 02 00 00 D0 02 00 00 70 08 00 00 12 ...@.......p.... + 00 2A 2C 0A 00 03 2A 2C 0A 00 40 42 0F 00 80 84 .*,...*,..@B.... + 1E 00 26 24 05 05 00 00 05 D0 02 00 00 C2 01 00 ..&$............ + 00 CA 08 00 20 1C 00 40 42 0F 00 03 40 42 0F 00 .... ..@B...@B.. + 80 84 1E 00 40 4B 4C 00 22 24 05 06 00 80 07 38 ....@KL."$.....8 + 04 00 80 F4 03 00 40 E3 09 00 48 3F 00 80 84 1E ......@...H?.... + 00 02 80 84 1E 00 40 4B 4C 00 06 24 0D 01 01 04 ......@KL..$.... + 09 04 01 01 01 0E 02 00 0A 07 05 85 05 01 00 01 ................ + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x00 +bInterfaceCount : 0x02 +bFunctionClass : 0x0E (Video) +bFunctionSubClass : 0x03 (Video Interface Collection) +bFunctionProtocol : 0x00 (PC_PROTOCOL_UNDEFINED protocol) +iFunction : 0x05 (String Descriptor 5) + *!*ERROR String descriptor not found +Data (HexDump) : 08 0B 00 02 0E 03 00 05 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x00 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x01 (Video Control) +bInterfaceProtocol : 0x00 +iInterface : 0x08 (String Descriptor 8) + *!*ERROR String descriptor not found +Data (HexDump) : 09 04 00 00 00 0E 01 00 08 ......... + + ------- Video Control Interface Header Descriptor ----- +bLength : 0x0D (13 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x01 (Video Control Header) +bcdUVC : 0x0110 (UVC Version 1.10) +wTotalLength : 0x0068 (104 bytes) +dwClockFreq : 0x02DC6C00 (48 MHz) +bInCollection : 0x01 (1 VideoStreaming interface) +baInterfaceNr[1] : 0x01 +Data (HexDump) : 0D 24 01 10 01 68 00 00 6C DC 02 01 01 .$...h..l.... + + -------- Video Control Input Terminal Descriptor ------ +bLength : 0x12 (18 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (ITT_CAMERA) +bAssocTerminal : 0x00 (Not associated with an Output Terminal) +iTerminal : 0x00 +Camera Input Terminal Data: +wObjectiveFocalLengthMin : 0x0000 +wObjectiveFocalLengthMax : 0x0000 +wOcularFocalLength : 0x0000 +bControlSize : 0x03 +bmControls : 0x0E, 0x22, 0x00 + D0 : 0 no - Scanning Mode + D1 : 1 yes - Auto-Exposure Mode + D2 : 1 yes - Auto-Exposure Priority + D3 : 1 yes - Exposure Time (Absolute) + D4 : 0 no - Exposure Time (Relative) + D5 : 0 no - Focus (Absolute) + D6 : 0 no - Focus (Relative) + D7 : 0 no - Iris (Absolute) + D8 : 0 no - Iris (Relative) + D9 : 1 yes - Zoom (Absolute) + D10 : 0 no - Zoom (Relative) + D11 : 0 no - Pan (Absolute) + D12 : 0 no - Pan (Relative) + D13 : 1 yes - Roll (Absolute) + D14 : 0 no - Roll (Relative) + D15 : 0 no - Tilt (Absolute) + D16 : 0 no - Tilt (Relative) + D17 : 0 no - Focus Auto + D18 : 0 no - Reserved + D19 : 0 no - Reserved + D20 : 0 no - Reserved + D21 : 0 no - Reserved + D22 : 0 no - Reserved + D23 : 0 no - Reserved +Data (HexDump) : 12 24 02 01 01 02 00 00 00 00 00 00 00 00 03 0E .$.............. + 22 00 ". + + -------- Video Control Processing Unit Descriptor ----- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x05 (Processing Unit) +bUnitID : 0x02 +bSourceID : 0x01 +wMaxMultiplier : 0x4000 (163.84x Zoom) +bControlSize : 0x02 +bmControls : 0x7F, 0x17 + D0 : 1 yes - Brightness + D1 : 1 yes - Contrast + D2 : 1 yes - Hue + D3 : 1 yes - Saturation + D4 : 1 yes - Sharpness + D5 : 1 yes - Gamma + D6 : 1 yes - White Balance Temperature + D7 : 0 no - White Balance Component + D8 : 1 yes - Backlight Compensation + D9 : 1 yes - Gain + D10 : 1 yes - Power Line Frequency + D11 : 0 no - Hue, Auto + D12 : 1 yes - White Balance Temperature, Auto + D13 : 0 no - White Balance Component, Auto + D14 : 0 no - Digital Multiplier + D15 : 0 no - Digital Multiplier Limit +iProcessing : 0x00 +bmVideoStandards : 0x00 + D0 : 0 no - None + D1 : 0 no - NTSC - 525/60 + D2 : 0 no - PAL - 625/50 + D3 : 0 no - SECAM - 625/50 + D4 : 0 no - NTSC - 625/50 + D5 : 0 no - PAL - 525/60 + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Data (HexDump) : 0C 24 05 02 01 00 40 02 7F 17 00 00 .$....@..... + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1A (26 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x03 +guidExtensionCode : {302E2018-6311-4A2E-BA2C-6890EB334016} +bNumControls : 0x02 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x02 +bControlSize : 0x01 +bmControls : 0x03 + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 0 no - Vendor-Specific (Optional) + D3 : 0 no - Vendor-Specific (Optional) + D4 : 0 no - Vendor-Specific (Optional) + D5 : 0 no - Vendor-Specific (Optional) + D6 : 0 no - Vendor-Specific (Optional) + D7 : 0 no - Vendor-Specific (Optional) +iExtension : 0x06 + *!*ERROR String descriptor not found +Data (HexDump) : 1A 24 06 03 18 20 2E 30 11 63 2E 4A BA 2C 68 90 .$... .0.c.J.,h. + EB 33 40 16 02 01 02 01 03 06 .3@....... + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1A (26 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x04 +guidExtensionCode : {33CBFBA4-FD26-4CE4-9076-A1931FE74C5E} +bNumControls : 0x02 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x02 +bControlSize : 0x01 +bmControls : 0x03 + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 0 no - Vendor-Specific (Optional) + D3 : 0 no - Vendor-Specific (Optional) + D4 : 0 no - Vendor-Specific (Optional) + D5 : 0 no - Vendor-Specific (Optional) + D6 : 0 no - Vendor-Specific (Optional) + D7 : 0 no - Vendor-Specific (Optional) +iExtension : 0x07 + *!*ERROR String descriptor not found +Data (HexDump) : 1A 24 06 04 A4 FB CB 33 26 FD E4 4C 90 76 A1 93 .$.....3&..L.v.. + 1F E7 4C 5E 02 01 02 01 03 07 ..L^...... + + ------- Video Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x04 +wTerminalType : 0x0101 (TT_STREAMING) +bAssocTerminal : 0x00 (Not associated with an Input Terminal) +bSourceID : 0x03 +iTerminal : 0x00 +Data (HexDump) : 09 24 03 04 01 01 00 03 00 .$....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x09 (String Descriptor 9) + *!*ERROR String descriptor not found +Data (HexDump) : 09 04 01 00 00 0E 02 00 09 ......... + + ---- VC-Specific VS Video Input Header Descriptor ----- +bLength : 0x11 (17 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x01 (Input Header) +bNumFormats : 0x04 +wTotalLength : 0x04E5 (1253 bytes) +bEndpointAddress : 0x85 (Direction=IN EndpointID=5) +bmInfo : 0x00 (Dynamic Format Change not supported) +bTerminalLink : 0x04 +bStillCaptureMethod : 0x00 (No Still Capture) +nbTriggerSupport : 0x00 (Hardware Triggering not supported) +bTriggerUsage : 0x00 (Host will initiate still image capture) +nbControlSize : 0x01 +Video Payload Format 1 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Video Payload Format 2 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Video Payload Format 3 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Video Payload Format 4 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Data (HexDump) : 11 24 01 04 E5 04 85 00 04 00 00 00 01 00 00 00 .$.............. + 00 . + + ----- Video Streaming MJPEG Format Type Descriptor ---- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x06 (Format MJPEG) +bFormatIndex : 0x01 (1) +bNumFrameDescriptors : 0x08 (8) +bmFlags : 0x00 (Sample size is not fixed) +bDefaultFrameIndex : 0x08 (8) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +*!*ERROR: no Color Matching Descriptor for this format +Data (HexDump) : 0B 24 06 01 08 00 08 00 00 00 00 .$......... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x0168 (360) +dwMinBitRate : 0x0278D000 (41472000 bps -> 5.184 MB/s) +dwMaxBitRate : 0x04F1A000 (82944000 bps -> 10.368 MB/s) +dwMaxVideoFrameBufferSize: 0x00054600 (345600 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 07 01 00 80 02 68 01 00 D0 78 02 00 A0 F1 &$.....h...x.... + 04 00 46 05 00 15 16 05 00 03 15 16 05 00 20 A1 ..F........... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x034BC000 (55296000 bps -> 6.912 MB/s) +dwMaxBitRate : 0x06978000 (110592000 bps -> 13.824 MB/s) +dwMaxVideoFrameBufferSize: 0x00070800 (460800 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 07 02 00 80 02 E0 01 00 C0 4B 03 00 80 97 &$.........K.... + 06 00 08 07 00 15 16 05 00 03 15 16 05 00 20 A1 .............. . + 07 00 2A 2C 0A 00 ..*,.. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x00 +wWidth : 0x03C0 (960) +wHeight : 0x021C (540) +dwMinBitRate : 0x058FD400 (93312000 bps -> 11.664 MB/s) +dwMaxBitRate : 0x0B1FA800 (186624000 bps -> 23.328 MB/s) +dwMaxVideoFrameBufferSize: 0x000BDD80 (777600 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 07 03 00 C0 03 1C 02 00 D4 8F 05 00 A8 1F &$.............. + 0B 80 DD 0B 00 15 16 05 00 03 15 16 05 00 20 A1 .............. . + 07 00 2A 2C 0A 00 ..*,.. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x00 +wWidth : 0x0400 (1024) +wHeight : 0x0240 (576) +dwMinBitRate : 0x06540000 (106168320 bps -> 13.271 MB/s) +dwMaxBitRate : 0x0CA80000 (212336640 bps -> 26.542 MB/s) +dwMaxVideoFrameBufferSize: 0x000D8000 (884736 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 07 04 00 00 04 40 02 00 00 54 06 00 00 A8 &$.....@...T.... + 0C 00 80 0D 00 15 16 05 00 03 15 16 05 00 20 A1 .............. . + 07 00 2A 2C 0A 00 ..*,.. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x05 +bmCapabilities : 0x00 +wWidth : 0x0500 (1280) +wHeight : 0x02D0 (720) +dwMinBitRate : 0x09E34000 (165888000 bps -> 20.736 MB/s) +dwMaxBitRate : 0x13C68000 (331776000 bps -> 41.472 MB/s) +dwMaxVideoFrameBufferSize: 0x00151800 (1382400 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 07 05 00 00 05 D0 02 00 40 E3 09 00 80 C6 &$........@..... + 13 00 18 15 00 15 16 05 00 03 15 16 05 00 20 A1 .............. . + 07 00 2A 2C 0A 00 ..*,.. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x06 +bmCapabilities : 0x00 +wWidth : 0x0780 (1920) +wHeight : 0x0438 (1080) +dwMinBitRate : 0x163F5000 (373248000 bps -> 46.656 MB/s) +dwMaxBitRate : 0x2C7EA000 (746496000 bps -> 93.312 MB/s) +dwMaxVideoFrameBufferSize: 0x002F7600 (3110400 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 07 06 00 80 07 38 04 00 50 3F 16 00 A0 7E &$.....8..P?...~ + 2C 00 76 2F 00 15 16 05 00 03 15 16 05 00 20 A1 ,.v/.......... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x07 +bmCapabilities : 0x00 +wWidth : 0x0A00 (2560) +wHeight : 0x05A0 (1440) +dwMinBitRate : 0x278D0000 (663552000 bps -> 82.944 MB/s) +dwMaxBitRate : 0x4F1A0000 (1327104000 bps -> 165.888 MB/s) +dwMaxVideoFrameBufferSize: 0x00546000 (5529600 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 07 07 00 00 0A A0 05 00 00 8D 27 00 00 1A &$..........'... + 4F 00 60 54 00 15 16 05 00 03 15 16 05 00 20 A1 O.`T.......... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +---> This is the Default (optimum) Frame index +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x08 +bmCapabilities : 0x00 +wWidth : 0x0F00 (3840) +wHeight : 0x0870 (2160) +dwMinBitRate : 0x58FD4000 (1492992000 bps -> 186.624 MB/s) +dwMaxBitRate : 0xB1FA8000 (2985984000 bps -> 373.248 MB/s) +dwMaxVideoFrameBufferSize: 0x00BDD800 (12441600 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 07 08 00 00 0F 70 08 00 40 FD 58 00 80 FA &$.....p..@.X... + B1 00 D8 BD 00 15 16 05 00 03 15 16 05 00 20 A1 .............. . + 07 00 2A 2C 0A 00 ..*,.. + + ---- VS Frame Based Payload Format Type Descriptor ---- +bLength : 0x1C (28 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x10 (Frame Based Format Type) +bFormatIndex : 0x02 (2) +bNumFrameDescriptors : 0x08 (8) +guidFormat : {34363248-0000-0010-8000-00AA00389B71} (H264) +bBitsPerPixel : 0x10 (16 bits) +bDefaultFrameIndex : 0x08 (8) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +bVariableSize : 0x01 (Variable Size) +*!*ERROR: Found 16 frame descriptors (should be 8) +*!*ERROR: no Color Matching Descriptor for this format +Data (HexDump) : 1C 24 10 02 08 48 32 36 34 00 00 10 00 80 00 00 .$...H264....... + AA 00 38 9B 71 10 08 00 00 00 00 01 ..8.q....... + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x0168 (360) +dwMinBitRate : 0x0278D000 (41472000 bps -> 5.184 MB/s) +dwMaxBitRate : 0x04F1A000 (82944000 bps -> 10.368 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 01 00 80 02 68 01 00 D0 78 02 00 A0 F1 &$.....h...x.... + 04 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ......,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x034BC000 (55296000 bps -> 6.912 MB/s) +dwMaxBitRate : 0x06978000 (110592000 bps -> 13.824 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 02 00 80 02 E0 01 00 C0 4B 03 00 80 97 &$.........K.... + 06 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ......,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x00 +wWidth : 0x03C0 (960) +wHeight : 0x021C (540) +dwMinBitRate : 0x058FD400 (93312000 bps -> 11.664 MB/s) +dwMaxBitRate : 0x0B1FA800 (186624000 bps -> 23.328 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 03 00 C0 03 1C 02 00 D4 8F 05 00 A8 1F &$.............. + 0B 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ......,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x00 +wWidth : 0x0400 (1024) +wHeight : 0x0240 (576) +dwMinBitRate : 0x06540000 (106168320 bps -> 13.271 MB/s) +dwMaxBitRate : 0x0CA80000 (212336640 bps -> 26.542 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 04 00 00 04 40 02 00 00 54 06 00 00 A8 &$.....@...T.... + 0C 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ......,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x05 +bmCapabilities : 0x00 +wWidth : 0x0500 (1280) +wHeight : 0x02D0 (720) +dwMinBitRate : 0x09E34000 (165888000 bps -> 20.736 MB/s) +dwMaxBitRate : 0x13C68000 (331776000 bps -> 41.472 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 05 00 00 05 D0 02 00 40 E3 09 00 80 C6 &$........@..... + 13 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ......,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x06 +bmCapabilities : 0x00 +wWidth : 0x0780 (1920) +wHeight : 0x0438 (1080) +dwMinBitRate : 0x163F5000 (373248000 bps -> 46.656 MB/s) +dwMaxBitRate : 0x2C7EA000 (746496000 bps -> 93.312 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 06 00 80 07 38 04 00 50 3F 16 00 A0 7E &$.....8..P?...~ + 2C 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ,.....,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x07 +bmCapabilities : 0x00 +wWidth : 0x0A00 (2560) +wHeight : 0x05A0 (1440) +dwMinBitRate : 0x278D0000 (663552000 bps -> 82.944 MB/s) +dwMaxBitRate : 0x4F1A0000 (1327104000 bps -> 165.888 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 07 00 00 0A A0 05 00 00 8D 27 00 00 1A &$..........'... + 4F 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 O.....,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x08 +bmCapabilities : 0x00 +wWidth : 0x0F00 (3840) +wHeight : 0x0870 (2160) +dwMinBitRate : 0x58FD4000 (1492992000 bps -> 186.624 MB/s) +dwMaxBitRate : 0xB1FA8000 (2985984000 bps -> 373.248 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 08 00 00 0F 70 08 00 40 FD 58 00 80 FA &$.....p..@.X... + B1 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ......,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ---- VS Frame Based Payload Format Type Descriptor ---- +bLength : 0x1C (28 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x10 (Frame Based Format Type) +bFormatIndex : 0x03 (3) +bNumFrameDescriptors : 0x08 (8) +guidFormat : {35363248-0000-0010-8000-00AA00389B71} (H265) +bBitsPerPixel : 0x10 (16 bits) +bDefaultFrameIndex : 0x08 (8) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +bVariableSize : 0x01 (Variable Size) +*!*ERROR: no Color Matching Descriptor for this format +Data (HexDump) : 1C 24 10 03 08 48 32 36 35 00 00 10 00 80 00 00 .$...H265....... + AA 00 38 9B 71 10 08 00 00 00 00 01 ..8.q....... + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x0168 (360) +dwMinBitRate : 0x0278D000 (41472000 bps -> 5.184 MB/s) +dwMaxBitRate : 0x04F1A000 (82944000 bps -> 10.368 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 01 00 80 02 68 01 00 D0 78 02 00 A0 F1 &$.....h...x.... + 04 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ......,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x034BC000 (55296000 bps -> 6.912 MB/s) +dwMaxBitRate : 0x06978000 (110592000 bps -> 13.824 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 02 00 80 02 E0 01 00 C0 4B 03 00 80 97 &$.........K.... + 06 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ......,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x00 +wWidth : 0x03C0 (960) +wHeight : 0x021C (540) +dwMinBitRate : 0x058FD400 (93312000 bps -> 11.664 MB/s) +dwMaxBitRate : 0x0B1FA800 (186624000 bps -> 23.328 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 03 00 C0 03 1C 02 00 D4 8F 05 00 A8 1F &$.............. + 0B 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ......,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x00 +wWidth : 0x0400 (1024) +wHeight : 0x0240 (576) +dwMinBitRate : 0x06540000 (106168320 bps -> 13.271 MB/s) +dwMaxBitRate : 0x0CA80000 (212336640 bps -> 26.542 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 04 00 00 04 40 02 00 00 54 06 00 00 A8 &$.....@...T.... + 0C 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ......,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x05 +bmCapabilities : 0x00 +wWidth : 0x0500 (1280) +wHeight : 0x02D0 (720) +dwMinBitRate : 0x09E34000 (165888000 bps -> 20.736 MB/s) +dwMaxBitRate : 0x13C68000 (331776000 bps -> 41.472 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 05 00 00 05 D0 02 00 40 E3 09 00 80 C6 &$........@..... + 13 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ......,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x06 +bmCapabilities : 0x00 +wWidth : 0x0780 (1920) +wHeight : 0x0438 (1080) +dwMinBitRate : 0x163F5000 (373248000 bps -> 46.656 MB/s) +dwMaxBitRate : 0x2C7EA000 (746496000 bps -> 93.312 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 06 00 80 07 38 04 00 50 3F 16 00 A0 7E &$.....8..P?...~ + 2C 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ,.....,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x07 +bmCapabilities : 0x00 +wWidth : 0x0A00 (2560) +wHeight : 0x05A0 (1440) +dwMinBitRate : 0x278D0000 (663552000 bps -> 82.944 MB/s) +dwMaxBitRate : 0x4F1A0000 (1327104000 bps -> 165.888 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 07 00 00 0A A0 05 00 00 8D 27 00 00 1A &$..........'... + 4F 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 O.....,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ----- VS Frame Based Payload Frame Type Descriptor ---- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type) +bFrameIndex : 0x08 +bmCapabilities : 0x00 +wWidth : 0x0F00 (3840) +wHeight : 0x0870 (2160) +dwMinBitRate : 0x58FD4000 (1492992000 bps -> 186.624 MB/s) +dwMaxBitRate : 0xB1FA8000 (2985984000 bps -> 373.248 MB/s) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +dwBytesPerLine : 0xA2C (2604 bytes) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 11 08 00 00 0F 70 08 00 40 FD 58 00 80 FA &$.....p..@.X... + B1 15 16 05 00 03 2C 0A 00 00 15 16 05 00 20 A1 ......,....... . + 07 00 2A 2C 0A 00 ..*,.. + + ------- VS Uncompressed Format Type Descriptor -------- +bLength : 0x1B (27 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x04 (Uncompressed Format Type) +bFormatIndex : 0x04 (4) +bNumFrameDescriptors : 0x06 (6) +guidFormat : {32595559-0000-0010-8000-00AA00389B71} (YUY2) +bBitsPerPixel : 0x10 (16 bits) +bDefaultFrameIndex : 0x06 (6) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +Data (HexDump) : 1B 24 04 04 06 59 55 59 32 00 00 10 00 80 00 00 .$...YUY2....... + AA 00 38 9B 71 10 06 00 00 00 00 ..8.q...... + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x0168 (360) +dwMinBitRate : 0x034BC000 (55296000 bps -> 6.912 MB/s) +dwMaxBitRate : 0x06978000 (110592000 bps -> 13.824 MB/s) +dwMaxVideoFrameBufferSize: 0x00070800 (460800 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 05 01 00 80 02 68 01 00 C0 4B 03 00 80 97 &$.....h...K.... + 06 00 08 07 00 15 16 05 00 03 15 16 05 00 20 A1 .............. . + 07 00 2A 2C 0A 00 ..*,.. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x04650000 (73728000 bps -> 9.216 MB/s) +dwMaxBitRate : 0x08CA0000 (147456000 bps -> 18.432 MB/s) +dwMaxVideoFrameBufferSize: 0x00096000 (614400 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +Data (HexDump) : 26 24 05 02 00 80 02 E0 01 00 00 65 04 00 00 CA &$.........e.... + 08 00 60 09 00 15 16 05 00 03 15 16 05 00 20 A1 ..`........... . + 07 00 2A 2C 0A 00 ..*,.. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x00 +wWidth : 0x03C0 (960) +wHeight : 0x021C (540) +dwMinBitRate : 0x0278D000 (41472000 bps -> 5.184 MB/s) +dwMaxBitRate : 0x076A7000 (124416000 bps -> 15.552 MB/s) +dwMaxVideoFrameBufferSize: 0x000FD200 (1036800 bytes) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[2] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 26 24 05 03 00 C0 03 1C 02 00 D0 78 02 00 70 6A &$.........x..pj + 07 00 D2 0F 00 2A 2C 0A 00 03 2A 2C 0A 00 40 42 .....*,...*,..@B + 0F 00 80 84 1E 00 ...... + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x00 +wWidth : 0x0400 (1024) +wHeight : 0x0240 (576) +dwMinBitRate : 0x02D00000 (47185920 bps -> 5.898 MB/s) +dwMaxBitRate : 0x08700000 (141557760 bps -> 17.694 MB/s) +dwMaxVideoFrameBufferSize: 0x00120000 (1179648 bytes) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[2] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 26 24 05 04 00 00 04 40 02 00 00 D0 02 00 00 70 &$.....@.......p + 08 00 00 12 00 2A 2C 0A 00 03 2A 2C 0A 00 40 42 .....*,...*,..@B + 0F 00 80 84 1E 00 ...... + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x05 +bmCapabilities : 0x00 +wWidth : 0x0500 (1280) +wHeight : 0x02D0 (720) +dwMinBitRate : 0x01C20000 (29491200 bps -> 3.686 MB/s) +dwMaxBitRate : 0x08CA0000 (147456000 bps -> 18.432 MB/s) +dwMaxVideoFrameBufferSize: 0x001C2000 (1843200 bytes) +dwDefaultFrameInterval : 0x000F4240 (100.0000 ms -> 10.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[2] : 0x001E8480 (200.0000 ms -> 5.000 fps) +adwFrameInterval[3] : 0x004C4B40 (500.0000 ms -> 2.000 fps) +Data (HexDump) : 26 24 05 05 00 00 05 D0 02 00 00 C2 01 00 00 CA &$.............. + 08 00 20 1C 00 40 42 0F 00 03 40 42 0F 00 80 84 .. ..@B...@B.... + 1E 00 40 4B 4C 00 ..@KL. + + -------- VS Uncompressed Frame Type Descriptor -------- +---> This is the Default (optimum) Frame index +bLength : 0x22 (34 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x06 +bmCapabilities : 0x00 +wWidth : 0x0780 (1920) +wHeight : 0x0438 (1080) +dwMinBitRate : 0x03F48000 (66355200 bps -> 8.294 MB/s) +dwMaxBitRate : 0x09E34000 (165888000 bps -> 20.736 MB/s) +dwMaxVideoFrameBufferSize: 0x003F4800 (4147200 bytes) +dwDefaultFrameInterval : 0x001E8480 (200.0000 ms -> 5.000 fps) +bFrameIntervalType : 0x02 (2 discrete frame intervals supported) +adwFrameInterval[1] : 0x001E8480 (200.0000 ms -> 5.000 fps) +adwFrameInterval[2] : 0x004C4B40 (500.0000 ms -> 2.000 fps) +Data (HexDump) : 22 24 05 06 00 80 07 38 04 00 80 F4 03 00 40 E3 "$.....8......@. + 09 00 48 3F 00 80 84 1E 00 02 80 84 1E 00 40 4B ..H?..........@K + 4C 00 L. + + ------- VS Color Matching Descriptor Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x0D (Color Matching) +bColorPrimaries : 0x01 (BT.709, sRGB) +bTransferCharacteristics : 0x01 (BT.709) +bMatrixCoefficients : 0x04 (SMPTE 170M) +Data (HexDump) : 06 24 0D 01 01 04 .$.... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x0A (String Descriptor 10) + *!*ERROR String descriptor not found +Data (HexDump) : 09 04 01 01 01 0E 02 00 0A ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x85 (Direction=IN EndpointID=5) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0001 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x01 (1 byte per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 85 05 01 00 01 ....... + + -------------------- String Descriptors ------------------- +none +*/ + +namespace elp_h265 { +const uint8_t dev_desc[] = { + 0x12, 0x01, 0x00, 0x02, 0xEF, 0x02, 0x01, 0x40, 0xE4, 0x32, 0x15, 0x94, 0x19, 0x04, 0x01, 0x02, + 0x03, 0x01 +}; +const uint8_t cfg_desc[] = { + 0x09, 0x02, 0xB0, 0x05, 0x02, 0x01, 0x04, 0x80, 0xFA, 0x08, 0x0B, 0x00, 0x02, 0x0E, 0x03, 0x00, + 0x05, 0x09, 0x04, 0x00, 0x00, 0x00, 0x0E, 0x01, 0x00, 0x08, 0x0D, 0x24, 0x01, 0x10, 0x01, 0x68, + 0x00, 0x00, 0x6C, 0xDC, 0x02, 0x01, 0x01, 0x12, 0x24, 0x02, 0x01, 0x01, 0x02, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0E, 0x22, 0x00, 0x0C, 0x24, 0x05, 0x02, 0x01, 0x00, 0x40, + 0x02, 0x7F, 0x17, 0x00, 0x00, 0x1A, 0x24, 0x06, 0x03, 0x18, 0x20, 0x2E, 0x30, 0x11, 0x63, 0x2E, + 0x4A, 0xBA, 0x2C, 0x68, 0x90, 0xEB, 0x33, 0x40, 0x16, 0x02, 0x01, 0x02, 0x01, 0x03, 0x06, 0x1A, + 0x24, 0x06, 0x04, 0xA4, 0xFB, 0xCB, 0x33, 0x26, 0xFD, 0xE4, 0x4C, 0x90, 0x76, 0xA1, 0x93, 0x1F, + 0xE7, 0x4C, 0x5E, 0x02, 0x01, 0x02, 0x01, 0x03, 0x07, 0x09, 0x24, 0x03, 0x04, 0x01, 0x01, 0x00, + 0x03, 0x00, 0x09, 0x04, 0x01, 0x00, 0x00, 0x0E, 0x02, 0x00, 0x09, 0x11, 0x24, 0x01, 0x04, 0xE5, + 0x04, 0x85, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x24, 0x06, 0x01, + 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x26, 0x24, 0x07, 0x01, 0x00, 0x80, 0x02, 0x68, 0x01, + 0x00, 0xD0, 0x78, 0x02, 0x00, 0xA0, 0xF1, 0x04, 0x00, 0x46, 0x05, 0x00, 0x15, 0x16, 0x05, 0x00, + 0x03, 0x15, 0x16, 0x05, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x07, + 0x02, 0x00, 0x80, 0x02, 0xE0, 0x01, 0x00, 0xC0, 0x4B, 0x03, 0x00, 0x80, 0x97, 0x06, 0x00, 0x08, + 0x07, 0x00, 0x15, 0x16, 0x05, 0x00, 0x03, 0x15, 0x16, 0x05, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, + 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x07, 0x03, 0x00, 0xC0, 0x03, 0x1C, 0x02, 0x00, 0xD4, 0x8F, 0x05, + 0x00, 0xA8, 0x1F, 0x0B, 0x80, 0xDD, 0x0B, 0x00, 0x15, 0x16, 0x05, 0x00, 0x03, 0x15, 0x16, 0x05, + 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x07, 0x04, 0x00, 0x00, 0x04, + 0x40, 0x02, 0x00, 0x00, 0x54, 0x06, 0x00, 0x00, 0xA8, 0x0C, 0x00, 0x80, 0x0D, 0x00, 0x15, 0x16, + 0x05, 0x00, 0x03, 0x15, 0x16, 0x05, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, + 0x24, 0x07, 0x05, 0x00, 0x00, 0x05, 0xD0, 0x02, 0x00, 0x40, 0xE3, 0x09, 0x00, 0x80, 0xC6, 0x13, + 0x00, 0x18, 0x15, 0x00, 0x15, 0x16, 0x05, 0x00, 0x03, 0x15, 0x16, 0x05, 0x00, 0x20, 0xA1, 0x07, + 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x07, 0x06, 0x00, 0x80, 0x07, 0x38, 0x04, 0x00, 0x50, + 0x3F, 0x16, 0x00, 0xA0, 0x7E, 0x2C, 0x00, 0x76, 0x2F, 0x00, 0x15, 0x16, 0x05, 0x00, 0x03, 0x15, + 0x16, 0x05, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x07, 0x07, 0x00, + 0x00, 0x0A, 0xA0, 0x05, 0x00, 0x00, 0x8D, 0x27, 0x00, 0x00, 0x1A, 0x4F, 0x00, 0x60, 0x54, 0x00, + 0x15, 0x16, 0x05, 0x00, 0x03, 0x15, 0x16, 0x05, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, + 0x00, 0x26, 0x24, 0x07, 0x08, 0x00, 0x00, 0x0F, 0x70, 0x08, 0x00, 0x40, 0xFD, 0x58, 0x00, 0x80, + 0xFA, 0xB1, 0x00, 0xD8, 0xBD, 0x00, 0x15, 0x16, 0x05, 0x00, 0x03, 0x15, 0x16, 0x05, 0x00, 0x20, + 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x1C, 0x24, 0x10, 0x02, 0x08, 0x48, 0x32, 0x36, 0x34, + 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71, 0x10, 0x08, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x26, 0x24, 0x11, 0x01, 0x00, 0x80, 0x02, 0x68, 0x01, 0x00, 0xD0, 0x78, 0x02, + 0x00, 0xA0, 0xF1, 0x04, 0x15, 0x16, 0x05, 0x00, 0x03, 0x2C, 0x0A, 0x00, 0x00, 0x15, 0x16, 0x05, + 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x11, 0x02, 0x00, 0x80, 0x02, + 0xE0, 0x01, 0x00, 0xC0, 0x4B, 0x03, 0x00, 0x80, 0x97, 0x06, 0x15, 0x16, 0x05, 0x00, 0x03, 0x2C, + 0x0A, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, + 0x24, 0x11, 0x03, 0x00, 0xC0, 0x03, 0x1C, 0x02, 0x00, 0xD4, 0x8F, 0x05, 0x00, 0xA8, 0x1F, 0x0B, + 0x15, 0x16, 0x05, 0x00, 0x03, 0x2C, 0x0A, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x20, 0xA1, 0x07, + 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x11, 0x04, 0x00, 0x00, 0x04, 0x40, 0x02, 0x00, 0x00, + 0x54, 0x06, 0x00, 0x00, 0xA8, 0x0C, 0x15, 0x16, 0x05, 0x00, 0x03, 0x2C, 0x0A, 0x00, 0x00, 0x15, + 0x16, 0x05, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x11, 0x05, 0x00, + 0x00, 0x05, 0xD0, 0x02, 0x00, 0x40, 0xE3, 0x09, 0x00, 0x80, 0xC6, 0x13, 0x15, 0x16, 0x05, 0x00, + 0x03, 0x2C, 0x0A, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, + 0x00, 0x26, 0x24, 0x11, 0x06, 0x00, 0x80, 0x07, 0x38, 0x04, 0x00, 0x50, 0x3F, 0x16, 0x00, 0xA0, + 0x7E, 0x2C, 0x15, 0x16, 0x05, 0x00, 0x03, 0x2C, 0x0A, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x20, + 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x11, 0x07, 0x00, 0x00, 0x0A, 0xA0, 0x05, + 0x00, 0x00, 0x8D, 0x27, 0x00, 0x00, 0x1A, 0x4F, 0x15, 0x16, 0x05, 0x00, 0x03, 0x2C, 0x0A, 0x00, + 0x00, 0x15, 0x16, 0x05, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x11, + 0x08, 0x00, 0x00, 0x0F, 0x70, 0x08, 0x00, 0x40, 0xFD, 0x58, 0x00, 0x80, 0xFA, 0xB1, 0x15, 0x16, + 0x05, 0x00, 0x03, 0x2C, 0x0A, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, + 0x2C, 0x0A, 0x00, 0x1C, 0x24, 0x10, 0x03, 0x08, 0x48, 0x32, 0x36, 0x35, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x26, + 0x24, 0x11, 0x01, 0x00, 0x80, 0x02, 0x68, 0x01, 0x00, 0xD0, 0x78, 0x02, 0x00, 0xA0, 0xF1, 0x04, + 0x15, 0x16, 0x05, 0x00, 0x03, 0x2C, 0x0A, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x20, 0xA1, 0x07, + 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x11, 0x02, 0x00, 0x80, 0x02, 0xE0, 0x01, 0x00, 0xC0, + 0x4B, 0x03, 0x00, 0x80, 0x97, 0x06, 0x15, 0x16, 0x05, 0x00, 0x03, 0x2C, 0x0A, 0x00, 0x00, 0x15, + 0x16, 0x05, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x11, 0x03, 0x00, + 0xC0, 0x03, 0x1C, 0x02, 0x00, 0xD4, 0x8F, 0x05, 0x00, 0xA8, 0x1F, 0x0B, 0x15, 0x16, 0x05, 0x00, + 0x03, 0x2C, 0x0A, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, + 0x00, 0x26, 0x24, 0x11, 0x04, 0x00, 0x00, 0x04, 0x40, 0x02, 0x00, 0x00, 0x54, 0x06, 0x00, 0x00, + 0xA8, 0x0C, 0x15, 0x16, 0x05, 0x00, 0x03, 0x2C, 0x0A, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x20, + 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x11, 0x05, 0x00, 0x00, 0x05, 0xD0, 0x02, + 0x00, 0x40, 0xE3, 0x09, 0x00, 0x80, 0xC6, 0x13, 0x15, 0x16, 0x05, 0x00, 0x03, 0x2C, 0x0A, 0x00, + 0x00, 0x15, 0x16, 0x05, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x11, + 0x06, 0x00, 0x80, 0x07, 0x38, 0x04, 0x00, 0x50, 0x3F, 0x16, 0x00, 0xA0, 0x7E, 0x2C, 0x15, 0x16, + 0x05, 0x00, 0x03, 0x2C, 0x0A, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, + 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x11, 0x07, 0x00, 0x00, 0x0A, 0xA0, 0x05, 0x00, 0x00, 0x8D, 0x27, + 0x00, 0x00, 0x1A, 0x4F, 0x15, 0x16, 0x05, 0x00, 0x03, 0x2C, 0x0A, 0x00, 0x00, 0x15, 0x16, 0x05, + 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x11, 0x08, 0x00, 0x00, 0x0F, + 0x70, 0x08, 0x00, 0x40, 0xFD, 0x58, 0x00, 0x80, 0xFA, 0xB1, 0x15, 0x16, 0x05, 0x00, 0x03, 0x2C, + 0x0A, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x1B, + 0x24, 0x04, 0x04, 0x06, 0x59, 0x55, 0x59, 0x32, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0xAA, + 0x00, 0x38, 0x9B, 0x71, 0x10, 0x06, 0x00, 0x00, 0x00, 0x00, 0x26, 0x24, 0x05, 0x01, 0x00, 0x80, + 0x02, 0x68, 0x01, 0x00, 0xC0, 0x4B, 0x03, 0x00, 0x80, 0x97, 0x06, 0x00, 0x08, 0x07, 0x00, 0x15, + 0x16, 0x05, 0x00, 0x03, 0x15, 0x16, 0x05, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, + 0x26, 0x24, 0x05, 0x02, 0x00, 0x80, 0x02, 0xE0, 0x01, 0x00, 0x00, 0x65, 0x04, 0x00, 0x00, 0xCA, + 0x08, 0x00, 0x60, 0x09, 0x00, 0x15, 0x16, 0x05, 0x00, 0x03, 0x15, 0x16, 0x05, 0x00, 0x20, 0xA1, + 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x26, 0x24, 0x05, 0x03, 0x00, 0xC0, 0x03, 0x1C, 0x02, 0x00, + 0xD0, 0x78, 0x02, 0x00, 0x70, 0x6A, 0x07, 0x00, 0xD2, 0x0F, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x03, + 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x26, 0x24, 0x05, 0x04, + 0x00, 0x00, 0x04, 0x40, 0x02, 0x00, 0x00, 0xD0, 0x02, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x12, + 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x03, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, + 0x1E, 0x00, 0x26, 0x24, 0x05, 0x05, 0x00, 0x00, 0x05, 0xD0, 0x02, 0x00, 0x00, 0xC2, 0x01, 0x00, + 0x00, 0xCA, 0x08, 0x00, 0x20, 0x1C, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x03, 0x40, 0x42, 0x0F, 0x00, + 0x80, 0x84, 0x1E, 0x00, 0x40, 0x4B, 0x4C, 0x00, 0x22, 0x24, 0x05, 0x06, 0x00, 0x80, 0x07, 0x38, + 0x04, 0x00, 0x80, 0xF4, 0x03, 0x00, 0x40, 0xE3, 0x09, 0x00, 0x48, 0x3F, 0x00, 0x80, 0x84, 0x1E, + 0x00, 0x02, 0x80, 0x84, 0x1E, 0x00, 0x40, 0x4B, 0x4C, 0x00, 0x06, 0x24, 0x0D, 0x01, 0x01, 0x04, + 0x09, 0x04, 0x01, 0x01, 0x01, 0x0E, 0x02, 0x00, 0x0A, 0x07, 0x05, 0x85, 0x05, 0x00, 0x02, 0x01, + 0x09, 0x04, 0x01, 0x02, 0x01, 0x0E, 0x02, 0x00, 0x0B, 0x07, 0x05, 0x85, 0x05, 0x00, 0x04, 0x01, + 0x09, 0x04, 0x01, 0x03, 0x01, 0x0E, 0x02, 0x00, 0x0C, 0x07, 0x05, 0x85, 0x05, 0x00, 0x0C, 0x01, + 0x09, 0x04, 0x01, 0x04, 0x01, 0x0E, 0x02, 0x00, 0x0D, 0x07, 0x05, 0x85, 0x05, 0x00, 0x14, 0x01 +}; +} diff --git a/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/logitech_c270.hpp b/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/logitech_c270.hpp new file mode 100644 index 00000000..59bef8ea --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/logitech_c270.hpp @@ -0,0 +1,3598 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include + +/* + ======================== USB Device ======================== + + +++++++++++++++++ Device Information ++++++++++++++++++ +Device Description : Logi USB Camera (C270 HD WebCam) +Device ID : USB\VID_046D&PID_0825\E190CC90 +Hardware IDs : USB\VID_046D&PID_0825&REV_0012 USB\VID_046D&PID_0825 +Driver KeyName : {36fc9e60-c465-11cf-8056-444553540000}\0084 (GUID_DEVCLASS_USB) +Driver : \SystemRoot\System32\drivers\usbccgp.sys (Version: 10.0.19041.4474 Date: 2024-06-13) +Driver Inf : C:\Windows\inf\oem102.inf +Legacy BusType : PNPBus +Class : USB +Class GUID : {36fc9e60-c465-11cf-8056-444553540000} (GUID_DEVCLASS_USB) +Service : usbccgp +Enumerator : USB +Location Info : Port_#0007.Hub_#0013 +Location IDs : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(1)#USB(3)#USB(7), ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(1)#USB(3)#USB(7) +Container ID : {3e8be164-67c8-544f-83b8-ffdd10fc0add} +Manufacturer Info : Logitech +Capabilities : 0x94 (Removable, UniqueID, SurpriseRemovalOK) +Status : 0x0180600A (DN_DRIVER_LOADED, DN_STARTED, DN_DISABLEABLE, DN_REMOVABLE, DN_NT_ENUMERATOR, DN_NT_DRIVER) +Problem Code : 0 +Address : 7 +HcDisableSelectiveSuspend: 0 +EnableSelectiveSuspend : 0 +SelectiveSuspendEnabled : 0 +EnhancedPowerMgmtEnabled : 0 +IdleInWorkingState : 0 +WakeFromSleepState : 0 +Power State : D0 (supported: D0, D3, wake from D0) + Child Device 1 : Logi C270 HD WebCam + Device Path : \\?\USB#VID_046D&PID_0825&MI_00#7&40544e5&1&0000#{e5323777-f976-4f5b-9b55-b94699c46e44}\global (STATIC_KSCATEGORY_VIDEO_CAMERA) + Kernel Name : \Device\00000358 + Device ID : USB\VID_046D&PID_0825&MI_00\7&40544E5&1&0000 + Class : Camera + Driver KeyName : {ca3e7ab9-b4c3-4ae6-8251-579ef933890f}\0002 (GUID_DEVCLASS_CAMERA) + Service : usbvideo + Location : 0005.0000.0004.001.003.001.003.007.000 + LocationPaths : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(1)#USB(3)#USB(7)#USBMI(0) PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(1)#USB(3)#USB(7)#USB(7) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(1)#USB(3)#USB(7)#USBMI(0) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(1)#USB(3)#USB(7)#USB(7) + Child Device 2 : Logi C270 HD WebCam + Device Path : \\?\USB#VID_046D&PID_0825&MI_02#7&40544e5&1&0002#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global (AM_KSCATEGORY_CAPTURE) + Kernel Name : \Device\00000359 + Device ID : USB\VID_046D&PID_0825&MI_02\7&40544E5&1&0002 + Class : MEDIA + Driver KeyName : {4d36e96c-e325-11ce-bfc1-08002be10318}\0007 (GUID_DEVCLASS_MEDIA) + Service : usbaudio + Location : 0005.0000.0004.001.003.001.003.007.000 + LocationPaths : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(3)#USB(1)#USB(3)#USB(7)#USBMI(2) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(3)#USB(1)#USB(3)#USB(7)#USBMI(2) + Child Device 1 : Microphone (Logi C270 HD WebCam) (Audio Endpoint) + Device ID : SWD\MMDEVAPI\{0.0.1.00000000}.{1F697205-E0F8-4820-97E4-7E3AB271EEDD} + Class : AudioEndpoint + Driver KeyName : {c166523c-fe0c-4a94-a586-f1a80cfbbf3e}\0027 (AUDIOENDPOINT_CLASS_UUID) + + +++++++++++++++++ Registry USB Flags +++++++++++++++++ +HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags\046D08250012 + osvc : REG_BINARY 00 00 + NewInterfaceUsage : REG_DWORD 00000000 (0) + + ---------------- Connection Information --------------- +Connection Index : 0x07 (Port 7) +Connection Status : 0x01 (DeviceConnected) +Current Config Value : 0x01 (Configuration 1) +Device Address : 0x0F (15) +Is Hub : 0x00 (no) +Device Bus Speed : 0x02 (High-Speed) +Number Of Open Pipes : 0x01 (1 pipe to data endpoints) +Pipe[0] : EndpointID=7 Direction=IN ScheduleOffset=0 Type=Interrupt +Data (HexDump) : 07 00 00 00 12 01 00 02 EF 02 01 40 6D 04 25 08 ...........@m.%. + 12 00 00 00 02 01 01 02 00 0F 00 01 00 00 00 01 ................ + 00 00 00 07 05 87 03 10 00 08 00 00 00 00 .............. + + --------------- Connection Information V2 ------------- +Connection Index : 0x07 (7) +Length : 0x10 (16 bytes) +SupportedUsbProtocols : 0x03 + Usb110 : 1 (yes, port supports USB 1.1) + Usb200 : 1 (yes, port supports USB 2.0) + Usb300 : 0 (no, port not supports USB 3.0) + ReservedMBZ : 0x00 +Flags : 0x00 + DevIsOpAtSsOrHigher : 0 (Device is not operating at SuperSpeed or higher) + DevIsSsCapOrHigher : 0 (Device is not SuperSpeed capable or higher) + DevIsOpAtSsPlusOrHigher : 0 (Device is not operating at SuperSpeedPlus or higher) + DevIsSsPlusCapOrHigher : 0 (Device is not SuperSpeedPlus capable or higher) + ReservedMBZ : 0x00 +Data (HexDump) : 07 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 ................ + + ---------------------- Device Descriptor ---------------------- +bLength : 0x12 (18 bytes) +bDescriptorType : 0x01 (Device Descriptor) +bcdUSB : 0x200 (USB Version 2.00) +bDeviceClass : 0xEF (Miscellaneous) +bDeviceSubClass : 0x02 +bDeviceProtocol : 0x01 (IAD - Interface Association Descriptor) +bMaxPacketSize0 : 0x40 (64 bytes) +idVendor : 0x046D (Logitech Inc.) +idProduct : 0x0825 +bcdDevice : 0x0012 +iManufacturer : 0x00 (No String Descriptor) +iProduct : 0x00 (No String Descriptor) +iSerialNumber : 0x02 (String Descriptor 2) + Language 0x0409 : "E190CC90" +bNumConfigurations : 0x01 (1 Configuration) +Data (HexDump) : 12 01 00 02 EF 02 01 40 6D 04 25 08 12 00 00 00 .......@m.%..... + 02 01 .. + + ------------------ Configuration Descriptor ------------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x02 (Configuration Descriptor) +wTotalLength : 0x09A2 (2466 bytes) +bNumInterfaces : 0x04 (4 Interfaces) +bConfigurationValue : 0x01 (Configuration 1) +iConfiguration : 0x00 (No String Descriptor) +bmAttributes : 0x80 + D7: Reserved, set 1 : 0x01 + D6: Self Powered : 0x00 (no) + D5: Remote Wakeup : 0x00 (no) + D4..0: Reserved, set 0 : 0x00 +MaxPower : 0xFA (500 mA) +Data (HexDump) : 09 02 A2 09 04 01 00 80 FA 08 0B 00 02 0E 03 00 ................ + 00 09 04 00 00 01 0E 01 00 00 0D 24 01 00 01 A0 ...........$.... + 00 00 6C DC 02 01 01 12 24 02 01 01 02 00 00 00 ..l.....$....... + 00 00 00 00 00 03 0E 00 00 0B 24 05 02 01 00 40 ..........$....@ + 02 5B 17 00 1B 24 06 03 E4 8E 67 69 0F 41 DB 40 .[...$....gi.A.@ + A8 50 74 20 D7 D8 24 0E 08 01 02 02 3F 03 00 1B .Pt ..$.....?... + 24 06 04 15 02 E4 49 34 F4 FE 47 B1 58 0E 88 50 $.....I4..G.X..P + 23 E5 1B 03 01 02 02 09 01 00 1C 24 06 06 A9 4C #..........$...L + 5D 1F 11 DE 87 44 84 0D 50 93 3C 8E C8 D1 12 01 ]....D..P.<..... + 04 03 FF FF 03 00 1B 24 06 07 21 2D E5 FF 30 80 .......$..!-..0. + 2C 4E 82 D9 F5 87 D0 05 40 BD 02 01 04 02 00 03 ,N......@....... + 00 09 24 03 05 01 01 00 04 00 07 05 87 03 10 00 ..$............. + 08 05 25 03 10 00 09 04 01 00 00 0E 02 00 00 10 ..%............. + 24 01 03 36 07 81 00 05 01 00 00 01 00 04 04 1B $..6............ + 24 04 01 13 59 55 59 32 00 00 10 00 80 00 00 AA $...YUY2........ + 00 38 9B 71 10 01 00 00 00 00 32 24 05 01 01 80 .8.q......2$.... + 02 E0 01 00 00 77 01 00 00 CA 08 00 60 09 00 15 .....w......`... + 16 05 00 06 15 16 05 00 80 1A 06 00 20 A1 07 00 ............ ... + 2A 2C 0A 00 40 42 0F 00 80 84 1E 00 32 24 05 02 *,..@B......2$.. + 01 A0 00 78 00 00 70 17 00 00 A0 8C 00 00 96 00 ...x..p......... + 00 15 16 05 00 06 15 16 05 00 80 1A 06 00 20 A1 .............. . + 07 00 2A 2C 0A 00 40 42 0F 00 80 84 1E 00 32 24 ..*,..@B......2$ + 05 03 01 B0 00 90 00 00 F0 1E 00 00 A0 B9 00 00 ................ + C6 00 00 15 16 05 00 06 15 16 05 00 80 1A 06 00 ................ + 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 1E 00 ...*,..@B...... + 32 24 05 04 01 40 01 B0 00 00 C0 44 00 00 80 9C 2$...@.....D.... + 01 00 B8 01 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 32 24 05 05 01 40 01 F0 00 00 C0 5D 00 00 ..2$...@.....].. + 80 32 02 00 58 02 00 15 16 05 00 06 15 16 05 00 .2..X........... + 80 1A 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 .... ...*,..@B.. + 80 84 1E 00 32 24 05 06 01 60 01 20 01 00 C0 7B ....2$...`. ...{ + 00 00 80 E6 02 00 18 03 00 15 16 05 00 06 15 16 ................ + 05 00 80 1A 06 00 20 A1 07 00 2A 2C 0A 00 40 42 ...... ...*,..@B + 0F 00 80 84 1E 00 32 24 05 07 01 B0 01 F0 00 00 ......2$........ + 90 7E 00 00 60 F7 02 00 2A 03 00 15 16 05 00 06 .~..`...*....... + 15 16 05 00 80 1A 06 00 20 A1 07 00 2A 2C 0A 00 ........ ...*,.. + 40 42 0F 00 80 84 1E 00 32 24 05 08 01 20 02 20 @B......2$... . + 01 00 40 BF 00 00 80 7B 04 00 C8 04 00 15 16 05 ..@....{........ + 00 06 15 16 05 00 80 1A 06 00 20 A1 07 00 2A 2C .......... ...*, + 0A 00 40 42 0F 00 80 84 1E 00 32 24 05 09 01 80 ..@B......2$.... + 02 68 01 00 40 19 01 00 80 97 06 00 08 07 00 15 .h..@........... + 16 05 00 06 15 16 05 00 80 1A 06 00 20 A1 07 00 ............ ... + 2A 2C 0A 00 40 42 0F 00 80 84 1E 00 2E 24 05 0A *,..@B.......$.. + 01 F0 02 A0 01 00 E0 7D 01 00 60 75 07 00 8C 09 .......}..`u.... + 00 80 1A 06 00 05 80 1A 06 00 20 A1 07 00 2A 2C .......... ...*, + 0A 00 40 42 0F 00 80 84 1E 00 2A 24 05 0B 01 20 ..@B......*$... + 03 C0 01 00 80 B5 01 00 00 D6 06 00 F0 0A 00 20 ............... + A1 07 00 04 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 .... ...*,..@B.. + 80 84 1E 00 2A 24 05 0C 01 20 03 58 02 00 F0 49 ....*$... .X...I + 02 00 C0 27 09 00 A6 0E 00 20 A1 07 00 04 20 A1 ...'..... .... . + 07 00 2A 2C 0A 00 40 42 0F 00 80 84 1E 00 2A 24 ..*,..@B......*$ + 05 0D 01 60 03 E0 01 00 40 FA 01 00 00 E9 07 00 ...`....@....... + A8 0C 00 20 A1 07 00 04 20 A1 07 00 2A 2C 0A 00 ... .... ...*,.. + 40 42 0F 00 80 84 1E 00 26 24 05 0E 01 C0 03 20 @B......&$..... + 02 00 80 7D 02 00 80 78 07 00 F0 0F 00 2A 2C 0A ...}...x.....*,. + 00 03 2A 2C 0A 00 40 42 0F 00 80 84 1E 00 22 24 ..*,..@B......"$ + 05 0F 01 C0 03 D0 02 00 C0 4B 03 00 80 97 06 00 .........K...... + 18 15 00 40 42 0F 00 02 40 42 0F 00 80 84 1E 00 ...@B...@B...... + 22 24 05 10 01 00 04 40 02 00 00 D0 02 00 00 A0 "$.....@........ + 05 00 00 12 00 40 42 0F 00 02 40 42 0F 00 80 84 .....@B...@B.... + 1E 00 22 24 05 11 01 A0 04 90 02 00 20 B4 03 00 .."$........ ... + 40 68 07 00 B4 17 00 40 42 0F 00 02 40 42 0F 00 @h.....@B...@B.. + 80 84 1E 00 22 24 05 12 01 00 05 D0 02 00 00 65 ...."$.........e + 04 00 00 CA 08 00 20 1C 00 80 84 1E 00 02 55 58 ...... .......UX + 14 00 80 84 1E 00 22 24 05 13 01 00 05 C0 03 00 ......"$........ + 00 DC 05 00 00 B8 0B 00 80 25 00 80 84 1E 00 02 .........%...... + 55 58 14 00 80 84 1E 00 06 24 0D 01 01 04 0B 24 UX.......$.....$ + 06 02 13 01 01 00 00 00 00 32 24 07 01 01 80 02 .........2$..... + E0 01 00 00 77 01 00 00 CA 08 00 60 09 00 15 16 ....w......`.... + 05 00 06 15 16 05 00 80 1A 06 00 20 A1 07 00 2A ........... ...* + 2C 0A 00 40 42 0F 00 80 84 1E 00 32 24 07 02 01 ,..@B......2$... + A0 00 78 00 00 70 17 00 00 A0 8C 00 00 96 00 00 ..x..p.......... + 15 16 05 00 06 15 16 05 00 80 1A 06 00 20 A1 07 ............. .. + 00 2A 2C 0A 00 40 42 0F 00 80 84 1E 00 32 24 07 .*,..@B......2$. + 03 01 B0 00 90 00 00 F0 1E 00 00 A0 B9 00 00 C6 ................ + 00 00 15 16 05 00 06 15 16 05 00 80 1A 06 00 20 ............... + A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 1E 00 32 ...*,..@B......2 + 24 07 04 01 40 01 B0 00 00 C0 44 00 00 80 9C 01 $...@.....D..... + 00 B8 01 00 15 16 05 00 06 15 16 05 00 80 1A 06 ................ + 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 1E . ...*,..@B..... + 00 32 24 07 05 01 40 01 F0 00 00 C0 5D 00 00 80 .2$...@.....]... + 32 02 00 58 02 00 15 16 05 00 06 15 16 05 00 80 2..X............ + 1A 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 ... ...*,..@B... + 84 1E 00 32 24 07 06 01 60 01 20 01 00 C0 7B 00 ...2$...`. ...{. + 00 80 E6 02 00 18 03 00 15 16 05 00 06 15 16 05 ................ + 00 80 1A 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F ..... ...*,..@B. + 00 80 84 1E 00 32 24 07 07 01 B0 01 F0 00 00 90 .....2$......... + 7E 00 00 60 F7 02 00 2A 03 00 15 16 05 00 06 15 ~..`...*........ + 16 05 00 80 1A 06 00 20 A1 07 00 2A 2C 0A 00 40 ....... ...*,..@ + 42 0F 00 80 84 1E 00 32 24 07 08 01 20 02 20 01 B......2$... . . + 00 40 BF 00 00 80 7B 04 00 C8 04 00 15 16 05 00 .@....{......... + 06 15 16 05 00 80 1A 06 00 20 A1 07 00 2A 2C 0A ......... ...*,. + 00 40 42 0F 00 80 84 1E 00 32 24 07 09 01 80 02 .@B......2$..... + 68 01 00 40 19 01 00 80 97 06 00 08 07 00 15 16 h..@............ + 05 00 06 15 16 05 00 80 1A 06 00 20 A1 07 00 2A ........... ...* + 2C 0A 00 40 42 0F 00 80 84 1E 00 32 24 07 0A 01 ,..@B......2$... + F0 02 A0 01 00 E0 7D 01 00 40 F3 08 00 8C 09 00 ......}..@...... + 15 16 05 00 06 15 16 05 00 80 1A 06 00 20 A1 07 ............. .. + 00 2A 2C 0A 00 40 42 0F 00 80 84 1E 00 32 24 07 .*,..@B......2$. + 0B 01 20 03 C0 01 00 80 B5 01 00 00 41 0A 00 F0 .. .........A... + 0A 00 15 16 05 00 06 15 16 05 00 80 1A 06 00 20 ............... + A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 1E 00 32 ...*,..@B......2 + 24 07 0C 01 20 03 58 02 00 F0 49 02 00 A0 BB 0D $... .X...I..... + 00 A6 0E 00 15 16 05 00 06 15 16 05 00 80 1A 06 ................ + 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 1E . ...*,..@B..... + 00 32 24 07 0D 01 60 03 E0 01 00 40 FA 01 00 80 .2$...`....@.... + DD 0B 00 A8 0C 00 15 16 05 00 06 15 16 05 00 80 ................ + 1A 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 ... ...*,..@B... + 84 1E 00 32 24 07 0E 01 C0 03 20 02 00 80 7D 02 ...2$..... ...}. + 00 00 F1 0E 00 F0 0F 00 15 16 05 00 06 15 16 05 ................ + 00 80 1A 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F ..... ...*,..@B. + 00 80 84 1E 00 32 24 07 0F 01 C0 03 D0 02 00 C0 .....2$......... + 4B 03 00 80 C6 13 00 18 15 00 15 16 05 00 06 15 K............... + 16 05 00 80 1A 06 00 20 A1 07 00 2A 2C 0A 00 40 ....... ...*,..@ + 42 0F 00 80 84 1E 00 32 24 07 10 01 00 04 40 02 B......2$.....@. + 00 00 D0 02 00 00 E0 10 00 00 12 00 15 16 05 00 ................ + 06 15 16 05 00 80 1A 06 00 20 A1 07 00 2A 2C 0A ......... ...*,. + 00 40 42 0F 00 80 84 1E 00 32 24 07 11 01 A0 04 .@B......2$..... + 90 02 00 20 B4 03 00 C0 38 16 00 B4 17 00 15 16 ... ....8....... + 05 00 06 15 16 05 00 80 1A 06 00 20 A1 07 00 2A ........... ...* + 2C 0A 00 40 42 0F 00 80 84 1E 00 32 24 07 12 01 ,..@B......2$... + 00 05 D0 02 00 00 65 04 00 00 5E 1A 00 20 1C 00 ......e...^.. .. + 15 16 05 00 06 15 16 05 00 80 1A 06 00 20 A1 07 ............. .. + 00 2A 2C 0A 00 40 42 0F 00 80 84 1E 00 32 24 07 .*,..@B......2$. + 13 01 00 05 C0 03 00 00 DC 05 00 00 28 23 00 80 ............(#.. + 25 00 15 16 05 00 06 15 16 05 00 80 1A 06 00 20 %.............. + A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 1E 00 06 ...*,..@B....... + 24 0D 01 01 04 09 04 01 01 01 0E 02 00 00 07 05 $............... + 81 05 C0 00 01 09 04 01 02 01 0E 02 00 00 07 05 ................ + 81 05 80 01 01 09 04 01 03 01 0E 02 00 00 07 05 ................ + 81 05 00 02 01 09 04 01 04 01 0E 02 00 00 07 05 ................ + 81 05 80 02 01 09 04 01 05 01 0E 02 00 00 07 05 ................ + 81 05 20 03 01 09 04 01 06 01 0E 02 00 00 07 05 .. ............. + 81 05 B0 03 01 09 04 01 07 01 0E 02 00 00 07 05 ................ + 81 05 80 0A 01 09 04 01 08 01 0E 02 00 00 07 05 ................ + 81 05 20 0B 01 09 04 01 09 01 0E 02 00 00 07 05 .. ............. + 81 05 E0 0B 01 09 04 01 0A 01 0E 02 00 00 07 05 ................ + 81 05 80 13 01 09 04 01 0B 01 0E 02 00 00 07 05 ................ + 81 05 FC 13 01 08 0B 02 02 01 02 00 00 09 04 02 ................ + 00 00 01 01 00 00 09 24 01 00 01 26 00 01 03 0C .......$...&.... + 24 02 01 01 02 00 01 00 00 00 00 09 24 03 03 01 $...........$... + 01 01 05 00 09 24 06 05 01 01 03 00 00 09 04 03 .....$.......... + 00 00 01 02 00 00 09 04 03 01 01 01 02 00 00 07 ................ + 24 01 03 01 01 00 0B 24 02 01 01 02 10 01 80 3E $......$.......> + 00 09 05 86 05 44 00 04 00 00 07 25 01 01 00 00 .....D.....%.... + 00 09 04 03 02 01 01 02 00 00 07 24 01 03 01 01 ...........$.... + 00 0B 24 02 01 01 02 10 01 C0 5D 00 09 05 86 05 ..$.......]..... + 64 00 04 00 00 07 25 01 01 00 00 00 09 04 03 03 d.....%......... + 01 01 02 00 00 07 24 01 03 01 01 00 0B 24 02 01 ......$......$.. + 01 02 10 01 00 7D 00 09 05 86 05 84 00 04 00 00 .....}.......... + 07 25 01 01 00 00 00 09 04 03 04 01 01 02 00 00 .%.............. + 07 24 01 03 01 01 00 0B 24 02 01 01 02 10 01 80 .$......$....... + BB 00 09 05 86 05 C4 00 04 00 00 07 25 01 01 00 ............%... + 00 00 .. + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x00 +bInterfaceCount : 0x02 +bFunctionClass : 0x0E (Video) +bFunctionSubClass : 0x03 (Video Interface Collection) +bFunctionProtocol : 0x00 (PC_PROTOCOL_UNDEFINED protocol) +iFunction : 0x00 (No String Descriptor) +Data (HexDump) : 08 0B 00 02 0E 03 00 00 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x00 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x01 (Video Control) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 00 00 01 0E 01 00 00 ......... + + ------- Video Control Interface Header Descriptor ----- +bLength : 0x0D (13 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x01 (Video Control Header) +bcdUVC : 0x0100 (UVC Version 1.00) +wTotalLength : 0x00A0 (160 bytes) +dwClockFreq : 0x02DC6C00 (48 MHz) +bInCollection : 0x01 (1 VideoStreaming interface) +baInterfaceNr[1] : 0x01 +Data (HexDump) : 0D 24 01 00 01 A0 00 00 6C DC 02 01 01 .$......l.... + + -------- Video Control Input Terminal Descriptor ------ +bLength : 0x12 (18 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (ITT_CAMERA) +bAssocTerminal : 0x00 (Not associated with an Output Terminal) +iTerminal : 0x00 +Camera Input Terminal Data: +wObjectiveFocalLengthMin : 0x0000 +wObjectiveFocalLengthMax : 0x0000 +wOcularFocalLength : 0x0000 +bControlSize : 0x03 +bmControls : 0x0E, 0x00, 0x00 + D0 : 0 no - Scanning Mode + D1 : 1 yes - Auto-Exposure Mode + D2 : 1 yes - Auto-Exposure Priority + D3 : 1 yes - Exposure Time (Absolute) + D4 : 0 no - Exposure Time (Relative) + D5 : 0 no - Focus (Absolute) + D6 : 0 no - Focus (Relative) + D7 : 0 no - Iris (Absolute) + D8 : 0 no - Iris (Relative) + D9 : 0 no - Zoom (Absolute) + D10 : 0 no - Zoom (Relative) + D11 : 0 no - Pan (Absolute) + D12 : 0 no - Pan (Relative) + D13 : 0 no - Roll (Absolute) + D14 : 0 no - Roll (Relative) + D15 : 0 no - Tilt (Absolute) + D16 : 0 no - Tilt (Relative) + D17 : 0 no - Focus Auto + D18 : 0 no - Reserved + D19 : 0 no - Reserved + D20 : 0 no - Reserved + D21 : 0 no - Reserved + D22 : 0 no - Reserved + D23 : 0 no - Reserved +Data (HexDump) : 12 24 02 01 01 02 00 00 00 00 00 00 00 00 03 0E .$.............. + 00 00 .. + + -------- Video Control Processing Unit Descriptor ----- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x05 (Processing Unit) +bUnitID : 0x02 +bSourceID : 0x01 +wMaxMultiplier : 0x4000 (163.84x Zoom) +bControlSize : 0x02 +bmControls : 0x5B, 0x17 + D0 : 1 yes - Brightness + D1 : 1 yes - Contrast + D2 : 0 no - Hue + D3 : 1 yes - Saturation + D4 : 1 yes - Sharpness + D5 : 0 no - Gamma + D6 : 1 yes - White Balance Temperature + D7 : 0 no - White Balance Component + D8 : 1 yes - Backlight Compensation + D9 : 1 yes - Gain + D10 : 1 yes - Power Line Frequency + D11 : 0 no - Hue, Auto + D12 : 1 yes - White Balance Temperature, Auto + D13 : 0 no - White Balance Component, Auto + D14 : 0 no - Digital Multiplier + D15 : 0 no - Digital Multiplier Limit +iProcessing : 0x00 +Data (HexDump) : 0B 24 05 02 01 00 40 02 5B 17 00 .$....@.[.. + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1B (27 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x03 +guidExtensionCode : {69678EE4-410F-40DB-A850-7420D7D8240E} +bNumControls : 0x08 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x02 +bControlSize : 0x02 +bmControls : 0x3F, 0x03 + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 1 yes - Vendor-Specific (Optional) + D3 : 1 yes - Vendor-Specific (Optional) + D4 : 1 yes - Vendor-Specific (Optional) + D5 : 1 yes - Vendor-Specific (Optional) + D6 : 0 no - Vendor-Specific (Optional) + D7 : 0 no - Vendor-Specific (Optional) + D8 : 1 yes - Vendor-Specific (Optional) + D9 : 1 yes - Vendor-Specific (Optional) + D10 : 0 no - Vendor-Specific (Optional) + D11 : 0 no - Vendor-Specific (Optional) + D12 : 0 no - Vendor-Specific (Optional) + D13 : 0 no - Vendor-Specific (Optional) + D14 : 0 no - Vendor-Specific (Optional) + D15 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1B 24 06 03 E4 8E 67 69 0F 41 DB 40 A8 50 74 20 .$....gi.A.@.Pt + D7 D8 24 0E 08 01 02 02 3F 03 00 ..$.....?.. + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1B (27 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x04 +guidExtensionCode : {49E40215-F434-47FE-B158-0E885023E51B} +bNumControls : 0x03 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x02 +bControlSize : 0x02 +bmControls : 0x09, 0x01 + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 0 no - Vendor-Specific (Optional) + D2 : 0 no - Vendor-Specific (Optional) + D3 : 1 yes - Vendor-Specific (Optional) + D4 : 0 no - Vendor-Specific (Optional) + D5 : 0 no - Vendor-Specific (Optional) + D6 : 0 no - Vendor-Specific (Optional) + D7 : 0 no - Vendor-Specific (Optional) + D8 : 1 yes - Vendor-Specific (Optional) + D9 : 0 no - Vendor-Specific (Optional) + D10 : 0 no - Vendor-Specific (Optional) + D11 : 0 no - Vendor-Specific (Optional) + D12 : 0 no - Vendor-Specific (Optional) + D13 : 0 no - Vendor-Specific (Optional) + D14 : 0 no - Vendor-Specific (Optional) + D15 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1B 24 06 04 15 02 E4 49 34 F4 FE 47 B1 58 0E 88 .$.....I4..G.X.. + 50 23 E5 1B 03 01 02 02 09 01 00 P#......... + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1C (28 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x06 +guidExtensionCode : {1F5D4CA9-DE11-4487-840D-50933C8EC8D1} +bNumControls : 0x12 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x04 +bControlSize : 0x03 +bmControls : 0xFF, 0xFF, 0x03 + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 1 yes - Vendor-Specific (Optional) + D3 : 1 yes - Vendor-Specific (Optional) + D4 : 1 yes - Vendor-Specific (Optional) + D5 : 1 yes - Vendor-Specific (Optional) + D6 : 1 yes - Vendor-Specific (Optional) + D7 : 1 yes - Vendor-Specific (Optional) + D8 : 1 yes - Vendor-Specific (Optional) + D9 : 1 yes - Vendor-Specific (Optional) + D10 : 1 yes - Vendor-Specific (Optional) + D11 : 1 yes - Vendor-Specific (Optional) + D12 : 1 yes - Vendor-Specific (Optional) + D13 : 1 yes - Vendor-Specific (Optional) + D14 : 1 yes - Vendor-Specific (Optional) + D15 : 1 yes - Vendor-Specific (Optional) + D16 : 1 yes - Vendor-Specific (Optional) + D17 : 1 yes - Vendor-Specific (Optional) + D18 : 0 no - Vendor-Specific (Optional) + D19 : 0 no - Vendor-Specific (Optional) + D20 : 0 no - Vendor-Specific (Optional) + D21 : 0 no - Vendor-Specific (Optional) + D22 : 0 no - Vendor-Specific (Optional) + D23 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1C 24 06 06 A9 4C 5D 1F 11 DE 87 44 84 0D 50 93 .$...L]....D..P. + 3C 8E C8 D1 12 01 04 03 FF FF 03 00 <........... + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1B (27 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x07 +guidExtensionCode : {FFE52D21-8030-4E2C-82D9-F587D00540BD} +bNumControls : 0x02 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x04 +bControlSize : 0x02 +bmControls : 0x00, 0x03 + D0 : 0 no - Vendor-Specific (Optional) + D1 : 0 no - Vendor-Specific (Optional) + D2 : 0 no - Vendor-Specific (Optional) + D3 : 0 no - Vendor-Specific (Optional) + D4 : 0 no - Vendor-Specific (Optional) + D5 : 0 no - Vendor-Specific (Optional) + D6 : 0 no - Vendor-Specific (Optional) + D7 : 0 no - Vendor-Specific (Optional) + D8 : 1 yes - Vendor-Specific (Optional) + D9 : 1 yes - Vendor-Specific (Optional) + D10 : 0 no - Vendor-Specific (Optional) + D11 : 0 no - Vendor-Specific (Optional) + D12 : 0 no - Vendor-Specific (Optional) + D13 : 0 no - Vendor-Specific (Optional) + D14 : 0 no - Vendor-Specific (Optional) + D15 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1B 24 06 07 21 2D E5 FF 30 80 2C 4E 82 D9 F5 87 .$..!-..0.,N.... + D0 05 40 BD 02 01 04 02 00 03 00 ..@........ + + ------- Video Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x05 +wTerminalType : 0x0101 (TT_STREAMING) +bAssocTerminal : 0x00 (Not associated with an Input Terminal) +bSourceID : 0x04 +iTerminal : 0x00 +Data (HexDump) : 09 24 03 05 01 01 00 04 00 .$....... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x87 (Direction=IN EndpointID=7) +bmAttributes : 0x03 (TransferType=Interrupt) +wMaxPacketSize : 0x0010 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x10 (16 bytes per packet) +bInterval : 0x08 (8 ms) +Data (HexDump) : 07 05 87 03 10 00 08 ....... + + --- Class-specific VC Interrupt Endpoint Descriptor --- +bLength : 0x05 (5 bytes) +bDescriptorType : 0x25 (Video Control Endpoint) +bDescriptorSubtype : 0x03 (Interrupt) +wMaxTransferSize : 0x0010 (16 bytes) +Data (HexDump) : 05 25 03 10 00 .%... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 00 00 0E 02 00 00 ......... + + ---- VC-Specific VS Video Input Header Descriptor ----- +bLength : 0x10 (16 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x01 (Input Header) +bNumFormats : 0x03 +wTotalLength : 0x0736 (1846 bytes) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmInfo : 0x00 (Dynamic Format Change not supported) +bTerminalLink : 0x05 +bStillCaptureMethod : 0x01 (Still Capture Method 1) +nbTriggerSupport : 0x00 (Hardware Triggering not supported) +bTriggerUsage : 0x00 (Host will initiate still image capture) +nbControlSize : 0x01 +Video Payload Format 1 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Video Payload Format 2 : 0x04 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 1 yes - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Video Payload Format 3 : 0x04 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 1 yes - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Data (HexDump) : 10 24 01 03 36 07 81 00 05 01 00 00 01 00 04 04 .$..6........... + + ------- VS Uncompressed Format Type Descriptor -------- +bLength : 0x1B (27 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x04 (Uncompressed Format Type) +bFormatIndex : 0x01 (1) +bNumFrameDescriptors : 0x13 (19) +guidFormat : {32595559-0000-0010-8000-00AA00389B71} (YUY2) +bBitsPerPixel : 0x10 (16 bits) +bDefaultFrameIndex : 0x01 (1) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +Data (HexDump) : 1B 24 04 01 13 59 55 59 32 00 00 10 00 80 00 00 .$...YUY2....... + AA 00 38 9B 71 10 01 00 00 00 00 ..8.q...... + + -------- VS Uncompressed Frame Type Descriptor -------- +---> This is the Default (optimum) Frame index +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x01 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x01770000 (24576000 bps -> 3.72 MB/s) +dwMaxBitRate : 0x08CA0000 (147456000 bps -> 18.432 MB/s) +dwMaxVideoFrameBufferSize: 0x00096000 (614400 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 05 01 01 80 02 E0 01 00 00 77 01 00 00 CA 2$.........w.... + 08 00 60 09 00 15 16 05 00 06 15 16 05 00 80 1A ..`............. + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x01 +wWidth : 0x00A0 (160) +wHeight : 0x0078 (120) +dwMinBitRate : 0x00177000 (1536000 bps -> 192 KB/s) +dwMaxBitRate : 0x008CA000 (9216000 bps -> 1.152 MB/s) +dwMaxVideoFrameBufferSize: 0x00009600 (38400 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 05 02 01 A0 00 78 00 00 70 17 00 00 A0 8C 2$.....x..p..... + 00 00 96 00 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x01 +wWidth : 0x00B0 (176) +wHeight : 0x0090 (144) +dwMinBitRate : 0x001EF000 (2027520 bps -> 253.375 KB/s) +dwMaxBitRate : 0x00B9A000 (12165120 bps -> 1.520 MB/s) +dwMaxVideoFrameBufferSize: 0x0000C600 (50688 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 05 03 01 B0 00 90 00 00 F0 1E 00 00 A0 B9 2$.............. + 00 00 C6 00 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x01 +wWidth : 0x0140 (320) +wHeight : 0x00B0 (176) +dwMinBitRate : 0x0044C000 (4505600 bps -> 563.125 KB/s) +dwMaxBitRate : 0x019C8000 (27033600 bps -> 3.379 MB/s) +dwMaxVideoFrameBufferSize: 0x0001B800 (112640 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 05 04 01 40 01 B0 00 00 C0 44 00 00 80 9C 2$...@.....D.... + 01 00 B8 01 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x05 +bmCapabilities : 0x01 +wWidth : 0x0140 (320) +wHeight : 0x00F0 (240) +dwMinBitRate : 0x005DC000 (6144000 bps -> 768 KB/s) +dwMaxBitRate : 0x02328000 (36864000 bps -> 4.608 MB/s) +dwMaxVideoFrameBufferSize: 0x00025800 (153600 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 05 05 01 40 01 F0 00 00 C0 5D 00 00 80 32 2$...@.....]...2 + 02 00 58 02 00 15 16 05 00 06 15 16 05 00 80 1A ..X............. + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x06 +bmCapabilities : 0x01 +wWidth : 0x0160 (352) +wHeight : 0x0120 (288) +dwMinBitRate : 0x007BC000 (8110080 bps -> 1.13 MB/s) +dwMaxBitRate : 0x02E68000 (48660480 bps -> 6.82 MB/s) +dwMaxVideoFrameBufferSize: 0x00031800 (202752 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 05 06 01 60 01 20 01 00 C0 7B 00 00 80 E6 2$...`. ...{.... + 02 00 18 03 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x07 +bmCapabilities : 0x01 +wWidth : 0x01B0 (432) +wHeight : 0x00F0 (240) +dwMinBitRate : 0x007E9000 (8294400 bps -> 1.36 MB/s) +dwMaxBitRate : 0x02F76000 (49766400 bps -> 6.220 MB/s) +dwMaxVideoFrameBufferSize: 0x00032A00 (207360 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 05 07 01 B0 01 F0 00 00 90 7E 00 00 60 F7 2$.........~..`. + 02 00 2A 03 00 15 16 05 00 06 15 16 05 00 80 1A ..*............. + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x08 +bmCapabilities : 0x01 +wWidth : 0x0220 (544) +wHeight : 0x0120 (288) +dwMinBitRate : 0x00BF4000 (12533760 bps -> 1.566 MB/s) +dwMaxBitRate : 0x047B8000 (75202560 bps -> 9.400 MB/s) +dwMaxVideoFrameBufferSize: 0x0004C800 (313344 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 05 08 01 20 02 20 01 00 40 BF 00 00 80 7B 2$... . ..@....{ + 04 00 C8 04 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x09 +bmCapabilities : 0x01 +wWidth : 0x0280 (640) +wHeight : 0x0168 (360) +dwMinBitRate : 0x01194000 (18432000 bps -> 2.304 MB/s) +dwMaxBitRate : 0x06978000 (110592000 bps -> 13.824 MB/s) +dwMaxVideoFrameBufferSize: 0x00070800 (460800 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 05 09 01 80 02 68 01 00 40 19 01 00 80 97 2$.....h..@..... + 06 00 08 07 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x2E (46 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x0A +bmCapabilities : 0x01 +wWidth : 0x02F0 (752) +wHeight : 0x01A0 (416) +dwMinBitRate : 0x017DE000 (25026560 bps -> 3.128 MB/s) +dwMaxBitRate : 0x07756000 (125132800 bps -> 15.641 MB/s) +dwMaxVideoFrameBufferSize: 0x00098C00 (625664 bytes) +dwDefaultFrameInterval : 0x00061A80 (40.0000 ms -> 25.000 fps) +bFrameIntervalType : 0x05 (5 discrete frame intervals supported) +adwFrameInterval[1] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[2] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[3] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[4] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[5] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 2E 24 05 0A 01 F0 02 A0 01 00 E0 7D 01 00 60 75 .$.........}..`u + 07 00 8C 09 00 80 1A 06 00 05 80 1A 06 00 20 A1 .............. . + 07 00 2A 2C 0A 00 40 42 0F 00 80 84 1E 00 ..*,..@B...... + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x2A (42 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x0B +bmCapabilities : 0x01 +wWidth : 0x0320 (800) +wHeight : 0x01C0 (448) +dwMinBitRate : 0x01B58000 (28672000 bps -> 3.584 MB/s) +dwMaxBitRate : 0x06D60000 (114688000 bps -> 14.336 MB/s) +dwMaxVideoFrameBufferSize: 0x000AF000 (716800 bytes) +dwDefaultFrameInterval : 0x0007A120 (50.0000 ms -> 20.000 fps) +bFrameIntervalType : 0x04 (4 discrete frame intervals supported) +adwFrameInterval[1] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[2] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[3] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[4] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 2A 24 05 0B 01 20 03 C0 01 00 80 B5 01 00 00 D6 *$... .......... + 06 00 F0 0A 00 20 A1 07 00 04 20 A1 07 00 2A 2C ..... .... ...*, + 0A 00 40 42 0F 00 80 84 1E 00 ..@B...... + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x2A (42 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x0C +bmCapabilities : 0x01 +wWidth : 0x0320 (800) +wHeight : 0x0258 (600) +dwMinBitRate : 0x0249F000 (38400000 bps -> 4.800 MB/s) +dwMaxBitRate : 0x0927C000 (153600000 bps -> 19.200 MB/s) +dwMaxVideoFrameBufferSize: 0x000EA600 (960000 bytes) +dwDefaultFrameInterval : 0x0007A120 (50.0000 ms -> 20.000 fps) +bFrameIntervalType : 0x04 (4 discrete frame intervals supported) +adwFrameInterval[1] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[2] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[3] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[4] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 2A 24 05 0C 01 20 03 58 02 00 F0 49 02 00 C0 27 *$... .X...I...' + 09 00 A6 0E 00 20 A1 07 00 04 20 A1 07 00 2A 2C ..... .... ...*, + 0A 00 40 42 0F 00 80 84 1E 00 ..@B...... + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x2A (42 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x0D +bmCapabilities : 0x01 +wWidth : 0x0360 (864) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x01FA4000 (33177600 bps -> 4.147 MB/s) +dwMaxBitRate : 0x07E90000 (132710400 bps -> 16.588 MB/s) +dwMaxVideoFrameBufferSize: 0x000CA800 (829440 bytes) +dwDefaultFrameInterval : 0x0007A120 (50.0000 ms -> 20.000 fps) +bFrameIntervalType : 0x04 (4 discrete frame intervals supported) +adwFrameInterval[1] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[2] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[3] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[4] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 2A 24 05 0D 01 60 03 E0 01 00 40 FA 01 00 00 E9 *$...`....@..... + 07 00 A8 0C 00 20 A1 07 00 04 20 A1 07 00 2A 2C ..... .... ...*, + 0A 00 40 42 0F 00 80 84 1E 00 ..@B...... + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x0E +bmCapabilities : 0x01 +wWidth : 0x03C0 (960) +wHeight : 0x0220 (544) +dwMinBitRate : 0x027D8000 (41779200 bps -> 5.222 MB/s) +dwMaxBitRate : 0x07788000 (125337600 bps -> 15.667 MB/s) +dwMaxVideoFrameBufferSize: 0x000FF000 (1044480 bytes) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[2] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 26 24 05 0E 01 C0 03 20 02 00 80 7D 02 00 80 78 &$..... ...}...x + 07 00 F0 0F 00 2A 2C 0A 00 03 2A 2C 0A 00 40 42 .....*,...*,..@B + 0F 00 80 84 1E 00 ...... + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x22 (34 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x0F +bmCapabilities : 0x01 +wWidth : 0x03C0 (960) +wHeight : 0x02D0 (720) +dwMinBitRate : 0x034BC000 (55296000 bps -> 6.912 MB/s) +dwMaxBitRate : 0x06978000 (110592000 bps -> 13.824 MB/s) +dwMaxVideoFrameBufferSize: 0x00151800 (1382400 bytes) +dwDefaultFrameInterval : 0x000F4240 (100.0000 ms -> 10.000 fps) +bFrameIntervalType : 0x02 (2 discrete frame intervals supported) +adwFrameInterval[1] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[2] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 22 24 05 0F 01 C0 03 D0 02 00 C0 4B 03 00 80 97 "$.........K.... + 06 00 18 15 00 40 42 0F 00 02 40 42 0F 00 80 84 .....@B...@B.... + 1E 00 .. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x22 (34 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x10 +bmCapabilities : 0x01 +wWidth : 0x0400 (1024) +wHeight : 0x0240 (576) +dwMinBitRate : 0x02D00000 (47185920 bps -> 5.898 MB/s) +dwMaxBitRate : 0x05A00000 (94371840 bps -> 11.796 MB/s) +dwMaxVideoFrameBufferSize: 0x00120000 (1179648 bytes) +dwDefaultFrameInterval : 0x000F4240 (100.0000 ms -> 10.000 fps) +bFrameIntervalType : 0x02 (2 discrete frame intervals supported) +adwFrameInterval[1] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[2] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 22 24 05 10 01 00 04 40 02 00 00 D0 02 00 00 A0 "$.....@........ + 05 00 00 12 00 40 42 0F 00 02 40 42 0F 00 80 84 .....@B...@B.... + 1E 00 .. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x22 (34 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x11 +bmCapabilities : 0x01 +wWidth : 0x04A0 (1184) +wHeight : 0x0290 (656) +dwMinBitRate : 0x03B42000 (62136320 bps -> 7.767 MB/s) +dwMaxBitRate : 0x07684000 (124272640 bps -> 15.534 MB/s) +dwMaxVideoFrameBufferSize: 0x0017B400 (1553408 bytes) +dwDefaultFrameInterval : 0x000F4240 (100.0000 ms -> 10.000 fps) +bFrameIntervalType : 0x02 (2 discrete frame intervals supported) +adwFrameInterval[1] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[2] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 22 24 05 11 01 A0 04 90 02 00 20 B4 03 00 40 68 "$........ ...@h + 07 00 B4 17 00 40 42 0F 00 02 40 42 0F 00 80 84 .....@B...@B.... + 1E 00 .. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x22 (34 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x12 +bmCapabilities : 0x01 +wWidth : 0x0500 (1280) +wHeight : 0x02D0 (720) +dwMinBitRate : 0x04650000 (73728000 bps -> 9.216 MB/s) +dwMaxBitRate : 0x08CA0000 (147456000 bps -> 18.432 MB/s) +dwMaxVideoFrameBufferSize: 0x001C2000 (1843200 bytes) +dwDefaultFrameInterval : 0x001E8480 (200.0000 ms -> 5.000 fps) +bFrameIntervalType : 0x02 (2 discrete frame intervals supported) +adwFrameInterval[1] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[2] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 22 24 05 12 01 00 05 D0 02 00 00 65 04 00 00 CA "$.........e.... + 08 00 20 1C 00 80 84 1E 00 02 55 58 14 00 80 84 .. .......UX.... + 1E 00 .. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x22 (34 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x13 +bmCapabilities : 0x01 +wWidth : 0x0500 (1280) +wHeight : 0x03C0 (960) +dwMinBitRate : 0x05DC0000 (98304000 bps -> 12.288 MB/s) +dwMaxBitRate : 0x0BB80000 (196608000 bps -> 24.576 MB/s) +dwMaxVideoFrameBufferSize: 0x00258000 (2457600 bytes) +dwDefaultFrameInterval : 0x001E8480 (200.0000 ms -> 5.000 fps) +bFrameIntervalType : 0x02 (2 discrete frame intervals supported) +adwFrameInterval[1] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[2] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 22 24 05 13 01 00 05 C0 03 00 00 DC 05 00 00 B8 "$.............. + 0B 00 80 25 00 80 84 1E 00 02 55 58 14 00 80 84 ...%......UX.... + 1E 00 .. + + ------- VS Color Matching Descriptor Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x0D (Color Matching) +bColorPrimaries : 0x01 (BT.709, sRGB) +bTransferCharacteristics : 0x01 (BT.709) +bMatrixCoefficients : 0x04 (SMPTE 170M) +Data (HexDump) : 06 24 0D 01 01 04 .$.... + + ----- Video Streaming MJPEG Format Type Descriptor ---- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x06 (Format MJPEG) +bFormatIndex : 0x02 (2) +bNumFrameDescriptors : 0x13 (19) +bmFlags : 0x01 (Sample size is fixed) +bDefaultFrameIndex : 0x01 (1) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +Data (HexDump) : 0B 24 06 02 13 01 01 00 00 00 00 .$......... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +---> This is the Default (optimum) Frame index +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x01 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x01770000 (24576000 bps -> 3.72 MB/s) +dwMaxBitRate : 0x08CA0000 (147456000 bps -> 18.432 MB/s) +dwMaxVideoFrameBufferSize: 0x00096000 (614400 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 01 01 80 02 E0 01 00 00 77 01 00 00 CA 2$.........w.... + 08 00 60 09 00 15 16 05 00 06 15 16 05 00 80 1A ..`............. + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x01 +wWidth : 0x00A0 (160) +wHeight : 0x0078 (120) +dwMinBitRate : 0x00177000 (1536000 bps -> 192 KB/s) +dwMaxBitRate : 0x008CA000 (9216000 bps -> 1.152 MB/s) +dwMaxVideoFrameBufferSize: 0x00009600 (38400 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 02 01 A0 00 78 00 00 70 17 00 00 A0 8C 2$.....x..p..... + 00 00 96 00 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x01 +wWidth : 0x00B0 (176) +wHeight : 0x0090 (144) +dwMinBitRate : 0x001EF000 (2027520 bps -> 253.375 KB/s) +dwMaxBitRate : 0x00B9A000 (12165120 bps -> 1.520 MB/s) +dwMaxVideoFrameBufferSize: 0x0000C600 (50688 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 03 01 B0 00 90 00 00 F0 1E 00 00 A0 B9 2$.............. + 00 00 C6 00 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x01 +wWidth : 0x0140 (320) +wHeight : 0x00B0 (176) +dwMinBitRate : 0x0044C000 (4505600 bps -> 563.125 KB/s) +dwMaxBitRate : 0x019C8000 (27033600 bps -> 3.379 MB/s) +dwMaxVideoFrameBufferSize: 0x0001B800 (112640 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 04 01 40 01 B0 00 00 C0 44 00 00 80 9C 2$...@.....D.... + 01 00 B8 01 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x05 +bmCapabilities : 0x01 +wWidth : 0x0140 (320) +wHeight : 0x00F0 (240) +dwMinBitRate : 0x005DC000 (6144000 bps -> 768 KB/s) +dwMaxBitRate : 0x02328000 (36864000 bps -> 4.608 MB/s) +dwMaxVideoFrameBufferSize: 0x00025800 (153600 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 05 01 40 01 F0 00 00 C0 5D 00 00 80 32 2$...@.....]...2 + 02 00 58 02 00 15 16 05 00 06 15 16 05 00 80 1A ..X............. + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x06 +bmCapabilities : 0x01 +wWidth : 0x0160 (352) +wHeight : 0x0120 (288) +dwMinBitRate : 0x007BC000 (8110080 bps -> 1.13 MB/s) +dwMaxBitRate : 0x02E68000 (48660480 bps -> 6.82 MB/s) +dwMaxVideoFrameBufferSize: 0x00031800 (202752 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 06 01 60 01 20 01 00 C0 7B 00 00 80 E6 2$...`. ...{.... + 02 00 18 03 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x07 +bmCapabilities : 0x01 +wWidth : 0x01B0 (432) +wHeight : 0x00F0 (240) +dwMinBitRate : 0x007E9000 (8294400 bps -> 1.36 MB/s) +dwMaxBitRate : 0x02F76000 (49766400 bps -> 6.220 MB/s) +dwMaxVideoFrameBufferSize: 0x00032A00 (207360 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 07 01 B0 01 F0 00 00 90 7E 00 00 60 F7 2$.........~..`. + 02 00 2A 03 00 15 16 05 00 06 15 16 05 00 80 1A ..*............. + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x08 +bmCapabilities : 0x01 +wWidth : 0x0220 (544) +wHeight : 0x0120 (288) +dwMinBitRate : 0x00BF4000 (12533760 bps -> 1.566 MB/s) +dwMaxBitRate : 0x047B8000 (75202560 bps -> 9.400 MB/s) +dwMaxVideoFrameBufferSize: 0x0004C800 (313344 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 08 01 20 02 20 01 00 40 BF 00 00 80 7B 2$... . ..@....{ + 04 00 C8 04 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x09 +bmCapabilities : 0x01 +wWidth : 0x0280 (640) +wHeight : 0x0168 (360) +dwMinBitRate : 0x01194000 (18432000 bps -> 2.304 MB/s) +dwMaxBitRate : 0x06978000 (110592000 bps -> 13.824 MB/s) +dwMaxVideoFrameBufferSize: 0x00070800 (460800 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 09 01 80 02 68 01 00 40 19 01 00 80 97 2$.....h..@..... + 06 00 08 07 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x0A +bmCapabilities : 0x01 +wWidth : 0x02F0 (752) +wHeight : 0x01A0 (416) +dwMinBitRate : 0x017DE000 (25026560 bps -> 3.128 MB/s) +dwMaxBitRate : 0x08F34000 (150159360 bps -> 18.769 MB/s) +dwMaxVideoFrameBufferSize: 0x00098C00 (625664 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 0A 01 F0 02 A0 01 00 E0 7D 01 00 40 F3 2$.........}..@. + 08 00 8C 09 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x0B +bmCapabilities : 0x01 +wWidth : 0x0320 (800) +wHeight : 0x01C0 (448) +dwMinBitRate : 0x01B58000 (28672000 bps -> 3.584 MB/s) +dwMaxBitRate : 0x0A410000 (172032000 bps -> 21.504 MB/s) +dwMaxVideoFrameBufferSize: 0x000AF000 (716800 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 0B 01 20 03 C0 01 00 80 B5 01 00 00 41 2$... .........A + 0A 00 F0 0A 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x0C +bmCapabilities : 0x01 +wWidth : 0x0320 (800) +wHeight : 0x0258 (600) +dwMinBitRate : 0x0249F000 (38400000 bps -> 4.800 MB/s) +dwMaxBitRate : 0x0DBBA000 (230400000 bps -> 28.800 MB/s) +dwMaxVideoFrameBufferSize: 0x000EA600 (960000 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 0C 01 20 03 58 02 00 F0 49 02 00 A0 BB 2$... .X...I.... + 0D 00 A6 0E 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x0D +bmCapabilities : 0x01 +wWidth : 0x0360 (864) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x01FA4000 (33177600 bps -> 4.147 MB/s) +dwMaxBitRate : 0x0BDD8000 (199065600 bps -> 24.883 MB/s) +dwMaxVideoFrameBufferSize: 0x000CA800 (829440 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 0D 01 60 03 E0 01 00 40 FA 01 00 80 DD 2$...`....@..... + 0B 00 A8 0C 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x0E +bmCapabilities : 0x01 +wWidth : 0x03C0 (960) +wHeight : 0x0220 (544) +dwMinBitRate : 0x027D8000 (41779200 bps -> 5.222 MB/s) +dwMaxBitRate : 0x0EF10000 (250675200 bps -> 31.334 MB/s) +dwMaxVideoFrameBufferSize: 0x000FF000 (1044480 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 0E 01 C0 03 20 02 00 80 7D 02 00 00 F1 2$..... ...}.... + 0E 00 F0 0F 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x0F +bmCapabilities : 0x01 +wWidth : 0x03C0 (960) +wHeight : 0x02D0 (720) +dwMinBitRate : 0x034BC000 (55296000 bps -> 6.912 MB/s) +dwMaxBitRate : 0x13C68000 (331776000 bps -> 41.472 MB/s) +dwMaxVideoFrameBufferSize: 0x00151800 (1382400 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 0F 01 C0 03 D0 02 00 C0 4B 03 00 80 C6 2$.........K.... + 13 00 18 15 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x10 +bmCapabilities : 0x01 +wWidth : 0x0400 (1024) +wHeight : 0x0240 (576) +dwMinBitRate : 0x02D00000 (47185920 bps -> 5.898 MB/s) +dwMaxBitRate : 0x10E00000 (283115520 bps -> 35.389 MB/s) +dwMaxVideoFrameBufferSize: 0x00120000 (1179648 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 10 01 00 04 40 02 00 00 D0 02 00 00 E0 2$.....@........ + 10 00 00 12 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x11 +bmCapabilities : 0x01 +wWidth : 0x04A0 (1184) +wHeight : 0x0290 (656) +dwMinBitRate : 0x03B42000 (62136320 bps -> 7.767 MB/s) +dwMaxBitRate : 0x1638C000 (372817920 bps -> 46.602 MB/s) +dwMaxVideoFrameBufferSize: 0x0017B400 (1553408 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 11 01 A0 04 90 02 00 20 B4 03 00 C0 38 2$........ ....8 + 16 00 B4 17 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x12 +bmCapabilities : 0x01 +wWidth : 0x0500 (1280) +wHeight : 0x02D0 (720) +dwMinBitRate : 0x04650000 (73728000 bps -> 9.216 MB/s) +dwMaxBitRate : 0x1A5E0000 (442368000 bps -> 55.296 MB/s) +dwMaxVideoFrameBufferSize: 0x001C2000 (1843200 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 12 01 00 05 D0 02 00 00 65 04 00 00 5E 2$.........e...^ + 1A 00 20 1C 00 15 16 05 00 06 15 16 05 00 80 1A .. ............. + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x13 +bmCapabilities : 0x01 +wWidth : 0x0500 (1280) +wHeight : 0x03C0 (960) +dwMinBitRate : 0x05DC0000 (98304000 bps -> 12.288 MB/s) +dwMaxBitRate : 0x23280000 (589824000 bps -> 73.728 MB/s) +dwMaxVideoFrameBufferSize: 0x00258000 (2457600 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 13 01 00 05 C0 03 00 00 DC 05 00 00 28 2$.............( + 23 00 80 25 00 15 16 05 00 06 15 16 05 00 80 1A #..%............ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ------- VS Color Matching Descriptor Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x0D (Color Matching) +bColorPrimaries : 0x01 (BT.709, sRGB) +bTransferCharacteristics : 0x01 (BT.709) +bMatrixCoefficients : 0x04 (SMPTE 170M) +Data (HexDump) : 06 24 0D 01 01 04 .$.... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 01 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x00C0 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0xC0 (192 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 C0 00 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x02 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 02 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0180 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x180 (384 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 80 01 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x03 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 03 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0200 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x200 (512 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 00 02 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x04 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 04 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0280 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x280 (640 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 80 02 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x05 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 05 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0320 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x320 (800 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 20 03 01 .... .. + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x06 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 06 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x03B0 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x3B0 (944 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 B0 03 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x07 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 07 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0A80 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x01 (1 additional transactions per microframe -> allows 513..1024 byte per packet) + Bits 10..0 : 0x280 (640 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 80 0A 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x08 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 08 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0B20 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x01 (1 additional transactions per microframe -> allows 513..1024 byte per packet) + Bits 10..0 : 0x320 (800 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 20 0B 01 .... .. + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x09 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 09 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0BE0 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x01 (1 additional transactions per microframe -> allows 513..1024 byte per packet) + Bits 10..0 : 0x3E0 (992 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 E0 0B 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x0A +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 0A 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x1380 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x02 (2 additional transactions per microframe -> allows 683..1024 bytes per packet) + Bits 10..0 : 0x380 (896 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 80 13 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x0B +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 0B 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x13FC + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x02 (2 additional transactions per microframe -> allows 683..1024 bytes per packet) + Bits 10..0 : 0x3FC (1020 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 FC 13 01 ....... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x02 +bInterfaceCount : 0x02 +bFunctionClass : 0x01 (Audio) +bFunctionSubClass : 0x02 (Audio Streaming) +bFunctionProtocol : 0x00 +iFunction : 0x00 (No String Descriptor) +Data (HexDump) : 08 0B 02 02 01 02 00 00 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x02 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x01 (Audio Control) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 02 00 00 01 01 00 00 ......... + + ------ Audio Control Interface Header Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 (Header) +bcdADC : 0x0100 +wTotalLength : 0x0026 (38 bytes) +bInCollection : 0x01 +baInterfaceNr[1] : 0x03 +Data (HexDump) : 09 24 01 00 01 26 00 01 03 .$...&... + + ------- Audio Control Input Terminal Descriptor ------- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (Microphone) +bAssocTerminal : 0x00 +bNrChannels : 0x01 (1 channel) +wChannelConfig : 0x0000 (-) +iChannelNames : 0x00 (No String Descriptor) +iTerminal : 0x00 (No String Descriptor) +Data (HexDump) : 0C 24 02 01 01 02 00 01 00 00 00 00 .$.......... + + ------- Audio Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x03 +wTerminalType : 0x0101 (USB streaming) +bAssocTerminal : 0x01 (1) +bSourceID : 0x05 (5) +iTerminal : 0x00 (No String Descriptor) +Data (HexDump) : 09 24 03 03 01 01 01 05 00 .$....... + + -------- Audio Control Feature Unit Descriptor -------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x06 (Feature Unit) +bUnitID : 0x05 (5) +bSourceID : 0x01 (1) +bControlSize : 0x01 (1 byte per control) +bmaControls[0] : 0x03 + D0: Mute : 1 + D1: Volume : 1 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 +bmaControls[1] : 0x00 + D0: Mute : 0 + D1: Volume : 0 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 +iFeature : 0x00 (No String Descriptor) +Data (HexDump) : 09 24 06 05 01 01 03 00 00 .$....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 00 00 01 02 00 00 ......... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 01 01 01 02 00 00 ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x03 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 03 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x01 (1 channel) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x01 (supports 1 sample frequency) +tSamFreq[1] : 0x03E80 (16000 Hz) +Data (HexDump) : 0B 24 02 01 01 02 10 01 80 3E 00 .$.......>. + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x86 (Direction=IN EndpointID=6) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0044 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x44 (68 bytes per packet) +bInterval : 0x04 (4 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 86 05 44 00 04 00 00 ....D.... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x00 (Undefined) +wLockDelay : 0x0000 +Data (HexDump) : 07 25 01 01 00 00 00 .%..... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x02 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 02 01 01 02 00 00 ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x03 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 03 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x01 (1 channel) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x01 (supports 1 sample frequency) +tSamFreq[1] : 0x05DC0 (24000 Hz) +Data (HexDump) : 0B 24 02 01 01 02 10 01 C0 5D 00 .$.......]. + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x86 (Direction=IN EndpointID=6) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0064 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x64 (100 bytes per packet) +bInterval : 0x04 (4 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 86 05 64 00 04 00 00 ....d.... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x00 (Undefined) +wLockDelay : 0x0000 +Data (HexDump) : 07 25 01 01 00 00 00 .%..... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x03 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 03 01 01 02 00 00 ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x03 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 03 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x01 (1 channel) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x01 (supports 1 sample frequency) +tSamFreq[1] : 0x07D00 (32000 Hz) +Data (HexDump) : 0B 24 02 01 01 02 10 01 00 7D 00 .$.......}. + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x86 (Direction=IN EndpointID=6) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0084 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x84 (132 bytes per packet) +bInterval : 0x04 (4 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 86 05 84 00 04 00 00 ......... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x00 (Undefined) +wLockDelay : 0x0000 +Data (HexDump) : 07 25 01 01 00 00 00 .%..... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x04 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 04 01 01 02 00 00 ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x03 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 03 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x01 (1 channel) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x01 (supports 1 sample frequency) +tSamFreq[1] : 0x0BB80 (48000 Hz) +Data (HexDump) : 0B 24 02 01 01 02 10 01 80 BB 00 .$......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x86 (Direction=IN EndpointID=6) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x00C4 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0xC4 (196 bytes per packet) +bInterval : 0x04 (4 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 86 05 C4 00 04 00 00 ......... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x00 (Undefined) +wLockDelay : 0x0000 +Data (HexDump) : 07 25 01 01 00 00 00 .%..... + + ----------------- Device Qualifier Descriptor ----------------- +bLength : 0x0A (10 bytes) +bDescriptorType : 0x06 (Device_qualifier Descriptor) +bcdUSB : 0x200 (USB Version 2.00) +bDeviceClass : 0xEF (Miscellaneous) +bDeviceSubClass : 0x02 +bDeviceProtocol : 0x01 (IAD - Interface Association Descriptor) +bMaxPacketSize0 : 0x40 (64 Bytes) +bNumConfigurations : 0x01 (1 other-speed configuration) +bReserved : 0x00 +Data (HexDump) : 0A 06 00 02 EF 02 01 40 01 00 .......@.. + + ------------ Other Speed Configuration Descriptor ------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x07 (Other_speed_configuration Descriptor) +wTotalLength : 0x04DE (1246 bytes) +bNumInterfaces : 0x04 (4 Interfaces) +bConfigurationValue : 0x01 (Configuration 1) +iConfiguration : 0x00 (No String Descriptor) +bmAttributes : 0x80 + D7: Reserved, set 1 : 0x01 + D6: Self Powered : 0x00 (no) + D5: Remote Wakeup : 0x00 (no) + D4..0: Reserved, set 0 : 0x00 +MaxPower : 0xFA (500 mA) +Data (HexDump) : 09 07 DE 04 04 01 00 80 FA 08 0B 00 02 0E 03 00 ................ + 00 09 04 00 00 01 0E 01 00 00 0D 24 01 00 01 A0 ...........$.... + 00 00 6C DC 02 01 01 12 24 02 01 01 02 00 00 00 ..l.....$....... + 00 00 00 00 00 03 0E 00 00 0B 24 05 02 01 00 40 ..........$....@ + 02 5B 17 00 1B 24 06 03 E4 8E 67 69 0F 41 DB 40 .[...$....gi.A.@ + A8 50 74 20 D7 D8 24 0E 08 01 02 02 3F 03 00 1B .Pt ..$.....?... + 24 06 04 15 02 E4 49 34 F4 FE 47 B1 58 0E 88 50 $.....I4..G.X..P + 23 E5 1B 03 01 02 02 09 01 00 1C 24 06 06 A9 4C #..........$...L + 5D 1F 11 DE 87 44 84 0D 50 93 3C 8E C8 D1 12 01 ]....D..P.<..... + 04 03 FF FF 03 00 1B 24 06 07 21 2D E5 FF 30 80 .......$..!-..0. + 2C 4E 82 D9 F5 87 D0 05 40 BD 02 01 04 02 00 03 ,N......@....... + 00 09 24 03 05 01 01 00 04 00 07 05 87 03 10 00 ..$............. + 10 05 25 03 10 00 09 04 01 00 00 0E 02 00 00 10 ..%............. + 24 01 03 C2 02 81 00 05 01 00 00 01 00 04 04 1B $............... + 24 04 01 02 59 55 59 32 00 00 10 00 80 00 00 AA $...YUY2........ + 00 38 9B 71 10 02 00 00 00 00 26 24 05 02 01 A0 .8.q......&$.... + 00 78 00 00 70 17 00 00 50 46 00 00 96 00 00 2A .x..p...PF.....* + 2C 0A 00 03 2A 2C 0A 00 40 42 0F 00 80 84 1E 00 ,...*,..@B...... + 26 24 05 03 01 B0 00 90 00 00 F0 1E 00 00 D0 5C &$.............\ + 00 00 C6 00 00 2A 2C 0A 00 03 2A 2C 0A 00 40 42 .....*,...*,..@B + 0F 00 80 84 1E 00 06 24 0D 01 01 04 0B 24 06 02 .......$.....$.. + 0C 01 01 00 00 00 00 32 24 07 01 01 80 02 E0 01 .......2$....... + 00 00 77 01 00 00 CA 08 00 60 09 00 15 16 05 00 ..w......`...... + 06 15 16 05 00 80 1A 06 00 20 A1 07 00 2A 2C 0A ......... ...*,. + 00 40 42 0F 00 80 84 1E 00 32 24 07 02 01 A0 00 .@B......2$..... + 78 00 00 70 17 00 00 A0 8C 00 00 96 00 00 15 16 x..p............ + 05 00 06 15 16 05 00 80 1A 06 00 20 A1 07 00 2A ........... ...* + 2C 0A 00 40 42 0F 00 80 84 1E 00 32 24 07 03 01 ,..@B......2$... + B0 00 90 00 00 F0 1E 00 00 A0 B9 00 00 C6 00 00 ................ + 15 16 05 00 06 15 16 05 00 80 1A 06 00 20 A1 07 ............. .. + 00 2A 2C 0A 00 40 42 0F 00 80 84 1E 00 32 24 07 .*,..@B......2$. + 04 01 40 01 B0 00 00 C0 44 00 00 80 9C 01 00 B8 ..@.....D....... + 01 00 15 16 05 00 06 15 16 05 00 80 1A 06 00 20 ............... + A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 1E 00 32 ...*,..@B......2 + 24 07 05 01 40 01 F0 00 00 C0 5D 00 00 80 32 02 $...@.....]...2. + 00 58 02 00 15 16 05 00 06 15 16 05 00 80 1A 06 .X.............. + 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 1E . ...*,..@B..... + 00 32 24 07 06 01 60 01 20 01 00 C0 7B 00 00 80 .2$...`. ...{... + E6 02 00 18 03 00 15 16 05 00 06 15 16 05 00 80 ................ + 1A 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 ... ...*,..@B... + 84 1E 00 32 24 07 07 01 B0 01 F0 00 00 90 7E 00 ...2$.........~. + 00 60 F7 02 00 2A 03 00 15 16 05 00 06 15 16 05 .`...*.......... + 00 80 1A 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F ..... ...*,..@B. + 00 80 84 1E 00 32 24 07 08 01 20 02 20 01 00 40 .....2$... . ..@ + BF 00 00 80 7B 04 00 C8 04 00 15 16 05 00 06 15 ....{........... + 16 05 00 80 1A 06 00 20 A1 07 00 2A 2C 0A 00 40 ....... ...*,..@ + 42 0F 00 80 84 1E 00 32 24 07 09 01 80 02 68 01 B......2$.....h. + 00 40 19 01 00 80 97 06 00 08 07 00 15 16 05 00 .@.............. + 06 15 16 05 00 80 1A 06 00 20 A1 07 00 2A 2C 0A ......... ...*,. + 00 40 42 0F 00 80 84 1E 00 26 24 07 0A 01 F0 02 .@B......&$..... + A0 01 00 E0 7D 01 00 A0 79 04 00 8C 09 00 2A 2C ....}...y.....*, + 0A 00 03 2A 2C 0A 00 40 42 0F 00 80 84 1E 00 26 ...*,..@B......& + 24 07 0B 01 20 03 C0 01 00 80 B5 01 00 80 20 05 $... ......... . + 00 F0 0A 00 2A 2C 0A 00 03 2A 2C 0A 00 40 42 0F ....*,...*,..@B. + 00 80 84 1E 00 26 24 07 0C 01 20 03 58 02 00 F0 .....&$... .X... + 49 02 00 D0 DD 06 00 A6 0E 00 2A 2C 0A 00 03 2A I.........*,...* + 2C 0A 00 40 42 0F 00 80 84 1E 00 06 24 0D 01 01 ,..@B.......$... + 04 09 04 01 01 01 0E 02 00 00 07 05 81 05 C0 00 ................ + 01 09 04 01 02 01 0E 02 00 00 07 05 81 05 80 01 ................ + 01 09 04 01 03 01 0E 02 00 00 07 05 81 05 00 02 ................ + 01 09 04 01 04 01 0E 02 00 00 07 05 81 05 80 02 ................ + 01 09 04 01 05 01 0E 02 00 00 07 05 81 05 20 03 .............. . + 01 09 04 01 06 01 0E 02 00 00 07 05 81 05 B0 03 ................ + 01 08 0B 02 02 01 02 00 00 09 04 02 00 00 01 01 ................ + 00 00 09 24 01 00 01 26 00 01 03 0C 24 02 01 01 ...$...&....$... + 02 00 01 00 00 00 00 09 24 03 03 01 01 01 05 00 ........$....... + 09 24 06 05 01 01 03 00 00 09 04 03 00 00 01 02 .$.............. + 00 00 09 04 03 01 01 01 02 00 00 07 24 01 03 01 ............$... + 01 00 0B 24 02 01 01 02 10 01 80 3E 00 09 05 86 ...$.......>.... + 05 44 00 01 00 00 07 25 01 01 00 00 00 09 04 03 .D.....%........ + 02 01 01 02 00 00 07 24 01 03 01 01 00 0B 24 02 .......$......$. + 01 01 02 10 01 C0 5D 00 09 05 86 05 64 00 01 00 ......].....d... + 00 07 25 01 01 00 00 00 09 04 03 03 01 01 02 00 ..%............. + 00 07 24 01 03 01 01 00 0B 24 02 01 01 02 10 01 ..$......$...... + 00 7D 00 09 05 86 05 84 00 01 00 00 07 25 01 01 .}...........%.. + 00 00 00 09 04 03 04 01 01 02 00 00 07 24 01 03 .............$.. + 01 01 00 0B 24 02 01 01 02 10 01 80 BB 00 09 05 ....$........... + 86 05 C4 00 01 00 00 07 25 01 01 00 00 00 ........%..... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x00 +bInterfaceCount : 0x02 +bFunctionClass : 0x0E (Video) +bFunctionSubClass : 0x03 (Video Interface Collection) +bFunctionProtocol : 0x00 (PC_PROTOCOL_UNDEFINED protocol) +iFunction : 0x00 (No String Descriptor) +Data (HexDump) : 08 0B 00 02 0E 03 00 00 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x00 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x01 (Video Control) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 00 00 01 0E 01 00 00 ......... + + ------- Video Control Interface Header Descriptor ----- +bLength : 0x0D (13 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x01 (Video Control Header) +bcdUVC : 0x0100 (UVC Version 1.00) +wTotalLength : 0x00A0 (160 bytes) +dwClockFreq : 0x02DC6C00 (48 MHz) +bInCollection : 0x01 (1 VideoStreaming interface) +baInterfaceNr[1] : 0x01 +Data (HexDump) : 0D 24 01 00 01 A0 00 00 6C DC 02 01 01 .$......l.... + + -------- Video Control Input Terminal Descriptor ------ +bLength : 0x12 (18 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (ITT_CAMERA) +bAssocTerminal : 0x00 (Not associated with an Output Terminal) +iTerminal : 0x00 +Camera Input Terminal Data: +wObjectiveFocalLengthMin : 0x0000 +wObjectiveFocalLengthMax : 0x0000 +wOcularFocalLength : 0x0000 +bControlSize : 0x03 +bmControls : 0x0E, 0x00, 0x00 + D0 : 0 no - Scanning Mode + D1 : 1 yes - Auto-Exposure Mode + D2 : 1 yes - Auto-Exposure Priority + D3 : 1 yes - Exposure Time (Absolute) + D4 : 0 no - Exposure Time (Relative) + D5 : 0 no - Focus (Absolute) + D6 : 0 no - Focus (Relative) + D7 : 0 no - Iris (Absolute) + D8 : 0 no - Iris (Relative) + D9 : 0 no - Zoom (Absolute) + D10 : 0 no - Zoom (Relative) + D11 : 0 no - Pan (Absolute) + D12 : 0 no - Pan (Relative) + D13 : 0 no - Roll (Absolute) + D14 : 0 no - Roll (Relative) + D15 : 0 no - Tilt (Absolute) + D16 : 0 no - Tilt (Relative) + D17 : 0 no - Focus Auto + D18 : 0 no - Reserved + D19 : 0 no - Reserved + D20 : 0 no - Reserved + D21 : 0 no - Reserved + D22 : 0 no - Reserved + D23 : 0 no - Reserved +Data (HexDump) : 12 24 02 01 01 02 00 00 00 00 00 00 00 00 03 0E .$.............. + 00 00 .. + + -------- Video Control Processing Unit Descriptor ----- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x05 (Processing Unit) +bUnitID : 0x02 +bSourceID : 0x01 +wMaxMultiplier : 0x4000 (163.84x Zoom) +bControlSize : 0x02 +bmControls : 0x5B, 0x17 + D0 : 1 yes - Brightness + D1 : 1 yes - Contrast + D2 : 0 no - Hue + D3 : 1 yes - Saturation + D4 : 1 yes - Sharpness + D5 : 0 no - Gamma + D6 : 1 yes - White Balance Temperature + D7 : 0 no - White Balance Component + D8 : 1 yes - Backlight Compensation + D9 : 1 yes - Gain + D10 : 1 yes - Power Line Frequency + D11 : 0 no - Hue, Auto + D12 : 1 yes - White Balance Temperature, Auto + D13 : 0 no - White Balance Component, Auto + D14 : 0 no - Digital Multiplier + D15 : 0 no - Digital Multiplier Limit +iProcessing : 0x00 +Data (HexDump) : 0B 24 05 02 01 00 40 02 5B 17 00 .$....@.[.. + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1B (27 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x03 +guidExtensionCode : {69678EE4-410F-40DB-A850-7420D7D8240E} +bNumControls : 0x08 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x02 +bControlSize : 0x02 +bmControls : 0x3F, 0x03 + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 1 yes - Vendor-Specific (Optional) + D3 : 1 yes - Vendor-Specific (Optional) + D4 : 1 yes - Vendor-Specific (Optional) + D5 : 1 yes - Vendor-Specific (Optional) + D6 : 0 no - Vendor-Specific (Optional) + D7 : 0 no - Vendor-Specific (Optional) + D8 : 1 yes - Vendor-Specific (Optional) + D9 : 1 yes - Vendor-Specific (Optional) + D10 : 0 no - Vendor-Specific (Optional) + D11 : 0 no - Vendor-Specific (Optional) + D12 : 0 no - Vendor-Specific (Optional) + D13 : 0 no - Vendor-Specific (Optional) + D14 : 0 no - Vendor-Specific (Optional) + D15 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1B 24 06 03 E4 8E 67 69 0F 41 DB 40 A8 50 74 20 .$....gi.A.@.Pt + D7 D8 24 0E 08 01 02 02 3F 03 00 ..$.....?.. + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1B (27 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x04 +guidExtensionCode : {49E40215-F434-47FE-B158-0E885023E51B} +bNumControls : 0x03 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x02 +bControlSize : 0x02 +bmControls : 0x09, 0x01 + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 0 no - Vendor-Specific (Optional) + D2 : 0 no - Vendor-Specific (Optional) + D3 : 1 yes - Vendor-Specific (Optional) + D4 : 0 no - Vendor-Specific (Optional) + D5 : 0 no - Vendor-Specific (Optional) + D6 : 0 no - Vendor-Specific (Optional) + D7 : 0 no - Vendor-Specific (Optional) + D8 : 1 yes - Vendor-Specific (Optional) + D9 : 0 no - Vendor-Specific (Optional) + D10 : 0 no - Vendor-Specific (Optional) + D11 : 0 no - Vendor-Specific (Optional) + D12 : 0 no - Vendor-Specific (Optional) + D13 : 0 no - Vendor-Specific (Optional) + D14 : 0 no - Vendor-Specific (Optional) + D15 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1B 24 06 04 15 02 E4 49 34 F4 FE 47 B1 58 0E 88 .$.....I4..G.X.. + 50 23 E5 1B 03 01 02 02 09 01 00 P#......... + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1C (28 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x06 +guidExtensionCode : {1F5D4CA9-DE11-4487-840D-50933C8EC8D1} +bNumControls : 0x12 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x04 +bControlSize : 0x03 +bmControls : 0xFF, 0xFF, 0x03 + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 1 yes - Vendor-Specific (Optional) + D3 : 1 yes - Vendor-Specific (Optional) + D4 : 1 yes - Vendor-Specific (Optional) + D5 : 1 yes - Vendor-Specific (Optional) + D6 : 1 yes - Vendor-Specific (Optional) + D7 : 1 yes - Vendor-Specific (Optional) + D8 : 1 yes - Vendor-Specific (Optional) + D9 : 1 yes - Vendor-Specific (Optional) + D10 : 1 yes - Vendor-Specific (Optional) + D11 : 1 yes - Vendor-Specific (Optional) + D12 : 1 yes - Vendor-Specific (Optional) + D13 : 1 yes - Vendor-Specific (Optional) + D14 : 1 yes - Vendor-Specific (Optional) + D15 : 1 yes - Vendor-Specific (Optional) + D16 : 1 yes - Vendor-Specific (Optional) + D17 : 1 yes - Vendor-Specific (Optional) + D18 : 0 no - Vendor-Specific (Optional) + D19 : 0 no - Vendor-Specific (Optional) + D20 : 0 no - Vendor-Specific (Optional) + D21 : 0 no - Vendor-Specific (Optional) + D22 : 0 no - Vendor-Specific (Optional) + D23 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1C 24 06 06 A9 4C 5D 1F 11 DE 87 44 84 0D 50 93 .$...L]....D..P. + 3C 8E C8 D1 12 01 04 03 FF FF 03 00 <........... + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1B (27 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x07 +guidExtensionCode : {FFE52D21-8030-4E2C-82D9-F587D00540BD} +bNumControls : 0x02 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x04 +bControlSize : 0x02 +bmControls : 0x00, 0x03 + D0 : 0 no - Vendor-Specific (Optional) + D1 : 0 no - Vendor-Specific (Optional) + D2 : 0 no - Vendor-Specific (Optional) + D3 : 0 no - Vendor-Specific (Optional) + D4 : 0 no - Vendor-Specific (Optional) + D5 : 0 no - Vendor-Specific (Optional) + D6 : 0 no - Vendor-Specific (Optional) + D7 : 0 no - Vendor-Specific (Optional) + D8 : 1 yes - Vendor-Specific (Optional) + D9 : 1 yes - Vendor-Specific (Optional) + D10 : 0 no - Vendor-Specific (Optional) + D11 : 0 no - Vendor-Specific (Optional) + D12 : 0 no - Vendor-Specific (Optional) + D13 : 0 no - Vendor-Specific (Optional) + D14 : 0 no - Vendor-Specific (Optional) + D15 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1B 24 06 07 21 2D E5 FF 30 80 2C 4E 82 D9 F5 87 .$..!-..0.,N.... + D0 05 40 BD 02 01 04 02 00 03 00 ..@........ + + ------- Video Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x05 +wTerminalType : 0x0101 (TT_STREAMING) +bAssocTerminal : 0x00 (Not associated with an Input Terminal) +bSourceID : 0x04 +iTerminal : 0x00 +Data (HexDump) : 09 24 03 05 01 01 00 04 00 .$....... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x87 (Direction=IN EndpointID=7) +bmAttributes : 0x03 (TransferType=Interrupt) +wMaxPacketSize : 0x0010 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x10 (16 bytes per packet) +bInterval : 0x10 (16 ms) +Data (HexDump) : 07 05 87 03 10 00 10 ....... + + --- Class-specific VC Interrupt Endpoint Descriptor --- +bLength : 0x05 (5 bytes) +bDescriptorType : 0x25 (Video Control Endpoint) +bDescriptorSubtype : 0x03 (Interrupt) +wMaxTransferSize : 0x0010 (16 bytes) +Data (HexDump) : 05 25 03 10 00 .%... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 00 00 0E 02 00 00 ......... + + ---- VC-Specific VS Video Input Header Descriptor ----- +bLength : 0x10 (16 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x01 (Input Header) +bNumFormats : 0x03 +wTotalLength : 0x02C2 (706 bytes) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmInfo : 0x00 (Dynamic Format Change not supported) +bTerminalLink : 0x05 +bStillCaptureMethod : 0x01 (Still Capture Method 1) +nbTriggerSupport : 0x00 (Hardware Triggering not supported) +bTriggerUsage : 0x00 (Host will initiate still image capture) +nbControlSize : 0x01 +Video Payload Format 1 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Video Payload Format 2 : 0x04 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 1 yes - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Video Payload Format 3 : 0x04 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 1 yes - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Data (HexDump) : 10 24 01 03 C2 02 81 00 05 01 00 00 01 00 04 04 .$.............. + + ------- VS Uncompressed Format Type Descriptor -------- +bLength : 0x1B (27 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x04 (Uncompressed Format Type) +bFormatIndex : 0x01 (1) +bNumFrameDescriptors : 0x02 (2) +guidFormat : {32595559-0000-0010-8000-00AA00389B71} (YUY2) +bBitsPerPixel : 0x10 (16 bits) +bDefaultFrameIndex : 0x02 (2) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +Data (HexDump) : 1B 24 04 01 02 59 55 59 32 00 00 10 00 80 00 00 .$...YUY2....... + AA 00 38 9B 71 10 02 00 00 00 00 ..8.q...... + + -------- VS Uncompressed Frame Type Descriptor -------- +---> This is the Default (optimum) Frame index +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x01 +wWidth : 0x00A0 (160) +wHeight : 0x0078 (120) +dwMinBitRate : 0x00177000 (1536000 bps -> 192 KB/s) +dwMaxBitRate : 0x00465000 (4608000 bps -> 576 KB/s) +dwMaxVideoFrameBufferSize: 0x00009600 (38400 bytes) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[2] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 26 24 05 02 01 A0 00 78 00 00 70 17 00 00 50 46 &$.....x..p...PF + 00 00 96 00 00 2A 2C 0A 00 03 2A 2C 0A 00 40 42 .....*,...*,..@B + 0F 00 80 84 1E 00 ...... + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x01 +wWidth : 0x00B0 (176) +wHeight : 0x0090 (144) +dwMinBitRate : 0x001EF000 (2027520 bps -> 253.375 KB/s) +dwMaxBitRate : 0x005CD000 (6082560 bps -> 760.250 KB/s) +dwMaxVideoFrameBufferSize: 0x0000C600 (50688 bytes) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[2] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 26 24 05 03 01 B0 00 90 00 00 F0 1E 00 00 D0 5C &$.............\ + 00 00 C6 00 00 2A 2C 0A 00 03 2A 2C 0A 00 40 42 .....*,...*,..@B + 0F 00 80 84 1E 00 ...... + + ------- VS Color Matching Descriptor Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x0D (Color Matching) +bColorPrimaries : 0x01 (BT.709, sRGB) +bTransferCharacteristics : 0x01 (BT.709) +bMatrixCoefficients : 0x04 (SMPTE 170M) +Data (HexDump) : 06 24 0D 01 01 04 .$.... + + ----- Video Streaming MJPEG Format Type Descriptor ---- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x06 (Format MJPEG) +bFormatIndex : 0x02 (2) +bNumFrameDescriptors : 0x0C (12) +bmFlags : 0x01 (Sample size is fixed) +bDefaultFrameIndex : 0x01 (1) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +Data (HexDump) : 0B 24 06 02 0C 01 01 00 00 00 00 .$......... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +---> This is the Default (optimum) Frame index +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x01 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x01770000 (24576000 bps -> 3.72 MB/s) +dwMaxBitRate : 0x08CA0000 (147456000 bps -> 18.432 MB/s) +dwMaxVideoFrameBufferSize: 0x00096000 (614400 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 01 01 80 02 E0 01 00 00 77 01 00 00 CA 2$.........w.... + 08 00 60 09 00 15 16 05 00 06 15 16 05 00 80 1A ..`............. + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x01 +wWidth : 0x00A0 (160) +wHeight : 0x0078 (120) +dwMinBitRate : 0x00177000 (1536000 bps -> 192 KB/s) +dwMaxBitRate : 0x008CA000 (9216000 bps -> 1.152 MB/s) +dwMaxVideoFrameBufferSize: 0x00009600 (38400 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 02 01 A0 00 78 00 00 70 17 00 00 A0 8C 2$.....x..p..... + 00 00 96 00 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x01 +wWidth : 0x00B0 (176) +wHeight : 0x0090 (144) +dwMinBitRate : 0x001EF000 (2027520 bps -> 253.375 KB/s) +dwMaxBitRate : 0x00B9A000 (12165120 bps -> 1.520 MB/s) +dwMaxVideoFrameBufferSize: 0x0000C600 (50688 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 03 01 B0 00 90 00 00 F0 1E 00 00 A0 B9 2$.............. + 00 00 C6 00 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x01 +wWidth : 0x0140 (320) +wHeight : 0x00B0 (176) +dwMinBitRate : 0x0044C000 (4505600 bps -> 563.125 KB/s) +dwMaxBitRate : 0x019C8000 (27033600 bps -> 3.379 MB/s) +dwMaxVideoFrameBufferSize: 0x0001B800 (112640 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 04 01 40 01 B0 00 00 C0 44 00 00 80 9C 2$...@.....D.... + 01 00 B8 01 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x05 +bmCapabilities : 0x01 +wWidth : 0x0140 (320) +wHeight : 0x00F0 (240) +dwMinBitRate : 0x005DC000 (6144000 bps -> 768 KB/s) +dwMaxBitRate : 0x02328000 (36864000 bps -> 4.608 MB/s) +dwMaxVideoFrameBufferSize: 0x00025800 (153600 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 05 01 40 01 F0 00 00 C0 5D 00 00 80 32 2$...@.....]...2 + 02 00 58 02 00 15 16 05 00 06 15 16 05 00 80 1A ..X............. + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x06 +bmCapabilities : 0x01 +wWidth : 0x0160 (352) +wHeight : 0x0120 (288) +dwMinBitRate : 0x007BC000 (8110080 bps -> 1.13 MB/s) +dwMaxBitRate : 0x02E68000 (48660480 bps -> 6.82 MB/s) +dwMaxVideoFrameBufferSize: 0x00031800 (202752 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 06 01 60 01 20 01 00 C0 7B 00 00 80 E6 2$...`. ...{.... + 02 00 18 03 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x07 +bmCapabilities : 0x01 +wWidth : 0x01B0 (432) +wHeight : 0x00F0 (240) +dwMinBitRate : 0x007E9000 (8294400 bps -> 1.36 MB/s) +dwMaxBitRate : 0x02F76000 (49766400 bps -> 6.220 MB/s) +dwMaxVideoFrameBufferSize: 0x00032A00 (207360 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 07 01 B0 01 F0 00 00 90 7E 00 00 60 F7 2$.........~..`. + 02 00 2A 03 00 15 16 05 00 06 15 16 05 00 80 1A ..*............. + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x08 +bmCapabilities : 0x01 +wWidth : 0x0220 (544) +wHeight : 0x0120 (288) +dwMinBitRate : 0x00BF4000 (12533760 bps -> 1.566 MB/s) +dwMaxBitRate : 0x047B8000 (75202560 bps -> 9.400 MB/s) +dwMaxVideoFrameBufferSize: 0x0004C800 (313344 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 08 01 20 02 20 01 00 40 BF 00 00 80 7B 2$... . ..@....{ + 04 00 C8 04 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x09 +bmCapabilities : 0x01 +wWidth : 0x0280 (640) +wHeight : 0x0168 (360) +dwMinBitRate : 0x01194000 (18432000 bps -> 2.304 MB/s) +dwMaxBitRate : 0x06978000 (110592000 bps -> 13.824 MB/s) +dwMaxVideoFrameBufferSize: 0x00070800 (460800 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 07 09 01 80 02 68 01 00 40 19 01 00 80 97 2$.....h..@..... + 06 00 08 07 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x0A +bmCapabilities : 0x01 +wWidth : 0x02F0 (752) +wHeight : 0x01A0 (416) +dwMinBitRate : 0x017DE000 (25026560 bps -> 3.128 MB/s) +dwMaxBitRate : 0x0479A000 (75079680 bps -> 9.384 MB/s) +dwMaxVideoFrameBufferSize: 0x00098C00 (625664 bytes) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[2] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 26 24 07 0A 01 F0 02 A0 01 00 E0 7D 01 00 A0 79 &$.........}...y + 04 00 8C 09 00 2A 2C 0A 00 03 2A 2C 0A 00 40 42 .....*,...*,..@B + 0F 00 80 84 1E 00 ...... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x0B +bmCapabilities : 0x01 +wWidth : 0x0320 (800) +wHeight : 0x01C0 (448) +dwMinBitRate : 0x01B58000 (28672000 bps -> 3.584 MB/s) +dwMaxBitRate : 0x05208000 (86016000 bps -> 10.752 MB/s) +dwMaxVideoFrameBufferSize: 0x000AF000 (716800 bytes) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[2] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 26 24 07 0B 01 20 03 C0 01 00 80 B5 01 00 80 20 &$... ......... + 05 00 F0 0A 00 2A 2C 0A 00 03 2A 2C 0A 00 40 42 .....*,...*,..@B + 0F 00 80 84 1E 00 ...... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x0C +bmCapabilities : 0x01 +wWidth : 0x0320 (800) +wHeight : 0x0258 (600) +dwMinBitRate : 0x0249F000 (38400000 bps -> 4.800 MB/s) +dwMaxBitRate : 0x06DDD000 (115200000 bps -> 14.400 MB/s) +dwMaxVideoFrameBufferSize: 0x000EA600 (960000 bytes) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[2] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 26 24 07 0C 01 20 03 58 02 00 F0 49 02 00 D0 DD &$... .X...I.... + 06 00 A6 0E 00 2A 2C 0A 00 03 2A 2C 0A 00 40 42 .....*,...*,..@B + 0F 00 80 84 1E 00 ...... + + ------- VS Color Matching Descriptor Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x0D (Color Matching) +bColorPrimaries : 0x01 (BT.709, sRGB) +bTransferCharacteristics : 0x01 (BT.709) +bMatrixCoefficients : 0x04 (SMPTE 170M) +Data (HexDump) : 06 24 0D 01 01 04 .$.... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 01 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x00C0 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0xC0 (192 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 C0 00 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x02 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 02 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0180 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x180 (384 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 80 01 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x03 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 03 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0200 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x200 (512 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 00 02 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x04 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 04 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0280 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x280 (640 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 80 02 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x05 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 05 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0320 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x320 (800 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 20 03 01 .... .. + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x06 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 06 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x03B0 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x3B0 (944 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 B0 03 01 ....... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x02 +bInterfaceCount : 0x02 +bFunctionClass : 0x01 (Audio) +bFunctionSubClass : 0x02 (Audio Streaming) +bFunctionProtocol : 0x00 +iFunction : 0x00 (No String Descriptor) +Data (HexDump) : 08 0B 02 02 01 02 00 00 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x02 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x01 (Audio Control) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 02 00 00 01 01 00 00 ......... + + ------ Audio Control Interface Header Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 (Header) +bcdADC : 0x0100 +wTotalLength : 0x0026 (38 bytes) +bInCollection : 0x01 +baInterfaceNr[1] : 0x03 +Data (HexDump) : 09 24 01 00 01 26 00 01 03 .$...&... + + ------- Audio Control Input Terminal Descriptor ------- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (Microphone) +bAssocTerminal : 0x00 +bNrChannels : 0x01 (1 channel) +wChannelConfig : 0x0000 (-) +iChannelNames : 0x00 (No String Descriptor) +iTerminal : 0x00 (No String Descriptor) +Data (HexDump) : 0C 24 02 01 01 02 00 01 00 00 00 00 .$.......... + + ------- Audio Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x03 +wTerminalType : 0x0101 (USB streaming) +bAssocTerminal : 0x01 (1) +bSourceID : 0x05 (5) +iTerminal : 0x00 (No String Descriptor) +Data (HexDump) : 09 24 03 03 01 01 01 05 00 .$....... + + -------- Audio Control Feature Unit Descriptor -------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x06 (Feature Unit) +bUnitID : 0x05 (5) +bSourceID : 0x01 (1) +bControlSize : 0x01 (1 byte per control) +bmaControls[0] : 0x03 + D0: Mute : 1 + D1: Volume : 1 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 +bmaControls[1] : 0x00 + D0: Mute : 0 + D1: Volume : 0 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 +iFeature : 0x00 (No String Descriptor) +Data (HexDump) : 09 24 06 05 01 01 03 00 00 .$....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 00 00 01 02 00 00 ......... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 01 01 01 02 00 00 ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x03 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 03 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x01 (1 channel) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x01 (supports 1 sample frequency) +tSamFreq[1] : 0x03E80 (16000 Hz) +Data (HexDump) : 0B 24 02 01 01 02 10 01 80 3E 00 .$.......>. + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x86 (Direction=IN EndpointID=6) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0044 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x44 (68 bytes per packet) +bInterval : 0x01 (1 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 86 05 44 00 01 00 00 ....D.... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x00 (Undefined) +wLockDelay : 0x0000 +Data (HexDump) : 07 25 01 01 00 00 00 .%..... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x02 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 02 01 01 02 00 00 ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x03 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 03 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x01 (1 channel) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x01 (supports 1 sample frequency) +tSamFreq[1] : 0x05DC0 (24000 Hz) +Data (HexDump) : 0B 24 02 01 01 02 10 01 C0 5D 00 .$.......]. + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x86 (Direction=IN EndpointID=6) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0064 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x64 (100 bytes per packet) +bInterval : 0x01 (1 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 86 05 64 00 01 00 00 ....d.... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x00 (Undefined) +wLockDelay : 0x0000 +Data (HexDump) : 07 25 01 01 00 00 00 .%..... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x03 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 03 01 01 02 00 00 ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x03 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 03 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x01 (1 channel) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x01 (supports 1 sample frequency) +tSamFreq[1] : 0x07D00 (32000 Hz) +Data (HexDump) : 0B 24 02 01 01 02 10 01 00 7D 00 .$.......}. + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x86 (Direction=IN EndpointID=6) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0084 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x84 (132 bytes per packet) +bInterval : 0x01 (1 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 86 05 84 00 01 00 00 ......... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x00 (Undefined) +wLockDelay : 0x0000 +Data (HexDump) : 07 25 01 01 00 00 00 .%..... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x04 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 04 01 01 02 00 00 ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x03 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 03 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x01 (1 channel) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x01 (supports 1 sample frequency) +tSamFreq[1] : 0x0BB80 (48000 Hz) +Data (HexDump) : 0B 24 02 01 01 02 10 01 80 BB 00 .$......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x86 (Direction=IN EndpointID=6) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x00C4 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0xC4 (196 bytes per packet) +bInterval : 0x01 (1 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 86 05 C4 00 01 00 00 ......... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x00 (Undefined) +wLockDelay : 0x0000 +Data (HexDump) : 07 25 01 01 00 00 00 .%..... + + -------------------- String Descriptors ------------------- + ------ String Descriptor 0 ------ +bLength : 0x04 (4 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language ID[0] : 0x0409 (English - United States) +Data (HexDump) : 04 03 09 04 .... + ------ String Descriptor 2 ------ +bLength : 0x12 (18 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "E190CC90" +Data (HexDump) : 12 03 45 00 31 00 39 00 30 00 43 00 43 00 39 00 ..E.1.9.0.C.C.9. + 30 00 0. +*/ + +namespace logitech_c270 { +const uint8_t dev_desc[] = { + 0x12, 0x01, 0x00, 0x02, 0xEF, 0x02, 0x01, 0x40, 0x6D, 0x04, 0x25, 0x08, 0x12, 0x00, 0x00, 0x00, + 0x02, 0x01 +}; +const uint8_t cfg_desc[] = { + 0x09, 0x02, 0xA2, 0x09, 0x04, 0x01, 0x00, 0x80, 0xFA, 0x08, 0x0B, 0x00, 0x02, 0x0E, 0x03, 0x00, + 0x00, 0x09, 0x04, 0x00, 0x00, 0x01, 0x0E, 0x01, 0x00, 0x00, 0x0D, 0x24, 0x01, 0x00, 0x01, 0xA0, + 0x00, 0x00, 0x6C, 0xDC, 0x02, 0x01, 0x01, 0x12, 0x24, 0x02, 0x01, 0x01, 0x02, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0E, 0x00, 0x00, 0x0B, 0x24, 0x05, 0x02, 0x01, 0x00, 0x40, + 0x02, 0x5B, 0x17, 0x00, 0x1B, 0x24, 0x06, 0x03, 0xE4, 0x8E, 0x67, 0x69, 0x0F, 0x41, 0xDB, 0x40, + 0xA8, 0x50, 0x74, 0x20, 0xD7, 0xD8, 0x24, 0x0E, 0x08, 0x01, 0x02, 0x02, 0x3F, 0x03, 0x00, 0x1B, + 0x24, 0x06, 0x04, 0x15, 0x02, 0xE4, 0x49, 0x34, 0xF4, 0xFE, 0x47, 0xB1, 0x58, 0x0E, 0x88, 0x50, + 0x23, 0xE5, 0x1B, 0x03, 0x01, 0x02, 0x02, 0x09, 0x01, 0x00, 0x1C, 0x24, 0x06, 0x06, 0xA9, 0x4C, + 0x5D, 0x1F, 0x11, 0xDE, 0x87, 0x44, 0x84, 0x0D, 0x50, 0x93, 0x3C, 0x8E, 0xC8, 0xD1, 0x12, 0x01, + 0x04, 0x03, 0xFF, 0xFF, 0x03, 0x00, 0x1B, 0x24, 0x06, 0x07, 0x21, 0x2D, 0xE5, 0xFF, 0x30, 0x80, + 0x2C, 0x4E, 0x82, 0xD9, 0xF5, 0x87, 0xD0, 0x05, 0x40, 0xBD, 0x02, 0x01, 0x04, 0x02, 0x00, 0x03, + 0x00, 0x09, 0x24, 0x03, 0x05, 0x01, 0x01, 0x00, 0x04, 0x00, 0x07, 0x05, 0x87, 0x03, 0x10, 0x00, + 0x08, 0x05, 0x25, 0x03, 0x10, 0x00, 0x09, 0x04, 0x01, 0x00, 0x00, 0x0E, 0x02, 0x00, 0x00, 0x10, + 0x24, 0x01, 0x03, 0x36, 0x07, 0x81, 0x00, 0x05, 0x01, 0x00, 0x00, 0x01, 0x00, 0x04, 0x04, 0x1B, + 0x24, 0x04, 0x01, 0x13, 0x59, 0x55, 0x59, 0x32, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0xAA, + 0x00, 0x38, 0x9B, 0x71, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x32, 0x24, 0x05, 0x01, 0x01, 0x80, + 0x02, 0xE0, 0x01, 0x00, 0x00, 0x77, 0x01, 0x00, 0x00, 0xCA, 0x08, 0x00, 0x60, 0x09, 0x00, 0x15, + 0x16, 0x05, 0x00, 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, + 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x32, 0x24, 0x05, 0x02, + 0x01, 0xA0, 0x00, 0x78, 0x00, 0x00, 0x70, 0x17, 0x00, 0x00, 0xA0, 0x8C, 0x00, 0x00, 0x96, 0x00, + 0x00, 0x15, 0x16, 0x05, 0x00, 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, + 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x32, 0x24, + 0x05, 0x03, 0x01, 0xB0, 0x00, 0x90, 0x00, 0x00, 0xF0, 0x1E, 0x00, 0x00, 0xA0, 0xB9, 0x00, 0x00, + 0xC6, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, + 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, + 0x32, 0x24, 0x05, 0x04, 0x01, 0x40, 0x01, 0xB0, 0x00, 0x00, 0xC0, 0x44, 0x00, 0x00, 0x80, 0x9C, + 0x01, 0x00, 0xB8, 0x01, 0x00, 0x15, 0x16, 0x05, 0x00, 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, + 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, + 0x1E, 0x00, 0x32, 0x24, 0x05, 0x05, 0x01, 0x40, 0x01, 0xF0, 0x00, 0x00, 0xC0, 0x5D, 0x00, 0x00, + 0x80, 0x32, 0x02, 0x00, 0x58, 0x02, 0x00, 0x15, 0x16, 0x05, 0x00, 0x06, 0x15, 0x16, 0x05, 0x00, + 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, + 0x80, 0x84, 0x1E, 0x00, 0x32, 0x24, 0x05, 0x06, 0x01, 0x60, 0x01, 0x20, 0x01, 0x00, 0xC0, 0x7B, + 0x00, 0x00, 0x80, 0xE6, 0x02, 0x00, 0x18, 0x03, 0x00, 0x15, 0x16, 0x05, 0x00, 0x06, 0x15, 0x16, + 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, + 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x32, 0x24, 0x05, 0x07, 0x01, 0xB0, 0x01, 0xF0, 0x00, 0x00, + 0x90, 0x7E, 0x00, 0x00, 0x60, 0xF7, 0x02, 0x00, 0x2A, 0x03, 0x00, 0x15, 0x16, 0x05, 0x00, 0x06, + 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, + 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x32, 0x24, 0x05, 0x08, 0x01, 0x20, 0x02, 0x20, + 0x01, 0x00, 0x40, 0xBF, 0x00, 0x00, 0x80, 0x7B, 0x04, 0x00, 0xC8, 0x04, 0x00, 0x15, 0x16, 0x05, + 0x00, 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, + 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x32, 0x24, 0x05, 0x09, 0x01, 0x80, + 0x02, 0x68, 0x01, 0x00, 0x40, 0x19, 0x01, 0x00, 0x80, 0x97, 0x06, 0x00, 0x08, 0x07, 0x00, 0x15, + 0x16, 0x05, 0x00, 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, + 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x2E, 0x24, 0x05, 0x0A, + 0x01, 0xF0, 0x02, 0xA0, 0x01, 0x00, 0xE0, 0x7D, 0x01, 0x00, 0x60, 0x75, 0x07, 0x00, 0x8C, 0x09, + 0x00, 0x80, 0x1A, 0x06, 0x00, 0x05, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, + 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x2A, 0x24, 0x05, 0x0B, 0x01, 0x20, + 0x03, 0xC0, 0x01, 0x00, 0x80, 0xB5, 0x01, 0x00, 0x00, 0xD6, 0x06, 0x00, 0xF0, 0x0A, 0x00, 0x20, + 0xA1, 0x07, 0x00, 0x04, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, + 0x80, 0x84, 0x1E, 0x00, 0x2A, 0x24, 0x05, 0x0C, 0x01, 0x20, 0x03, 0x58, 0x02, 0x00, 0xF0, 0x49, + 0x02, 0x00, 0xC0, 0x27, 0x09, 0x00, 0xA6, 0x0E, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x04, 0x20, 0xA1, + 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x2A, 0x24, + 0x05, 0x0D, 0x01, 0x60, 0x03, 0xE0, 0x01, 0x00, 0x40, 0xFA, 0x01, 0x00, 0x00, 0xE9, 0x07, 0x00, + 0xA8, 0x0C, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x04, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, + 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x26, 0x24, 0x05, 0x0E, 0x01, 0xC0, 0x03, 0x20, + 0x02, 0x00, 0x80, 0x7D, 0x02, 0x00, 0x80, 0x78, 0x07, 0x00, 0xF0, 0x0F, 0x00, 0x2A, 0x2C, 0x0A, + 0x00, 0x03, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x22, 0x24, + 0x05, 0x0F, 0x01, 0xC0, 0x03, 0xD0, 0x02, 0x00, 0xC0, 0x4B, 0x03, 0x00, 0x80, 0x97, 0x06, 0x00, + 0x18, 0x15, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x02, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, + 0x22, 0x24, 0x05, 0x10, 0x01, 0x00, 0x04, 0x40, 0x02, 0x00, 0x00, 0xD0, 0x02, 0x00, 0x00, 0xA0, + 0x05, 0x00, 0x00, 0x12, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x02, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, + 0x1E, 0x00, 0x22, 0x24, 0x05, 0x11, 0x01, 0xA0, 0x04, 0x90, 0x02, 0x00, 0x20, 0xB4, 0x03, 0x00, + 0x40, 0x68, 0x07, 0x00, 0xB4, 0x17, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x02, 0x40, 0x42, 0x0F, 0x00, + 0x80, 0x84, 0x1E, 0x00, 0x22, 0x24, 0x05, 0x12, 0x01, 0x00, 0x05, 0xD0, 0x02, 0x00, 0x00, 0x65, + 0x04, 0x00, 0x00, 0xCA, 0x08, 0x00, 0x20, 0x1C, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x02, 0x55, 0x58, + 0x14, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x22, 0x24, 0x05, 0x13, 0x01, 0x00, 0x05, 0xC0, 0x03, 0x00, + 0x00, 0xDC, 0x05, 0x00, 0x00, 0xB8, 0x0B, 0x00, 0x80, 0x25, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x02, + 0x55, 0x58, 0x14, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x06, 0x24, 0x0D, 0x01, 0x01, 0x04, 0x0B, 0x24, + 0x06, 0x02, 0x13, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x32, 0x24, 0x07, 0x01, 0x01, 0x80, 0x02, + 0xE0, 0x01, 0x00, 0x00, 0x77, 0x01, 0x00, 0x00, 0xCA, 0x08, 0x00, 0x60, 0x09, 0x00, 0x15, 0x16, + 0x05, 0x00, 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, + 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x32, 0x24, 0x07, 0x02, 0x01, + 0xA0, 0x00, 0x78, 0x00, 0x00, 0x70, 0x17, 0x00, 0x00, 0xA0, 0x8C, 0x00, 0x00, 0x96, 0x00, 0x00, + 0x15, 0x16, 0x05, 0x00, 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, + 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x32, 0x24, 0x07, + 0x03, 0x01, 0xB0, 0x00, 0x90, 0x00, 0x00, 0xF0, 0x1E, 0x00, 0x00, 0xA0, 0xB9, 0x00, 0x00, 0xC6, + 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, + 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x32, + 0x24, 0x07, 0x04, 0x01, 0x40, 0x01, 0xB0, 0x00, 0x00, 0xC0, 0x44, 0x00, 0x00, 0x80, 0x9C, 0x01, + 0x00, 0xB8, 0x01, 0x00, 0x15, 0x16, 0x05, 0x00, 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, + 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, + 0x00, 0x32, 0x24, 0x07, 0x05, 0x01, 0x40, 0x01, 0xF0, 0x00, 0x00, 0xC0, 0x5D, 0x00, 0x00, 0x80, + 0x32, 0x02, 0x00, 0x58, 0x02, 0x00, 0x15, 0x16, 0x05, 0x00, 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, + 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, + 0x84, 0x1E, 0x00, 0x32, 0x24, 0x07, 0x06, 0x01, 0x60, 0x01, 0x20, 0x01, 0x00, 0xC0, 0x7B, 0x00, + 0x00, 0x80, 0xE6, 0x02, 0x00, 0x18, 0x03, 0x00, 0x15, 0x16, 0x05, 0x00, 0x06, 0x15, 0x16, 0x05, + 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, + 0x00, 0x80, 0x84, 0x1E, 0x00, 0x32, 0x24, 0x07, 0x07, 0x01, 0xB0, 0x01, 0xF0, 0x00, 0x00, 0x90, + 0x7E, 0x00, 0x00, 0x60, 0xF7, 0x02, 0x00, 0x2A, 0x03, 0x00, 0x15, 0x16, 0x05, 0x00, 0x06, 0x15, + 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, + 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x32, 0x24, 0x07, 0x08, 0x01, 0x20, 0x02, 0x20, 0x01, + 0x00, 0x40, 0xBF, 0x00, 0x00, 0x80, 0x7B, 0x04, 0x00, 0xC8, 0x04, 0x00, 0x15, 0x16, 0x05, 0x00, + 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, + 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x32, 0x24, 0x07, 0x09, 0x01, 0x80, 0x02, + 0x68, 0x01, 0x00, 0x40, 0x19, 0x01, 0x00, 0x80, 0x97, 0x06, 0x00, 0x08, 0x07, 0x00, 0x15, 0x16, + 0x05, 0x00, 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, + 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x32, 0x24, 0x07, 0x0A, 0x01, + 0xF0, 0x02, 0xA0, 0x01, 0x00, 0xE0, 0x7D, 0x01, 0x00, 0x40, 0xF3, 0x08, 0x00, 0x8C, 0x09, 0x00, + 0x15, 0x16, 0x05, 0x00, 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, + 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x32, 0x24, 0x07, + 0x0B, 0x01, 0x20, 0x03, 0xC0, 0x01, 0x00, 0x80, 0xB5, 0x01, 0x00, 0x00, 0x41, 0x0A, 0x00, 0xF0, + 0x0A, 0x00, 0x15, 0x16, 0x05, 0x00, 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, + 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x32, + 0x24, 0x07, 0x0C, 0x01, 0x20, 0x03, 0x58, 0x02, 0x00, 0xF0, 0x49, 0x02, 0x00, 0xA0, 0xBB, 0x0D, + 0x00, 0xA6, 0x0E, 0x00, 0x15, 0x16, 0x05, 0x00, 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, + 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, + 0x00, 0x32, 0x24, 0x07, 0x0D, 0x01, 0x60, 0x03, 0xE0, 0x01, 0x00, 0x40, 0xFA, 0x01, 0x00, 0x80, + 0xDD, 0x0B, 0x00, 0xA8, 0x0C, 0x00, 0x15, 0x16, 0x05, 0x00, 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, + 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, + 0x84, 0x1E, 0x00, 0x32, 0x24, 0x07, 0x0E, 0x01, 0xC0, 0x03, 0x20, 0x02, 0x00, 0x80, 0x7D, 0x02, + 0x00, 0x00, 0xF1, 0x0E, 0x00, 0xF0, 0x0F, 0x00, 0x15, 0x16, 0x05, 0x00, 0x06, 0x15, 0x16, 0x05, + 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, + 0x00, 0x80, 0x84, 0x1E, 0x00, 0x32, 0x24, 0x07, 0x0F, 0x01, 0xC0, 0x03, 0xD0, 0x02, 0x00, 0xC0, + 0x4B, 0x03, 0x00, 0x80, 0xC6, 0x13, 0x00, 0x18, 0x15, 0x00, 0x15, 0x16, 0x05, 0x00, 0x06, 0x15, + 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, + 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x32, 0x24, 0x07, 0x10, 0x01, 0x00, 0x04, 0x40, 0x02, + 0x00, 0x00, 0xD0, 0x02, 0x00, 0x00, 0xE0, 0x10, 0x00, 0x00, 0x12, 0x00, 0x15, 0x16, 0x05, 0x00, + 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, + 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x32, 0x24, 0x07, 0x11, 0x01, 0xA0, 0x04, + 0x90, 0x02, 0x00, 0x20, 0xB4, 0x03, 0x00, 0xC0, 0x38, 0x16, 0x00, 0xB4, 0x17, 0x00, 0x15, 0x16, + 0x05, 0x00, 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, + 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x32, 0x24, 0x07, 0x12, 0x01, + 0x00, 0x05, 0xD0, 0x02, 0x00, 0x00, 0x65, 0x04, 0x00, 0x00, 0x5E, 0x1A, 0x00, 0x20, 0x1C, 0x00, + 0x15, 0x16, 0x05, 0x00, 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, + 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x32, 0x24, 0x07, + 0x13, 0x01, 0x00, 0x05, 0xC0, 0x03, 0x00, 0x00, 0xDC, 0x05, 0x00, 0x00, 0x28, 0x23, 0x00, 0x80, + 0x25, 0x00, 0x15, 0x16, 0x05, 0x00, 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, + 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x06, + 0x24, 0x0D, 0x01, 0x01, 0x04, 0x09, 0x04, 0x01, 0x01, 0x01, 0x0E, 0x02, 0x00, 0x00, 0x07, 0x05, + 0x81, 0x05, 0xC0, 0x00, 0x01, 0x09, 0x04, 0x01, 0x02, 0x01, 0x0E, 0x02, 0x00, 0x00, 0x07, 0x05, + 0x81, 0x05, 0x80, 0x01, 0x01, 0x09, 0x04, 0x01, 0x03, 0x01, 0x0E, 0x02, 0x00, 0x00, 0x07, 0x05, + 0x81, 0x05, 0x00, 0x02, 0x01, 0x09, 0x04, 0x01, 0x04, 0x01, 0x0E, 0x02, 0x00, 0x00, 0x07, 0x05, + 0x81, 0x05, 0x80, 0x02, 0x01, 0x09, 0x04, 0x01, 0x05, 0x01, 0x0E, 0x02, 0x00, 0x00, 0x07, 0x05, + 0x81, 0x05, 0x20, 0x03, 0x01, 0x09, 0x04, 0x01, 0x06, 0x01, 0x0E, 0x02, 0x00, 0x00, 0x07, 0x05, + 0x81, 0x05, 0xB0, 0x03, 0x01, 0x09, 0x04, 0x01, 0x07, 0x01, 0x0E, 0x02, 0x00, 0x00, 0x07, 0x05, + 0x81, 0x05, 0x80, 0x0A, 0x01, 0x09, 0x04, 0x01, 0x08, 0x01, 0x0E, 0x02, 0x00, 0x00, 0x07, 0x05, + 0x81, 0x05, 0x20, 0x0B, 0x01, 0x09, 0x04, 0x01, 0x09, 0x01, 0x0E, 0x02, 0x00, 0x00, 0x07, 0x05, + 0x81, 0x05, 0xE0, 0x0B, 0x01, 0x09, 0x04, 0x01, 0x0A, 0x01, 0x0E, 0x02, 0x00, 0x00, 0x07, 0x05, + 0x81, 0x05, 0x80, 0x13, 0x01, 0x09, 0x04, 0x01, 0x0B, 0x01, 0x0E, 0x02, 0x00, 0x00, 0x07, 0x05, + 0x81, 0x05, 0xFC, 0x13, 0x01, 0x08, 0x0B, 0x02, 0x02, 0x01, 0x02, 0x00, 0x00, 0x09, 0x04, 0x02, + 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x09, 0x24, 0x01, 0x00, 0x01, 0x26, 0x00, 0x01, 0x03, 0x0C, + 0x24, 0x02, 0x01, 0x01, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x09, 0x24, 0x03, 0x03, 0x01, + 0x01, 0x01, 0x05, 0x00, 0x09, 0x24, 0x06, 0x05, 0x01, 0x01, 0x03, 0x00, 0x00, 0x09, 0x04, 0x03, + 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x09, 0x04, 0x03, 0x01, 0x01, 0x01, 0x02, 0x00, 0x00, 0x07, + 0x24, 0x01, 0x03, 0x01, 0x01, 0x00, 0x0B, 0x24, 0x02, 0x01, 0x01, 0x02, 0x10, 0x01, 0x80, 0x3E, + 0x00, 0x09, 0x05, 0x86, 0x05, 0x44, 0x00, 0x04, 0x00, 0x00, 0x07, 0x25, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x09, 0x04, 0x03, 0x02, 0x01, 0x01, 0x02, 0x00, 0x00, 0x07, 0x24, 0x01, 0x03, 0x01, 0x01, + 0x00, 0x0B, 0x24, 0x02, 0x01, 0x01, 0x02, 0x10, 0x01, 0xC0, 0x5D, 0x00, 0x09, 0x05, 0x86, 0x05, + 0x64, 0x00, 0x04, 0x00, 0x00, 0x07, 0x25, 0x01, 0x01, 0x00, 0x00, 0x00, 0x09, 0x04, 0x03, 0x03, + 0x01, 0x01, 0x02, 0x00, 0x00, 0x07, 0x24, 0x01, 0x03, 0x01, 0x01, 0x00, 0x0B, 0x24, 0x02, 0x01, + 0x01, 0x02, 0x10, 0x01, 0x00, 0x7D, 0x00, 0x09, 0x05, 0x86, 0x05, 0x84, 0x00, 0x04, 0x00, 0x00, + 0x07, 0x25, 0x01, 0x01, 0x00, 0x00, 0x00, 0x09, 0x04, 0x03, 0x04, 0x01, 0x01, 0x02, 0x00, 0x00, + 0x07, 0x24, 0x01, 0x03, 0x01, 0x01, 0x00, 0x0B, 0x24, 0x02, 0x01, 0x01, 0x02, 0x10, 0x01, 0x80, + 0xBB, 0x00, 0x09, 0x05, 0x86, 0x05, 0xC4, 0x00, 0x04, 0x00, 0x00, 0x07, 0x25, 0x01, 0x01, 0x00, + 0x00, 0x00 +}; +} diff --git a/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/logitech_streamcam.hpp b/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/logitech_streamcam.hpp new file mode 100644 index 00000000..e3adb3fe --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/logitech_streamcam.hpp @@ -0,0 +1,3021 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include + +/* + ======================== USB Device ======================== + + +++++++++++++++++ Device Information ++++++++++++++++++ +Device Description : USB Composite Device +Device ID : USB\VID_046D&PID_0893\5079EB25 +Hardware IDs : USB\VID_046D&PID_0893&REV_0017 USB\VID_046D&PID_0893 +Driver KeyName : {36fc9e60-c465-11cf-8056-444553540000}\0098 (GUID_DEVCLASS_USB) +Driver : \SystemRoot\System32\drivers\usbccgp.sys (Version: 10.0.19041.4474 Date: 2024-06-13) +Driver Inf : C:\Windows\inf\usb.inf +Legacy BusType : PNPBus +Class : USB +Class GUID : {36fc9e60-c465-11cf-8056-444553540000} (GUID_DEVCLASS_USB) +Service : usbccgp +Enumerator : USB +Location Info : Port_#0004.Hub_#0009 +Location IDs : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(4), ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(4) +Container ID : {6d7059ae-e6ab-5490-b0a5-ee8acac7dd52} +Manufacturer Info : (Standard USB Host Controller) +Capabilities : 0x94 (Removable, UniqueID, SurpriseRemovalOK) +Status : 0x0180600A (DN_DRIVER_LOADED, DN_STARTED, DN_DISABLEABLE, DN_REMOVABLE, DN_NT_ENUMERATOR, DN_NT_DRIVER) +Problem Code : 0 +Address : 4 +HcDisableSelectiveSuspend: 0 +EnableSelectiveSuspend : 0 +SelectiveSuspendEnabled : 0 +EnhancedPowerMgmtEnabled : 0 +IdleInWorkingState : 0 +WakeFromSleepState : 0 +Power State : D0 (supported: D0, D3, wake from D0) + Child Device 1 : Logitech StreamCam + Device Path : \\?\USB#VID_046D&PID_0893&MI_00#8&35e311c5&0&0000#{e5323777-f976-4f5b-9b55-b94699c46e44}\global (STATIC_KSCATEGORY_VIDEO_CAMERA) + Kernel Name : \Device\00000379 + Device ID : USB\VID_046D&PID_0893&MI_00\8&35E311C5&0&0000 + Class : Image + Driver KeyName : {6bdd1fc6-810f-11d0-bec7-08002be2092f}\0002 (GUID_DEVCLASS_IMAGE) + Service : usbvideo + Location : 0005.0000.0004.001.004.000.000.000.000 + LocationPaths : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(4)#USBMI(0) PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(4)#USB(4) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(4)#USBMI(0) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(4)#USB(4) + Child Device 2 : Logitech StreamCam (USB Audio Device) + Device Path : \\?\USB#VID_046D&PID_0893&MI_02#8&35e311c5&0&0002#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\global (AM_KSCATEGORY_AUDIO) + Kernel Name : \Device\0000037a + Device ID : USB\VID_046D&PID_0893&MI_02\8&35E311C5&0&0002 + Class : MEDIA + Driver KeyName : {4d36e96c-e325-11ce-bfc1-08002be10318}\0013 (GUID_DEVCLASS_MEDIA) + Service : usbaudio + Location : 0005.0000.0004.001.004.000.000.000.000 + LocationPaths : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(4)#USBMI(2) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(4)#USBMI(2) + Child Device 1 : Microphone (Logitech StreamCam) (Audio Endpoint) + Device ID : SWD\MMDEVAPI\{0.0.1.00000000}.{05B0DFB8-996D-4E3F-8A5B-183A37F30CD8} + Class : AudioEndpoint + Driver KeyName : {c166523c-fe0c-4a94-a586-f1a80cfbbf3e}\0039 (AUDIOENDPOINT_CLASS_UUID) + Child Device 3 : Logitech StreamCam + Device ID : USB\VID_046D&PID_0893&MI_04\8&35E311C5&0&0004 + Location : 0005.0000.0004.001.004.000.000.000.000 + LocationPaths : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(4)#USBMI(4) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(4)#USBMI(4) + Problem : 28 (CM_PROB_FAILED_INSTALL) + Child Device 4 : USB Input Device + Device ID : USB\VID_046D&PID_0893&MI_05\8&35E311C5&0&0005 + Class : HIDClass + Driver KeyName : {745a17a0-74d3-11d0-b6fe-00a0c90f57da}\0048 (GUID_DEVCLASS_HIDCLASS) + Service : HidUsb + Location : 0005.0000.0004.001.004.000.000.000.000 + LocationPaths : PCIROOT(0)#PCI(0803)#PCI(0004)#USBROOT(0)#USB(1)#USB(4)#USBMI(5) ACPI(_SB_)#ACPI(PCI0)#ACPI(GP19)#ACPI(XHC4)#ACPI(RHUB)#ACPI(PRT1)#USB(4)#USBMI(5) + Child Device 1 : HID-compliant vendor-defined device + Device Path : \\?\HID#VID_046D&PID_0893&MI_05#9&3b5eb197&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030} (GUID_DEVINTERFACE_HID) + Kernel Name : \Device\0000037f + Device ID : HID\VID_046D&PID_0893&MI_05\9&3B5EB197&0&0000 + Class : HIDClass + Driver KeyName : {745a17a0-74d3-11d0-b6fe-00a0c90f57da}\0049 (GUID_DEVCLASS_HIDCLASS) + + +++++++++++++++++ Registry USB Flags +++++++++++++++++ +HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags\046D08930017 + osvc : REG_BINARY 00 00 + + ---------------- Connection Information --------------- +Connection Index : 0x04 (Port 4) +Connection Status : 0x01 (DeviceConnected) +Current Config Value : 0x01 (Configuration 1) +Device Address : 0x04 (4) +Is Hub : 0x00 (no) +Device Bus Speed : 0x02 (High-Speed) +Number Of Open Pipes : 0x03 (3 pipes to data endpoints) +Pipe[0] : EndpointID=5 Direction=IN ScheduleOffset=0 Type=Interrupt +Pipe[1] : EndpointID=3 Direction=IN ScheduleOffset=0 Type=Bulk +Pipe[2] : EndpointID=7 Direction=IN ScheduleOffset=0 Type=Interrupt +Data (HexDump) : 04 00 00 00 12 01 10 02 EF 02 01 40 6D 04 93 08 ...........@m... + 17 00 00 02 03 01 01 02 00 04 00 03 00 00 00 01 ................ + 00 00 00 07 05 85 03 40 00 08 00 00 00 00 07 05 .......@........ + 83 02 00 02 00 00 00 00 00 07 05 87 03 02 00 06 ................ + 00 00 00 00 .... + + --------------- Connection Information V2 ------------- +Connection Index : 0x04 (4) +Length : 0x10 (16 bytes) +SupportedUsbProtocols : 0x03 + Usb110 : 1 (yes, port supports USB 1.1) + Usb200 : 1 (yes, port supports USB 2.0) + Usb300 : 0 (no, port not supports USB 3.0) + ReservedMBZ : 0x00 +Flags : 0x02 + DevIsOpAtSsOrHigher : 0 (Device is not operating at SuperSpeed or higher) + DevIsSsCapOrHigher : 1 (Device is SuperSpeed capable or higher) + DevIsOpAtSsPlusOrHigher : 0 (Device is not operating at SuperSpeedPlus or higher) + DevIsSsPlusCapOrHigher : 0 (Device is not SuperSpeedPlus capable or higher) + ReservedMBZ : 0x00 +Data (HexDump) : 04 00 00 00 10 00 00 00 03 00 00 00 02 00 00 00 ................ + + ---------------------- Device Descriptor ---------------------- +bLength : 0x12 (18 bytes) +bDescriptorType : 0x01 (Device Descriptor) +bcdUSB : 0x210 (USB Version 2.10) +bDeviceClass : 0xEF (Miscellaneous) +bDeviceSubClass : 0x02 +bDeviceProtocol : 0x01 (IAD - Interface Association Descriptor) +bMaxPacketSize0 : 0x40 (64 bytes) +idVendor : 0x046D (Logitech Inc.) +idProduct : 0x0893 +bcdDevice : 0x0017 +iManufacturer : 0x00 (No String Descriptor) +iProduct : 0x02 (String Descriptor 2) + Language 0x0409 : "Logitech StreamCam" +iSerialNumber : 0x03 (String Descriptor 3) + Language 0x0409 : "5079EB25" +bNumConfigurations : 0x01 (1 Configuration) +Data (HexDump) : 12 01 10 02 EF 02 01 40 6D 04 93 08 17 00 00 02 .......@m....... + 03 01 .. + + ------------------ Configuration Descriptor ------------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x02 (Configuration Descriptor) +wTotalLength : 0x0709 (1801 bytes) +bNumInterfaces : 0x06 (6 Interfaces) +bConfigurationValue : 0x01 (Configuration 1) +iConfiguration : 0x00 (No String Descriptor) +bmAttributes : 0x80 + D7: Reserved, set 1 : 0x01 + D6: Self Powered : 0x00 (no) + D5: Remote Wakeup : 0x00 (no) + D4..0: Reserved, set 0 : 0x00 +MaxPower : 0xFA (500 mA) +Data (HexDump) : 09 02 09 07 06 01 00 80 FA 08 0B 00 02 0E 03 00 ................ + 00 09 04 00 00 01 0E 01 00 00 0D 24 01 00 01 D8 ...........$.... + 00 80 C3 C9 01 01 01 12 24 02 01 01 02 00 00 00 ........$....... + 00 00 00 00 00 03 2E 2A 02 0B 24 05 03 01 00 40 .......*..$....@ + 02 5B 17 00 1B 24 06 0E 6A D1 49 2C B8 32 85 44 .[...$..j.I,.2.D + 3E A8 64 3A 15 23 62 F2 06 01 03 02 3F 00 00 1B >.d:.#b.....?... + 24 06 06 D0 9E E4 23 78 11 31 4F AE 52 D2 FB 8A $.....#x.1O.R... + 8D 3B 48 0E 01 03 02 FF 6F 00 1B 24 06 08 E4 8E .;H.....o..$.... + 67 69 0F 41 DB 40 A8 50 74 20 D7 D8 24 0E 08 01 gi.A.@.Pt ..$... + 03 02 3F 0F 00 1C 24 06 09 A9 4C 5D 1F 11 DE 87 ..?...$...L].... + 44 84 0D 50 93 3C 8E C8 D1 12 01 03 03 FF FF 03 D..P.<.......... + 00 1C 24 06 0A 15 02 E4 49 34 F4 FE 47 B1 58 0E ..$.....I4..G.X. + 88 50 23 E5 1B 0B 01 03 03 FA FF 01 00 1C 24 06 .P#...........$. + 0B 21 2D E5 FF 30 80 2C 4E 82 D9 F5 87 D0 05 40 .!-..0.,N......@ + BD 04 01 03 03 00 41 01 00 09 24 03 04 01 01 00 ......A...$..... + 03 00 07 05 85 03 40 00 08 05 25 03 40 00 09 04 ......@...%.@... + 01 00 00 0E 02 00 00 0F 24 01 02 31 04 81 00 04 ........$..1.... + 00 00 00 01 00 00 1B 24 04 01 0A 59 55 59 32 00 .......$...YUY2. + 00 10 00 80 00 00 AA 00 38 9B 71 10 01 00 00 00 ........8.q..... + 00 36 24 05 01 00 80 02 E0 01 00 00 77 01 00 00 .6$.........w... + CA 08 00 60 09 00 15 16 05 00 07 15 16 05 00 9A ...`............ + 5B 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 [.. ...*,..@B..U + 58 14 00 80 84 1E 00 36 24 05 02 00 B0 00 90 00 X......6$....... + 00 F0 1E 00 00 A0 B9 00 00 C6 00 00 15 16 05 00 ................ + 07 15 16 05 00 9A 5B 06 00 20 A1 07 00 2A 2C 0A ......[.. ...*,. + 00 40 42 0F 00 55 58 14 00 80 84 1E 00 36 24 05 .@B..UX......6$. + 03 00 40 01 F0 00 00 C0 5D 00 00 80 32 02 00 58 ..@.....]...2..X + 02 00 15 16 05 00 07 15 16 05 00 9A 5B 06 00 20 ............[.. + A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 14 00 80 ...*,..@B..UX... + 84 1E 00 36 24 05 04 00 A8 01 F0 00 00 38 7C 00 ...6$........8|. + 00 50 E9 02 00 1B 03 00 15 16 05 00 07 15 16 05 .P.............. + 00 9A 5B 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F ..[.. ...*,..@B. + 00 55 58 14 00 80 84 1E 00 36 24 05 05 00 80 02 .UX......6$..... + 68 01 00 40 19 01 00 80 97 06 00 08 07 00 15 16 h..@............ + 05 00 07 15 16 05 00 9A 5B 06 00 20 A1 07 00 2A ........[.. ...* + 2C 0A 00 40 42 0F 00 55 58 14 00 80 84 1E 00 36 ,..@B..UX......6 + 24 05 06 00 50 03 E0 01 00 E0 F0 01 00 40 A5 0B $...P........@.. + 00 6C 0C 00 15 16 05 00 07 15 16 05 00 9A 5B 06 .l............[. + 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 14 . ...*,..@B..UX. + 00 80 84 1E 00 2A 24 05 07 00 C0 03 1C 02 00 D0 .....*$......... + 78 02 00 70 6A 07 00 D2 0F 00 2A 2C 0A 00 04 2A x..pj.....*,...* + 2C 0A 00 40 42 0F 00 55 58 14 00 80 84 1E 00 26 ,..@B..UX......& + 24 05 08 00 00 05 D0 02 00 00 65 04 00 00 CA 08 $.........e..... + 00 20 1C 00 40 42 0F 00 03 40 42 0F 00 55 58 14 . ..@B...@B..UX. + 00 80 84 1E 00 22 24 05 09 00 40 06 80 03 00 00 ....."$...@..... + D6 06 00 00 41 0A 00 C0 2B 00 55 58 14 00 02 55 ....A...+.UX...U + 58 14 00 80 84 1E 00 1E 24 05 0A 00 80 07 38 04 X.......$.....8. + 00 40 E3 09 00 40 E3 09 00 48 3F 00 80 84 1E 00 .@...@...H?..... + 01 80 84 1E 00 06 24 0D 01 01 04 0B 24 06 02 0A ......$.....$... + 01 01 00 00 00 00 36 24 07 01 00 80 02 E0 01 00 ......6$........ + 00 77 01 00 00 CA 08 00 60 09 00 15 16 05 00 07 .w......`....... + 15 16 05 00 9A 5B 06 00 20 A1 07 00 2A 2C 0A 00 .....[.. ...*,.. + 40 42 0F 00 55 58 14 00 80 84 1E 00 36 24 07 02 @B..UX......6$.. + 00 B0 00 90 00 00 F0 1E 00 00 A0 B9 00 00 C6 00 ................ + 00 15 16 05 00 07 15 16 05 00 9A 5B 06 00 20 A1 ...........[.. . + 07 00 2A 2C 0A 00 40 42 0F 00 55 58 14 00 80 84 ..*,..@B..UX.... + 1E 00 36 24 07 03 00 40 01 F0 00 00 C0 5D 00 00 ..6$...@.....].. + 80 32 02 00 58 02 00 15 16 05 00 07 15 16 05 00 .2..X........... + 9A 5B 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 .[.. ...*,..@B.. + 55 58 14 00 80 84 1E 00 36 24 07 04 00 A8 01 F0 UX......6$...... + 00 00 38 7C 00 00 50 E9 02 00 1B 03 00 15 16 05 ..8|..P......... + 00 07 15 16 05 00 9A 5B 06 00 20 A1 07 00 2A 2C .......[.. ...*, + 0A 00 40 42 0F 00 55 58 14 00 80 84 1E 00 36 24 ..@B..UX......6$ + 07 05 00 80 02 68 01 00 40 19 01 00 80 97 06 00 .....h..@....... + 08 07 00 15 16 05 00 07 15 16 05 00 9A 5B 06 00 .............[.. + 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 14 00 ...*,..@B..UX.. + 80 84 1E 00 36 24 07 06 00 50 03 E0 01 00 E0 F0 ....6$...P...... + 01 00 40 A5 0B 00 6C 0C 00 15 16 05 00 07 15 16 ..@...l......... + 05 00 9A 5B 06 00 20 A1 07 00 2A 2C 0A 00 40 42 ...[.. ...*,..@B + 0F 00 55 58 14 00 80 84 1E 00 36 24 07 07 00 C0 ..UX......6$.... + 03 1C 02 00 D0 78 02 00 E0 D4 0E 00 D2 0F 00 15 .....x.......... + 16 05 00 07 15 16 05 00 9A 5B 06 00 20 A1 07 00 .........[.. ... + 2A 2C 0A 00 40 42 0F 00 55 58 14 00 80 84 1E 00 *,..@B..UX...... + 36 24 07 08 00 00 05 D0 02 00 00 65 04 00 00 5E 6$.........e...^ + 1A 00 20 1C 00 15 16 05 00 07 15 16 05 00 9A 5B .. ............[ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 .. ...*,..@B..UX + 14 00 80 84 1E 00 36 24 07 09 00 40 06 80 03 00 ......6$...@.... + 00 D6 06 00 00 04 29 00 C0 2B 00 15 16 05 00 07 ......)..+...... + 15 16 05 00 9A 5B 06 00 20 A1 07 00 2A 2C 0A 00 .....[.. ...*,.. + 40 42 0F 00 55 58 14 00 80 84 1E 00 36 24 07 0A @B..UX......6$.. + 00 80 07 38 04 00 40 E3 09 00 80 53 3B 00 48 3F ...8..@....S;.H? + 00 15 16 05 00 07 15 16 05 00 9A 5B 06 00 20 A1 ...........[.. . + 07 00 2A 2C 0A 00 40 42 0F 00 55 58 14 00 80 84 ..*,..@B..UX.... + 1E 00 06 24 0D 01 01 04 09 04 01 01 01 0E 02 00 ...$............ + 00 07 05 81 05 C0 00 01 09 04 01 02 01 0E 02 00 ................ + 00 07 05 81 05 80 01 01 09 04 01 03 01 0E 02 00 ................ + 00 07 05 81 05 00 02 01 09 04 01 04 01 0E 02 00 ................ + 00 07 05 81 05 80 02 01 09 04 01 05 01 0E 02 00 ................ + 00 07 05 81 05 20 03 01 09 04 01 06 01 0E 02 00 ..... .......... + 00 07 05 81 05 B0 03 01 09 04 01 07 01 0E 02 00 ................ + 00 07 05 81 05 80 0A 01 09 04 01 08 01 0E 02 00 ................ + 00 07 05 81 05 20 0B 01 09 04 01 09 01 0E 02 00 ..... .......... + 00 07 05 81 05 E0 0B 01 09 04 01 0A 01 0E 02 00 ................ + 00 07 05 81 05 80 13 01 09 04 01 0B 01 0E 02 00 ................ + 00 07 05 81 05 00 14 01 08 0B 02 02 01 02 00 00 ................ + 09 04 02 00 00 01 01 00 00 09 24 01 00 01 26 00 ..........$...&. + 01 03 0C 24 02 01 01 02 00 02 03 00 00 00 09 24 ...$...........$ + 03 03 01 01 00 05 00 08 24 06 05 01 01 03 00 09 ........$....... + 04 03 00 00 01 02 00 00 09 04 03 01 01 01 02 00 ................ + 00 07 24 01 03 01 01 00 0B 24 02 01 02 02 10 01 ..$......$...... + 80 3E 00 09 05 84 05 44 00 04 00 00 07 25 01 01 .>.....D.....%.. + 00 00 00 09 04 03 02 01 01 02 00 00 07 24 01 03 .............$.. + 01 01 00 0B 24 02 01 02 02 10 01 C0 5D 00 09 05 ....$.......]... + 84 05 64 00 04 00 00 07 25 01 01 00 00 00 09 04 ..d.....%....... + 03 03 01 01 02 00 00 07 24 01 03 01 01 00 0B 24 ........$......$ + 02 01 02 02 10 01 00 7D 00 09 05 84 05 84 00 04 .......}........ + 00 00 07 25 01 01 00 00 00 09 04 03 04 01 01 02 ...%............ + 00 00 07 24 01 03 01 01 00 0B 24 02 01 02 02 10 ...$......$..... + 01 80 BB 00 09 05 84 05 C4 00 04 00 00 07 25 01 ..............%. + 01 00 00 00 09 04 04 00 01 FF FF 00 00 07 05 83 ................ + 02 00 02 00 06 30 00 00 00 00 09 04 05 00 01 03 .....0.......... + 00 00 00 09 21 11 01 00 01 22 6C 00 07 05 87 03 ....!...."l..... + 02 00 06 06 30 00 00 02 00 ....0.... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x00 +bInterfaceCount : 0x02 +bFunctionClass : 0x0E (Video) +bFunctionSubClass : 0x03 (Video Interface Collection) +bFunctionProtocol : 0x00 (PC_PROTOCOL_UNDEFINED protocol) +iFunction : 0x00 (No String Descriptor) +Data (HexDump) : 08 0B 00 02 0E 03 00 00 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x00 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x01 (Video Control) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 00 00 01 0E 01 00 00 ......... + + ------- Video Control Interface Header Descriptor ----- +bLength : 0x0D (13 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x01 (Video Control Header) +bcdUVC : 0x0100 (UVC Version 1.00) +wTotalLength : 0x00D8 (216 bytes) +dwClockFreq : 0x01C9C380 (30 MHz) +bInCollection : 0x01 (1 VideoStreaming interface) +baInterfaceNr[1] : 0x01 +Data (HexDump) : 0D 24 01 00 01 D8 00 80 C3 C9 01 01 01 .$........... + + -------- Video Control Input Terminal Descriptor ------ +bLength : 0x12 (18 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (ITT_CAMERA) +bAssocTerminal : 0x00 (Not associated with an Output Terminal) +iTerminal : 0x00 +Camera Input Terminal Data: +wObjectiveFocalLengthMin : 0x0000 +wObjectiveFocalLengthMax : 0x0000 +wOcularFocalLength : 0x0000 +bControlSize : 0x03 +bmControls : 0x2E, 0x2A, 0x02 + D0 : 0 no - Scanning Mode + D1 : 1 yes - Auto-Exposure Mode + D2 : 1 yes - Auto-Exposure Priority + D3 : 1 yes - Exposure Time (Absolute) + D4 : 0 no - Exposure Time (Relative) + D5 : 1 yes - Focus (Absolute) + D6 : 0 no - Focus (Relative) + D7 : 0 no - Iris (Absolute) + D8 : 0 no - Iris (Relative) + D9 : 1 yes - Zoom (Absolute) + D10 : 0 no - Zoom (Relative) + D11 : 1 yes - Pan (Absolute) + D12 : 0 no - Pan (Relative) + D13 : 1 yes - Roll (Absolute) + D14 : 0 no - Roll (Relative) + D15 : 0 no - Tilt (Absolute) + D16 : 0 no - Tilt (Relative) + D17 : 1 yes - Focus Auto + D18 : 0 no - Reserved + D19 : 0 no - Reserved + D20 : 0 no - Reserved + D21 : 0 no - Reserved + D22 : 0 no - Reserved + D23 : 0 no - Reserved +Data (HexDump) : 12 24 02 01 01 02 00 00 00 00 00 00 00 00 03 2E .$.............. + 2A 02 *. + + -------- Video Control Processing Unit Descriptor ----- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x05 (Processing Unit) +bUnitID : 0x03 +bSourceID : 0x01 +wMaxMultiplier : 0x4000 (163.84x Zoom) +bControlSize : 0x02 +bmControls : 0x5B, 0x17 + D0 : 1 yes - Brightness + D1 : 1 yes - Contrast + D2 : 0 no - Hue + D3 : 1 yes - Saturation + D4 : 1 yes - Sharpness + D5 : 0 no - Gamma + D6 : 1 yes - White Balance Temperature + D7 : 0 no - White Balance Component + D8 : 1 yes - Backlight Compensation + D9 : 1 yes - Gain + D10 : 1 yes - Power Line Frequency + D11 : 0 no - Hue, Auto + D12 : 1 yes - White Balance Temperature, Auto + D13 : 0 no - White Balance Component, Auto + D14 : 0 no - Digital Multiplier + D15 : 0 no - Digital Multiplier Limit +iProcessing : 0x00 +Data (HexDump) : 0B 24 05 03 01 00 40 02 5B 17 00 .$....@.[.. + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1B (27 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x0E +guidExtensionCode : {2C49D16A-32B8-4485-3EA8-643A152362F2} +bNumControls : 0x06 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x03 +bControlSize : 0x02 +bmControls : 0x3F, 0x00 + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 1 yes - Vendor-Specific (Optional) + D3 : 1 yes - Vendor-Specific (Optional) + D4 : 1 yes - Vendor-Specific (Optional) + D5 : 1 yes - Vendor-Specific (Optional) + D6 : 0 no - Vendor-Specific (Optional) + D7 : 0 no - Vendor-Specific (Optional) + D8 : 0 no - Vendor-Specific (Optional) + D9 : 0 no - Vendor-Specific (Optional) + D10 : 0 no - Vendor-Specific (Optional) + D11 : 0 no - Vendor-Specific (Optional) + D12 : 0 no - Vendor-Specific (Optional) + D13 : 0 no - Vendor-Specific (Optional) + D14 : 0 no - Vendor-Specific (Optional) + D15 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1B 24 06 0E 6A D1 49 2C B8 32 85 44 3E A8 64 3A .$..j.I,.2.D>.d: + 15 23 62 F2 06 01 03 02 3F 00 00 .#b.....?.. + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1B (27 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x06 +guidExtensionCode : {23E49ED0-1178-4F31-AE52-D2FB8A8D3B48} +bNumControls : 0x0E +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x03 +bControlSize : 0x02 +bmControls : 0xFF, 0x6F + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 1 yes - Vendor-Specific (Optional) + D3 : 1 yes - Vendor-Specific (Optional) + D4 : 1 yes - Vendor-Specific (Optional) + D5 : 1 yes - Vendor-Specific (Optional) + D6 : 1 yes - Vendor-Specific (Optional) + D7 : 1 yes - Vendor-Specific (Optional) + D8 : 1 yes - Vendor-Specific (Optional) + D9 : 1 yes - Vendor-Specific (Optional) + D10 : 1 yes - Vendor-Specific (Optional) + D11 : 1 yes - Vendor-Specific (Optional) + D12 : 0 no - Vendor-Specific (Optional) + D13 : 1 yes - Vendor-Specific (Optional) + D14 : 1 yes - Vendor-Specific (Optional) + D15 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1B 24 06 06 D0 9E E4 23 78 11 31 4F AE 52 D2 FB .$.....#x.1O.R.. + 8A 8D 3B 48 0E 01 03 02 FF 6F 00 ..;H.....o. + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1B (27 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x08 +guidExtensionCode : {69678EE4-410F-40DB-A850-7420D7D8240E} +bNumControls : 0x08 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x03 +bControlSize : 0x02 +bmControls : 0x3F, 0x0F + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 1 yes - Vendor-Specific (Optional) + D3 : 1 yes - Vendor-Specific (Optional) + D4 : 1 yes - Vendor-Specific (Optional) + D5 : 1 yes - Vendor-Specific (Optional) + D6 : 0 no - Vendor-Specific (Optional) + D7 : 0 no - Vendor-Specific (Optional) + D8 : 1 yes - Vendor-Specific (Optional) + D9 : 1 yes - Vendor-Specific (Optional) + D10 : 1 yes - Vendor-Specific (Optional) + D11 : 1 yes - Vendor-Specific (Optional) + D12 : 0 no - Vendor-Specific (Optional) + D13 : 0 no - Vendor-Specific (Optional) + D14 : 0 no - Vendor-Specific (Optional) + D15 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1B 24 06 08 E4 8E 67 69 0F 41 DB 40 A8 50 74 20 .$....gi.A.@.Pt + D7 D8 24 0E 08 01 03 02 3F 0F 00 ..$.....?.. + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1C (28 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x09 +guidExtensionCode : {1F5D4CA9-DE11-4487-840D-50933C8EC8D1} +bNumControls : 0x12 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x03 +bControlSize : 0x03 +bmControls : 0xFF, 0xFF, 0x03 + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 1 yes - Vendor-Specific (Optional) + D3 : 1 yes - Vendor-Specific (Optional) + D4 : 1 yes - Vendor-Specific (Optional) + D5 : 1 yes - Vendor-Specific (Optional) + D6 : 1 yes - Vendor-Specific (Optional) + D7 : 1 yes - Vendor-Specific (Optional) + D8 : 1 yes - Vendor-Specific (Optional) + D9 : 1 yes - Vendor-Specific (Optional) + D10 : 1 yes - Vendor-Specific (Optional) + D11 : 1 yes - Vendor-Specific (Optional) + D12 : 1 yes - Vendor-Specific (Optional) + D13 : 1 yes - Vendor-Specific (Optional) + D14 : 1 yes - Vendor-Specific (Optional) + D15 : 1 yes - Vendor-Specific (Optional) + D16 : 1 yes - Vendor-Specific (Optional) + D17 : 1 yes - Vendor-Specific (Optional) + D18 : 0 no - Vendor-Specific (Optional) + D19 : 0 no - Vendor-Specific (Optional) + D20 : 0 no - Vendor-Specific (Optional) + D21 : 0 no - Vendor-Specific (Optional) + D22 : 0 no - Vendor-Specific (Optional) + D23 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1C 24 06 09 A9 4C 5D 1F 11 DE 87 44 84 0D 50 93 .$...L]....D..P. + 3C 8E C8 D1 12 01 03 03 FF FF 03 00 <........... + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1C (28 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x0A +guidExtensionCode : {49E40215-F434-47FE-B158-0E885023E51B} +bNumControls : 0x0B +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x03 +bControlSize : 0x03 +bmControls : 0xFA, 0xFF, 0x01 + D0 : 0 no - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 0 no - Vendor-Specific (Optional) + D3 : 1 yes - Vendor-Specific (Optional) + D4 : 1 yes - Vendor-Specific (Optional) + D5 : 1 yes - Vendor-Specific (Optional) + D6 : 1 yes - Vendor-Specific (Optional) + D7 : 1 yes - Vendor-Specific (Optional) + D8 : 1 yes - Vendor-Specific (Optional) + D9 : 1 yes - Vendor-Specific (Optional) + D10 : 1 yes - Vendor-Specific (Optional) + D11 : 1 yes - Vendor-Specific (Optional) + D12 : 1 yes - Vendor-Specific (Optional) + D13 : 1 yes - Vendor-Specific (Optional) + D14 : 1 yes - Vendor-Specific (Optional) + D15 : 1 yes - Vendor-Specific (Optional) + D16 : 1 yes - Vendor-Specific (Optional) + D17 : 0 no - Vendor-Specific (Optional) + D18 : 0 no - Vendor-Specific (Optional) + D19 : 0 no - Vendor-Specific (Optional) + D20 : 0 no - Vendor-Specific (Optional) + D21 : 0 no - Vendor-Specific (Optional) + D22 : 0 no - Vendor-Specific (Optional) + D23 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1C 24 06 0A 15 02 E4 49 34 F4 FE 47 B1 58 0E 88 .$.....I4..G.X.. + 50 23 E5 1B 0B 01 03 03 FA FF 01 00 P#.......... + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1C (28 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x0B +guidExtensionCode : {FFE52D21-8030-4E2C-82D9-F587D00540BD} +bNumControls : 0x04 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x03 +bControlSize : 0x03 +bmControls : 0x00, 0x41, 0x01 + D0 : 0 no - Vendor-Specific (Optional) + D1 : 0 no - Vendor-Specific (Optional) + D2 : 0 no - Vendor-Specific (Optional) + D3 : 0 no - Vendor-Specific (Optional) + D4 : 0 no - Vendor-Specific (Optional) + D5 : 0 no - Vendor-Specific (Optional) + D6 : 0 no - Vendor-Specific (Optional) + D7 : 0 no - Vendor-Specific (Optional) + D8 : 1 yes - Vendor-Specific (Optional) + D9 : 0 no - Vendor-Specific (Optional) + D10 : 0 no - Vendor-Specific (Optional) + D11 : 0 no - Vendor-Specific (Optional) + D12 : 0 no - Vendor-Specific (Optional) + D13 : 0 no - Vendor-Specific (Optional) + D14 : 1 yes - Vendor-Specific (Optional) + D15 : 0 no - Vendor-Specific (Optional) + D16 : 1 yes - Vendor-Specific (Optional) + D17 : 0 no - Vendor-Specific (Optional) + D18 : 0 no - Vendor-Specific (Optional) + D19 : 0 no - Vendor-Specific (Optional) + D20 : 0 no - Vendor-Specific (Optional) + D21 : 0 no - Vendor-Specific (Optional) + D22 : 0 no - Vendor-Specific (Optional) + D23 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1C 24 06 0B 21 2D E5 FF 30 80 2C 4E 82 D9 F5 87 .$..!-..0.,N.... + D0 05 40 BD 04 01 03 03 00 41 01 00 ..@......A.. + + ------- Video Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x04 +wTerminalType : 0x0101 (TT_STREAMING) +bAssocTerminal : 0x00 (Not associated with an Input Terminal) +bSourceID : 0x03 +iTerminal : 0x00 +Data (HexDump) : 09 24 03 04 01 01 00 03 00 .$....... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x85 (Direction=IN EndpointID=5) +bmAttributes : 0x03 (TransferType=Interrupt) +wMaxPacketSize : 0x0040 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x40 (64 bytes per packet) +bInterval : 0x08 (8 ms) +Data (HexDump) : 07 05 85 03 40 00 08 ....@.. + + --- Class-specific VC Interrupt Endpoint Descriptor --- +bLength : 0x05 (5 bytes) +bDescriptorType : 0x25 (Video Control Endpoint) +bDescriptorSubtype : 0x03 (Interrupt) +wMaxTransferSize : 0x0040 (64 bytes) +Data (HexDump) : 05 25 03 40 00 .%.@. + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 00 00 0E 02 00 00 ......... + + ---- VC-Specific VS Video Input Header Descriptor ----- +bLength : 0x0F (15 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x01 (Input Header) +bNumFormats : 0x02 +wTotalLength : 0x0431 (1073 bytes) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmInfo : 0x00 (Dynamic Format Change not supported) +bTerminalLink : 0x04 +bStillCaptureMethod : 0x00 (No Still Capture) +nbTriggerSupport : 0x00 (Hardware Triggering not supported) +bTriggerUsage : 0x00 (Host will initiate still image capture) +nbControlSize : 0x01 +Video Payload Format 1 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Video Payload Format 2 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Data (HexDump) : 0F 24 01 02 31 04 81 00 04 00 00 00 01 00 00 .$..1.......... + + ------- VS Uncompressed Format Type Descriptor -------- +bLength : 0x1B (27 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x04 (Uncompressed Format Type) +bFormatIndex : 0x01 (1) +bNumFrameDescriptors : 0x0A (10) +guidFormat : {32595559-0000-0010-8000-00AA00389B71} (YUY2) +bBitsPerPixel : 0x10 (16 bits) +bDefaultFrameIndex : 0x01 (1) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +Data (HexDump) : 1B 24 04 01 0A 59 55 59 32 00 00 10 00 80 00 00 .$...YUY2....... + AA 00 38 9B 71 10 01 00 00 00 00 ..8.q...... + + -------- VS Uncompressed Frame Type Descriptor -------- +---> This is the Default (optimum) Frame index +bLength : 0x36 (54 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x01770000 (24576000 bps -> 3.72 MB/s) +dwMaxBitRate : 0x08CA0000 (147456000 bps -> 18.432 MB/s) +dwMaxVideoFrameBufferSize: 0x00096000 (614400 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x07 (7 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00065B9A (41.6666 ms -> 24.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[7] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 36 24 05 01 00 80 02 E0 01 00 00 77 01 00 00 CA 6$.........w.... + 08 00 60 09 00 15 16 05 00 07 15 16 05 00 9A 5B ..`............[ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 .. ...*,..@B..UX + 14 00 80 84 1E 00 ...... + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x36 (54 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x00 +wWidth : 0x00B0 (176) +wHeight : 0x0090 (144) +dwMinBitRate : 0x001EF000 (2027520 bps -> 253.375 KB/s) +dwMaxBitRate : 0x00B9A000 (12165120 bps -> 1.520 MB/s) +dwMaxVideoFrameBufferSize: 0x0000C600 (50688 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x07 (7 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00065B9A (41.6666 ms -> 24.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[7] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 36 24 05 02 00 B0 00 90 00 00 F0 1E 00 00 A0 B9 6$.............. + 00 00 C6 00 00 15 16 05 00 07 15 16 05 00 9A 5B ...............[ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 .. ...*,..@B..UX + 14 00 80 84 1E 00 ...... + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x36 (54 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x00 +wWidth : 0x0140 (320) +wHeight : 0x00F0 (240) +dwMinBitRate : 0x005DC000 (6144000 bps -> 768 KB/s) +dwMaxBitRate : 0x02328000 (36864000 bps -> 4.608 MB/s) +dwMaxVideoFrameBufferSize: 0x00025800 (153600 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x07 (7 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00065B9A (41.6666 ms -> 24.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[7] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 36 24 05 03 00 40 01 F0 00 00 C0 5D 00 00 80 32 6$...@.....]...2 + 02 00 58 02 00 15 16 05 00 07 15 16 05 00 9A 5B ..X............[ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 .. ...*,..@B..UX + 14 00 80 84 1E 00 ...... + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x36 (54 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x00 +wWidth : 0x01A8 (424) +wHeight : 0x00F0 (240) +dwMinBitRate : 0x007C3800 (8140800 bps -> 1.17 MB/s) +dwMaxBitRate : 0x02E95000 (48844800 bps -> 6.105 MB/s) +dwMaxVideoFrameBufferSize: 0x00031B00 (203520 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x07 (7 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00065B9A (41.6666 ms -> 24.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[7] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 36 24 05 04 00 A8 01 F0 00 00 38 7C 00 00 50 E9 6$........8|..P. + 02 00 1B 03 00 15 16 05 00 07 15 16 05 00 9A 5B ...............[ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 .. ...*,..@B..UX + 14 00 80 84 1E 00 ...... + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x36 (54 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x05 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x0168 (360) +dwMinBitRate : 0x01194000 (18432000 bps -> 2.304 MB/s) +dwMaxBitRate : 0x06978000 (110592000 bps -> 13.824 MB/s) +dwMaxVideoFrameBufferSize: 0x00070800 (460800 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x07 (7 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00065B9A (41.6666 ms -> 24.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[7] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 36 24 05 05 00 80 02 68 01 00 40 19 01 00 80 97 6$.....h..@..... + 06 00 08 07 00 15 16 05 00 07 15 16 05 00 9A 5B ...............[ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 .. ...*,..@B..UX + 14 00 80 84 1E 00 ...... + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x36 (54 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x06 +bmCapabilities : 0x00 +wWidth : 0x0350 (848) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x01F0E000 (32563200 bps -> 4.70 MB/s) +dwMaxBitRate : 0x0BA54000 (195379200 bps -> 24.422 MB/s) +dwMaxVideoFrameBufferSize: 0x000C6C00 (814080 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x07 (7 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00065B9A (41.6666 ms -> 24.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[7] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 36 24 05 06 00 50 03 E0 01 00 E0 F0 01 00 40 A5 6$...P........@. + 0B 00 6C 0C 00 15 16 05 00 07 15 16 05 00 9A 5B ..l............[ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 .. ...*,..@B..UX + 14 00 80 84 1E 00 ...... + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x2A (42 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x07 +bmCapabilities : 0x00 +wWidth : 0x03C0 (960) +wHeight : 0x021C (540) +dwMinBitRate : 0x0278D000 (41472000 bps -> 5.184 MB/s) +dwMaxBitRate : 0x076A7000 (124416000 bps -> 15.552 MB/s) +dwMaxVideoFrameBufferSize: 0x000FD200 (1036800 bytes) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x04 (4 discrete frame intervals supported) +adwFrameInterval[1] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[2] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[3] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[4] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 2A 24 05 07 00 C0 03 1C 02 00 D0 78 02 00 70 6A *$.........x..pj + 07 00 D2 0F 00 2A 2C 0A 00 04 2A 2C 0A 00 40 42 .....*,...*,..@B + 0F 00 55 58 14 00 80 84 1E 00 ..UX...... + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x26 (38 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x08 +bmCapabilities : 0x00 +wWidth : 0x0500 (1280) +wHeight : 0x02D0 (720) +dwMinBitRate : 0x04650000 (73728000 bps -> 9.216 MB/s) +dwMaxBitRate : 0x08CA0000 (147456000 bps -> 18.432 MB/s) +dwMaxVideoFrameBufferSize: 0x001C2000 (1843200 bytes) +dwDefaultFrameInterval : 0x000F4240 (100.0000 ms -> 10.000 fps) +bFrameIntervalType : 0x03 (3 discrete frame intervals supported) +adwFrameInterval[1] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[2] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 26 24 05 08 00 00 05 D0 02 00 00 65 04 00 00 CA &$.........e.... + 08 00 20 1C 00 40 42 0F 00 03 40 42 0F 00 55 58 .. ..@B...@B..UX + 14 00 80 84 1E 00 ...... + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x22 (34 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x09 +bmCapabilities : 0x00 +wWidth : 0x0640 (1600) +wHeight : 0x0380 (896) +dwMinBitRate : 0x06D60000 (114688000 bps -> 14.336 MB/s) +dwMaxBitRate : 0x0A410000 (172032000 bps -> 21.504 MB/s) +dwMaxVideoFrameBufferSize: 0x002BC000 (2867200 bytes) +dwDefaultFrameInterval : 0x00145855 (133.3333 ms -> 7.500 fps) +bFrameIntervalType : 0x02 (2 discrete frame intervals supported) +adwFrameInterval[1] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[2] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 22 24 05 09 00 40 06 80 03 00 00 D6 06 00 00 41 "$...@.........A + 0A 00 C0 2B 00 55 58 14 00 02 55 58 14 00 80 84 ...+.UX...UX.... + 1E 00 .. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x1E (30 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x0A +bmCapabilities : 0x00 +wWidth : 0x0780 (1920) +wHeight : 0x0438 (1080) +dwMinBitRate : 0x09E34000 (165888000 bps -> 20.736 MB/s) +dwMaxBitRate : 0x09E34000 (165888000 bps -> 20.736 MB/s) +dwMaxVideoFrameBufferSize: 0x003F4800 (4147200 bytes) +dwDefaultFrameInterval : 0x001E8480 (200.0000 ms -> 5.000 fps) +bFrameIntervalType : 0x01 (1 discrete frame interval supported) +adwFrameInterval[1] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 1E 24 05 0A 00 80 07 38 04 00 40 E3 09 00 40 E3 .$.....8..@...@. + 09 00 48 3F 00 80 84 1E 00 01 80 84 1E 00 ..H?.......... + + ------- VS Color Matching Descriptor Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x0D (Color Matching) +bColorPrimaries : 0x01 (BT.709, sRGB) +bTransferCharacteristics : 0x01 (BT.709) +bMatrixCoefficients : 0x04 (SMPTE 170M) +Data (HexDump) : 06 24 0D 01 01 04 .$.... + + ----- Video Streaming MJPEG Format Type Descriptor ---- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x06 (Format MJPEG) +bFormatIndex : 0x02 (2) +bNumFrameDescriptors : 0x0A (10) +bmFlags : 0x01 (Sample size is fixed) +bDefaultFrameIndex : 0x01 (1) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +Data (HexDump) : 0B 24 06 02 0A 01 01 00 00 00 00 .$......... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +---> This is the Default (optimum) Frame index +bLength : 0x36 (54 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x01770000 (24576000 bps -> 3.72 MB/s) +dwMaxBitRate : 0x08CA0000 (147456000 bps -> 18.432 MB/s) +dwMaxVideoFrameBufferSize: 0x00096000 (614400 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x07 (7 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00065B9A (41.6666 ms -> 24.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[7] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 36 24 07 01 00 80 02 E0 01 00 00 77 01 00 00 CA 6$.........w.... + 08 00 60 09 00 15 16 05 00 07 15 16 05 00 9A 5B ..`............[ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 .. ...*,..@B..UX + 14 00 80 84 1E 00 ...... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x36 (54 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x00 +wWidth : 0x00B0 (176) +wHeight : 0x0090 (144) +dwMinBitRate : 0x001EF000 (2027520 bps -> 253.375 KB/s) +dwMaxBitRate : 0x00B9A000 (12165120 bps -> 1.520 MB/s) +dwMaxVideoFrameBufferSize: 0x0000C600 (50688 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x07 (7 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00065B9A (41.6666 ms -> 24.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[7] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 36 24 07 02 00 B0 00 90 00 00 F0 1E 00 00 A0 B9 6$.............. + 00 00 C6 00 00 15 16 05 00 07 15 16 05 00 9A 5B ...............[ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 .. ...*,..@B..UX + 14 00 80 84 1E 00 ...... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x36 (54 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x00 +wWidth : 0x0140 (320) +wHeight : 0x00F0 (240) +dwMinBitRate : 0x005DC000 (6144000 bps -> 768 KB/s) +dwMaxBitRate : 0x02328000 (36864000 bps -> 4.608 MB/s) +dwMaxVideoFrameBufferSize: 0x00025800 (153600 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x07 (7 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00065B9A (41.6666 ms -> 24.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[7] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 36 24 07 03 00 40 01 F0 00 00 C0 5D 00 00 80 32 6$...@.....]...2 + 02 00 58 02 00 15 16 05 00 07 15 16 05 00 9A 5B ..X............[ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 .. ...*,..@B..UX + 14 00 80 84 1E 00 ...... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x36 (54 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x00 +wWidth : 0x01A8 (424) +wHeight : 0x00F0 (240) +dwMinBitRate : 0x007C3800 (8140800 bps -> 1.17 MB/s) +dwMaxBitRate : 0x02E95000 (48844800 bps -> 6.105 MB/s) +dwMaxVideoFrameBufferSize: 0x00031B00 (203520 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x07 (7 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00065B9A (41.6666 ms -> 24.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[7] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 36 24 07 04 00 A8 01 F0 00 00 38 7C 00 00 50 E9 6$........8|..P. + 02 00 1B 03 00 15 16 05 00 07 15 16 05 00 9A 5B ...............[ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 .. ...*,..@B..UX + 14 00 80 84 1E 00 ...... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x36 (54 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x05 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x0168 (360) +dwMinBitRate : 0x01194000 (18432000 bps -> 2.304 MB/s) +dwMaxBitRate : 0x06978000 (110592000 bps -> 13.824 MB/s) +dwMaxVideoFrameBufferSize: 0x00070800 (460800 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x07 (7 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00065B9A (41.6666 ms -> 24.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[7] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 36 24 07 05 00 80 02 68 01 00 40 19 01 00 80 97 6$.....h..@..... + 06 00 08 07 00 15 16 05 00 07 15 16 05 00 9A 5B ...............[ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 .. ...*,..@B..UX + 14 00 80 84 1E 00 ...... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x36 (54 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x06 +bmCapabilities : 0x00 +wWidth : 0x0350 (848) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x01F0E000 (32563200 bps -> 4.70 MB/s) +dwMaxBitRate : 0x0BA54000 (195379200 bps -> 24.422 MB/s) +dwMaxVideoFrameBufferSize: 0x000C6C00 (814080 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x07 (7 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00065B9A (41.6666 ms -> 24.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[7] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 36 24 07 06 00 50 03 E0 01 00 E0 F0 01 00 40 A5 6$...P........@. + 0B 00 6C 0C 00 15 16 05 00 07 15 16 05 00 9A 5B ..l............[ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 .. ...*,..@B..UX + 14 00 80 84 1E 00 ...... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x36 (54 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x07 +bmCapabilities : 0x00 +wWidth : 0x03C0 (960) +wHeight : 0x021C (540) +dwMinBitRate : 0x0278D000 (41472000 bps -> 5.184 MB/s) +dwMaxBitRate : 0x0ED4E000 (248832000 bps -> 31.104 MB/s) +dwMaxVideoFrameBufferSize: 0x000FD200 (1036800 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x07 (7 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00065B9A (41.6666 ms -> 24.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[7] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 36 24 07 07 00 C0 03 1C 02 00 D0 78 02 00 E0 D4 6$.........x.... + 0E 00 D2 0F 00 15 16 05 00 07 15 16 05 00 9A 5B ...............[ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 .. ...*,..@B..UX + 14 00 80 84 1E 00 ...... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x36 (54 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x08 +bmCapabilities : 0x00 +wWidth : 0x0500 (1280) +wHeight : 0x02D0 (720) +dwMinBitRate : 0x04650000 (73728000 bps -> 9.216 MB/s) +dwMaxBitRate : 0x1A5E0000 (442368000 bps -> 55.296 MB/s) +dwMaxVideoFrameBufferSize: 0x001C2000 (1843200 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x07 (7 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00065B9A (41.6666 ms -> 24.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[7] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 36 24 07 08 00 00 05 D0 02 00 00 65 04 00 00 5E 6$.........e...^ + 1A 00 20 1C 00 15 16 05 00 07 15 16 05 00 9A 5B .. ............[ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 .. ...*,..@B..UX + 14 00 80 84 1E 00 ...... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x36 (54 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x09 +bmCapabilities : 0x00 +wWidth : 0x0640 (1600) +wHeight : 0x0380 (896) +dwMinBitRate : 0x06D60000 (114688000 bps -> 14.336 MB/s) +dwMaxBitRate : 0x29040000 (688128000 bps -> 86.16 MB/s) +dwMaxVideoFrameBufferSize: 0x002BC000 (2867200 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x07 (7 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00065B9A (41.6666 ms -> 24.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[7] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 36 24 07 09 00 40 06 80 03 00 00 D6 06 00 00 04 6$...@.......... + 29 00 C0 2B 00 15 16 05 00 07 15 16 05 00 9A 5B )..+...........[ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 .. ...*,..@B..UX + 14 00 80 84 1E 00 ...... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x36 (54 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x0A +bmCapabilities : 0x00 +wWidth : 0x0780 (1920) +wHeight : 0x0438 (1080) +dwMinBitRate : 0x09E34000 (165888000 bps -> 20.736 MB/s) +dwMaxBitRate : 0x3B538000 (995328000 bps -> 124.416 MB/s) +dwMaxVideoFrameBufferSize: 0x003F4800 (4147200 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x07 (7 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00065B9A (41.6666 ms -> 24.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[7] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 36 24 07 0A 00 80 07 38 04 00 40 E3 09 00 80 53 6$.....8..@....S + 3B 00 48 3F 00 15 16 05 00 07 15 16 05 00 9A 5B ;.H?...........[ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 .. ...*,..@B..UX + 14 00 80 84 1E 00 ...... + + ------- VS Color Matching Descriptor Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x0D (Color Matching) +bColorPrimaries : 0x01 (BT.709, sRGB) +bTransferCharacteristics : 0x01 (BT.709) +bMatrixCoefficients : 0x04 (SMPTE 170M) +Data (HexDump) : 06 24 0D 01 01 04 .$.... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 01 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x00C0 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0xC0 (192 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 C0 00 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x02 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 02 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0180 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x180 (384 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 80 01 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x03 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 03 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0200 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x200 (512 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 00 02 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x04 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 04 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0280 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x280 (640 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 80 02 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x05 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 05 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0320 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x320 (800 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 20 03 01 .... .. + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x06 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 06 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x03B0 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x3B0 (944 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 B0 03 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x07 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 07 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0A80 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x01 (1 additional transactions per microframe -> allows 513..1024 byte per packet) + Bits 10..0 : 0x280 (640 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 80 0A 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x08 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 08 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0B20 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x01 (1 additional transactions per microframe -> allows 513..1024 byte per packet) + Bits 10..0 : 0x320 (800 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 20 0B 01 .... .. + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x09 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 09 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0BE0 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x01 (1 additional transactions per microframe -> allows 513..1024 byte per packet) + Bits 10..0 : 0x3E0 (992 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 E0 0B 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x0A +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 0A 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x1380 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x02 (2 additional transactions per microframe -> allows 683..1024 bytes per packet) + Bits 10..0 : 0x380 (896 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 80 13 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x0B +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 0B 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x1400 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x02 (2 additional transactions per microframe -> allows 683..1024 bytes per packet) + Bits 10..0 : 0x400 (1024 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 00 14 01 ....... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x02 +bInterfaceCount : 0x02 +bFunctionClass : 0x01 (Audio) +bFunctionSubClass : 0x02 (Audio Streaming) +bFunctionProtocol : 0x00 +iFunction : 0x00 (No String Descriptor) +Data (HexDump) : 08 0B 02 02 01 02 00 00 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x02 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x01 (Audio Control) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 02 00 00 01 01 00 00 ......... + + ------ Audio Control Interface Header Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 (Header) +bcdADC : 0x0100 +wTotalLength : 0x0026 (38 bytes) +bInCollection : 0x01 +baInterfaceNr[1] : 0x03 +Data (HexDump) : 09 24 01 00 01 26 00 01 03 .$...&... + + ------- Audio Control Input Terminal Descriptor ------- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (Microphone) +bAssocTerminal : 0x00 +bNrChannels : 0x02 (2 channels) +wChannelConfig : 0x0003 (L, R) +iChannelNames : 0x00 (No String Descriptor) +iTerminal : 0x00 (No String Descriptor) +Data (HexDump) : 0C 24 02 01 01 02 00 02 03 00 00 00 .$.......... + + ------- Audio Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x03 +wTerminalType : 0x0101 (USB streaming) +bAssocTerminal : 0x00 (0) +bSourceID : 0x05 (5) +iTerminal : 0x00 (No String Descriptor) +Data (HexDump) : 09 24 03 03 01 01 00 05 00 .$....... + + -------- Audio Control Feature Unit Descriptor -------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x06 (Feature Unit) +bUnitID : 0x05 (5) +bSourceID : 0x01 (1) +bControlSize : 0x01 (1 byte per control) +bmaControls[0] : 0x03 + D0: Mute : 1 + D1: Volume : 1 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 +iFeature : 0x00 (No String Descriptor) +Data (HexDump) : 08 24 06 05 01 01 03 00 .$...... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 00 00 01 02 00 00 ......... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 01 01 01 02 00 00 ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x03 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 03 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x02 (2 channels) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x01 (supports 1 sample frequency) +tSamFreq[1] : 0x03E80 (16000 Hz) +Data (HexDump) : 0B 24 02 01 02 02 10 01 80 3E 00 .$.......>. + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x84 (Direction=IN EndpointID=4) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0044 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x44 (68 bytes per packet) +bInterval : 0x04 (4 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 84 05 44 00 04 00 00 ....D.... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x00 (Undefined) +wLockDelay : 0x0000 +Data (HexDump) : 07 25 01 01 00 00 00 .%..... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x02 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 02 01 01 02 00 00 ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x03 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 03 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x02 (2 channels) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x01 (supports 1 sample frequency) +tSamFreq[1] : 0x05DC0 (24000 Hz) +Data (HexDump) : 0B 24 02 01 02 02 10 01 C0 5D 00 .$.......]. + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x84 (Direction=IN EndpointID=4) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0064 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x64 (100 bytes per packet) +bInterval : 0x04 (4 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 84 05 64 00 04 00 00 ....d.... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x00 (Undefined) +wLockDelay : 0x0000 +Data (HexDump) : 07 25 01 01 00 00 00 .%..... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x03 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 03 01 01 02 00 00 ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x03 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 03 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x02 (2 channels) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x01 (supports 1 sample frequency) +tSamFreq[1] : 0x07D00 (32000 Hz) +Data (HexDump) : 0B 24 02 01 02 02 10 01 00 7D 00 .$.......}. + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x84 (Direction=IN EndpointID=4) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0084 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x84 (132 bytes per packet) +bInterval : 0x04 (4 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 84 05 84 00 04 00 00 ......... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x00 (Undefined) +wLockDelay : 0x0000 +Data (HexDump) : 07 25 01 01 00 00 00 .%..... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x04 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 04 01 01 02 00 00 ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x03 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 03 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x02 (2 channels) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x01 (supports 1 sample frequency) +tSamFreq[1] : 0x0BB80 (48000 Hz) +Data (HexDump) : 0B 24 02 01 02 02 10 01 80 BB 00 .$......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x84 (Direction=IN EndpointID=4) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x00C4 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0xC4 (196 bytes per packet) +bInterval : 0x04 (4 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 84 05 C4 00 04 00 00 ......... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x00 (Undefined) +wLockDelay : 0x0000 +Data (HexDump) : 07 25 01 01 00 00 00 .%..... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x04 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0xFF (Vendor Specific) +bInterfaceSubClass : 0xFF +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 04 00 01 FF FF 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x83 (Direction=IN EndpointID=3) +bmAttributes : 0x02 (TransferType=Bulk) +wMaxPacketSize : 0x0200 (max 512 bytes) +bInterval : 0x00 (never NAKs) +Data (HexDump) : 07 05 83 02 00 02 00 ....... + + ------ SuperSpeed Endpoint Companion Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x30 (SuperSpeed Endpoint Companion Descriptor) +bMaxBurst : 0x00 (up to 1 packets per burst) +bmAttributes : 0x00 +wBytesPerInterval : 0x0000 +Data (HexDump) : 06 30 00 00 00 00 .0.... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x05 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x03 (HID - Human Interface Device) +bInterfaceSubClass : 0x00 (None) +bInterfaceProtocol : 0x00 (None) +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 05 00 01 03 00 00 00 ......... + + ------------------- HID Descriptor -------------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x21 (HID Descriptor) +bcdHID : 0x0111 (HID Version 1.11) +bCountryCode : 0x00 (00 = not localized) +bNumDescriptors : 0x01 +Data (HexDump) : 09 21 11 01 00 01 22 6C 00 .!...."l. +Descriptor 1: +bDescriptorType : 0x22 (Class=Report) +wDescriptorLength : 0x006C (108 bytes) +Error reading descriptor : ERROR_INVALID_PARAMETER (due to a obscure limitation of the Win32 USB API, see UsbTreeView.txt) + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x87 (Direction=IN EndpointID=7) +bmAttributes : 0x03 (TransferType=Interrupt) +wMaxPacketSize : 0x0002 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x02 (2 bytes per packet) +bInterval : 0x06 (6 ms) +Data (HexDump) : 07 05 87 03 02 00 06 ....... + + ------ SuperSpeed Endpoint Companion Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x30 (SuperSpeed Endpoint Companion Descriptor) +bMaxBurst : 0x00 (up to 1 packets per burst) +bmAttributes : 0x00 +wBytesPerInterval : 0x0002 (*!*ERROR must be 0 for control and bulk endpoints) +Data (HexDump) : 06 30 00 00 02 00 .0.... + + ----------------- Device Qualifier Descriptor ----------------- +bLength : 0x0A (10 bytes) +bDescriptorType : 0x06 (Device_qualifier Descriptor) +bcdUSB : 0x200 (USB Version 2.00) +bDeviceClass : 0xEF (Miscellaneous) +bDeviceSubClass : 0x02 +bDeviceProtocol : 0x01 (IAD - Interface Association Descriptor) +bMaxPacketSize0 : 0x40 (64 Bytes) +bNumConfigurations : 0x01 (1 other-speed configuration) +bReserved : 0x00 +Data (HexDump) : 0A 06 00 02 EF 02 01 40 01 00 .......@.. + + ------------ Other Speed Configuration Descriptor ------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x07 (Other_speed_configuration Descriptor) +wTotalLength : 0x035A (858 bytes) +bNumInterfaces : 0x05 (5 Interfaces) +bConfigurationValue : 0x01 (Configuration 1) +iConfiguration : 0x00 (No String Descriptor) +bmAttributes : 0x80 + D7: Reserved, set 1 : 0x01 + D6: Self Powered : 0x00 (no) + D5: Remote Wakeup : 0x00 (no) + D4..0: Reserved, set 0 : 0x00 +MaxPower : 0xFA (500 mA) +Data (HexDump) : 09 07 5A 03 05 01 00 80 FA 08 0B 00 02 0E 03 00 ..Z............. + 00 09 04 00 00 01 0E 01 00 00 0D 24 01 00 01 D8 ...........$.... + 00 80 C3 C9 01 01 01 12 24 02 01 01 02 00 00 00 ........$....... + 00 00 00 00 00 03 2E 2A 02 0B 24 05 03 01 00 40 .......*..$....@ + 02 5B 17 00 1B 24 06 0E 6A D1 49 2C B8 32 85 44 .[...$..j.I,.2.D + 3E A8 64 3A 15 23 62 F2 06 01 03 02 3F 00 00 1B >.d:.#b.....?... + 24 06 06 D0 9E E4 23 78 11 31 4F AE 52 D2 FB 8A $.....#x.1O.R... + 8D 3B 48 0E 01 03 02 FF 6F 00 1B 24 06 08 E4 8E .;H.....o..$.... + 67 69 0F 41 DB 40 A8 50 74 20 D7 D8 24 0E 08 01 gi.A.@.Pt ..$... + 03 02 3F 0F 00 1C 24 06 09 A9 4C 5D 1F 11 DE 87 ..?...$...L].... + 44 84 0D 50 93 3C 8E C8 D1 12 01 03 03 FF FF 03 D..P.<.......... + 00 1C 24 06 0A 15 02 E4 49 34 F4 FE 47 B1 58 0E ..$.....I4..G.X. + 88 50 23 E5 1B 0B 01 03 03 FA FF 01 00 1C 24 06 .P#...........$. + 0B 21 2D E5 FF 30 80 2C 4E 82 D9 F5 87 D0 05 40 .!-..0.,N......@ + BD 04 01 03 03 00 41 01 00 09 24 03 04 01 01 00 ......A...$..... + 03 00 07 05 85 03 40 00 10 05 25 03 40 00 09 04 ......@...%.@... + 01 00 00 0E 02 00 00 0F 24 01 02 79 01 81 00 04 ........$..y.... + 00 00 00 01 00 00 1B 24 04 01 01 59 55 59 32 00 .......$...YUY2. + 00 10 00 80 00 00 AA 00 38 9B 71 10 01 00 00 00 ........8.q..... + 00 2A 24 05 01 00 B0 00 90 00 00 F0 1E 00 00 D0 .*$............. + 5C 00 00 C6 00 00 2A 2C 0A 00 04 2A 2C 0A 00 40 \.....*,...*,..@ + 42 0F 00 55 58 14 00 80 84 1E 00 06 24 0D 01 01 B..UX.......$... + 04 0B 24 06 02 05 01 01 00 00 00 00 36 24 07 01 ..$.........6$.. + 00 80 02 E0 01 00 00 77 01 00 00 CA 08 00 60 09 .......w......`. + 00 15 16 05 00 07 15 16 05 00 9A 5B 06 00 20 A1 ...........[.. . + 07 00 2A 2C 0A 00 40 42 0F 00 55 58 14 00 80 84 ..*,..@B..UX.... + 1E 00 36 24 07 02 00 B0 00 90 00 00 F0 1E 00 00 ..6$............ + A0 B9 00 00 C6 00 00 15 16 05 00 07 15 16 05 00 ................ + 9A 5B 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 .[.. ...*,..@B.. + 55 58 14 00 80 84 1E 00 36 24 07 03 00 40 01 F0 UX......6$...@.. + 00 00 C0 5D 00 00 80 32 02 00 58 02 00 15 16 05 ...]...2..X..... + 00 07 15 16 05 00 9A 5B 06 00 20 A1 07 00 2A 2C .......[.. ...*, + 0A 00 40 42 0F 00 55 58 14 00 80 84 1E 00 36 24 ..@B..UX......6$ + 07 04 00 A8 01 F0 00 00 38 7C 00 00 50 E9 02 00 ........8|..P... + 1B 03 00 15 16 05 00 07 15 16 05 00 9A 5B 06 00 .............[.. + 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 14 00 ...*,..@B..UX.. + 80 84 1E 00 36 24 07 05 00 80 02 68 01 00 40 19 ....6$.....h..@. + 01 00 80 97 06 00 08 07 00 15 16 05 00 07 15 16 ................ + 05 00 9A 5B 06 00 20 A1 07 00 2A 2C 0A 00 40 42 ...[.. ...*,..@B + 0F 00 55 58 14 00 80 84 1E 00 06 24 0D 01 01 04 ..UX.......$.... + 09 04 01 01 01 0E 02 00 00 07 05 81 05 C0 00 01 ................ + 09 04 01 02 01 0E 02 00 00 07 05 81 05 80 01 01 ................ + 09 04 01 03 01 0E 02 00 00 07 05 81 05 00 02 01 ................ + 09 04 01 04 01 0E 02 00 00 07 05 81 05 80 02 01 ................ + 09 04 01 05 01 0E 02 00 00 07 05 81 05 20 03 01 ............. .. + 08 0B 02 02 01 02 00 00 09 04 02 00 00 01 01 00 ................ + 00 09 24 01 00 01 26 00 01 03 0C 24 02 01 01 02 ..$...&....$.... + 00 02 03 00 00 00 09 24 03 03 01 01 00 05 00 08 .......$........ + 24 06 05 01 01 03 00 09 04 03 00 00 01 02 00 00 $............... + 09 04 03 01 01 01 02 00 00 07 24 01 03 01 01 00 ..........$..... + 0B 24 02 01 02 02 10 01 80 3E 00 09 05 84 05 44 .$.......>.....D + 00 04 00 00 07 25 01 01 00 00 00 09 04 04 00 01 .....%.......... + 03 00 00 00 09 21 11 01 00 01 22 6C 00 07 05 87 .....!...."l.... + 03 02 00 06 06 30 00 00 02 00 .....0.... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x00 +bInterfaceCount : 0x02 +bFunctionClass : 0x0E (Video) +bFunctionSubClass : 0x03 (Video Interface Collection) +bFunctionProtocol : 0x00 (PC_PROTOCOL_UNDEFINED protocol) +iFunction : 0x00 (No String Descriptor) +Data (HexDump) : 08 0B 00 02 0E 03 00 00 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x00 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x01 (Video Control) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 00 00 01 0E 01 00 00 ......... + + ------- Video Control Interface Header Descriptor ----- +bLength : 0x0D (13 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x01 (Video Control Header) +bcdUVC : 0x0100 (UVC Version 1.00) +wTotalLength : 0x00D8 (216 bytes) +dwClockFreq : 0x01C9C380 (30 MHz) +bInCollection : 0x01 (1 VideoStreaming interface) +baInterfaceNr[1] : 0x01 +Data (HexDump) : 0D 24 01 00 01 D8 00 80 C3 C9 01 01 01 .$........... + + -------- Video Control Input Terminal Descriptor ------ +bLength : 0x12 (18 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (ITT_CAMERA) +bAssocTerminal : 0x00 (Not associated with an Output Terminal) +iTerminal : 0x00 +Camera Input Terminal Data: +wObjectiveFocalLengthMin : 0x0000 +wObjectiveFocalLengthMax : 0x0000 +wOcularFocalLength : 0x0000 +bControlSize : 0x03 +bmControls : 0x2E, 0x2A, 0x02 + D0 : 0 no - Scanning Mode + D1 : 1 yes - Auto-Exposure Mode + D2 : 1 yes - Auto-Exposure Priority + D3 : 1 yes - Exposure Time (Absolute) + D4 : 0 no - Exposure Time (Relative) + D5 : 1 yes - Focus (Absolute) + D6 : 0 no - Focus (Relative) + D7 : 0 no - Iris (Absolute) + D8 : 0 no - Iris (Relative) + D9 : 1 yes - Zoom (Absolute) + D10 : 0 no - Zoom (Relative) + D11 : 1 yes - Pan (Absolute) + D12 : 0 no - Pan (Relative) + D13 : 1 yes - Roll (Absolute) + D14 : 0 no - Roll (Relative) + D15 : 0 no - Tilt (Absolute) + D16 : 0 no - Tilt (Relative) + D17 : 1 yes - Focus Auto + D18 : 0 no - Reserved + D19 : 0 no - Reserved + D20 : 0 no - Reserved + D21 : 0 no - Reserved + D22 : 0 no - Reserved + D23 : 0 no - Reserved +Data (HexDump) : 12 24 02 01 01 02 00 00 00 00 00 00 00 00 03 2E .$.............. + 2A 02 *. + + -------- Video Control Processing Unit Descriptor ----- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x05 (Processing Unit) +bUnitID : 0x03 +bSourceID : 0x01 +wMaxMultiplier : 0x4000 (163.84x Zoom) +bControlSize : 0x02 +bmControls : 0x5B, 0x17 + D0 : 1 yes - Brightness + D1 : 1 yes - Contrast + D2 : 0 no - Hue + D3 : 1 yes - Saturation + D4 : 1 yes - Sharpness + D5 : 0 no - Gamma + D6 : 1 yes - White Balance Temperature + D7 : 0 no - White Balance Component + D8 : 1 yes - Backlight Compensation + D9 : 1 yes - Gain + D10 : 1 yes - Power Line Frequency + D11 : 0 no - Hue, Auto + D12 : 1 yes - White Balance Temperature, Auto + D13 : 0 no - White Balance Component, Auto + D14 : 0 no - Digital Multiplier + D15 : 0 no - Digital Multiplier Limit +iProcessing : 0x00 +Data (HexDump) : 0B 24 05 03 01 00 40 02 5B 17 00 .$....@.[.. + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1B (27 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x0E +guidExtensionCode : {2C49D16A-32B8-4485-3EA8-643A152362F2} +bNumControls : 0x06 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x03 +bControlSize : 0x02 +bmControls : 0x3F, 0x00 + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 1 yes - Vendor-Specific (Optional) + D3 : 1 yes - Vendor-Specific (Optional) + D4 : 1 yes - Vendor-Specific (Optional) + D5 : 1 yes - Vendor-Specific (Optional) + D6 : 0 no - Vendor-Specific (Optional) + D7 : 0 no - Vendor-Specific (Optional) + D8 : 0 no - Vendor-Specific (Optional) + D9 : 0 no - Vendor-Specific (Optional) + D10 : 0 no - Vendor-Specific (Optional) + D11 : 0 no - Vendor-Specific (Optional) + D12 : 0 no - Vendor-Specific (Optional) + D13 : 0 no - Vendor-Specific (Optional) + D14 : 0 no - Vendor-Specific (Optional) + D15 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1B 24 06 0E 6A D1 49 2C B8 32 85 44 3E A8 64 3A .$..j.I,.2.D>.d: + 15 23 62 F2 06 01 03 02 3F 00 00 .#b.....?.. + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1B (27 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x06 +guidExtensionCode : {23E49ED0-1178-4F31-AE52-D2FB8A8D3B48} +bNumControls : 0x0E +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x03 +bControlSize : 0x02 +bmControls : 0xFF, 0x6F + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 1 yes - Vendor-Specific (Optional) + D3 : 1 yes - Vendor-Specific (Optional) + D4 : 1 yes - Vendor-Specific (Optional) + D5 : 1 yes - Vendor-Specific (Optional) + D6 : 1 yes - Vendor-Specific (Optional) + D7 : 1 yes - Vendor-Specific (Optional) + D8 : 1 yes - Vendor-Specific (Optional) + D9 : 1 yes - Vendor-Specific (Optional) + D10 : 1 yes - Vendor-Specific (Optional) + D11 : 1 yes - Vendor-Specific (Optional) + D12 : 0 no - Vendor-Specific (Optional) + D13 : 1 yes - Vendor-Specific (Optional) + D14 : 1 yes - Vendor-Specific (Optional) + D15 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1B 24 06 06 D0 9E E4 23 78 11 31 4F AE 52 D2 FB .$.....#x.1O.R.. + 8A 8D 3B 48 0E 01 03 02 FF 6F 00 ..;H.....o. + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1B (27 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x08 +guidExtensionCode : {69678EE4-410F-40DB-A850-7420D7D8240E} +bNumControls : 0x08 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x03 +bControlSize : 0x02 +bmControls : 0x3F, 0x0F + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 1 yes - Vendor-Specific (Optional) + D3 : 1 yes - Vendor-Specific (Optional) + D4 : 1 yes - Vendor-Specific (Optional) + D5 : 1 yes - Vendor-Specific (Optional) + D6 : 0 no - Vendor-Specific (Optional) + D7 : 0 no - Vendor-Specific (Optional) + D8 : 1 yes - Vendor-Specific (Optional) + D9 : 1 yes - Vendor-Specific (Optional) + D10 : 1 yes - Vendor-Specific (Optional) + D11 : 1 yes - Vendor-Specific (Optional) + D12 : 0 no - Vendor-Specific (Optional) + D13 : 0 no - Vendor-Specific (Optional) + D14 : 0 no - Vendor-Specific (Optional) + D15 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1B 24 06 08 E4 8E 67 69 0F 41 DB 40 A8 50 74 20 .$....gi.A.@.Pt + D7 D8 24 0E 08 01 03 02 3F 0F 00 ..$.....?.. + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1C (28 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x09 +guidExtensionCode : {1F5D4CA9-DE11-4487-840D-50933C8EC8D1} +bNumControls : 0x12 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x03 +bControlSize : 0x03 +bmControls : 0xFF, 0xFF, 0x03 + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 1 yes - Vendor-Specific (Optional) + D3 : 1 yes - Vendor-Specific (Optional) + D4 : 1 yes - Vendor-Specific (Optional) + D5 : 1 yes - Vendor-Specific (Optional) + D6 : 1 yes - Vendor-Specific (Optional) + D7 : 1 yes - Vendor-Specific (Optional) + D8 : 1 yes - Vendor-Specific (Optional) + D9 : 1 yes - Vendor-Specific (Optional) + D10 : 1 yes - Vendor-Specific (Optional) + D11 : 1 yes - Vendor-Specific (Optional) + D12 : 1 yes - Vendor-Specific (Optional) + D13 : 1 yes - Vendor-Specific (Optional) + D14 : 1 yes - Vendor-Specific (Optional) + D15 : 1 yes - Vendor-Specific (Optional) + D16 : 1 yes - Vendor-Specific (Optional) + D17 : 1 yes - Vendor-Specific (Optional) + D18 : 0 no - Vendor-Specific (Optional) + D19 : 0 no - Vendor-Specific (Optional) + D20 : 0 no - Vendor-Specific (Optional) + D21 : 0 no - Vendor-Specific (Optional) + D22 : 0 no - Vendor-Specific (Optional) + D23 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1C 24 06 09 A9 4C 5D 1F 11 DE 87 44 84 0D 50 93 .$...L]....D..P. + 3C 8E C8 D1 12 01 03 03 FF FF 03 00 <........... + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1C (28 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x0A +guidExtensionCode : {49E40215-F434-47FE-B158-0E885023E51B} +bNumControls : 0x0B +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x03 +bControlSize : 0x03 +bmControls : 0xFA, 0xFF, 0x01 + D0 : 0 no - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 0 no - Vendor-Specific (Optional) + D3 : 1 yes - Vendor-Specific (Optional) + D4 : 1 yes - Vendor-Specific (Optional) + D5 : 1 yes - Vendor-Specific (Optional) + D6 : 1 yes - Vendor-Specific (Optional) + D7 : 1 yes - Vendor-Specific (Optional) + D8 : 1 yes - Vendor-Specific (Optional) + D9 : 1 yes - Vendor-Specific (Optional) + D10 : 1 yes - Vendor-Specific (Optional) + D11 : 1 yes - Vendor-Specific (Optional) + D12 : 1 yes - Vendor-Specific (Optional) + D13 : 1 yes - Vendor-Specific (Optional) + D14 : 1 yes - Vendor-Specific (Optional) + D15 : 1 yes - Vendor-Specific (Optional) + D16 : 1 yes - Vendor-Specific (Optional) + D17 : 0 no - Vendor-Specific (Optional) + D18 : 0 no - Vendor-Specific (Optional) + D19 : 0 no - Vendor-Specific (Optional) + D20 : 0 no - Vendor-Specific (Optional) + D21 : 0 no - Vendor-Specific (Optional) + D22 : 0 no - Vendor-Specific (Optional) + D23 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1C 24 06 0A 15 02 E4 49 34 F4 FE 47 B1 58 0E 88 .$.....I4..G.X.. + 50 23 E5 1B 0B 01 03 03 FA FF 01 00 P#.......... + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1C (28 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x0B +guidExtensionCode : {FFE52D21-8030-4E2C-82D9-F587D00540BD} +bNumControls : 0x04 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x03 +bControlSize : 0x03 +bmControls : 0x00, 0x41, 0x01 + D0 : 0 no - Vendor-Specific (Optional) + D1 : 0 no - Vendor-Specific (Optional) + D2 : 0 no - Vendor-Specific (Optional) + D3 : 0 no - Vendor-Specific (Optional) + D4 : 0 no - Vendor-Specific (Optional) + D5 : 0 no - Vendor-Specific (Optional) + D6 : 0 no - Vendor-Specific (Optional) + D7 : 0 no - Vendor-Specific (Optional) + D8 : 1 yes - Vendor-Specific (Optional) + D9 : 0 no - Vendor-Specific (Optional) + D10 : 0 no - Vendor-Specific (Optional) + D11 : 0 no - Vendor-Specific (Optional) + D12 : 0 no - Vendor-Specific (Optional) + D13 : 0 no - Vendor-Specific (Optional) + D14 : 1 yes - Vendor-Specific (Optional) + D15 : 0 no - Vendor-Specific (Optional) + D16 : 1 yes - Vendor-Specific (Optional) + D17 : 0 no - Vendor-Specific (Optional) + D18 : 0 no - Vendor-Specific (Optional) + D19 : 0 no - Vendor-Specific (Optional) + D20 : 0 no - Vendor-Specific (Optional) + D21 : 0 no - Vendor-Specific (Optional) + D22 : 0 no - Vendor-Specific (Optional) + D23 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1C 24 06 0B 21 2D E5 FF 30 80 2C 4E 82 D9 F5 87 .$..!-..0.,N.... + D0 05 40 BD 04 01 03 03 00 41 01 00 ..@......A.. + + ------- Video Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x04 +wTerminalType : 0x0101 (TT_STREAMING) +bAssocTerminal : 0x00 (Not associated with an Input Terminal) +bSourceID : 0x03 +iTerminal : 0x00 +Data (HexDump) : 09 24 03 04 01 01 00 03 00 .$....... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x85 (Direction=IN EndpointID=5) +bmAttributes : 0x03 (TransferType=Interrupt) +wMaxPacketSize : 0x0040 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x40 (64 bytes per packet) +bInterval : 0x10 (16 ms) +Data (HexDump) : 07 05 85 03 40 00 10 ....@.. + + --- Class-specific VC Interrupt Endpoint Descriptor --- +bLength : 0x05 (5 bytes) +bDescriptorType : 0x25 (Video Control Endpoint) +bDescriptorSubtype : 0x03 (Interrupt) +wMaxTransferSize : 0x0040 (64 bytes) +Data (HexDump) : 05 25 03 40 00 .%.@. + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 00 00 0E 02 00 00 ......... + + ---- VC-Specific VS Video Input Header Descriptor ----- +bLength : 0x0F (15 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x01 (Input Header) +bNumFormats : 0x02 +wTotalLength : 0x0179 (377 bytes) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmInfo : 0x00 (Dynamic Format Change not supported) +bTerminalLink : 0x04 +bStillCaptureMethod : 0x00 (No Still Capture) +nbTriggerSupport : 0x00 (Hardware Triggering not supported) +bTriggerUsage : 0x00 (Host will initiate still image capture) +nbControlSize : 0x01 +Video Payload Format 1 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Video Payload Format 2 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Data (HexDump) : 0F 24 01 02 79 01 81 00 04 00 00 00 01 00 00 .$..y.......... + + ------- VS Uncompressed Format Type Descriptor -------- +bLength : 0x1B (27 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x04 (Uncompressed Format Type) +bFormatIndex : 0x01 (1) +bNumFrameDescriptors : 0x01 (1) +guidFormat : {32595559-0000-0010-8000-00AA00389B71} (YUY2) +bBitsPerPixel : 0x10 (16 bits) +bDefaultFrameIndex : 0x01 (1) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +Data (HexDump) : 1B 24 04 01 01 59 55 59 32 00 00 10 00 80 00 00 .$...YUY2....... + AA 00 38 9B 71 10 01 00 00 00 00 ..8.q...... + + -------- VS Uncompressed Frame Type Descriptor -------- +---> This is the Default (optimum) Frame index +bLength : 0x2A (42 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x00B0 (176) +wHeight : 0x0090 (144) +dwMinBitRate : 0x001EF000 (2027520 bps -> 253.375 KB/s) +dwMaxBitRate : 0x005CD000 (6082560 bps -> 760.250 KB/s) +dwMaxVideoFrameBufferSize: 0x0000C600 (50688 bytes) +dwDefaultFrameInterval : 0x000A2C2A (66.6666 ms -> 15.000 fps) +bFrameIntervalType : 0x04 (4 discrete frame intervals supported) +adwFrameInterval[1] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[2] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[3] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[4] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 2A 24 05 01 00 B0 00 90 00 00 F0 1E 00 00 D0 5C *$.............\ + 00 00 C6 00 00 2A 2C 0A 00 04 2A 2C 0A 00 40 42 .....*,...*,..@B + 0F 00 55 58 14 00 80 84 1E 00 ..UX...... + + ------- VS Color Matching Descriptor Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x0D (Color Matching) +bColorPrimaries : 0x01 (BT.709, sRGB) +bTransferCharacteristics : 0x01 (BT.709) +bMatrixCoefficients : 0x04 (SMPTE 170M) +Data (HexDump) : 06 24 0D 01 01 04 .$.... + + ----- Video Streaming MJPEG Format Type Descriptor ---- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x06 (Format MJPEG) +bFormatIndex : 0x02 (2) +bNumFrameDescriptors : 0x05 (5) +bmFlags : 0x01 (Sample size is fixed) +bDefaultFrameIndex : 0x01 (1) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +Data (HexDump) : 0B 24 06 02 05 01 01 00 00 00 00 .$......... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +---> This is the Default (optimum) Frame index +bLength : 0x36 (54 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x01770000 (24576000 bps -> 3.72 MB/s) +dwMaxBitRate : 0x08CA0000 (147456000 bps -> 18.432 MB/s) +dwMaxVideoFrameBufferSize: 0x00096000 (614400 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x07 (7 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00065B9A (41.6666 ms -> 24.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[7] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 36 24 07 01 00 80 02 E0 01 00 00 77 01 00 00 CA 6$.........w.... + 08 00 60 09 00 15 16 05 00 07 15 16 05 00 9A 5B ..`............[ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 .. ...*,..@B..UX + 14 00 80 84 1E 00 ...... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x36 (54 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x00 +wWidth : 0x00B0 (176) +wHeight : 0x0090 (144) +dwMinBitRate : 0x001EF000 (2027520 bps -> 253.375 KB/s) +dwMaxBitRate : 0x00B9A000 (12165120 bps -> 1.520 MB/s) +dwMaxVideoFrameBufferSize: 0x0000C600 (50688 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x07 (7 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00065B9A (41.6666 ms -> 24.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[7] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 36 24 07 02 00 B0 00 90 00 00 F0 1E 00 00 A0 B9 6$.............. + 00 00 C6 00 00 15 16 05 00 07 15 16 05 00 9A 5B ...............[ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 .. ...*,..@B..UX + 14 00 80 84 1E 00 ...... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x36 (54 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x00 +wWidth : 0x0140 (320) +wHeight : 0x00F0 (240) +dwMinBitRate : 0x005DC000 (6144000 bps -> 768 KB/s) +dwMaxBitRate : 0x02328000 (36864000 bps -> 4.608 MB/s) +dwMaxVideoFrameBufferSize: 0x00025800 (153600 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x07 (7 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00065B9A (41.6666 ms -> 24.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[7] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 36 24 07 03 00 40 01 F0 00 00 C0 5D 00 00 80 32 6$...@.....]...2 + 02 00 58 02 00 15 16 05 00 07 15 16 05 00 9A 5B ..X............[ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 .. ...*,..@B..UX + 14 00 80 84 1E 00 ...... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x36 (54 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x00 +wWidth : 0x01A8 (424) +wHeight : 0x00F0 (240) +dwMinBitRate : 0x007C3800 (8140800 bps -> 1.17 MB/s) +dwMaxBitRate : 0x02E95000 (48844800 bps -> 6.105 MB/s) +dwMaxVideoFrameBufferSize: 0x00031B00 (203520 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x07 (7 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00065B9A (41.6666 ms -> 24.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[7] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 36 24 07 04 00 A8 01 F0 00 00 38 7C 00 00 50 E9 6$........8|..P. + 02 00 1B 03 00 15 16 05 00 07 15 16 05 00 9A 5B ...............[ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 .. ...*,..@B..UX + 14 00 80 84 1E 00 ...... + + ----- Video Streaming MJPEG Frame Type Descriptor ----- +bLength : 0x36 (54 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x07 (MJPEG Frame Type) +bFrameIndex : 0x05 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x0168 (360) +dwMinBitRate : 0x01194000 (18432000 bps -> 2.304 MB/s) +dwMaxBitRate : 0x06978000 (110592000 bps -> 13.824 MB/s) +dwMaxVideoFrameBufferSize: 0x00070800 (460800 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x07 (7 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00065B9A (41.6666 ms -> 24.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x00145855 (133.3333 ms -> 7.500 fps) +adwFrameInterval[7] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 36 24 07 05 00 80 02 68 01 00 40 19 01 00 80 97 6$.....h..@..... + 06 00 08 07 00 15 16 05 00 07 15 16 05 00 9A 5B ...............[ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 55 58 .. ...*,..@B..UX + 14 00 80 84 1E 00 ...... + + ------- VS Color Matching Descriptor Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x0D (Color Matching) +bColorPrimaries : 0x01 (BT.709, sRGB) +bTransferCharacteristics : 0x01 (BT.709) +bMatrixCoefficients : 0x04 (SMPTE 170M) +Data (HexDump) : 06 24 0D 01 01 04 .$.... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 01 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x00C0 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0xC0 (192 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 C0 00 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x02 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 02 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0180 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x180 (384 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 80 01 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x03 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 03 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0200 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x200 (512 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 00 02 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x04 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 04 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0280 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x280 (640 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 80 02 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x05 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 05 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0320 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x320 (800 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 20 03 01 .... .. + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x02 +bInterfaceCount : 0x02 +bFunctionClass : 0x01 (Audio) +bFunctionSubClass : 0x02 (Audio Streaming) +bFunctionProtocol : 0x00 +iFunction : 0x00 (No String Descriptor) +Data (HexDump) : 08 0B 02 02 01 02 00 00 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x02 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x01 (Audio Control) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 02 00 00 01 01 00 00 ......... + + ------ Audio Control Interface Header Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 (Header) +bcdADC : 0x0100 +wTotalLength : 0x0026 (38 bytes) +bInCollection : 0x01 +baInterfaceNr[1] : 0x03 +Data (HexDump) : 09 24 01 00 01 26 00 01 03 .$...&... + + ------- Audio Control Input Terminal Descriptor ------- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (Microphone) +bAssocTerminal : 0x00 +bNrChannels : 0x02 (2 channels) +wChannelConfig : 0x0003 (L, R) +iChannelNames : 0x00 (No String Descriptor) +iTerminal : 0x00 (No String Descriptor) +Data (HexDump) : 0C 24 02 01 01 02 00 02 03 00 00 00 .$.......... + + ------- Audio Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x03 +wTerminalType : 0x0101 (USB streaming) +bAssocTerminal : 0x00 (0) +bSourceID : 0x05 (5) +iTerminal : 0x00 (No String Descriptor) +Data (HexDump) : 09 24 03 03 01 01 00 05 00 .$....... + + -------- Audio Control Feature Unit Descriptor -------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x06 (Feature Unit) +bUnitID : 0x05 (5) +bSourceID : 0x01 (1) +bControlSize : 0x01 (1 byte per control) +bmaControls[0] : 0x03 + D0: Mute : 1 + D1: Volume : 1 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 +iFeature : 0x00 (No String Descriptor) +Data (HexDump) : 08 24 06 05 01 01 03 00 .$...... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 00 00 01 02 00 00 ......... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 01 01 01 02 00 00 ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x03 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 03 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x02 (2 channels) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x01 (supports 1 sample frequency) +tSamFreq[1] : 0x03E80 (16000 Hz) +Data (HexDump) : 0B 24 02 01 02 02 10 01 80 3E 00 .$.......>. + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x84 (Direction=IN EndpointID=4) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0044 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x44 (68 bytes per packet) +bInterval : 0x04 (4 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 84 05 44 00 04 00 00 ....D.... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x00 (Undefined) +wLockDelay : 0x0000 +Data (HexDump) : 07 25 01 01 00 00 00 .%..... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x04 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x03 (HID - Human Interface Device) +bInterfaceSubClass : 0x00 (None) +bInterfaceProtocol : 0x00 (None) +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 04 00 01 03 00 00 00 ......... + + ------------------- HID Descriptor -------------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x21 (HID Descriptor) +bcdHID : 0x0111 (HID Version 1.11) +bCountryCode : 0x00 (00 = not localized) +bNumDescriptors : 0x01 +Data (HexDump) : 09 21 11 01 00 01 22 6C 00 .!...."l. +Descriptor 1: +bDescriptorType : 0x22 (Class=Report) +wDescriptorLength : 0x006C (108 bytes) +Error reading descriptor : ERROR_INVALID_PARAMETER (due to a obscure limitation of the Win32 USB API, see UsbTreeView.txt) + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x87 (Direction=IN EndpointID=7) +bmAttributes : 0x03 (TransferType=Interrupt) +wMaxPacketSize : 0x0002 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x02 (2 bytes per packet) +bInterval : 0x06 (6 ms) +Data (HexDump) : 07 05 87 03 02 00 06 ....... + + ------ SuperSpeed Endpoint Companion Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x30 (SuperSpeed Endpoint Companion Descriptor) +bMaxBurst : 0x00 (up to 1 packets per burst) +bmAttributes : 0x00 +wBytesPerInterval : 0x0002 (*!*ERROR must be 0 for control and bulk endpoints) +Data (HexDump) : 06 30 00 00 02 00 .0.... + + ---------- Binary Object Store (BOS) Descriptor ----------- +bLength : 0x05 (5 bytes) +bDescriptorType : 0x0F (Binary Object Store) +wTotalLength : 0x0016 (22 bytes) +bNumDeviceCaps : 0x02 +Data (HexDump) : 05 0F 16 00 02 ..... + + ------------- USB 2.0 Extension Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x10 (Device Capability Descriptor) +bDevCapabilityType : 0x02 (USB 2.0 Extension) +bmAttributes : 0x02 + LPMCapable : 1 (Link Power Management protocol is supported) + BESLAndAlternateHIRD : 0 (BESL & Alternate HIRD definitions are not supported) + BaselineBESLValid : 0 (not valid) + DeepBESLValid : 0 (not valid) + BaselineBESL : 0 + DeepBESL : 0 +Data (HexDump) : 07 10 02 02 00 00 00 ....... + + ----- SuperSpeed USB Device Capability Descriptor ----- +bLength : 0x0A (10 bytes) +bDescriptorType : 0x10 (Device Capability Descriptor) +bDevCapabilityType : 0x03 (SuperSpeed USB Device Capability) +bmAttributes : 0x00 + Bit 0 Reserved : 0x00 + Bit 1 LTM Capable : 0x00 (no) + Bit 7:2 Reserved : 0x00 +wSpeedsSupported : 0x0E (Full-Speed, High-Speed, SuperSpeed) +bFunctionalitySupport : 0x02 (lowest speed with all the functionality is 'High-Speed') +bU1DevExitLat : 0x0A (less than 10 µs) +wU2DevExitLat : 0x0100 (less than 256 µs) +Data (HexDump) : 0A 10 03 00 0E 00 02 0A 00 01 .......... + + -------------------- String Descriptors ------------------- + ------ String Descriptor 0 ------ +bLength : 0x04 (4 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language ID[0] : 0x0409 (English - United States) +Data (HexDump) : 04 03 09 04 .... + ------ String Descriptor 2 ------ +bLength : 0x26 (38 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Logitech StreamCam" +Data (HexDump) : 26 03 4C 00 6F 00 67 00 69 00 74 00 65 00 63 00 &.L.o.g.i.t.e.c. + 68 00 20 00 53 00 74 00 72 00 65 00 61 00 6D 00 h. .S.t.r.e.a.m. + 43 00 61 00 6D 00 C.a.m. + ------ String Descriptor 3 ------ +bLength : 0x12 (18 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "5079EB25" +Data (HexDump) : 12 03 35 00 30 00 37 00 39 00 45 00 42 00 32 00 ..5.0.7.9.E.B.2. + 35 00 5. + +*/ +namespace logitech_streamcam { +const uint8_t dev_desc[] = { + 0x12, 0x01, 0x10, 0x02, 0xEF, 0x02, 0x01, 0x40, 0x6D, 0x04, 0x93, 0x08, 0x17, 0x00, 0x00, 0x02, + 0x03, 0x01 +}; +const uint8_t cfg_desc[] = { + 0x09, 0x02, 0x09, 0x07, 0x06, 0x01, 0x00, 0x80, 0xFA, 0x08, 0x0B, 0x00, 0x02, 0x0E, 0x03, 0x00, + 0x00, 0x09, 0x04, 0x00, 0x00, 0x01, 0x0E, 0x01, 0x00, 0x00, 0x0D, 0x24, 0x01, 0x00, 0x01, 0xD8, + 0x00, 0x80, 0xC3, 0xC9, 0x01, 0x01, 0x01, 0x12, 0x24, 0x02, 0x01, 0x01, 0x02, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x2E, 0x2A, 0x02, 0x0B, 0x24, 0x05, 0x03, 0x01, 0x00, 0x40, + 0x02, 0x5B, 0x17, 0x00, 0x1B, 0x24, 0x06, 0x0E, 0x6A, 0xD1, 0x49, 0x2C, 0xB8, 0x32, 0x85, 0x44, + 0x3E, 0xA8, 0x64, 0x3A, 0x15, 0x23, 0x62, 0xF2, 0x06, 0x01, 0x03, 0x02, 0x3F, 0x00, 0x00, 0x1B, + 0x24, 0x06, 0x06, 0xD0, 0x9E, 0xE4, 0x23, 0x78, 0x11, 0x31, 0x4F, 0xAE, 0x52, 0xD2, 0xFB, 0x8A, + 0x8D, 0x3B, 0x48, 0x0E, 0x01, 0x03, 0x02, 0xFF, 0x6F, 0x00, 0x1B, 0x24, 0x06, 0x08, 0xE4, 0x8E, + 0x67, 0x69, 0x0F, 0x41, 0xDB, 0x40, 0xA8, 0x50, 0x74, 0x20, 0xD7, 0xD8, 0x24, 0x0E, 0x08, 0x01, + 0x03, 0x02, 0x3F, 0x0F, 0x00, 0x1C, 0x24, 0x06, 0x09, 0xA9, 0x4C, 0x5D, 0x1F, 0x11, 0xDE, 0x87, + 0x44, 0x84, 0x0D, 0x50, 0x93, 0x3C, 0x8E, 0xC8, 0xD1, 0x12, 0x01, 0x03, 0x03, 0xFF, 0xFF, 0x03, + 0x00, 0x1C, 0x24, 0x06, 0x0A, 0x15, 0x02, 0xE4, 0x49, 0x34, 0xF4, 0xFE, 0x47, 0xB1, 0x58, 0x0E, + 0x88, 0x50, 0x23, 0xE5, 0x1B, 0x0B, 0x01, 0x03, 0x03, 0xFA, 0xFF, 0x01, 0x00, 0x1C, 0x24, 0x06, + 0x0B, 0x21, 0x2D, 0xE5, 0xFF, 0x30, 0x80, 0x2C, 0x4E, 0x82, 0xD9, 0xF5, 0x87, 0xD0, 0x05, 0x40, + 0xBD, 0x04, 0x01, 0x03, 0x03, 0x00, 0x41, 0x01, 0x00, 0x09, 0x24, 0x03, 0x04, 0x01, 0x01, 0x00, + 0x03, 0x00, 0x07, 0x05, 0x85, 0x03, 0x40, 0x00, 0x08, 0x05, 0x25, 0x03, 0x40, 0x00, 0x09, 0x04, + 0x01, 0x00, 0x00, 0x0E, 0x02, 0x00, 0x00, 0x0F, 0x24, 0x01, 0x02, 0x31, 0x04, 0x81, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x1B, 0x24, 0x04, 0x01, 0x0A, 0x59, 0x55, 0x59, 0x32, 0x00, + 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71, 0x10, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x36, 0x24, 0x05, 0x01, 0x00, 0x80, 0x02, 0xE0, 0x01, 0x00, 0x00, 0x77, 0x01, 0x00, 0x00, + 0xCA, 0x08, 0x00, 0x60, 0x09, 0x00, 0x15, 0x16, 0x05, 0x00, 0x07, 0x15, 0x16, 0x05, 0x00, 0x9A, + 0x5B, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x55, + 0x58, 0x14, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x36, 0x24, 0x05, 0x02, 0x00, 0xB0, 0x00, 0x90, 0x00, + 0x00, 0xF0, 0x1E, 0x00, 0x00, 0xA0, 0xB9, 0x00, 0x00, 0xC6, 0x00, 0x00, 0x15, 0x16, 0x05, 0x00, + 0x07, 0x15, 0x16, 0x05, 0x00, 0x9A, 0x5B, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, + 0x00, 0x40, 0x42, 0x0F, 0x00, 0x55, 0x58, 0x14, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x36, 0x24, 0x05, + 0x03, 0x00, 0x40, 0x01, 0xF0, 0x00, 0x00, 0xC0, 0x5D, 0x00, 0x00, 0x80, 0x32, 0x02, 0x00, 0x58, + 0x02, 0x00, 0x15, 0x16, 0x05, 0x00, 0x07, 0x15, 0x16, 0x05, 0x00, 0x9A, 0x5B, 0x06, 0x00, 0x20, + 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x55, 0x58, 0x14, 0x00, 0x80, + 0x84, 0x1E, 0x00, 0x36, 0x24, 0x05, 0x04, 0x00, 0xA8, 0x01, 0xF0, 0x00, 0x00, 0x38, 0x7C, 0x00, + 0x00, 0x50, 0xE9, 0x02, 0x00, 0x1B, 0x03, 0x00, 0x15, 0x16, 0x05, 0x00, 0x07, 0x15, 0x16, 0x05, + 0x00, 0x9A, 0x5B, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, + 0x00, 0x55, 0x58, 0x14, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x36, 0x24, 0x05, 0x05, 0x00, 0x80, 0x02, + 0x68, 0x01, 0x00, 0x40, 0x19, 0x01, 0x00, 0x80, 0x97, 0x06, 0x00, 0x08, 0x07, 0x00, 0x15, 0x16, + 0x05, 0x00, 0x07, 0x15, 0x16, 0x05, 0x00, 0x9A, 0x5B, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, + 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x55, 0x58, 0x14, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x36, + 0x24, 0x05, 0x06, 0x00, 0x50, 0x03, 0xE0, 0x01, 0x00, 0xE0, 0xF0, 0x01, 0x00, 0x40, 0xA5, 0x0B, + 0x00, 0x6C, 0x0C, 0x00, 0x15, 0x16, 0x05, 0x00, 0x07, 0x15, 0x16, 0x05, 0x00, 0x9A, 0x5B, 0x06, + 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x55, 0x58, 0x14, + 0x00, 0x80, 0x84, 0x1E, 0x00, 0x2A, 0x24, 0x05, 0x07, 0x00, 0xC0, 0x03, 0x1C, 0x02, 0x00, 0xD0, + 0x78, 0x02, 0x00, 0x70, 0x6A, 0x07, 0x00, 0xD2, 0x0F, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x04, 0x2A, + 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x55, 0x58, 0x14, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x26, + 0x24, 0x05, 0x08, 0x00, 0x00, 0x05, 0xD0, 0x02, 0x00, 0x00, 0x65, 0x04, 0x00, 0x00, 0xCA, 0x08, + 0x00, 0x20, 0x1C, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x03, 0x40, 0x42, 0x0F, 0x00, 0x55, 0x58, 0x14, + 0x00, 0x80, 0x84, 0x1E, 0x00, 0x22, 0x24, 0x05, 0x09, 0x00, 0x40, 0x06, 0x80, 0x03, 0x00, 0x00, + 0xD6, 0x06, 0x00, 0x00, 0x41, 0x0A, 0x00, 0xC0, 0x2B, 0x00, 0x55, 0x58, 0x14, 0x00, 0x02, 0x55, + 0x58, 0x14, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x1E, 0x24, 0x05, 0x0A, 0x00, 0x80, 0x07, 0x38, 0x04, + 0x00, 0x40, 0xE3, 0x09, 0x00, 0x40, 0xE3, 0x09, 0x00, 0x48, 0x3F, 0x00, 0x80, 0x84, 0x1E, 0x00, + 0x01, 0x80, 0x84, 0x1E, 0x00, 0x06, 0x24, 0x0D, 0x01, 0x01, 0x04, 0x0B, 0x24, 0x06, 0x02, 0x0A, + 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x36, 0x24, 0x07, 0x01, 0x00, 0x80, 0x02, 0xE0, 0x01, 0x00, + 0x00, 0x77, 0x01, 0x00, 0x00, 0xCA, 0x08, 0x00, 0x60, 0x09, 0x00, 0x15, 0x16, 0x05, 0x00, 0x07, + 0x15, 0x16, 0x05, 0x00, 0x9A, 0x5B, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, + 0x40, 0x42, 0x0F, 0x00, 0x55, 0x58, 0x14, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x36, 0x24, 0x07, 0x02, + 0x00, 0xB0, 0x00, 0x90, 0x00, 0x00, 0xF0, 0x1E, 0x00, 0x00, 0xA0, 0xB9, 0x00, 0x00, 0xC6, 0x00, + 0x00, 0x15, 0x16, 0x05, 0x00, 0x07, 0x15, 0x16, 0x05, 0x00, 0x9A, 0x5B, 0x06, 0x00, 0x20, 0xA1, + 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x55, 0x58, 0x14, 0x00, 0x80, 0x84, + 0x1E, 0x00, 0x36, 0x24, 0x07, 0x03, 0x00, 0x40, 0x01, 0xF0, 0x00, 0x00, 0xC0, 0x5D, 0x00, 0x00, + 0x80, 0x32, 0x02, 0x00, 0x58, 0x02, 0x00, 0x15, 0x16, 0x05, 0x00, 0x07, 0x15, 0x16, 0x05, 0x00, + 0x9A, 0x5B, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, + 0x55, 0x58, 0x14, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x36, 0x24, 0x07, 0x04, 0x00, 0xA8, 0x01, 0xF0, + 0x00, 0x00, 0x38, 0x7C, 0x00, 0x00, 0x50, 0xE9, 0x02, 0x00, 0x1B, 0x03, 0x00, 0x15, 0x16, 0x05, + 0x00, 0x07, 0x15, 0x16, 0x05, 0x00, 0x9A, 0x5B, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, + 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x55, 0x58, 0x14, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x36, 0x24, + 0x07, 0x05, 0x00, 0x80, 0x02, 0x68, 0x01, 0x00, 0x40, 0x19, 0x01, 0x00, 0x80, 0x97, 0x06, 0x00, + 0x08, 0x07, 0x00, 0x15, 0x16, 0x05, 0x00, 0x07, 0x15, 0x16, 0x05, 0x00, 0x9A, 0x5B, 0x06, 0x00, + 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x55, 0x58, 0x14, 0x00, + 0x80, 0x84, 0x1E, 0x00, 0x36, 0x24, 0x07, 0x06, 0x00, 0x50, 0x03, 0xE0, 0x01, 0x00, 0xE0, 0xF0, + 0x01, 0x00, 0x40, 0xA5, 0x0B, 0x00, 0x6C, 0x0C, 0x00, 0x15, 0x16, 0x05, 0x00, 0x07, 0x15, 0x16, + 0x05, 0x00, 0x9A, 0x5B, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, + 0x0F, 0x00, 0x55, 0x58, 0x14, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x36, 0x24, 0x07, 0x07, 0x00, 0xC0, + 0x03, 0x1C, 0x02, 0x00, 0xD0, 0x78, 0x02, 0x00, 0xE0, 0xD4, 0x0E, 0x00, 0xD2, 0x0F, 0x00, 0x15, + 0x16, 0x05, 0x00, 0x07, 0x15, 0x16, 0x05, 0x00, 0x9A, 0x5B, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, + 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x55, 0x58, 0x14, 0x00, 0x80, 0x84, 0x1E, 0x00, + 0x36, 0x24, 0x07, 0x08, 0x00, 0x00, 0x05, 0xD0, 0x02, 0x00, 0x00, 0x65, 0x04, 0x00, 0x00, 0x5E, + 0x1A, 0x00, 0x20, 0x1C, 0x00, 0x15, 0x16, 0x05, 0x00, 0x07, 0x15, 0x16, 0x05, 0x00, 0x9A, 0x5B, + 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x55, 0x58, + 0x14, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x36, 0x24, 0x07, 0x09, 0x00, 0x40, 0x06, 0x80, 0x03, 0x00, + 0x00, 0xD6, 0x06, 0x00, 0x00, 0x04, 0x29, 0x00, 0xC0, 0x2B, 0x00, 0x15, 0x16, 0x05, 0x00, 0x07, + 0x15, 0x16, 0x05, 0x00, 0x9A, 0x5B, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, + 0x40, 0x42, 0x0F, 0x00, 0x55, 0x58, 0x14, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x36, 0x24, 0x07, 0x0A, + 0x00, 0x80, 0x07, 0x38, 0x04, 0x00, 0x40, 0xE3, 0x09, 0x00, 0x80, 0x53, 0x3B, 0x00, 0x48, 0x3F, + 0x00, 0x15, 0x16, 0x05, 0x00, 0x07, 0x15, 0x16, 0x05, 0x00, 0x9A, 0x5B, 0x06, 0x00, 0x20, 0xA1, + 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x55, 0x58, 0x14, 0x00, 0x80, 0x84, + 0x1E, 0x00, 0x06, 0x24, 0x0D, 0x01, 0x01, 0x04, 0x09, 0x04, 0x01, 0x01, 0x01, 0x0E, 0x02, 0x00, + 0x00, 0x07, 0x05, 0x81, 0x05, 0xC0, 0x00, 0x01, 0x09, 0x04, 0x01, 0x02, 0x01, 0x0E, 0x02, 0x00, + 0x00, 0x07, 0x05, 0x81, 0x05, 0x80, 0x01, 0x01, 0x09, 0x04, 0x01, 0x03, 0x01, 0x0E, 0x02, 0x00, + 0x00, 0x07, 0x05, 0x81, 0x05, 0x00, 0x02, 0x01, 0x09, 0x04, 0x01, 0x04, 0x01, 0x0E, 0x02, 0x00, + 0x00, 0x07, 0x05, 0x81, 0x05, 0x80, 0x02, 0x01, 0x09, 0x04, 0x01, 0x05, 0x01, 0x0E, 0x02, 0x00, + 0x00, 0x07, 0x05, 0x81, 0x05, 0x20, 0x03, 0x01, 0x09, 0x04, 0x01, 0x06, 0x01, 0x0E, 0x02, 0x00, + 0x00, 0x07, 0x05, 0x81, 0x05, 0xB0, 0x03, 0x01, 0x09, 0x04, 0x01, 0x07, 0x01, 0x0E, 0x02, 0x00, + 0x00, 0x07, 0x05, 0x81, 0x05, 0x80, 0x0A, 0x01, 0x09, 0x04, 0x01, 0x08, 0x01, 0x0E, 0x02, 0x00, + 0x00, 0x07, 0x05, 0x81, 0x05, 0x20, 0x0B, 0x01, 0x09, 0x04, 0x01, 0x09, 0x01, 0x0E, 0x02, 0x00, + 0x00, 0x07, 0x05, 0x81, 0x05, 0xE0, 0x0B, 0x01, 0x09, 0x04, 0x01, 0x0A, 0x01, 0x0E, 0x02, 0x00, + 0x00, 0x07, 0x05, 0x81, 0x05, 0x80, 0x13, 0x01, 0x09, 0x04, 0x01, 0x0B, 0x01, 0x0E, 0x02, 0x00, + 0x00, 0x07, 0x05, 0x81, 0x05, 0x00, 0x14, 0x01, 0x08, 0x0B, 0x02, 0x02, 0x01, 0x02, 0x00, 0x00, + 0x09, 0x04, 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x09, 0x24, 0x01, 0x00, 0x01, 0x26, 0x00, + 0x01, 0x03, 0x0C, 0x24, 0x02, 0x01, 0x01, 0x02, 0x00, 0x02, 0x03, 0x00, 0x00, 0x00, 0x09, 0x24, + 0x03, 0x03, 0x01, 0x01, 0x00, 0x05, 0x00, 0x08, 0x24, 0x06, 0x05, 0x01, 0x01, 0x03, 0x00, 0x09, + 0x04, 0x03, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x09, 0x04, 0x03, 0x01, 0x01, 0x01, 0x02, 0x00, + 0x00, 0x07, 0x24, 0x01, 0x03, 0x01, 0x01, 0x00, 0x0B, 0x24, 0x02, 0x01, 0x02, 0x02, 0x10, 0x01, + 0x80, 0x3E, 0x00, 0x09, 0x05, 0x84, 0x05, 0x44, 0x00, 0x04, 0x00, 0x00, 0x07, 0x25, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x09, 0x04, 0x03, 0x02, 0x01, 0x01, 0x02, 0x00, 0x00, 0x07, 0x24, 0x01, 0x03, + 0x01, 0x01, 0x00, 0x0B, 0x24, 0x02, 0x01, 0x02, 0x02, 0x10, 0x01, 0xC0, 0x5D, 0x00, 0x09, 0x05, + 0x84, 0x05, 0x64, 0x00, 0x04, 0x00, 0x00, 0x07, 0x25, 0x01, 0x01, 0x00, 0x00, 0x00, 0x09, 0x04, + 0x03, 0x03, 0x01, 0x01, 0x02, 0x00, 0x00, 0x07, 0x24, 0x01, 0x03, 0x01, 0x01, 0x00, 0x0B, 0x24, + 0x02, 0x01, 0x02, 0x02, 0x10, 0x01, 0x00, 0x7D, 0x00, 0x09, 0x05, 0x84, 0x05, 0x84, 0x00, 0x04, + 0x00, 0x00, 0x07, 0x25, 0x01, 0x01, 0x00, 0x00, 0x00, 0x09, 0x04, 0x03, 0x04, 0x01, 0x01, 0x02, + 0x00, 0x00, 0x07, 0x24, 0x01, 0x03, 0x01, 0x01, 0x00, 0x0B, 0x24, 0x02, 0x01, 0x02, 0x02, 0x10, + 0x01, 0x80, 0xBB, 0x00, 0x09, 0x05, 0x84, 0x05, 0xC4, 0x00, 0x04, 0x00, 0x00, 0x07, 0x25, 0x01, + 0x01, 0x00, 0x00, 0x00, 0x09, 0x04, 0x04, 0x00, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0x07, 0x05, 0x83, + 0x02, 0x00, 0x02, 0x00, 0x06, 0x30, 0x00, 0x00, 0x00, 0x00, 0x09, 0x04, 0x05, 0x00, 0x01, 0x03, + 0x00, 0x00, 0x00, 0x09, 0x21, 0x11, 0x01, 0x00, 0x01, 0x22, 0x6C, 0x00, 0x07, 0x05, 0x87, 0x03, + 0x02, 0x00, 0x06, 0x06, 0x30, 0x00, 0x00, 0x02, 0x00 +}; +} diff --git a/host/class/uvc/usb_host_uvc/test_app/main/test_uvc.c b/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/old.hpp similarity index 61% rename from host/class/uvc/usb_host_uvc/test_app/main/test_uvc.c rename to host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/old.hpp index eaa7029f..61957e71 100644 --- a/host/class/uvc/usb_host_uvc/test_app/main/test_uvc.c +++ b/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/old.hpp @@ -1,33 +1,16 @@ /* - * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ -#include "soc/soc_caps.h" -#if SOC_USB_OTG_SUPPORTED +#pragma once -#include -#include -#include "esp_system.h" -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" -#include "esp_log.h" -#include "esp_err.h" - -#include "esp_private/usb_phy.h" -#include "usb/usb_host.h" -#include "unity.h" - -#include "libusb.h" -#include "descriptor.h" - -#define TAG "UVC_TEST" -#define COMPARE_DESCRIPTORS(array) compare_descriptors(array, sizeof(array)/sizeof(array[0]), #array) - -int libusb_parse_configuration(struct libusb_config_descriptor *config, const uint8_t *buffer, int size); -void libusb_clear_config_descriptor(struct libusb_config_descriptor *config); +#include +// Descriptors from UVC driver version 1 +// TODO check and test this +namespace old_cameras { const uint8_t CANYON_CNE_CWC2[] = { 0x09, 0x02, 0x7d, 0x02, 0x04, 0x01, 0x00, 0x80, 0xfa, 0x08, 0x0b, 0x00, 0x02, 0x0e, 0x03, 0x00, 0x05, 0x09, 0x04, 0x00, 0x00, 0x01, 0x0e, 0x01, 0x00, 0x05, 0x0d, 0x24, 0x01, 0x00, 0x01, 0x4d, @@ -127,91 +110,4 @@ const uint8_t Logitech_C980[] = { 0x03, 0x00, 0x00, 0x00, 0x09, 0x21, 0x11, 0x01, 0x00, 0x01, 0x22, 0x6c, 0x00, 0x07, 0x05, 0x87, 0x03, 0x02, 0x00, 0x06, 0x06, 0x30, 0x00, 0x00, 0x02, 0x00 }; - -const uint8_t unknown_camera[] = { - 0x09, 0x02, 0x69, 0x01, 0x02, 0x01, 0x00, 0x80, 0xfa, 0x08, 0x0b, 0x00, 0x02, 0x0e, 0x03, 0x00, - 0x05, 0x09, 0x04, 0x00, 0x00, 0x01, 0x0e, 0x01, 0x00, 0x05, 0x0d, 0x24, 0x01, 0x00, 0x01, 0x4d, - 0x00, 0xc0, 0xe1, 0xe4, 0x00, 0x01, 0x01, 0x09, 0x24, 0x03, 0x05, 0x01, 0x01, 0x00, 0x03, 0x00, - 0x1a, 0x24, 0x06, 0x03, 0x70, 0x33, 0xf0, 0x28, 0x11, 0x63, 0x2e, 0x4a, 0xba, 0x2c, 0x68, 0x90, - 0xeb, 0x33, 0x40, 0x16, 0x08, 0x01, 0x02, 0x01, 0x1f, 0x00, 0x12, 0x24, 0x02, 0x01, 0x01, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0e, 0x00, 0x00, 0x0b, 0x24, 0x05, 0x02, - 0x01, 0x00, 0x00, 0x02, 0x7f, 0x17, 0x00, 0x07, 0x05, 0x83, 0x03, 0x10, 0x00, 0x06, 0x05, 0x25, - 0x03, 0x10, 0x00, 0x09, 0x04, 0x01, 0x00, 0x00, 0x0e, 0x02, 0x00, 0x05, 0x0f, 0x24, 0x01, 0x02, - 0x8d, 0x00, 0x81, 0x00, 0x05, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x0b, 0x24, 0x06, 0x01, 0x01, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x24, 0x07, 0x01, 0x00, 0x40, 0x01, 0xf0, 0x00, 0x08, - 0x3c, 0x2f, 0x00, 0x30, 0x68, 0x1b, 0x01, 0x4d, 0x2e, 0x01, 0x00, 0x15, 0x16, 0x05, 0x00, 0x05, - 0x15, 0x16, 0x05, 0x00, 0x20, 0xa1, 0x07, 0x00, 0x2a, 0x2c, 0x0a, 0x00, 0x40, 0x42, 0x0f, 0x00, - 0x80, 0x84, 0x1e, 0x00, 0x06, 0x24, 0x0d, 0x01, 0x01, 0x04, 0x1b, 0x24, 0x04, 0x02, 0x01, 0x59, - 0x55, 0x59, 0x32, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71, 0x10, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x24, 0x05, 0x01, 0x00, 0x40, 0x01, 0xf0, 0x00, 0x00, 0xc0, - 0x5d, 0x00, 0x00, 0xc0, 0x5d, 0x00, 0x00, 0x58, 0x02, 0x00, 0x80, 0x84, 0x1e, 0x00, 0x01, 0x80, - 0x84, 0x1e, 0x00, 0x06, 0x24, 0x0d, 0x01, 0x01, 0x04, 0x09, 0x04, 0x01, 0x01, 0x01, 0x0e, 0x02, - 0x00, 0x00, 0x07, 0x05, 0x81, 0x05, 0x80, 0x00, 0x01, 0x09, 0x04, 0x01, 0x02, 0x01, 0x0e, 0x02, - 0x00, 0x00, 0x07, 0x05, 0x81, 0x05, 0x00, 0x01, 0x01, 0x09, 0x04, 0x01, 0x03, 0x01, 0x0e, 0x02, - 0x00, 0x00, 0x07, 0x05, 0x81, 0x05, 0x00, 0x02, 0x01, 0x09, 0x04, 0x01, 0x04, 0x01, 0x0e, 0x02, - 0x00, 0x00, 0x07, 0x05, 0x81, 0x05, 0x58, 0x02, 0x01, 0x09, 0x04, 0x01, 0x05, 0x01, 0x0e, 0x02, - 0x00, 0x00, 0x07, 0x05, 0x81, 0x05, 0x20, 0x03, 0x01, 0x09, 0x04, 0x01, 0x06, 0x01, 0x0e, 0x02, - 0x00, 0x00, 0x07, 0x05, 0x81, 0x05, 0xbc, 0x03, 0x01 -}; - -static void compare_descriptors(const uint8_t *config_desc, size_t size, const char *camera_name) -{ - ESP_LOGI(TAG, "Comparing descriptrors for %s camera", camera_name); - - struct libusb_config_descriptor *libusb_config = calloc(1, sizeof(struct libusb_config_descriptor)); - struct libusb_config_descriptor *config = NULL; - - TEST_ASSERT_NOT_NULL( libusb_config ); - TEST_ASSERT_EQUAL( libusb_parse_configuration(libusb_config, config_desc, size), LIBUSB_SUCCESS ); - TEST_ASSERT_EQUAL( raw_desc_to_libusb_config(config_desc, size, &config), LIBUSB_SUCCESS ); - - TEST_ASSERT_EQUAL( memcmp(libusb_config, config, LIBUSB_DT_CONFIG_SIZE), 0); - TEST_ASSERT_NOT_NULL( libusb_config->interface ); - TEST_ASSERT_NOT_NULL( config->interface ); - - TEST_ASSERT_EQUAL( libusb_config->extra_length, config->extra_length ); - TEST_ASSERT_EQUAL( memcmp(libusb_config->extra, config->extra, config->extra_length), 0); - - TEST_ASSERT_EQUAL( libusb_config->bNumInterfaces, config->bNumInterfaces ); - - printf("checking...\n"); - - for (int i = 0; i < libusb_config->bNumInterfaces; i++) { - printf("interface %u\n", i); - libusb_interface_t *ifc = &libusb_config->interface[i]; - libusb_interface_t *my_ifc = &config->interface[i]; - TEST_ASSERT_EQUAL( ifc->num_altsetting, my_ifc->num_altsetting ); - - for (int j = 0; j < ifc->num_altsetting; j++) { - printf(" altsetting %u\n", j); - libusb_interface_descriptor_t *libusb_alt = &ifc->altsetting[j]; - libusb_interface_descriptor_t *alt = &my_ifc->altsetting[j]; - TEST_ASSERT_EQUAL( memcmp(libusb_alt, alt, LIBUSB_DT_INTERFACE_SIZE), 0); - TEST_ASSERT_EQUAL( libusb_alt->extra_length, alt->extra_length ); - TEST_ASSERT_EQUAL( memcmp(libusb_alt->extra, alt->extra, alt->extra_length), 0); - TEST_ASSERT_EQUAL( libusb_alt->bNumEndpoints, alt->bNumEndpoints ); - - for (int ep = 0; ep < libusb_alt->bNumEndpoints; ep++) { - printf(" endpoint %u\n", ep); - libusb_endpoint_descriptor_t *libusb_endpoint = &libusb_alt->endpoint[ep]; - libusb_endpoint_descriptor_t *endpoint = &alt->endpoint[ep]; - TEST_ASSERT_EQUAL( memcmp(libusb_endpoint, endpoint, LIBUSB_DT_ENDPOINT_SIZE), 0); - TEST_ASSERT_EQUAL( libusb_endpoint->extra_length, endpoint->extra_length ); - TEST_ASSERT_EQUAL( memcmp(libusb_endpoint->extra, endpoint->extra, endpoint->extra_length), 0); - } - } - } - - libusb_clear_config_descriptor(libusb_config); - clear_config_descriptor(config); } - -// Test compares config descriptor created by usb_host_uvc driver and originally used libusb function -TEST_CASE("Compare config descriptor parser", "[usb_uvc]") -{ - COMPARE_DESCRIPTORS(CANYON_CNE_CWC2); - COMPARE_DESCRIPTORS(Logitech_C980); - COMPARE_DESCRIPTORS(unknown_camera); -} - -#endif diff --git a/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/trust_webcam.hpp b/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/trust_webcam.hpp new file mode 100644 index 00000000..32544aaa --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/trust_webcam.hpp @@ -0,0 +1,996 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include +/* + ---------------------- Device Descriptor ---------------------- +bLength : 0x12 (18 bytes) +bDescriptorType : 0x01 (Device Descriptor) +bcdUSB : 0x200 (USB Version 2.00) +bDeviceClass : 0xEF (Miscellaneous) +bDeviceSubClass : 0x02 +bDeviceProtocol : 0x01 (IAD - Interface Association Descriptor) +bMaxPacketSize0 : 0x40 (64 bytes) +idVendor : 0x0C45 (Sonix Technology Co., Ltd.) +idProduct : 0x6340 +bcdDevice : 0x0000 +iManufacturer : 0x02 (String Descriptor 2) + Language 0x0409 : "Trust Webcam" +iProduct : 0x01 (String Descriptor 1) + Language 0x0409 : "Trust Webcam" +iSerialNumber : 0x03 (String Descriptor 3) + Language 0x0409 : "20200907" +bNumConfigurations : 0x01 (1 Configuration) +Data (HexDump) : 12 01 00 02 EF 02 01 40 45 0C 40 63 00 00 02 01 .......@E.@c.... + 03 01 .. + + ------------------ Configuration Descriptor ------------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x02 (Configuration Descriptor) +wTotalLength : 0x02BD (701 bytes) +bNumInterfaces : 0x04 (4 Interfaces) +bConfigurationValue : 0x01 (Configuration 1) +iConfiguration : 0x00 (No String Descriptor) +bmAttributes : 0x80 + D7: Reserved, set 1 : 0x01 + D6: Self Powered : 0x00 (no) + D5: Remote Wakeup : 0x00 (no) + D4..0: Reserved, set 0 : 0x00 +MaxPower : 0xFA (500 mA) +Data (HexDump) : 09 02 BD 02 04 01 00 80 FA 08 0B 00 02 0E 03 00 ................ + 05 09 04 00 00 01 0E 01 00 05 0D 24 01 00 01 4D ...........$...M + 00 C0 E1 E4 00 01 01 09 24 03 02 01 01 00 04 00 ........$....... + 1A 24 06 04 70 33 F0 28 11 63 2E 4A BA 2C 68 90 .$..p3.(.c.J.,h. + EB 33 40 16 08 01 03 01 0F 00 12 24 02 01 01 02 .3@........$.... + 00 00 00 00 00 00 00 00 03 04 00 00 0B 24 05 03 .............$.. + 01 00 00 02 3F 07 00 07 05 83 03 10 00 06 05 25 ....?..........% + 03 10 00 09 04 01 00 00 0E 02 00 05 0E 24 01 01 .............$.. + 61 01 81 00 02 02 01 01 01 00 1B 24 04 01 06 59 a..........$...Y + 55 59 32 00 00 10 00 80 00 00 AA 00 38 9B 71 10 UY2.........8.q. + 01 00 00 00 00 32 24 05 01 00 80 02 E0 01 00 00 .....2$......... + 77 01 00 00 CA 08 00 60 09 00 15 16 05 00 06 15 w......`........ + 16 05 00 80 1A 06 00 20 A1 07 00 2A 2C 0A 00 40 ....... ...*,..@ + 42 0F 00 80 84 1E 00 32 24 05 02 00 60 01 20 01 B......2$...`. . + 00 C0 7B 00 00 80 E6 02 00 18 03 00 15 16 05 00 ..{............. + 06 15 16 05 00 80 1A 06 00 20 A1 07 00 2A 2C 0A ......... ...*,. + 00 40 42 0F 00 80 84 1E 00 32 24 05 03 00 40 01 .@B......2$...@. + F0 00 00 C0 5D 00 00 80 32 02 00 58 02 00 15 16 ....]...2..X.... + 05 00 06 15 16 05 00 80 1A 06 00 20 A1 07 00 2A ........... ...* + 2C 0A 00 40 42 0F 00 80 84 1E 00 32 24 05 04 00 ,..@B......2$... + B0 00 90 00 00 F0 1E 00 00 A0 B9 00 00 C6 00 00 ................ + 15 16 05 00 06 15 16 05 00 80 1A 06 00 20 A1 07 ............. .. + 00 2A 2C 0A 00 40 42 0F 00 80 84 1E 00 1E 24 05 .*,..@B.......$. + 05 00 00 05 00 04 00 00 40 06 00 00 40 06 00 00 ........@...@... + 28 00 80 84 1E 00 01 80 84 1E 00 32 24 05 06 00 (..........2$... + A0 00 78 00 00 70 17 00 00 A0 8C 00 00 96 00 00 ..x..p.......... + 15 16 05 00 06 15 16 05 00 80 1A 06 00 20 A1 07 ............. .. + 00 2A 2C 0A 00 40 42 0F 00 80 84 1E 00 1A 24 03 .*,..@B.......$. + 00 05 80 02 E0 01 60 01 20 01 40 01 F0 00 B0 00 ......`. .@..... + 90 00 A0 00 78 00 00 06 24 0D 01 01 04 09 04 01 ....x...$....... + 01 01 0E 02 00 00 07 05 81 05 80 00 01 09 04 01 ................ + 02 01 0E 02 00 00 07 05 81 05 00 01 01 09 04 01 ................ + 03 01 0E 02 00 00 07 05 81 05 20 03 01 09 04 01 .......... ..... + 04 01 0E 02 00 00 07 05 81 05 20 0B 01 09 04 01 .......... ..... + 05 01 0E 02 00 00 07 05 81 05 20 13 01 09 04 01 .......... ..... + 06 01 0E 02 00 00 07 05 81 05 00 14 01 08 0B 02 ................ + 02 01 00 00 04 09 04 02 00 00 01 01 00 04 09 24 ...............$ + 01 00 01 29 00 01 03 0C 24 02 01 01 02 00 01 00 ...)....$....... + 00 00 00 0B 24 06 02 01 02 01 00 02 00 00 09 24 ....$..........$ + 03 03 01 01 00 02 00 09 04 03 00 00 01 02 00 00 ................ + 09 04 03 01 01 01 02 00 00 07 24 01 03 01 01 00 ..........$..... + 1D 24 02 01 01 02 10 07 40 1F 00 11 2B 00 80 3E .$......@...+..> + 00 22 56 00 C0 5D 00 44 AC 00 80 BB 00 09 05 84 ."V..].D........ + 05 90 01 04 00 00 07 25 01 01 00 00 00 .......%..... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x00 +bInterfaceCount : 0x02 +bFunctionClass : 0x0E (Video) +bFunctionSubClass : 0x03 (Video Interface Collection) +bFunctionProtocol : 0x00 (PC_PROTOCOL_UNDEFINED protocol) +iFunction : 0x05 (String Descriptor 5) + Language 0x0409 : "Trust Webcam" +Data (HexDump) : 08 0B 00 02 0E 03 00 05 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x00 +bAlternateSetting : 0x00 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x01 (Video Control) +bInterfaceProtocol : 0x00 +iInterface : 0x05 (String Descriptor 5) + Language 0x0409 : "Trust Webcam" +Data (HexDump) : 09 04 00 00 01 0E 01 00 05 ......... + + ------- Video Control Interface Header Descriptor ----- +bLength : 0x0D (13 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x01 (Video Control Header) +bcdUVC : 0x0100 (UVC Version 1.00) +wTotalLength : 0x004D (77 bytes) +dwClockFreq : 0x00E4E1C0 (15 MHz) +bInCollection : 0x01 (1 VideoStreaming interface) +baInterfaceNr[1] : 0x01 +Data (HexDump) : 0D 24 01 00 01 4D 00 C0 E1 E4 00 01 01 .$...M....... + + ------- Video Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x02 +wTerminalType : 0x0101 (TT_STREAMING) +bAssocTerminal : 0x00 (Not associated with an Input Terminal) +bSourceID : 0x04 +iTerminal : 0x00 +Data (HexDump) : 09 24 03 02 01 01 00 04 00 .$....... + + --------- Video Control Extension Unit Descriptor ----- +bLength : 0x1A (26 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x06 (Extension Unit) +bUnitID : 0x04 +guidExtensionCode : {28F03370-6311-4A2E-BA2C-6890EB334016} +bNumControls : 0x08 +bNrInPins : 0x01 (1 pins) +baSourceID[1] : 0x03 +bControlSize : 0x01 +bmControls : 0x0F + D0 : 1 yes - Vendor-Specific (Optional) + D1 : 1 yes - Vendor-Specific (Optional) + D2 : 1 yes - Vendor-Specific (Optional) + D3 : 1 yes - Vendor-Specific (Optional) + D4 : 0 no - Vendor-Specific (Optional) + D5 : 0 no - Vendor-Specific (Optional) + D6 : 0 no - Vendor-Specific (Optional) + D7 : 0 no - Vendor-Specific (Optional) +iExtension : 0x00 +Data (HexDump) : 1A 24 06 04 70 33 F0 28 11 63 2E 4A BA 2C 68 90 .$..p3.(.c.J.,h. + EB 33 40 16 08 01 03 01 0F 00 .3@....... + + -------- Video Control Input Terminal Descriptor ------ +bLength : 0x12 (18 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (ITT_CAMERA) +bAssocTerminal : 0x00 (Not associated with an Output Terminal) +iTerminal : 0x00 +Camera Input Terminal Data: +wObjectiveFocalLengthMin : 0x0000 +wObjectiveFocalLengthMax : 0x0000 +wOcularFocalLength : 0x0000 +bControlSize : 0x03 +bmControls : 0x04, 0x00, 0x00 + D0 : 0 no - Scanning Mode + D1 : 0 no - Auto-Exposure Mode + D2 : 1 yes - Auto-Exposure Priority + D3 : 0 no - Exposure Time (Absolute) + D4 : 0 no - Exposure Time (Relative) + D5 : 0 no - Focus (Absolute) + D6 : 0 no - Focus (Relative) + D7 : 0 no - Iris (Absolute) + D8 : 0 no - Iris (Relative) + D9 : 0 no - Zoom (Absolute) + D10 : 0 no - Zoom (Relative) + D11 : 0 no - Pan (Absolute) + D12 : 0 no - Pan (Relative) + D13 : 0 no - Roll (Absolute) + D14 : 0 no - Roll (Relative) + D15 : 0 no - Tilt (Absolute) + D16 : 0 no - Tilt (Relative) + D17 : 0 no - Focus Auto + D18 : 0 no - Reserved + D19 : 0 no - Reserved + D20 : 0 no - Reserved + D21 : 0 no - Reserved + D22 : 0 no - Reserved + D23 : 0 no - Reserved +Data (HexDump) : 12 24 02 01 01 02 00 00 00 00 00 00 00 00 03 04 .$.............. + 00 00 .. + + -------- Video Control Processing Unit Descriptor ----- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x05 (Processing Unit) +bUnitID : 0x03 +bSourceID : 0x01 +wMaxMultiplier : 0x0000 +bControlSize : 0x02 +bmControls : 0x3F, 0x07 + D0 : 1 yes - Brightness + D1 : 1 yes - Contrast + D2 : 1 yes - Hue + D3 : 1 yes - Saturation + D4 : 1 yes - Sharpness + D5 : 1 yes - Gamma + D6 : 0 no - White Balance Temperature + D7 : 0 no - White Balance Component + D8 : 1 yes - Backlight Compensation + D9 : 1 yes - Gain + D10 : 1 yes - Power Line Frequency + D11 : 0 no - Hue, Auto + D12 : 0 no - White Balance Temperature, Auto + D13 : 0 no - White Balance Component, Auto + D14 : 0 no - Digital Multiplier + D15 : 0 no - Digital Multiplier Limit +iProcessing : 0x00 +Data (HexDump) : 0B 24 05 03 01 00 00 02 3F 07 00 .$......?.. + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x83 (Direction=IN EndpointID=3) +bmAttributes : 0x03 (TransferType=Interrupt) +wMaxPacketSize : 0x0010 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x10 (16 bytes per packet) +bInterval : 0x06 (6 ms) +Data (HexDump) : 07 05 83 03 10 00 06 ....... + + --- Class-specific VC Interrupt Endpoint Descriptor --- +bLength : 0x05 (5 bytes) +bDescriptorType : 0x25 (Video Control Endpoint) +bDescriptorSubtype : 0x03 (Interrupt) +wMaxTransferSize : 0x0010 (16 bytes) +Data (HexDump) : 05 25 03 10 00 .%... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x05 (String Descriptor 5) + Language 0x0409 : "Trust Webcam" +Data (HexDump) : 09 04 01 00 00 0E 02 00 05 ......... + + ---- VC-Specific VS Video Input Header Descriptor ----- +bLength : 0x0E (14 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x01 (Input Header) +bNumFormats : 0x01 +wTotalLength : 0x0161 (353 bytes) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmInfo : 0x00 (Dynamic Format Change not supported) +bTerminalLink : 0x02 +bStillCaptureMethod : 0x02 (Still Capture Method 2) +nbTriggerSupport : 0x01 (Hardware Triggering is supported) +bTriggerUsage : 0x01 (Host will notify client application of button event) +nbControlSize : 0x01 +Video Payload Format 1 : 0x00 + D0 : 0 no - Key Frame Rate + D1 : 0 no - P Frame Rate + D2 : 0 no - Compression Quality + D3 : 0 no - Compression Window Size + D4 : 0 no - Generate Key Frame + D5 : 0 no - Update Frame Segment + D6 : 0 no - Reserved + D7 : 0 no - Reserved +Data (HexDump) : 0E 24 01 01 61 01 81 00 02 02 01 01 01 00 .$..a......... + + ------- VS Uncompressed Format Type Descriptor -------- +bLength : 0x1B (27 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x04 (Uncompressed Format Type) +bFormatIndex : 0x01 (1) +bNumFrameDescriptors : 0x06 (6) +guidFormat : {32595559-0000-0010-8000-00AA00389B71} (YUY2) +bBitsPerPixel : 0x10 (16 bits) +bDefaultFrameIndex : 0x01 (1) +bAspectRatioX : 0x00 +bAspectRatioY : 0x00 +bmInterlaceFlags : 0x00 + D0 IL stream or variable: 0 (no) + D1 Fields per frame : 0 (2 fields) + D2 Field 1 first : 0 (no) + D3 Reserved : 0 + D4..5 Field pattern : 0 (Field 1 only) + D6..7 Display Mode : 0 (Bob only) +bCopyProtect : 0x00 (No restrictions) +Data (HexDump) : 1B 24 04 01 06 59 55 59 32 00 00 10 00 80 00 00 .$...YUY2....... + AA 00 38 9B 71 10 01 00 00 00 00 ..8.q...... + + -------- VS Uncompressed Frame Type Descriptor -------- +---> This is the Default (optimum) Frame index +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x01 +bmCapabilities : 0x00 +wWidth : 0x0280 (640) +wHeight : 0x01E0 (480) +dwMinBitRate : 0x01770000 (24576000 bps -> 3.72 MB/s) +dwMaxBitRate : 0x08CA0000 (147456000 bps -> 18.432 MB/s) +dwMaxVideoFrameBufferSize: 0x00096000 (614400 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 05 01 00 80 02 E0 01 00 00 77 01 00 00 CA 2$.........w.... + 08 00 60 09 00 15 16 05 00 06 15 16 05 00 80 1A ..`............. + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x02 +bmCapabilities : 0x00 +wWidth : 0x0160 (352) +wHeight : 0x0120 (288) +dwMinBitRate : 0x007BC000 (8110080 bps -> 1.13 MB/s) +dwMaxBitRate : 0x02E68000 (48660480 bps -> 6.82 MB/s) +dwMaxVideoFrameBufferSize: 0x00031800 (202752 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 05 02 00 60 01 20 01 00 C0 7B 00 00 80 E6 2$...`. ...{.... + 02 00 18 03 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x03 +bmCapabilities : 0x00 +wWidth : 0x0140 (320) +wHeight : 0x00F0 (240) +dwMinBitRate : 0x005DC000 (6144000 bps -> 768 KB/s) +dwMaxBitRate : 0x02328000 (36864000 bps -> 4.608 MB/s) +dwMaxVideoFrameBufferSize: 0x00025800 (153600 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 05 03 00 40 01 F0 00 00 C0 5D 00 00 80 32 2$...@.....]...2 + 02 00 58 02 00 15 16 05 00 06 15 16 05 00 80 1A ..X............. + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x04 +bmCapabilities : 0x00 +wWidth : 0x00B0 (176) +wHeight : 0x0090 (144) +dwMinBitRate : 0x001EF000 (2027520 bps -> 253.375 KB/s) +dwMaxBitRate : 0x00B9A000 (12165120 bps -> 1.520 MB/s) +dwMaxVideoFrameBufferSize: 0x0000C600 (50688 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 05 04 00 B0 00 90 00 00 F0 1E 00 00 A0 B9 2$.............. + 00 00 C6 00 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x1E (30 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x05 +bmCapabilities : 0x00 +wWidth : 0x0500 (1280) +wHeight : 0x0400 (1024) +dwMinBitRate : 0x06400000 (104857600 bps -> 13.107 MB/s) +dwMaxBitRate : 0x06400000 (104857600 bps -> 13.107 MB/s) +dwMaxVideoFrameBufferSize: 0x00280000 (2621440 bytes) +dwDefaultFrameInterval : 0x001E8480 (200.0000 ms -> 5.000 fps) +bFrameIntervalType : 0x01 (1 discrete frame interval supported) +adwFrameInterval[1] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 1E 24 05 05 00 00 05 00 04 00 00 40 06 00 00 40 .$.........@...@ + 06 00 00 28 00 80 84 1E 00 01 80 84 1E 00 ...(.......... + + -------- VS Uncompressed Frame Type Descriptor -------- +bLength : 0x32 (50 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x05 (Uncompressed Frame Type) +bFrameIndex : 0x06 +bmCapabilities : 0x00 +wWidth : 0x00A0 (160) +wHeight : 0x0078 (120) +dwMinBitRate : 0x00177000 (1536000 bps -> 192 KB/s) +dwMaxBitRate : 0x008CA000 (9216000 bps -> 1.152 MB/s) +dwMaxVideoFrameBufferSize: 0x00009600 (38400 bytes) +dwDefaultFrameInterval : 0x00051615 (33.3333 ms -> 30.000 fps) +bFrameIntervalType : 0x06 (6 discrete frame intervals supported) +adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.000 fps) +adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.000 fps) +adwFrameInterval[3] : 0x0007A120 (50.0000 ms -> 20.000 fps) +adwFrameInterval[4] : 0x000A2C2A (66.6666 ms -> 15.000 fps) +adwFrameInterval[5] : 0x000F4240 (100.0000 ms -> 10.000 fps) +adwFrameInterval[6] : 0x001E8480 (200.0000 ms -> 5.000 fps) +Data (HexDump) : 32 24 05 06 00 A0 00 78 00 00 70 17 00 00 A0 8C 2$.....x..p..... + 00 00 96 00 00 15 16 05 00 06 15 16 05 00 80 1A ................ + 06 00 20 A1 07 00 2A 2C 0A 00 40 42 0F 00 80 84 .. ...*,..@B.... + 1E 00 .. + + ---------- Still Image Frame Type Descriptor ---------- +bLength : 0x1A (26 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x03 (Still Image Frame Type) +bEndpointAddress : 0x00 (no endpoint) +bNumImageSizePatterns : 0x05 (5 Image Size Patterns) +1: wWidth x wHeight : 0x0280 x 0x01E0 (640 x 480) +2: wWidth x wHeight : 0x0160 x 0x0120 (352 x 288) +3: wWidth x wHeight : 0x0140 x 0x00F0 (320 x 240) +4: wWidth x wHeight : 0x00B0 x 0x0090 (176 x 144) +5: wWidth x wHeight : 0x00A0 x 0x0078 (160 x 120) +bNumCompressionPattern : 0x00 +Data (HexDump) : 1A 24 03 00 05 80 02 E0 01 60 01 20 01 40 01 F0 .$.......`. .@.. + 00 B0 00 90 00 A0 00 78 00 00 .......x.. + + ------- VS Color Matching Descriptor Descriptor ------- +bLength : 0x06 (6 bytes) +bDescriptorType : 0x24 (Video Streaming Interface) +bDescriptorSubtype : 0x0D (Color Matching) +bColorPrimaries : 0x01 (BT.709, sRGB) +bTransferCharacteristics : 0x01 (BT.709) +bMatrixCoefficients : 0x04 (SMPTE 170M) +Data (HexDump) : 06 24 0D 01 01 04 .$.... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 01 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0080 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x80 (128 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 80 00 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x02 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 02 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0100 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x100 (256 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 00 01 01 ....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x03 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 03 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0320 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x320 (800 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 20 03 01 .... .. + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x04 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 04 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0B20 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x01 (1 additional transactions per microframe -> allows 513..1024 byte per packet) + Bits 10..0 : 0x320 (800 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 20 0B 01 .... .. + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x05 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 05 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x1320 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x02 (2 additional transactions per microframe -> allows 683..1024 bytes per packet) + Bits 10..0 : 0x320 (800 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 20 13 01 .... .. + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x01 +bAlternateSetting : 0x06 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x02 (Video Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 01 06 01 0E 02 00 00 ......... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x81 (Direction=IN EndpointID=1) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x1400 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x02 (2 additional transactions per microframe -> allows 683..1024 bytes per packet) + Bits 10..0 : 0x400 (1024 bytes per packet) +bInterval : 0x01 (1 ms) +Data (HexDump) : 07 05 81 05 00 14 01 ....... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x02 +bInterfaceCount : 0x02 +bFunctionClass : 0x01 (Audio) +bFunctionSubClass : 0x00 (undefined) +bFunctionProtocol : 0x00 +iFunction : 0x04 (String Descriptor 4) + Language 0x0409 : "Trust Webcam" +Data (HexDump) : 08 0B 02 02 01 00 00 04 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x02 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x01 (Audio Control) +bInterfaceProtocol : 0x00 +iInterface : 0x04 (String Descriptor 4) + Language 0x0409 : "Trust Webcam" +Data (HexDump) : 09 04 02 00 00 01 01 00 04 ......... + + ------ Audio Control Interface Header Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 (Header) +bcdADC : 0x0100 +wTotalLength : 0x0029 (41 bytes) +bInCollection : 0x01 +baInterfaceNr[1] : 0x03 +Data (HexDump) : 09 24 01 00 01 29 00 01 03 .$...)... + + ------- Audio Control Input Terminal Descriptor ------- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (Microphone) +bAssocTerminal : 0x00 +bNrChannels : 0x01 (1 channel) +wChannelConfig : 0x0000 (-) +iChannelNames : 0x00 (No String Descriptor) +iTerminal : 0x00 (No String Descriptor) +Data (HexDump) : 0C 24 02 01 01 02 00 01 00 00 00 00 .$.......... + + -------- Audio Control Feature Unit Descriptor -------- +bLength : 0x0B (11 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x06 (Feature Unit) +bUnitID : 0x02 (2) +bSourceID : 0x01 (1) +bControlSize : 0x02 (2 bytes per control) +bmaControls[0] : 0x01, 0x00 + D0: Mute : 1 + D1: Volume : 0 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 + D8: Bass Boost : 0 + D9: Loudness : 0 + D10: Reserved : 0 + D11: Reserved : 0 + D12: Reserved : 0 + D13: Reserved : 0 + D14: Reserved : 0 + D15: Reserved : 0 +bmaControls[1] : 0x02, 0x00 + D0: Mute : 0 + D1: Volume : 1 + D2: Bass : 0 + D3: Mid : 0 + D4: Treble : 0 + D5: Graphic Equalizer : 0 + D6: Automatic Gain : 0 + D7: Delay : 0 + D8: Bass Boost : 0 + D9: Loudness : 0 + D10: Reserved : 0 + D11: Reserved : 0 + D12: Reserved : 0 + D13: Reserved : 0 + D14: Reserved : 0 + D15: Reserved : 0 +iFeature : 0x00 (No String Descriptor) +Data (HexDump) : 0B 24 06 02 01 02 01 00 02 00 00 .$......... + + ------- Audio Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x03 +wTerminalType : 0x0101 (USB streaming) +bAssocTerminal : 0x00 (0) +bSourceID : 0x02 (2) +iTerminal : 0x00 (No String Descriptor) +Data (HexDump) : 09 24 03 03 01 01 00 02 00 .$....... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 00 00 01 02 00 00 ......... + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x03 +bAlternateSetting : 0x01 +bNumEndpoints : 0x01 (1 Endpoint) +bInterfaceClass : 0x01 (Audio) +bInterfaceSubClass : 0x02 (Audio Streaming) +bInterfaceProtocol : 0x00 +iInterface : 0x00 (No String Descriptor) +Data (HexDump) : 09 04 03 01 01 01 02 00 00 ......... + + -------- Audio Streaming Interface Descriptor --------- +bLength : 0x07 (7 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x01 +bTerminalLink : 0x03 +bDelay : 0x01 +wFormatTag : 0x0001 (PCM) +Data (HexDump) : 07 24 01 03 01 01 00 .$..... + + ------- Audio Streaming Format Type Descriptor -------- +bLength : 0x1D (29 bytes) +bDescriptorType : 0x24 (Audio Interface Descriptor) +bDescriptorSubtype : 0x02 (Format Type) +bFormatType : 0x01 (FORMAT_TYPE_I) +bNrChannels : 0x01 (1 channel) +bSubframeSize : 0x02 (2 bytes per subframe) +bBitResolution : 0x10 (16 bits per sample) +bSamFreqType : 0x07 (supports 7 sample frequencies) +tSamFreq[1] : 0x01F40 (8000 Hz) +tSamFreq[2] : 0x02B11 (11025 Hz) +tSamFreq[3] : 0x03E80 (16000 Hz) +tSamFreq[4] : 0x05622 (22050 Hz) +tSamFreq[5] : 0x05DC0 (24000 Hz) +tSamFreq[6] : 0x0AC44 (44100 Hz) +tSamFreq[7] : 0x0BB80 (48000 Hz) +Data (HexDump) : 1D 24 02 01 01 02 10 07 40 1F 00 11 2B 00 80 3E .$......@...+..> + 00 22 56 00 C0 5D 00 44 AC 00 80 BB 00 ."V..].D..... + + ----------------- Endpoint Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x05 (Endpoint Descriptor) +bEndpointAddress : 0x84 (Direction=IN EndpointID=4) +bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data) +wMaxPacketSize : 0x0190 + Bits 15..13 : 0x00 (reserved, must be zero) + Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) + Bits 10..0 : 0x190 (400 bytes per packet) +bInterval : 0x04 (4 ms) +bRefresh : 0x00 +bSynchAddress : 0x00 +Data (HexDump) : 09 05 84 05 90 01 04 00 00 ......... + + ----------- Audio Data Endpoint Descriptor ------------ +bLength : 0x07 (7 bytes) +bDescriptorType : 0x25 (Audio Endpoint Descriptor) +bDescriptorSubtype : 0x01 (General) +bmAttributes : 0x01 + D0 : Sampling Freq : 0x01 (supported) + D1 : Pitch : 0x00 (not supported) + D6..2: Reserved : 0x00 + D7 : MaxPacketsOnly : 0x00 (no) +bLockDelayUnits : 0x00 (Undefined) +wLockDelay : 0x0000 +Data (HexDump) : 07 25 01 01 00 00 00 .%..... + + ----------------- Device Qualifier Descriptor ----------------- +bLength : 0x0A (10 bytes) +bDescriptorType : 0x06 (Device_qualifier Descriptor) +bcdUSB : 0x200 (USB Version 2.00) +bDeviceClass : 0xEF (Miscellaneous) +bDeviceSubClass : 0x02 +bDeviceProtocol : 0x01 (IAD - Interface Association Descriptor) +bMaxPacketSize0 : 0x40 (64 Bytes) +bNumConfigurations : 0x01 (1 other-speed configuration) +bReserved : 0x00 +Data (HexDump) : 0A 06 00 02 EF 02 01 40 01 00 .......@.. + + ------------ Other Speed Configuration Descriptor ------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x07 (Other_speed_configuration Descriptor) +wTotalLength : 0x0040 (64 bytes) +bNumInterfaces : 0x01 (1 Interface) +bConfigurationValue : 0x01 (Configuration 1) +iConfiguration : 0x00 (No String Descriptor) +bmAttributes : 0x80 + D7: Reserved, set 1 : 0x01 + D6: Self Powered : 0x00 (no) + D5: Remote Wakeup : 0x00 (no) + D4..0: Reserved, set 0 : 0x00 +MaxPower : 0xFA (500 mA) +Data (HexDump) : 09 07 40 00 01 01 00 80 FA 08 0B 00 01 0E 03 00 ..@............. + 01 09 04 00 00 00 0E 01 00 01 0C 24 01 00 01 26 ...........$...& + 00 80 8D 5B 00 00 09 24 03 02 01 01 00 03 00 11 ...[...$........ + 24 02 01 01 02 00 00 00 00 00 00 00 00 02 00 00 $............... + + ------------------- IAD Descriptor -------------------- +bLength : 0x08 (8 bytes) +bDescriptorType : 0x0B +bFirstInterface : 0x00 +bInterfaceCount : 0x01 +*!*ERROR bInterfaceCount must be greater than 1 +bFunctionClass : 0x0E (Video) +bFunctionSubClass : 0x03 (Video Interface Collection) +bFunctionProtocol : 0x00 (PC_PROTOCOL_UNDEFINED protocol) +iFunction : 0x01 (String Descriptor 1) + Language 0x0409 : "Trust Webcam" +Data (HexDump) : 08 0B 00 01 0E 03 00 01 ........ + + ---------------- Interface Descriptor ----------------- +bLength : 0x09 (9 bytes) +bDescriptorType : 0x04 (Interface Descriptor) +bInterfaceNumber : 0x00 +bAlternateSetting : 0x00 +bNumEndpoints : 0x00 (Default Control Pipe only) +bInterfaceClass : 0x0E (Video) +bInterfaceSubClass : 0x01 (Video Control) +bInterfaceProtocol : 0x00 +iInterface : 0x01 (String Descriptor 1) + Language 0x0409 : "Trust Webcam" +Data (HexDump) : 09 04 00 00 00 0E 01 00 01 ......... + + ------- Video Control Interface Header Descriptor ----- +bLength : 0x0C (12 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x01 (Video Control Header) +bcdUVC : 0x0100 (UVC Version 1.00) +wTotalLength : 0x0026 (38 bytes) +dwClockFreq : 0x005B8D80 (6 MHz) +bInCollection : 0x00 (0 VideoStreaming interface) +Data (HexDump) : 0C 24 01 00 01 26 00 80 8D 5B 00 00 .$...&...[.. + + ------- Video Control Output Terminal Descriptor ------ +bLength : 0x09 (9 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x03 (Output Terminal) +bTerminalID : 0x02 +wTerminalType : 0x0101 (TT_STREAMING) +bAssocTerminal : 0x00 (Not associated with an Input Terminal) +bSourceID : 0x03 +iTerminal : 0x00 +Data (HexDump) : 09 24 03 02 01 01 00 03 00 .$....... + + -------- Video Control Input Terminal Descriptor ------ +bLength : 0x11 (17 bytes) +bDescriptorType : 0x24 (Video Control Interface) +bDescriptorSubtype : 0x02 (Input Terminal) +bTerminalID : 0x01 +wTerminalType : 0x0201 (ITT_CAMERA) +bAssocTerminal : 0x00 (Not associated with an Output Terminal) +iTerminal : 0x00 +Camera Input Terminal Data: +wObjectiveFocalLengthMin : 0x0000 +wObjectiveFocalLengthMax : 0x0000 +wOcularFocalLength : 0x0000 +bControlSize : 0x02 +bmControls : 0x00, 0x00 + D0 : 0 no - Scanning Mode + D1 : 0 no - Auto-Exposure Mode + D2 : 0 no - Auto-Exposure Priority + D3 : 0 no - Exposure Time (Absolute) + D4 : 0 no - Exposure Time (Relative) + D5 : 0 no - Focus (Absolute) + D6 : 0 no - Focus (Relative) + D7 : 0 no - Iris (Absolute) + D8 : 0 no - Iris (Relative) + D9 : 0 no - Zoom (Absolute) + D10 : 0 no - Zoom (Relative) + D11 : 0 no - Pan (Absolute) + D12 : 0 no - Pan (Relative) + D13 : 0 no - Roll (Absolute) + D14 : 0 no - Roll (Relative) + D15 : 0 no - Tilt (Absolute) +Data (HexDump) : 11 24 02 01 01 02 00 00 00 00 00 00 00 00 02 00 .$.............. + 00 . + + -------------------- String Descriptors ------------------- + ------ String Descriptor 0 ------ +bLength : 0x04 (4 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language ID[0] : 0x0409 (English - United States) +Data (HexDump) : 04 03 09 04 .... + ------ String Descriptor 1 ------ +bLength : 0x1A (26 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Trust Webcam" +Data (HexDump) : 1A 03 54 00 72 00 75 00 73 00 74 00 20 00 57 00 ..T.r.u.s.t. .W. + 65 00 62 00 63 00 61 00 6D 00 e.b.c.a.m. + ------ String Descriptor 2 ------ +bLength : 0x1A (26 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Trust Webcam" +Data (HexDump) : 1A 03 54 00 72 00 75 00 73 00 74 00 20 00 57 00 ..T.r.u.s.t. .W. + 65 00 62 00 63 00 61 00 6D 00 e.b.c.a.m. + ------ String Descriptor 3 ------ +bLength : 0x12 (18 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "20200907" +Data (HexDump) : 12 03 32 00 30 00 32 00 30 00 30 00 39 00 30 00 ..2.0.2.0.0.9.0. + 37 00 7. + ------ String Descriptor 4 ------ +bLength : 0x1A (26 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Trust Webcam" +Data (HexDump) : 1A 03 54 00 72 00 75 00 73 00 74 00 20 00 57 00 ..T.r.u.s.t. .W. + 65 00 62 00 63 00 61 00 6D 00 e.b.c.a.m. + ------ String Descriptor 5 ------ +bLength : 0x1A (26 bytes) +bDescriptorType : 0x03 (String Descriptor) +Language 0x0409 : "Trust Webcam" +Data (HexDump) : 1A 03 54 00 72 00 75 00 73 00 74 00 20 00 57 00 ..T.r.u.s.t. .W. + 65 00 62 00 63 00 61 00 6D 00 e.b.c.a.m. +*/ + +namespace trust_webcam { +const uint8_t dev_desc[] = { + 0x12, 0x01, 0x00, 0x02, 0xEF, 0x02, 0x01, 0x40, 0x45, 0x0C, 0x40, 0x63, 0x00, 0x00, 0x02, 0x01, + 0x03, 0x01 +}; + +const uint8_t cfg_desc[] = { + 0x09, 0x02, 0xBD, 0x02, 0x04, 0x01, 0x00, 0x80, 0xFA, 0x08, 0x0B, 0x00, 0x02, 0x0E, 0x03, 0x00, + 0x05, 0x09, 0x04, 0x00, 0x00, 0x01, 0x0E, 0x01, 0x00, 0x05, 0x0D, 0x24, 0x01, 0x00, 0x01, 0x4D, + 0x00, 0xC0, 0xE1, 0xE4, 0x00, 0x01, 0x01, 0x09, 0x24, 0x03, 0x02, 0x01, 0x01, 0x00, 0x04, 0x00, + 0x1A, 0x24, 0x06, 0x04, 0x70, 0x33, 0xF0, 0x28, 0x11, 0x63, 0x2E, 0x4A, 0xBA, 0x2C, 0x68, 0x90, + 0xEB, 0x33, 0x40, 0x16, 0x08, 0x01, 0x03, 0x01, 0x0F, 0x00, 0x12, 0x24, 0x02, 0x01, 0x01, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x0B, 0x24, 0x05, 0x03, + 0x01, 0x00, 0x00, 0x02, 0x3F, 0x07, 0x00, 0x07, 0x05, 0x83, 0x03, 0x10, 0x00, 0x06, 0x05, 0x25, + 0x03, 0x10, 0x00, 0x09, 0x04, 0x01, 0x00, 0x00, 0x0E, 0x02, 0x00, 0x05, 0x0E, 0x24, 0x01, 0x01, + 0x61, 0x01, 0x81, 0x00, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x1B, 0x24, 0x04, 0x01, 0x06, 0x59, + 0x55, 0x59, 0x32, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71, 0x10, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x32, 0x24, 0x05, 0x01, 0x00, 0x80, 0x02, 0xE0, 0x01, 0x00, 0x00, + 0x77, 0x01, 0x00, 0x00, 0xCA, 0x08, 0x00, 0x60, 0x09, 0x00, 0x15, 0x16, 0x05, 0x00, 0x06, 0x15, + 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, + 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x32, 0x24, 0x05, 0x02, 0x00, 0x60, 0x01, 0x20, 0x01, + 0x00, 0xC0, 0x7B, 0x00, 0x00, 0x80, 0xE6, 0x02, 0x00, 0x18, 0x03, 0x00, 0x15, 0x16, 0x05, 0x00, + 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, 0x2C, 0x0A, + 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x32, 0x24, 0x05, 0x03, 0x00, 0x40, 0x01, + 0xF0, 0x00, 0x00, 0xC0, 0x5D, 0x00, 0x00, 0x80, 0x32, 0x02, 0x00, 0x58, 0x02, 0x00, 0x15, 0x16, + 0x05, 0x00, 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, 0x00, 0x2A, + 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x32, 0x24, 0x05, 0x04, 0x00, + 0xB0, 0x00, 0x90, 0x00, 0x00, 0xF0, 0x1E, 0x00, 0x00, 0xA0, 0xB9, 0x00, 0x00, 0xC6, 0x00, 0x00, + 0x15, 0x16, 0x05, 0x00, 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, + 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x1E, 0x24, 0x05, + 0x05, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, + 0x28, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x01, 0x80, 0x84, 0x1E, 0x00, 0x32, 0x24, 0x05, 0x06, 0x00, + 0xA0, 0x00, 0x78, 0x00, 0x00, 0x70, 0x17, 0x00, 0x00, 0xA0, 0x8C, 0x00, 0x00, 0x96, 0x00, 0x00, + 0x15, 0x16, 0x05, 0x00, 0x06, 0x15, 0x16, 0x05, 0x00, 0x80, 0x1A, 0x06, 0x00, 0x20, 0xA1, 0x07, + 0x00, 0x2A, 0x2C, 0x0A, 0x00, 0x40, 0x42, 0x0F, 0x00, 0x80, 0x84, 0x1E, 0x00, 0x1A, 0x24, 0x03, + 0x00, 0x05, 0x80, 0x02, 0xE0, 0x01, 0x60, 0x01, 0x20, 0x01, 0x40, 0x01, 0xF0, 0x00, 0xB0, 0x00, + 0x90, 0x00, 0xA0, 0x00, 0x78, 0x00, 0x00, 0x06, 0x24, 0x0D, 0x01, 0x01, 0x04, 0x09, 0x04, 0x01, + 0x01, 0x01, 0x0E, 0x02, 0x00, 0x00, 0x07, 0x05, 0x81, 0x05, 0x80, 0x00, 0x01, 0x09, 0x04, 0x01, + 0x02, 0x01, 0x0E, 0x02, 0x00, 0x00, 0x07, 0x05, 0x81, 0x05, 0x00, 0x01, 0x01, 0x09, 0x04, 0x01, + 0x03, 0x01, 0x0E, 0x02, 0x00, 0x00, 0x07, 0x05, 0x81, 0x05, 0x20, 0x03, 0x01, 0x09, 0x04, 0x01, + 0x04, 0x01, 0x0E, 0x02, 0x00, 0x00, 0x07, 0x05, 0x81, 0x05, 0x20, 0x0B, 0x01, 0x09, 0x04, 0x01, + 0x05, 0x01, 0x0E, 0x02, 0x00, 0x00, 0x07, 0x05, 0x81, 0x05, 0x20, 0x13, 0x01, 0x09, 0x04, 0x01, + 0x06, 0x01, 0x0E, 0x02, 0x00, 0x00, 0x07, 0x05, 0x81, 0x05, 0x00, 0x14, 0x01, 0x08, 0x0B, 0x02, + 0x02, 0x01, 0x00, 0x00, 0x04, 0x09, 0x04, 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x04, 0x09, 0x24, + 0x01, 0x00, 0x01, 0x29, 0x00, 0x01, 0x03, 0x0C, 0x24, 0x02, 0x01, 0x01, 0x02, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x0B, 0x24, 0x06, 0x02, 0x01, 0x02, 0x01, 0x00, 0x02, 0x00, 0x00, 0x09, 0x24, + 0x03, 0x03, 0x01, 0x01, 0x00, 0x02, 0x00, 0x09, 0x04, 0x03, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, + 0x09, 0x04, 0x03, 0x01, 0x01, 0x01, 0x02, 0x00, 0x00, 0x07, 0x24, 0x01, 0x03, 0x01, 0x01, 0x00, + 0x1D, 0x24, 0x02, 0x01, 0x01, 0x02, 0x10, 0x07, 0x40, 0x1F, 0x00, 0x11, 0x2B, 0x00, 0x80, 0x3E, + 0x00, 0x22, 0x56, 0x00, 0xC0, 0x5D, 0x00, 0x44, 0xAC, 0x00, 0x80, 0xBB, 0x00, 0x09, 0x05, 0x84, + 0x05, 0x90, 0x01, 0x04, 0x00, 0x00, 0x07, 0x25, 0x01, 0x01, 0x00, 0x00, 0x00 +}; + +} diff --git a/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/usb_device_tree_view_to_c_array.py b/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/usb_device_tree_view_to_c_array.py new file mode 100644 index 00000000..b0d73aa8 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/parsing/descriptors/usb_device_tree_view_to_c_array.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python3 +# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD +# SPDX-License-Identifier: Apache-2.0 +import re + +def hex_to_c_array(hex_string): + """ + Converts a hex string (with potential ASCII characters on the right side) into a formatted C-style uint8_t array. + + This function was used for generating C descriptor arrays from USB Device Tree Viewer + + This function: + 1. Removes the ASCII characters from the input, preserving only the hex values. + 2. Cleans up spaces and newlines from the hex values. + 3. Formats the hex values into a C-style uint8_t array with a new line after every 16 bytes. + + Args: + hex_string (str): The raw hex string input that may contain ASCII characters on the right side. + + Returns: + str: A formatted C-style uint8_t array string. + """ + # Step 1: Remove ASCII characters + # Use regex to capture only the hex part (ignore the part with ASCII characters) + # cleaned_hex = re.sub(r" {2,}.*", "", hex_string) # Matches double spaces and removes anything after + cleaned_hex = re.sub(r"(\S{2}(?:\s\S{2})*)\s{2,}.*", r"\1", hex_string) + + # Step 2: Remove any remaining extra spaces or newlines + cleaned_hex = cleaned_hex.replace(" ", "").replace("\n", "") + + # Step 3: Split the cleaned hex string into pairs of characters (hex bytes) + hex_bytes = [cleaned_hex[i:i+2] for i in range(0, len(cleaned_hex), 2)] + + # Step 4: Convert the hex bytes into a C-style uint8_t array with 16 bytes per line + c_array = "uint8_t data[] = {\n " + for i in range(0, len(hex_bytes), 16): + line = ", ".join(f"0x{byte}" for byte in hex_bytes[i:i+16]) + c_array += line + if i + 16 < len(hex_bytes): + c_array += ",\n " # Add a newline and indentation if more bytes follow + else: + c_array += "\n" + c_array += "};" + + return c_array + +def main(): + """ + The main function where the script execution begins. + + It defines a sample hex string (with ASCII characters on the right side) and converts it + to a formatted C-style uint8_t array using the hex_to_c_array function. + """ + # Example input - you can replace this with any hex dump + hex_string = """ + 12 01 00 02 EF 02 01 40 E4 32 15 94 19 04 01 02 .......@.2...... + 03 01 .. + """ + + # Convert the hex string to a C array + c_array_output = hex_to_c_array(hex_string) + + # Print the result + print(c_array_output) + +if __name__ == "__main__": + main() diff --git a/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_anker_powerconf_c200.cpp b/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_anker_powerconf_c200.cpp new file mode 100644 index 00000000..4c8a897b --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_anker_powerconf_c200.cpp @@ -0,0 +1,82 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +#include "usb/uvc_host.h" +#include "uvc_descriptors_priv.h" + +#include "test_parsing_helpers.hpp" +#include "descriptors/anker_powerconf_c200.hpp" +using namespace anker_powerconf_c200; + +SCENARIO("Camera descriptor parsing: Anker Powerconf C200", "[anker][powerconf][c200]") +{ + const usb_config_desc_t *cfg = (const usb_config_desc_t *)cfg_desc; + + GIVEN("Anker Powerconf C200 MJPEG") { + uvc_host_stream_format_t formats[] = { + {2560, 1440, 30, UVC_VS_FORMAT_MJPEG}, + {1920, 1080, 30, UVC_VS_FORMAT_MJPEG}, + {1280, 720, 30, UVC_VS_FORMAT_MJPEG}, + {640, 480, 30, UVC_VS_FORMAT_MJPEG}, + {640, 360, 30, UVC_VS_FORMAT_MJPEG}, + {320, 240, 30, UVC_VS_FORMAT_MJPEG}, + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_SUPPORTED(cfg, this_format, 1); + } + } + } + + GIVEN("Anker Powerconf C200 Uncompressed") { + uvc_host_stream_format_t formats[] = { + {640, 480, 30, UVC_VS_FORMAT_YUY2}, + {640, 360, 30, UVC_VS_FORMAT_YUY2}, + {320, 240, 30, UVC_VS_FORMAT_YUY2}, + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_SUPPORTED(cfg, this_format, 1); + } + } + } + + GIVEN("Anker Powerconf C200 h264") { + uvc_host_stream_format_t formats[] = { + {2560, 1440, 30, UVC_VS_FORMAT_H264}, + {1920, 1080, 30, UVC_VS_FORMAT_H264}, + {1280, 720, 30, UVC_VS_FORMAT_H264}, + {640, 480, 30, UVC_VS_FORMAT_H264}, + {640, 360, 30, UVC_VS_FORMAT_H264}, + {320, 240, 30, UVC_VS_FORMAT_H264}, + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_SUPPORTED(cfg, this_format, 1); + } + } + } + + GIVEN("Anker Powerconf C200 Unsupported") { + uvc_host_stream_format_t formats[] = { + {640, 480, 28, UVC_VS_FORMAT_MJPEG}, // Invalid FPS + {645, 480, 25, UVC_VS_FORMAT_MJPEG}, // Invalid definition + {640, 480, 20, UVC_VS_FORMAT_H265}, // Invalid format + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_NOT_SUPPORTED(cfg, this_format); + } + } + } +} diff --git a/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_customer.cpp b/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_customer.cpp new file mode 100644 index 00000000..0ac387ca --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_customer.cpp @@ -0,0 +1,53 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +#include "usb/uvc_host.h" +#include "uvc_descriptors_priv.h" + +#include "test_parsing_helpers.hpp" +#include "descriptors/customer.hpp" +using namespace customer_camera; + +SCENARIO("Camera descriptor parsing: Customer", "[customer][single]") +{ + const usb_config_desc_t *cfg = (const usb_config_desc_t *)cfg_desc; + + GIVEN("Customer MJPEG") { + uvc_host_stream_format_t formats[] = { + {1280, 720, 15, UVC_VS_FORMAT_MJPEG}, + {1280, 720, 10, UVC_VS_FORMAT_MJPEG}, + {800, 480, 20, UVC_VS_FORMAT_MJPEG}, + {800, 480, 15, UVC_VS_FORMAT_MJPEG}, + {640, 480, 25, UVC_VS_FORMAT_MJPEG}, + {640, 480, 15, UVC_VS_FORMAT_MJPEG}, + {480, 320, 25, UVC_VS_FORMAT_MJPEG}, + {480, 320, 15, UVC_VS_FORMAT_MJPEG}, + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_SUPPORTED(cfg, this_format, 1); + } + } + } + + GIVEN("Customer Unsupported") { + uvc_host_stream_format_t formats[] = { + {640, 480, 28, UVC_VS_FORMAT_MJPEG}, // Invalid FPS + {645, 480, 25, UVC_VS_FORMAT_MJPEG}, // Invalid definition + {640, 480, 20, UVC_VS_FORMAT_H264}, // Invalid format + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_NOT_SUPPORTED(cfg, this_format); + } + } + } +} diff --git a/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_customer_dual.cpp b/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_customer_dual.cpp new file mode 100644 index 00000000..96558c1c --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_customer_dual.cpp @@ -0,0 +1,88 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +#include "usb/uvc_host.h" +#include "uvc_descriptors_priv.h" + +#include "test_parsing_helpers.hpp" +#include "descriptors/customer_dual.hpp" +using namespace customer_camera_dual; + +SCENARIO("Camera descriptor parsing: Customer dual", "[customer][dual]") +{ + const usb_config_desc_t *cfg = (const usb_config_desc_t *)cfg_desc; + + GIVEN("Customer dual MJPEG") { + uvc_host_stream_format_t formats[] = { + {720, 1280, 30, UVC_VS_FORMAT_MJPEG}, + {720, 1280, 15, UVC_VS_FORMAT_MJPEG}, + {720, 1280, 10, UVC_VS_FORMAT_MJPEG}, + {720, 1280, 5, UVC_VS_FORMAT_MJPEG}, + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_SUPPORTED(cfg, this_format, 1); + } + } + } + + GIVEN("Customer dual h265") { + uvc_host_stream_format_t formats[] = { + FORMAT_H265_30_20_15(640, 480), + {640, 480, 25, UVC_VS_FORMAT_H265}, + + FORMAT_H265_30_20_15(1280, 720), + {1280, 720, 25, UVC_VS_FORMAT_H265}, + + FORMAT_H265_30_20_15(1920, 1080), + {1920, 1080, 25, UVC_VS_FORMAT_H265}, + + FORMAT_H265_30_20_15(2560, 1440), + {2560, 1440, 25, UVC_VS_FORMAT_H265}, + + FORMAT_H265_30_20_15(2304, 1296), + {2304, 1296, 25, UVC_VS_FORMAT_H265}, + }; + + for (uvc_host_stream_format_t this_format : formats) { + // Here we are testing uvc_index = 1 and expected_interface = 3 + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + uint8_t bInterfaceNumber = 0; + uint16_t bcdUVC = 0; + REQUIRE(ESP_OK == uvc_desc_get_streaming_interface_num(cfg, 1, &this_format, &bcdUVC, &bInterfaceNumber)); + REQUIRE(bInterfaceNumber == 3); + const usb_intf_desc_t *intf_desc = nullptr; + const usb_ep_desc_t *ep_desc = nullptr; + REQUIRE(ESP_OK == uvc_desc_get_streaming_intf_and_ep(cfg, bInterfaceNumber, 1024, &intf_desc, &ep_desc)); + REQUIRE(intf_desc != nullptr); + REQUIRE(ep_desc != nullptr); + const uvc_format_desc_t *format_desc = nullptr; + const uvc_frame_desc_t *frame_desc = nullptr; + REQUIRE(ESP_OK == uvc_desc_get_frame_format_by_format(cfg, bInterfaceNumber, &this_format, &format_desc, &frame_desc)); + REQUIRE(format_desc != nullptr); + REQUIRE(frame_desc != nullptr); + } + } + } + + GIVEN("Customer dual Unsupported") { + uvc_host_stream_format_t formats[] = { + {640, 480, 28, UVC_VS_FORMAT_MJPEG}, // Invalid FPS + {645, 480, 25, UVC_VS_FORMAT_MJPEG}, // Invalid definition + {640, 480, 20, UVC_VS_FORMAT_H264}, // Invalid format + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_NOT_SUPPORTED(cfg, this_format); + } + } + } +} diff --git a/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_elp_h264.cpp b/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_elp_h264.cpp new file mode 100644 index 00000000..8d930e10 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_elp_h264.cpp @@ -0,0 +1,86 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +#include "usb/uvc_host.h" +#include "uvc_descriptors_priv.h" + +#include "test_parsing_helpers.hpp" +#include "descriptors/elp_h264.hpp" +using namespace elp_h264; + +SCENARIO("Camera descriptor parsing: ELP h264", "[elp][h264]") +{ + const usb_config_desc_t *cfg = (const usb_config_desc_t *)cfg_desc; + + GIVEN("ELP h264 MJPEG") { + uvc_host_stream_format_t formats[] = { + FORMAT_MJPEG_30_25_15(1920, 1080), + FORMAT_MJPEG_30_25_15(1280, 720), + FORMAT_MJPEG_30_25_15(800, 600), + FORMAT_MJPEG_30_25_15(640, 480), + FORMAT_MJPEG_30_25_15(640, 360), + FORMAT_MJPEG_30_25_15(352, 288), + FORMAT_MJPEG_30_25_15(320, 240), + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_SUPPORTED(cfg, this_format, 1); + } + } + } + + GIVEN("ELP h264 Uncompressed") { + uvc_host_stream_format_t formats[] = { + FORMAT_UNCOMPRESSED_30_25_15(640, 480), + {800, 600, 15, UVC_VS_FORMAT_YUY2}, + FORMAT_UNCOMPRESSED_30_25_15(640, 360), + FORMAT_UNCOMPRESSED_30_25_15(352, 288), + FORMAT_UNCOMPRESSED_30_25_15(320, 240), + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_SUPPORTED(cfg, this_format, 1); + } + } + } + + GIVEN("ELP h264 h264") { + uvc_host_stream_format_t formats[] = { + FORMAT_H264_30_25_15(1920, 1080), + FORMAT_H264_30_25_15(1280, 720), + FORMAT_H264_30_25_15(800, 600), + FORMAT_H264_30_25_15(640, 480), + FORMAT_H264_30_25_15(640, 360), + FORMAT_H264_30_25_15(352, 288), + FORMAT_H264_30_25_15(320, 240), + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_SUPPORTED(cfg, this_format, 2); + } + } + } + + GIVEN("ELP h264 Unsupported") { + uvc_host_stream_format_t formats[] = { + {640, 480, 28, UVC_VS_FORMAT_MJPEG}, // Invalid FPS + {645, 480, 25, UVC_VS_FORMAT_MJPEG}, // Invalid definition + {640, 480, 20, UVC_VS_FORMAT_H265}, // Invalid format + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_NOT_SUPPORTED(cfg, this_format); + } + } + } +} diff --git a/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_elp_h265.cpp b/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_elp_h265.cpp new file mode 100644 index 00000000..31cf9d97 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_elp_h265.cpp @@ -0,0 +1,115 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +#include "usb/uvc_host.h" +#include "uvc_descriptors_priv.h" + +#include "test_parsing_helpers.hpp" +#include "descriptors/elp_h265.hpp" +using namespace elp_h265; + +SCENARIO("Camera descriptor parsing: ELP h265", "[elp][h265]") +{ + const usb_config_desc_t *cfg = (const usb_config_desc_t *)cfg_desc; + + GIVEN("ELP h265 MJPEG") { + uvc_host_stream_format_t formats[] = { + FORMAT_MJPEG_30_20_15(640, 360), + FORMAT_MJPEG_30_20_15(640, 480), + FORMAT_MJPEG_30_20_15(960, 540), + FORMAT_MJPEG_30_20_15(1024, 576), + FORMAT_MJPEG_30_20_15(1280, 720), + FORMAT_MJPEG_30_20_15(1920, 1080), + FORMAT_MJPEG_30_20_15(2560, 1440), + FORMAT_MJPEG_30_20_15(3840, 2160), + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_SUPPORTED(cfg, this_format, 1); + } + } + } + + GIVEN("ELP h265 h264") { + uvc_host_stream_format_t formats[] = { + FORMAT_H264_30_20_15(640, 360), + FORMAT_H264_30_20_15(640, 480), + FORMAT_H264_30_20_15(960, 540), + FORMAT_H264_30_20_15(1024, 576), + FORMAT_H264_30_20_15(1280, 720), + FORMAT_H264_30_20_15(1920, 1080), + FORMAT_H264_30_20_15(2560, 1440), + FORMAT_H264_30_20_15(3840, 2160), + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_SUPPORTED(cfg, this_format, 1); + } + } + } + + GIVEN("ELP h265 h265") { + uvc_host_stream_format_t formats[] = { + FORMAT_H265_30_20_15(640, 360), + FORMAT_H265_30_20_15(640, 480), + FORMAT_H265_30_20_15(960, 540), + FORMAT_H265_30_20_15(1024, 576), + FORMAT_H265_30_20_15(1280, 720), + FORMAT_H265_30_20_15(1920, 1080), + FORMAT_H265_30_20_15(2560, 1440), + FORMAT_H265_30_20_15(3840, 2160), + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_SUPPORTED(cfg, this_format, 1); + } + } + } + + GIVEN("ELP h265 Uncompressed") { + uvc_host_stream_format_t formats[] = { + FORMAT_UNCOMPRESSED_30_20_15(640, 360), + FORMAT_UNCOMPRESSED_30_20_15(640, 480), + {960, 540, 15, UVC_VS_FORMAT_YUY2}, + {960, 540, 10, UVC_VS_FORMAT_YUY2}, + {960, 540, 5, UVC_VS_FORMAT_YUY2}, + {1024, 576, 15, UVC_VS_FORMAT_YUY2}, + {1024, 576, 10, UVC_VS_FORMAT_YUY2}, + {1024, 576, 5, UVC_VS_FORMAT_YUY2}, + {1280, 720, 10, UVC_VS_FORMAT_YUY2}, + {1280, 720, 5, UVC_VS_FORMAT_YUY2}, + {1280, 720, 2, UVC_VS_FORMAT_YUY2}, + {1920, 1080, 5, UVC_VS_FORMAT_YUY2}, + {1920, 1080, 2, UVC_VS_FORMAT_YUY2}, + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_SUPPORTED(cfg, this_format, 1); + } + } + } + + GIVEN("ELP h265 Unsupported") { + uvc_host_stream_format_t formats[] = { + {640, 480, 28, UVC_VS_FORMAT_MJPEG}, // Invalid FPS + {645, 480, 25, UVC_VS_FORMAT_MJPEG}, // Invalid definition + {640, 480, 20, UVC_VS_FORMAT_UNDEFINED}, // Invalid format + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_NOT_SUPPORTED(cfg, this_format); + } + } + } +} diff --git a/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_helpers.hpp b/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_helpers.hpp new file mode 100644 index 00000000..9042abe4 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_helpers.hpp @@ -0,0 +1,125 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +/** + * @brief Define MJPEG formats with FPS 30-5 + */ +#define FORMAT_MJPEG_30_5(x, y) \ + {x, y, 30, UVC_VS_FORMAT_MJPEG}, \ + {x, y, 25, UVC_VS_FORMAT_MJPEG}, \ + {x, y, 20, UVC_VS_FORMAT_MJPEG}, \ + {x, y, 15, UVC_VS_FORMAT_MJPEG}, \ + {x, y, 10, UVC_VS_FORMAT_MJPEG}, \ + {x, y, 5, UVC_VS_FORMAT_MJPEG} + +/** + * @brief Define MJPEG formats with FPS 30-15 + */ +#define FORMAT_MJPEG_30_25_15(x, y) \ + {x, y, 30, UVC_VS_FORMAT_MJPEG}, \ + {x, y, 25, UVC_VS_FORMAT_MJPEG}, \ + {x, y, 15, UVC_VS_FORMAT_MJPEG} + +/** + * @brief Define MJPEG formats with FPS 30-15 + */ +#define FORMAT_MJPEG_30_20_15(x, y) \ + {x, y, 30, UVC_VS_FORMAT_MJPEG}, \ + {x, y, 20, UVC_VS_FORMAT_MJPEG}, \ + {x, y, 15, UVC_VS_FORMAT_MJPEG} + +/** + * @brief Define YUY2 formats with FPS 30-5 + */ +#define FORMAT_UNCOMPRESSED_30_5(x, y) \ + {x, y, 30, UVC_VS_FORMAT_YUY2}, \ + {x, y, 25, UVC_VS_FORMAT_YUY2}, \ + {x, y, 20, UVC_VS_FORMAT_YUY2}, \ + {x, y, 15, UVC_VS_FORMAT_YUY2}, \ + {x, y, 10, UVC_VS_FORMAT_YUY2}, \ + {x, y, 5, UVC_VS_FORMAT_YUY2} + +/** + * @brief Define YUY2 formats with FPS 30-15 + */ +#define FORMAT_UNCOMPRESSED_30_25_15(x, y) \ + {x, y, 30, UVC_VS_FORMAT_YUY2}, \ + {x, y, 25, UVC_VS_FORMAT_YUY2}, \ + {x, y, 15, UVC_VS_FORMAT_YUY2} + +/** + * @brief Define YUY2 formats with FPS 30-15 + */ +#define FORMAT_UNCOMPRESSED_30_20_15(x, y) \ + {x, y, 30, UVC_VS_FORMAT_YUY2}, \ + {x, y, 20, UVC_VS_FORMAT_YUY2}, \ + {x, y, 15, UVC_VS_FORMAT_YUY2} + +/** + * @brief Define YUY2 formats with FPS 20-5 + */ +#define FORMAT_UNCOMPRESSED_20_5(x, y) \ + {x, y, 20, UVC_VS_FORMAT_YUY2}, \ + {x, y, 15, UVC_VS_FORMAT_YUY2}, \ + {x, y, 10, UVC_VS_FORMAT_YUY2}, \ + {x, y, 5, UVC_VS_FORMAT_YUY2} + +/** + * @brief Define h264 formats with FPS 30-15 + */ +#define FORMAT_H264_30_25_15(x, y) \ + {x, y, 30, UVC_VS_FORMAT_H264}, \ + {x, y, 25, UVC_VS_FORMAT_H264}, \ + {x, y, 15, UVC_VS_FORMAT_H264} + +/** + * @brief Define h264 formats with FPS 30-15 + */ +#define FORMAT_H264_30_20_15(x, y) \ + {x, y, 30, UVC_VS_FORMAT_H264}, \ + {x, y, 20, UVC_VS_FORMAT_H264}, \ + {x, y, 15, UVC_VS_FORMAT_H264} + +/** + * @brief Define h265 formats with FPS 30-15 + */ +#define FORMAT_H265_30_20_15(x, y) \ + {x, y, 30, UVC_VS_FORMAT_H265}, \ + {x, y, 20, UVC_VS_FORMAT_H265}, \ + {x, y, 15, UVC_VS_FORMAT_H265} + +/** + * @brief Helper that check if required format is supported + */ +#define REQUIRE_FORMAT_SUPPORTED(cfg, format, expected_intf_num) \ + do { \ + uint8_t bInterfaceNumber = 0; \ + uint16_t bcdUVC = 0; \ + REQUIRE(ESP_OK == uvc_desc_get_streaming_interface_num(cfg, 0, &format, &bcdUVC, &bInterfaceNumber)); \ + REQUIRE(bInterfaceNumber == expected_intf_num); \ + const usb_intf_desc_t *intf_desc = nullptr; \ + const usb_ep_desc_t *ep_desc = nullptr; \ + REQUIRE(ESP_OK == uvc_desc_get_streaming_intf_and_ep(cfg, bInterfaceNumber, 1024, &intf_desc, &ep_desc)); \ + REQUIRE(intf_desc != nullptr); \ + REQUIRE(ep_desc != nullptr); \ + const uvc_format_desc_t *format_desc = nullptr; \ + const uvc_frame_desc_t *frame_desc = nullptr; \ + REQUIRE(ESP_OK == uvc_desc_get_frame_format_by_format(cfg, bInterfaceNumber, &format, &format_desc, &frame_desc)); \ + REQUIRE(format_desc != nullptr); \ + REQUIRE(frame_desc != nullptr); \ + } while (0) + +/** + * @brief Helper that check if required format is NOT supported + */ +#define REQUIRE_FORMAT_NOT_SUPPORTED(cfg, format) \ + do { \ + uint8_t bInterfaceNumber = 0; \ + uint16_t bcdUVC = 0; \ + REQUIRE_FALSE(ESP_OK == uvc_desc_get_streaming_interface_num(cfg, 0, &this_format, &bcdUVC, &bInterfaceNumber)); \ + } while (0) diff --git a/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_logitech_c270.cpp b/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_logitech_c270.cpp new file mode 100644 index 00000000..a8a5cb5c --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_logitech_c270.cpp @@ -0,0 +1,102 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +#include "usb/uvc_host.h" +#include "uvc_descriptors_priv.h" + +#include "test_parsing_helpers.hpp" +#include "descriptors/logitech_c270.hpp" +using namespace logitech_c270; + +SCENARIO("Camera descriptor parsing: Logitech C270", "[logitech][c270]") +{ + const usb_config_desc_t *cfg = (const usb_config_desc_t *)cfg_desc; + + GIVEN("Logitech C270 MJPEG") { + uvc_host_stream_format_t formats[] = { + FORMAT_MJPEG_30_5(640, 480), + FORMAT_MJPEG_30_5(160, 120), + FORMAT_MJPEG_30_5(176, 144), + FORMAT_MJPEG_30_5(320, 176), + FORMAT_MJPEG_30_5(320, 240), + FORMAT_MJPEG_30_5(352, 288), + FORMAT_MJPEG_30_5(432, 240), + FORMAT_MJPEG_30_5(544, 288), + FORMAT_MJPEG_30_5(640, 360), + FORMAT_MJPEG_30_5(752, 416), + FORMAT_MJPEG_30_5(800, 448), + FORMAT_MJPEG_30_5(800, 600), + FORMAT_MJPEG_30_5(864, 480), + FORMAT_MJPEG_30_5(960, 544), + FORMAT_MJPEG_30_5(960, 720), + FORMAT_MJPEG_30_5(1024, 576), + FORMAT_MJPEG_30_5(1184, 656), + FORMAT_MJPEG_30_5(1280, 720), + FORMAT_MJPEG_30_5(1280, 960), + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_SUPPORTED(cfg, this_format, 1); + } + } + } + + GIVEN("Logitech C270 Uncompressed") { + uvc_host_stream_format_t formats[] = { + FORMAT_UNCOMPRESSED_30_5(640, 480), + FORMAT_UNCOMPRESSED_30_5(160, 120), + FORMAT_UNCOMPRESSED_30_5(176, 144), + FORMAT_UNCOMPRESSED_30_5(320, 176), + FORMAT_UNCOMPRESSED_30_5(320, 240), + FORMAT_UNCOMPRESSED_30_5(352, 288), + FORMAT_UNCOMPRESSED_30_5(432, 240), + FORMAT_UNCOMPRESSED_30_5(544, 288), + FORMAT_UNCOMPRESSED_30_5(640, 360), + {752, 416, 25, UVC_VS_FORMAT_YUY2}, + FORMAT_UNCOMPRESSED_20_5(752, 416), + FORMAT_UNCOMPRESSED_20_5(800, 448), + FORMAT_UNCOMPRESSED_20_5(800, 600), + FORMAT_UNCOMPRESSED_20_5(864, 480), + {960, 544, 15, UVC_VS_FORMAT_YUY2}, + {960, 544, 10, UVC_VS_FORMAT_YUY2}, + {960, 544, 5, UVC_VS_FORMAT_YUY2}, + {960, 720, 10, UVC_VS_FORMAT_YUY2}, + {960, 720, 5, UVC_VS_FORMAT_YUY2}, + {1024, 576, 10, UVC_VS_FORMAT_YUY2}, + {1024, 576, 5, UVC_VS_FORMAT_YUY2}, + {1184, 656, 10, UVC_VS_FORMAT_YUY2}, + {1184, 656, 5, UVC_VS_FORMAT_YUY2}, + {1280, 720, 7.5f, UVC_VS_FORMAT_YUY2}, + {1280, 720, 5, UVC_VS_FORMAT_YUY2}, + {1280, 960, 7.5f, UVC_VS_FORMAT_YUY2}, + {1280, 960, 5, UVC_VS_FORMAT_YUY2}, + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_SUPPORTED(cfg, this_format, 1); + } + } + } + + GIVEN("Logitech C270 Unsupported") { + uvc_host_stream_format_t formats[] = { + {640, 480, 28, UVC_VS_FORMAT_MJPEG}, // Invalid FPS + {645, 480, 25, UVC_VS_FORMAT_MJPEG}, // Invalid definition + {640, 480, 20, UVC_VS_FORMAT_H264}, // Invalid format + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_NOT_SUPPORTED(cfg, this_format); + } + } + } +} diff --git a/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_logitech_streamcam.cpp b/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_logitech_streamcam.cpp new file mode 100644 index 00000000..083d3a7e --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_logitech_streamcam.cpp @@ -0,0 +1,104 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +#include "usb/uvc_host.h" +#include "uvc_descriptors_priv.h" + +#include "test_parsing_helpers.hpp" +#include "descriptors/logitech_streamcam.hpp" +using namespace logitech_streamcam; + +#define FORMAT_MJPEG(x, y) \ + {x, y, 30, UVC_VS_FORMAT_MJPEG}, \ + {x, y, 24, UVC_VS_FORMAT_MJPEG}, \ + {x, y, 20, UVC_VS_FORMAT_MJPEG}, \ + {x, y, 15, UVC_VS_FORMAT_MJPEG}, \ + {x, y, 10, UVC_VS_FORMAT_MJPEG}, \ + {x, y, 7.5f, UVC_VS_FORMAT_MJPEG}, \ + {x, y, 5, UVC_VS_FORMAT_MJPEG} + +#define FORMAT_UNCOMPRESSED(x, y) \ + {x, y, 30, UVC_VS_FORMAT_YUY2}, \ + {x, y, 24, UVC_VS_FORMAT_YUY2}, \ + {x, y, 20, UVC_VS_FORMAT_YUY2}, \ + {x, y, 15, UVC_VS_FORMAT_YUY2}, \ + {x, y, 10, UVC_VS_FORMAT_YUY2}, \ + {x, y, 7.5f, UVC_VS_FORMAT_YUY2}, \ + {x, y, 5, UVC_VS_FORMAT_YUY2} + +SCENARIO("Camera descriptor parsing: Logitech Streamcam", "[logitech][streamcam]") +{ + const usb_config_desc_t *cfg = (const usb_config_desc_t *)cfg_desc; + + GIVEN("Logitech Streamcam MJPEG") { + uvc_host_stream_format_t formats[] = { + FORMAT_MJPEG(640, 480), + FORMAT_MJPEG(176, 144), + FORMAT_MJPEG(320, 240), + FORMAT_MJPEG(424, 240), + FORMAT_MJPEG(640, 360), + FORMAT_MJPEG(848, 480), + FORMAT_MJPEG(960, 540), + FORMAT_MJPEG(1280, 720), + FORMAT_MJPEG(1600, 896), + FORMAT_MJPEG(1920, 1080), + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_SUPPORTED(cfg, this_format, 1); + } + } + } + + GIVEN("Logitech Streamcam Uncompressed") { + uvc_host_stream_format_t formats[] = { + FORMAT_UNCOMPRESSED(640, 480), + FORMAT_UNCOMPRESSED(176, 144), + FORMAT_UNCOMPRESSED(320, 240), + FORMAT_UNCOMPRESSED(424, 240), + FORMAT_UNCOMPRESSED(640, 360), + FORMAT_UNCOMPRESSED(848, 480), + + {960, 540, 15, UVC_VS_FORMAT_YUY2}, + {960, 540, 10, UVC_VS_FORMAT_YUY2}, + {960, 540, 7.5f, UVC_VS_FORMAT_YUY2}, + {960, 540, 5, UVC_VS_FORMAT_YUY2}, + + {1280, 720, 10, UVC_VS_FORMAT_YUY2}, + {1280, 720, 7.5f, UVC_VS_FORMAT_YUY2}, + {1280, 720, 5, UVC_VS_FORMAT_YUY2}, + + {1600, 896, 7.5f, UVC_VS_FORMAT_YUY2}, + {1600, 896, 5, UVC_VS_FORMAT_YUY2}, + + {1920, 1080, 5, UVC_VS_FORMAT_YUY2}, + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_SUPPORTED(cfg, this_format, 1); + } + } + } + + GIVEN("Logitech Streamcam Unsupported") { + uvc_host_stream_format_t formats[] = { + {640, 480, 28, UVC_VS_FORMAT_MJPEG}, // Invalid FPS + {645, 480, 25, UVC_VS_FORMAT_MJPEG}, // Invalid definition + {640, 480, 20, UVC_VS_FORMAT_H265}, // Invalid format + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_NOT_SUPPORTED(cfg, this_format); + } + } + } +} diff --git a/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_old.cpp b/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_old.cpp new file mode 100644 index 00000000..b12a2179 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_old.cpp @@ -0,0 +1,52 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +#include "usb/uvc_host.h" +#include "uvc_descriptors_priv.h" + +#include "test_parsing_helpers.hpp" +#include "descriptors/old.hpp" + +// Here is a collection of raw Configuration descriptors, but I don't have the cameras +// so not all supported formats are added :'( +using namespace old_cameras; + +SCENARIO("Camera descriptor parsing: Canyon CNE CWC2", "[old][canyon][cne_cwc2]") +{ + const usb_config_desc_t *cfg = (const usb_config_desc_t *)CANYON_CNE_CWC2; + + GIVEN("Canyon CNE CWC2") { + uvc_host_stream_format_t formats[] = { + {640, 480, 30, UVC_VS_FORMAT_MJPEG}, + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_SUPPORTED(cfg, this_format, 1); + } + } + } +} + +SCENARIO("Camera descriptor parsing: Logitech C980", "[old][logitech][c980]") +{ + const usb_config_desc_t *cfg = (const usb_config_desc_t *)Logitech_C980; + + GIVEN("Logitech C980") { + uvc_host_stream_format_t formats[] = { + {640, 480, 30, UVC_VS_FORMAT_MJPEG}, + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_SUPPORTED(cfg, this_format, 1); + } + } + } +} diff --git a/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_trust_webcam.cpp b/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_trust_webcam.cpp new file mode 100644 index 00000000..263c088d --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_trust_webcam.cpp @@ -0,0 +1,51 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +#include "usb/uvc_host.h" +#include "uvc_descriptors_priv.h" + +#include "test_parsing_helpers.hpp" +#include "descriptors/trust_webcam.hpp" +using namespace trust_webcam; + +SCENARIO("Camera descriptor parsing: Trust Webcam", "[trust][webcam]") +{ + const usb_config_desc_t *cfg = (const usb_config_desc_t *)cfg_desc; + + GIVEN("Trust Webcam Uncompressed") { + uvc_host_stream_format_t formats[] = { + FORMAT_UNCOMPRESSED_30_5(640, 480), + FORMAT_UNCOMPRESSED_30_5(352, 288), + FORMAT_UNCOMPRESSED_30_5(320, 240), + FORMAT_UNCOMPRESSED_30_5(176, 144), + {1280, 1024, 5, UVC_VS_FORMAT_YUY2}, + FORMAT_UNCOMPRESSED_30_5(160, 120), + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_SUPPORTED(cfg, this_format, 1); + } + } + } + + GIVEN("Trust Webcam Unsupported") { + uvc_host_stream_format_t formats[] = { + {640, 480, 28, UVC_VS_FORMAT_MJPEG}, // Invalid FPS + {645, 480, 25, UVC_VS_FORMAT_MJPEG}, // Invalid definition + {640, 480, 20, UVC_VS_FORMAT_H264}, // Invalid format + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_NOT_SUPPORTED(cfg, this_format); + } + } + } +} diff --git a/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_tusb_dual.cpp b/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_tusb_dual.cpp new file mode 100644 index 00000000..7d9d36a5 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/parsing/test_parsing_tusb_dual.cpp @@ -0,0 +1,72 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +#include "usb/uvc_host.h" +#include "uvc_descriptors_priv.h" + +#include "test_parsing_helpers.hpp" +#include "descriptors/dual_tusb.hpp" +using namespace dual_tusb; + +SCENARIO("Camera descriptor parsing: TinyUSB dual UVC", "[tusb][dual]") +{ + const usb_config_desc_t *cfg = (const usb_config_desc_t *)cfg_desc; + + GIVEN("TinyUSB dual UVC MJPEG 0") { + uvc_host_stream_format_t formats[] = { + {480, 270, 20, UVC_VS_FORMAT_MJPEG} + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_SUPPORTED(cfg, this_format, 1); + } + } + } + + GIVEN("TinyUSB dual UVC MJPEG 1") { + uvc_host_stream_format_t formats[] = { + {1280, 720, 15, UVC_VS_FORMAT_MJPEG} + }; + + for (uvc_host_stream_format_t this_format : formats) { + // Here we test uvc_index = 1 + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + uint8_t bInterfaceNumber = 0; + uint16_t bcdUVC = 0; + REQUIRE(ESP_OK == uvc_desc_get_streaming_interface_num(cfg, 1, &this_format, &bcdUVC, &bInterfaceNumber)); + REQUIRE(bInterfaceNumber == 3); + const usb_intf_desc_t *intf_desc = nullptr; + const usb_ep_desc_t *ep_desc = nullptr; + REQUIRE(ESP_OK == uvc_desc_get_streaming_intf_and_ep(cfg, bInterfaceNumber, 1024, &intf_desc, &ep_desc)); + REQUIRE(intf_desc != nullptr); + REQUIRE(ep_desc != nullptr); + const uvc_format_desc_t *format_desc = nullptr; + const uvc_frame_desc_t *frame_desc = nullptr; + REQUIRE(ESP_OK == uvc_desc_get_frame_format_by_format(cfg, bInterfaceNumber, &this_format, &format_desc, &frame_desc)); + REQUIRE(format_desc != nullptr); + REQUIRE(frame_desc != nullptr); + } + } + } + + GIVEN("TinyUSB dual UVC Unsupported") { + uvc_host_stream_format_t formats[] = { + {640, 480, 28, UVC_VS_FORMAT_MJPEG}, // Invalid FPS + {645, 480, 25, UVC_VS_FORMAT_MJPEG}, // Invalid definition + {640, 480, 20, UVC_VS_FORMAT_H264}, // Invalid format + }; + + for (uvc_host_stream_format_t this_format : formats) { + SECTION(std::to_string(this_format.h_res) + "x" + std::to_string(this_format.v_res) + "@" + std::to_string(this_format.fps)) { + REQUIRE_FORMAT_NOT_SUPPORTED(cfg, this_format); + } + } + } +} diff --git a/host/class/uvc/usb_host_uvc/host_test/main/streaming/images/logo.jpg b/host/class/uvc/usb_host_uvc/host_test/main/streaming/images/logo.jpg new file mode 100644 index 00000000..2bd9e775 Binary files /dev/null and b/host/class/uvc/usb_host_uvc/host_test/main/streaming/images/logo.jpg differ diff --git a/host/class/uvc/usb_host_uvc/host_test/main/streaming/images/test_logo_jpg.hpp b/host/class/uvc/usb_host_uvc/host_test/main/streaming/images/test_logo_jpg.hpp new file mode 100644 index 00000000..6d1a4908 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/streaming/images/test_logo_jpg.hpp @@ -0,0 +1,640 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +#include + +std::array logo_jpg = { + 0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x00, 0x01, + 0x01, 0x01, 0x00, 0x48, 0x00, 0x48, 0x00, 0x00, 0xff, 0xe2, 0x0c, 0x58, + 0x49, 0x43, 0x43, 0x5f, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x00, + 0x01, 0x01, 0x00, 0x00, 0x0c, 0x48, 0x4c, 0x69, 0x6e, 0x6f, 0x02, 0x10, + 0x00, 0x00, 0x6d, 0x6e, 0x74, 0x72, 0x52, 0x47, 0x42, 0x20, 0x58, 0x59, + 0x5a, 0x20, 0x07, 0xce, 0x00, 0x02, 0x00, 0x09, 0x00, 0x06, 0x00, 0x31, + 0x00, 0x00, 0x61, 0x63, 0x73, 0x70, 0x4d, 0x53, 0x46, 0x54, 0x00, 0x00, + 0x00, 0x00, 0x49, 0x45, 0x43, 0x20, 0x73, 0x52, 0x47, 0x42, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf6, 0xd6, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x2d, 0x48, 0x50, + 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x11, 0x63, 0x70, 0x72, 0x74, 0x00, 0x00, 0x01, 0x50, 0x00, 0x00, + 0x00, 0x33, 0x64, 0x65, 0x73, 0x63, 0x00, 0x00, 0x01, 0x84, 0x00, 0x00, + 0x00, 0x6c, 0x77, 0x74, 0x70, 0x74, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, + 0x00, 0x14, 0x62, 0x6b, 0x70, 0x74, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, + 0x00, 0x14, 0x72, 0x58, 0x59, 0x5a, 0x00, 0x00, 0x02, 0x18, 0x00, 0x00, + 0x00, 0x14, 0x67, 0x58, 0x59, 0x5a, 0x00, 0x00, 0x02, 0x2c, 0x00, 0x00, + 0x00, 0x14, 0x62, 0x58, 0x59, 0x5a, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, + 0x00, 0x14, 0x64, 0x6d, 0x6e, 0x64, 0x00, 0x00, 0x02, 0x54, 0x00, 0x00, + 0x00, 0x70, 0x64, 0x6d, 0x64, 0x64, 0x00, 0x00, 0x02, 0xc4, 0x00, 0x00, + 0x00, 0x88, 0x76, 0x75, 0x65, 0x64, 0x00, 0x00, 0x03, 0x4c, 0x00, 0x00, + 0x00, 0x86, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x03, 0xd4, 0x00, 0x00, + 0x00, 0x24, 0x6c, 0x75, 0x6d, 0x69, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, + 0x00, 0x14, 0x6d, 0x65, 0x61, 0x73, 0x00, 0x00, 0x04, 0x0c, 0x00, 0x00, + 0x00, 0x24, 0x74, 0x65, 0x63, 0x68, 0x00, 0x00, 0x04, 0x30, 0x00, 0x00, + 0x00, 0x0c, 0x72, 0x54, 0x52, 0x43, 0x00, 0x00, 0x04, 0x3c, 0x00, 0x00, + 0x08, 0x0c, 0x67, 0x54, 0x52, 0x43, 0x00, 0x00, 0x04, 0x3c, 0x00, 0x00, + 0x08, 0x0c, 0x62, 0x54, 0x52, 0x43, 0x00, 0x00, 0x04, 0x3c, 0x00, 0x00, + 0x08, 0x0c, 0x74, 0x65, 0x78, 0x74, 0x00, 0x00, 0x00, 0x00, 0x43, 0x6f, + 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x28, 0x63, 0x29, 0x20, + 0x31, 0x39, 0x39, 0x38, 0x20, 0x48, 0x65, 0x77, 0x6c, 0x65, 0x74, 0x74, + 0x2d, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x72, 0x64, 0x20, 0x43, 0x6f, 0x6d, + 0x70, 0x61, 0x6e, 0x79, 0x00, 0x00, 0x64, 0x65, 0x73, 0x63, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x73, 0x52, 0x47, 0x42, 0x20, 0x49, + 0x45, 0x43, 0x36, 0x31, 0x39, 0x36, 0x36, 0x2d, 0x32, 0x2e, 0x31, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x73, + 0x52, 0x47, 0x42, 0x20, 0x49, 0x45, 0x43, 0x36, 0x31, 0x39, 0x36, 0x36, + 0x2d, 0x32, 0x2e, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf3, 0x51, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, + 0x16, 0xcc, 0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x59, + 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6f, 0xa2, 0x00, 0x00, + 0x38, 0xf5, 0x00, 0x00, 0x03, 0x90, 0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x62, 0x99, 0x00, 0x00, 0xb7, 0x85, 0x00, 0x00, + 0x18, 0xda, 0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x24, 0xa0, 0x00, 0x00, 0x0f, 0x84, 0x00, 0x00, 0xb6, 0xcf, 0x64, 0x65, + 0x73, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x49, 0x45, + 0x43, 0x20, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, + 0x2e, 0x69, 0x65, 0x63, 0x2e, 0x63, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x49, 0x45, 0x43, 0x20, 0x68, + 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x65, + 0x63, 0x2e, 0x63, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x64, 0x65, 0x73, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x2e, 0x49, 0x45, 0x43, 0x20, 0x36, 0x31, 0x39, 0x36, 0x36, 0x2d, + 0x32, 0x2e, 0x31, 0x20, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, + 0x52, 0x47, 0x42, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x75, 0x72, 0x20, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x20, 0x2d, 0x20, 0x73, 0x52, 0x47, 0x42, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x49, + 0x45, 0x43, 0x20, 0x36, 0x31, 0x39, 0x36, 0x36, 0x2d, 0x32, 0x2e, 0x31, + 0x20, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x52, 0x47, 0x42, + 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x75, 0x72, 0x20, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x20, 0x2d, 0x20, 0x73, 0x52, 0x47, 0x42, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x65, 0x73, 0x63, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x20, 0x56, 0x69, 0x65, 0x77, 0x69, 0x6e, 0x67, 0x20, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, + 0x20, 0x49, 0x45, 0x43, 0x36, 0x31, 0x39, 0x36, 0x36, 0x2d, 0x32, 0x2e, + 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x2c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x56, + 0x69, 0x65, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x49, 0x45, 0x43, 0x36, + 0x31, 0x39, 0x36, 0x36, 0x2d, 0x32, 0x2e, 0x31, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x69, + 0x65, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0xa4, 0xfe, 0x00, 0x14, + 0x5f, 0x2e, 0x00, 0x10, 0xcf, 0x14, 0x00, 0x03, 0xed, 0xcc, 0x00, 0x04, + 0x13, 0x0b, 0x00, 0x03, 0x5c, 0x9e, 0x00, 0x00, 0x00, 0x01, 0x58, 0x59, + 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x09, 0x56, 0x00, 0x50, + 0x00, 0x00, 0x00, 0x57, 0x1f, 0xe7, 0x6d, 0x65, 0x61, 0x73, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x8f, 0x00, 0x00, 0x00, 0x02, 0x73, 0x69, 0x67, 0x20, 0x00, 0x00, + 0x00, 0x00, 0x43, 0x52, 0x54, 0x20, 0x63, 0x75, 0x72, 0x76, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, + 0x00, 0x0f, 0x00, 0x14, 0x00, 0x19, 0x00, 0x1e, 0x00, 0x23, 0x00, 0x28, + 0x00, 0x2d, 0x00, 0x32, 0x00, 0x37, 0x00, 0x3b, 0x00, 0x40, 0x00, 0x45, + 0x00, 0x4a, 0x00, 0x4f, 0x00, 0x54, 0x00, 0x59, 0x00, 0x5e, 0x00, 0x63, + 0x00, 0x68, 0x00, 0x6d, 0x00, 0x72, 0x00, 0x77, 0x00, 0x7c, 0x00, 0x81, + 0x00, 0x86, 0x00, 0x8b, 0x00, 0x90, 0x00, 0x95, 0x00, 0x9a, 0x00, 0x9f, + 0x00, 0xa4, 0x00, 0xa9, 0x00, 0xae, 0x00, 0xb2, 0x00, 0xb7, 0x00, 0xbc, + 0x00, 0xc1, 0x00, 0xc6, 0x00, 0xcb, 0x00, 0xd0, 0x00, 0xd5, 0x00, 0xdb, + 0x00, 0xe0, 0x00, 0xe5, 0x00, 0xeb, 0x00, 0xf0, 0x00, 0xf6, 0x00, 0xfb, + 0x01, 0x01, 0x01, 0x07, 0x01, 0x0d, 0x01, 0x13, 0x01, 0x19, 0x01, 0x1f, + 0x01, 0x25, 0x01, 0x2b, 0x01, 0x32, 0x01, 0x38, 0x01, 0x3e, 0x01, 0x45, + 0x01, 0x4c, 0x01, 0x52, 0x01, 0x59, 0x01, 0x60, 0x01, 0x67, 0x01, 0x6e, + 0x01, 0x75, 0x01, 0x7c, 0x01, 0x83, 0x01, 0x8b, 0x01, 0x92, 0x01, 0x9a, + 0x01, 0xa1, 0x01, 0xa9, 0x01, 0xb1, 0x01, 0xb9, 0x01, 0xc1, 0x01, 0xc9, + 0x01, 0xd1, 0x01, 0xd9, 0x01, 0xe1, 0x01, 0xe9, 0x01, 0xf2, 0x01, 0xfa, + 0x02, 0x03, 0x02, 0x0c, 0x02, 0x14, 0x02, 0x1d, 0x02, 0x26, 0x02, 0x2f, + 0x02, 0x38, 0x02, 0x41, 0x02, 0x4b, 0x02, 0x54, 0x02, 0x5d, 0x02, 0x67, + 0x02, 0x71, 0x02, 0x7a, 0x02, 0x84, 0x02, 0x8e, 0x02, 0x98, 0x02, 0xa2, + 0x02, 0xac, 0x02, 0xb6, 0x02, 0xc1, 0x02, 0xcb, 0x02, 0xd5, 0x02, 0xe0, + 0x02, 0xeb, 0x02, 0xf5, 0x03, 0x00, 0x03, 0x0b, 0x03, 0x16, 0x03, 0x21, + 0x03, 0x2d, 0x03, 0x38, 0x03, 0x43, 0x03, 0x4f, 0x03, 0x5a, 0x03, 0x66, + 0x03, 0x72, 0x03, 0x7e, 0x03, 0x8a, 0x03, 0x96, 0x03, 0xa2, 0x03, 0xae, + 0x03, 0xba, 0x03, 0xc7, 0x03, 0xd3, 0x03, 0xe0, 0x03, 0xec, 0x03, 0xf9, + 0x04, 0x06, 0x04, 0x13, 0x04, 0x20, 0x04, 0x2d, 0x04, 0x3b, 0x04, 0x48, + 0x04, 0x55, 0x04, 0x63, 0x04, 0x71, 0x04, 0x7e, 0x04, 0x8c, 0x04, 0x9a, + 0x04, 0xa8, 0x04, 0xb6, 0x04, 0xc4, 0x04, 0xd3, 0x04, 0xe1, 0x04, 0xf0, + 0x04, 0xfe, 0x05, 0x0d, 0x05, 0x1c, 0x05, 0x2b, 0x05, 0x3a, 0x05, 0x49, + 0x05, 0x58, 0x05, 0x67, 0x05, 0x77, 0x05, 0x86, 0x05, 0x96, 0x05, 0xa6, + 0x05, 0xb5, 0x05, 0xc5, 0x05, 0xd5, 0x05, 0xe5, 0x05, 0xf6, 0x06, 0x06, + 0x06, 0x16, 0x06, 0x27, 0x06, 0x37, 0x06, 0x48, 0x06, 0x59, 0x06, 0x6a, + 0x06, 0x7b, 0x06, 0x8c, 0x06, 0x9d, 0x06, 0xaf, 0x06, 0xc0, 0x06, 0xd1, + 0x06, 0xe3, 0x06, 0xf5, 0x07, 0x07, 0x07, 0x19, 0x07, 0x2b, 0x07, 0x3d, + 0x07, 0x4f, 0x07, 0x61, 0x07, 0x74, 0x07, 0x86, 0x07, 0x99, 0x07, 0xac, + 0x07, 0xbf, 0x07, 0xd2, 0x07, 0xe5, 0x07, 0xf8, 0x08, 0x0b, 0x08, 0x1f, + 0x08, 0x32, 0x08, 0x46, 0x08, 0x5a, 0x08, 0x6e, 0x08, 0x82, 0x08, 0x96, + 0x08, 0xaa, 0x08, 0xbe, 0x08, 0xd2, 0x08, 0xe7, 0x08, 0xfb, 0x09, 0x10, + 0x09, 0x25, 0x09, 0x3a, 0x09, 0x4f, 0x09, 0x64, 0x09, 0x79, 0x09, 0x8f, + 0x09, 0xa4, 0x09, 0xba, 0x09, 0xcf, 0x09, 0xe5, 0x09, 0xfb, 0x0a, 0x11, + 0x0a, 0x27, 0x0a, 0x3d, 0x0a, 0x54, 0x0a, 0x6a, 0x0a, 0x81, 0x0a, 0x98, + 0x0a, 0xae, 0x0a, 0xc5, 0x0a, 0xdc, 0x0a, 0xf3, 0x0b, 0x0b, 0x0b, 0x22, + 0x0b, 0x39, 0x0b, 0x51, 0x0b, 0x69, 0x0b, 0x80, 0x0b, 0x98, 0x0b, 0xb0, + 0x0b, 0xc8, 0x0b, 0xe1, 0x0b, 0xf9, 0x0c, 0x12, 0x0c, 0x2a, 0x0c, 0x43, + 0x0c, 0x5c, 0x0c, 0x75, 0x0c, 0x8e, 0x0c, 0xa7, 0x0c, 0xc0, 0x0c, 0xd9, + 0x0c, 0xf3, 0x0d, 0x0d, 0x0d, 0x26, 0x0d, 0x40, 0x0d, 0x5a, 0x0d, 0x74, + 0x0d, 0x8e, 0x0d, 0xa9, 0x0d, 0xc3, 0x0d, 0xde, 0x0d, 0xf8, 0x0e, 0x13, + 0x0e, 0x2e, 0x0e, 0x49, 0x0e, 0x64, 0x0e, 0x7f, 0x0e, 0x9b, 0x0e, 0xb6, + 0x0e, 0xd2, 0x0e, 0xee, 0x0f, 0x09, 0x0f, 0x25, 0x0f, 0x41, 0x0f, 0x5e, + 0x0f, 0x7a, 0x0f, 0x96, 0x0f, 0xb3, 0x0f, 0xcf, 0x0f, 0xec, 0x10, 0x09, + 0x10, 0x26, 0x10, 0x43, 0x10, 0x61, 0x10, 0x7e, 0x10, 0x9b, 0x10, 0xb9, + 0x10, 0xd7, 0x10, 0xf5, 0x11, 0x13, 0x11, 0x31, 0x11, 0x4f, 0x11, 0x6d, + 0x11, 0x8c, 0x11, 0xaa, 0x11, 0xc9, 0x11, 0xe8, 0x12, 0x07, 0x12, 0x26, + 0x12, 0x45, 0x12, 0x64, 0x12, 0x84, 0x12, 0xa3, 0x12, 0xc3, 0x12, 0xe3, + 0x13, 0x03, 0x13, 0x23, 0x13, 0x43, 0x13, 0x63, 0x13, 0x83, 0x13, 0xa4, + 0x13, 0xc5, 0x13, 0xe5, 0x14, 0x06, 0x14, 0x27, 0x14, 0x49, 0x14, 0x6a, + 0x14, 0x8b, 0x14, 0xad, 0x14, 0xce, 0x14, 0xf0, 0x15, 0x12, 0x15, 0x34, + 0x15, 0x56, 0x15, 0x78, 0x15, 0x9b, 0x15, 0xbd, 0x15, 0xe0, 0x16, 0x03, + 0x16, 0x26, 0x16, 0x49, 0x16, 0x6c, 0x16, 0x8f, 0x16, 0xb2, 0x16, 0xd6, + 0x16, 0xfa, 0x17, 0x1d, 0x17, 0x41, 0x17, 0x65, 0x17, 0x89, 0x17, 0xae, + 0x17, 0xd2, 0x17, 0xf7, 0x18, 0x1b, 0x18, 0x40, 0x18, 0x65, 0x18, 0x8a, + 0x18, 0xaf, 0x18, 0xd5, 0x18, 0xfa, 0x19, 0x20, 0x19, 0x45, 0x19, 0x6b, + 0x19, 0x91, 0x19, 0xb7, 0x19, 0xdd, 0x1a, 0x04, 0x1a, 0x2a, 0x1a, 0x51, + 0x1a, 0x77, 0x1a, 0x9e, 0x1a, 0xc5, 0x1a, 0xec, 0x1b, 0x14, 0x1b, 0x3b, + 0x1b, 0x63, 0x1b, 0x8a, 0x1b, 0xb2, 0x1b, 0xda, 0x1c, 0x02, 0x1c, 0x2a, + 0x1c, 0x52, 0x1c, 0x7b, 0x1c, 0xa3, 0x1c, 0xcc, 0x1c, 0xf5, 0x1d, 0x1e, + 0x1d, 0x47, 0x1d, 0x70, 0x1d, 0x99, 0x1d, 0xc3, 0x1d, 0xec, 0x1e, 0x16, + 0x1e, 0x40, 0x1e, 0x6a, 0x1e, 0x94, 0x1e, 0xbe, 0x1e, 0xe9, 0x1f, 0x13, + 0x1f, 0x3e, 0x1f, 0x69, 0x1f, 0x94, 0x1f, 0xbf, 0x1f, 0xea, 0x20, 0x15, + 0x20, 0x41, 0x20, 0x6c, 0x20, 0x98, 0x20, 0xc4, 0x20, 0xf0, 0x21, 0x1c, + 0x21, 0x48, 0x21, 0x75, 0x21, 0xa1, 0x21, 0xce, 0x21, 0xfb, 0x22, 0x27, + 0x22, 0x55, 0x22, 0x82, 0x22, 0xaf, 0x22, 0xdd, 0x23, 0x0a, 0x23, 0x38, + 0x23, 0x66, 0x23, 0x94, 0x23, 0xc2, 0x23, 0xf0, 0x24, 0x1f, 0x24, 0x4d, + 0x24, 0x7c, 0x24, 0xab, 0x24, 0xda, 0x25, 0x09, 0x25, 0x38, 0x25, 0x68, + 0x25, 0x97, 0x25, 0xc7, 0x25, 0xf7, 0x26, 0x27, 0x26, 0x57, 0x26, 0x87, + 0x26, 0xb7, 0x26, 0xe8, 0x27, 0x18, 0x27, 0x49, 0x27, 0x7a, 0x27, 0xab, + 0x27, 0xdc, 0x28, 0x0d, 0x28, 0x3f, 0x28, 0x71, 0x28, 0xa2, 0x28, 0xd4, + 0x29, 0x06, 0x29, 0x38, 0x29, 0x6b, 0x29, 0x9d, 0x29, 0xd0, 0x2a, 0x02, + 0x2a, 0x35, 0x2a, 0x68, 0x2a, 0x9b, 0x2a, 0xcf, 0x2b, 0x02, 0x2b, 0x36, + 0x2b, 0x69, 0x2b, 0x9d, 0x2b, 0xd1, 0x2c, 0x05, 0x2c, 0x39, 0x2c, 0x6e, + 0x2c, 0xa2, 0x2c, 0xd7, 0x2d, 0x0c, 0x2d, 0x41, 0x2d, 0x76, 0x2d, 0xab, + 0x2d, 0xe1, 0x2e, 0x16, 0x2e, 0x4c, 0x2e, 0x82, 0x2e, 0xb7, 0x2e, 0xee, + 0x2f, 0x24, 0x2f, 0x5a, 0x2f, 0x91, 0x2f, 0xc7, 0x2f, 0xfe, 0x30, 0x35, + 0x30, 0x6c, 0x30, 0xa4, 0x30, 0xdb, 0x31, 0x12, 0x31, 0x4a, 0x31, 0x82, + 0x31, 0xba, 0x31, 0xf2, 0x32, 0x2a, 0x32, 0x63, 0x32, 0x9b, 0x32, 0xd4, + 0x33, 0x0d, 0x33, 0x46, 0x33, 0x7f, 0x33, 0xb8, 0x33, 0xf1, 0x34, 0x2b, + 0x34, 0x65, 0x34, 0x9e, 0x34, 0xd8, 0x35, 0x13, 0x35, 0x4d, 0x35, 0x87, + 0x35, 0xc2, 0x35, 0xfd, 0x36, 0x37, 0x36, 0x72, 0x36, 0xae, 0x36, 0xe9, + 0x37, 0x24, 0x37, 0x60, 0x37, 0x9c, 0x37, 0xd7, 0x38, 0x14, 0x38, 0x50, + 0x38, 0x8c, 0x38, 0xc8, 0x39, 0x05, 0x39, 0x42, 0x39, 0x7f, 0x39, 0xbc, + 0x39, 0xf9, 0x3a, 0x36, 0x3a, 0x74, 0x3a, 0xb2, 0x3a, 0xef, 0x3b, 0x2d, + 0x3b, 0x6b, 0x3b, 0xaa, 0x3b, 0xe8, 0x3c, 0x27, 0x3c, 0x65, 0x3c, 0xa4, + 0x3c, 0xe3, 0x3d, 0x22, 0x3d, 0x61, 0x3d, 0xa1, 0x3d, 0xe0, 0x3e, 0x20, + 0x3e, 0x60, 0x3e, 0xa0, 0x3e, 0xe0, 0x3f, 0x21, 0x3f, 0x61, 0x3f, 0xa2, + 0x3f, 0xe2, 0x40, 0x23, 0x40, 0x64, 0x40, 0xa6, 0x40, 0xe7, 0x41, 0x29, + 0x41, 0x6a, 0x41, 0xac, 0x41, 0xee, 0x42, 0x30, 0x42, 0x72, 0x42, 0xb5, + 0x42, 0xf7, 0x43, 0x3a, 0x43, 0x7d, 0x43, 0xc0, 0x44, 0x03, 0x44, 0x47, + 0x44, 0x8a, 0x44, 0xce, 0x45, 0x12, 0x45, 0x55, 0x45, 0x9a, 0x45, 0xde, + 0x46, 0x22, 0x46, 0x67, 0x46, 0xab, 0x46, 0xf0, 0x47, 0x35, 0x47, 0x7b, + 0x47, 0xc0, 0x48, 0x05, 0x48, 0x4b, 0x48, 0x91, 0x48, 0xd7, 0x49, 0x1d, + 0x49, 0x63, 0x49, 0xa9, 0x49, 0xf0, 0x4a, 0x37, 0x4a, 0x7d, 0x4a, 0xc4, + 0x4b, 0x0c, 0x4b, 0x53, 0x4b, 0x9a, 0x4b, 0xe2, 0x4c, 0x2a, 0x4c, 0x72, + 0x4c, 0xba, 0x4d, 0x02, 0x4d, 0x4a, 0x4d, 0x93, 0x4d, 0xdc, 0x4e, 0x25, + 0x4e, 0x6e, 0x4e, 0xb7, 0x4f, 0x00, 0x4f, 0x49, 0x4f, 0x93, 0x4f, 0xdd, + 0x50, 0x27, 0x50, 0x71, 0x50, 0xbb, 0x51, 0x06, 0x51, 0x50, 0x51, 0x9b, + 0x51, 0xe6, 0x52, 0x31, 0x52, 0x7c, 0x52, 0xc7, 0x53, 0x13, 0x53, 0x5f, + 0x53, 0xaa, 0x53, 0xf6, 0x54, 0x42, 0x54, 0x8f, 0x54, 0xdb, 0x55, 0x28, + 0x55, 0x75, 0x55, 0xc2, 0x56, 0x0f, 0x56, 0x5c, 0x56, 0xa9, 0x56, 0xf7, + 0x57, 0x44, 0x57, 0x92, 0x57, 0xe0, 0x58, 0x2f, 0x58, 0x7d, 0x58, 0xcb, + 0x59, 0x1a, 0x59, 0x69, 0x59, 0xb8, 0x5a, 0x07, 0x5a, 0x56, 0x5a, 0xa6, + 0x5a, 0xf5, 0x5b, 0x45, 0x5b, 0x95, 0x5b, 0xe5, 0x5c, 0x35, 0x5c, 0x86, + 0x5c, 0xd6, 0x5d, 0x27, 0x5d, 0x78, 0x5d, 0xc9, 0x5e, 0x1a, 0x5e, 0x6c, + 0x5e, 0xbd, 0x5f, 0x0f, 0x5f, 0x61, 0x5f, 0xb3, 0x60, 0x05, 0x60, 0x57, + 0x60, 0xaa, 0x60, 0xfc, 0x61, 0x4f, 0x61, 0xa2, 0x61, 0xf5, 0x62, 0x49, + 0x62, 0x9c, 0x62, 0xf0, 0x63, 0x43, 0x63, 0x97, 0x63, 0xeb, 0x64, 0x40, + 0x64, 0x94, 0x64, 0xe9, 0x65, 0x3d, 0x65, 0x92, 0x65, 0xe7, 0x66, 0x3d, + 0x66, 0x92, 0x66, 0xe8, 0x67, 0x3d, 0x67, 0x93, 0x67, 0xe9, 0x68, 0x3f, + 0x68, 0x96, 0x68, 0xec, 0x69, 0x43, 0x69, 0x9a, 0x69, 0xf1, 0x6a, 0x48, + 0x6a, 0x9f, 0x6a, 0xf7, 0x6b, 0x4f, 0x6b, 0xa7, 0x6b, 0xff, 0x6c, 0x57, + 0x6c, 0xaf, 0x6d, 0x08, 0x6d, 0x60, 0x6d, 0xb9, 0x6e, 0x12, 0x6e, 0x6b, + 0x6e, 0xc4, 0x6f, 0x1e, 0x6f, 0x78, 0x6f, 0xd1, 0x70, 0x2b, 0x70, 0x86, + 0x70, 0xe0, 0x71, 0x3a, 0x71, 0x95, 0x71, 0xf0, 0x72, 0x4b, 0x72, 0xa6, + 0x73, 0x01, 0x73, 0x5d, 0x73, 0xb8, 0x74, 0x14, 0x74, 0x70, 0x74, 0xcc, + 0x75, 0x28, 0x75, 0x85, 0x75, 0xe1, 0x76, 0x3e, 0x76, 0x9b, 0x76, 0xf8, + 0x77, 0x56, 0x77, 0xb3, 0x78, 0x11, 0x78, 0x6e, 0x78, 0xcc, 0x79, 0x2a, + 0x79, 0x89, 0x79, 0xe7, 0x7a, 0x46, 0x7a, 0xa5, 0x7b, 0x04, 0x7b, 0x63, + 0x7b, 0xc2, 0x7c, 0x21, 0x7c, 0x81, 0x7c, 0xe1, 0x7d, 0x41, 0x7d, 0xa1, + 0x7e, 0x01, 0x7e, 0x62, 0x7e, 0xc2, 0x7f, 0x23, 0x7f, 0x84, 0x7f, 0xe5, + 0x80, 0x47, 0x80, 0xa8, 0x81, 0x0a, 0x81, 0x6b, 0x81, 0xcd, 0x82, 0x30, + 0x82, 0x92, 0x82, 0xf4, 0x83, 0x57, 0x83, 0xba, 0x84, 0x1d, 0x84, 0x80, + 0x84, 0xe3, 0x85, 0x47, 0x85, 0xab, 0x86, 0x0e, 0x86, 0x72, 0x86, 0xd7, + 0x87, 0x3b, 0x87, 0x9f, 0x88, 0x04, 0x88, 0x69, 0x88, 0xce, 0x89, 0x33, + 0x89, 0x99, 0x89, 0xfe, 0x8a, 0x64, 0x8a, 0xca, 0x8b, 0x30, 0x8b, 0x96, + 0x8b, 0xfc, 0x8c, 0x63, 0x8c, 0xca, 0x8d, 0x31, 0x8d, 0x98, 0x8d, 0xff, + 0x8e, 0x66, 0x8e, 0xce, 0x8f, 0x36, 0x8f, 0x9e, 0x90, 0x06, 0x90, 0x6e, + 0x90, 0xd6, 0x91, 0x3f, 0x91, 0xa8, 0x92, 0x11, 0x92, 0x7a, 0x92, 0xe3, + 0x93, 0x4d, 0x93, 0xb6, 0x94, 0x20, 0x94, 0x8a, 0x94, 0xf4, 0x95, 0x5f, + 0x95, 0xc9, 0x96, 0x34, 0x96, 0x9f, 0x97, 0x0a, 0x97, 0x75, 0x97, 0xe0, + 0x98, 0x4c, 0x98, 0xb8, 0x99, 0x24, 0x99, 0x90, 0x99, 0xfc, 0x9a, 0x68, + 0x9a, 0xd5, 0x9b, 0x42, 0x9b, 0xaf, 0x9c, 0x1c, 0x9c, 0x89, 0x9c, 0xf7, + 0x9d, 0x64, 0x9d, 0xd2, 0x9e, 0x40, 0x9e, 0xae, 0x9f, 0x1d, 0x9f, 0x8b, + 0x9f, 0xfa, 0xa0, 0x69, 0xa0, 0xd8, 0xa1, 0x47, 0xa1, 0xb6, 0xa2, 0x26, + 0xa2, 0x96, 0xa3, 0x06, 0xa3, 0x76, 0xa3, 0xe6, 0xa4, 0x56, 0xa4, 0xc7, + 0xa5, 0x38, 0xa5, 0xa9, 0xa6, 0x1a, 0xa6, 0x8b, 0xa6, 0xfd, 0xa7, 0x6e, + 0xa7, 0xe0, 0xa8, 0x52, 0xa8, 0xc4, 0xa9, 0x37, 0xa9, 0xa9, 0xaa, 0x1c, + 0xaa, 0x8f, 0xab, 0x02, 0xab, 0x75, 0xab, 0xe9, 0xac, 0x5c, 0xac, 0xd0, + 0xad, 0x44, 0xad, 0xb8, 0xae, 0x2d, 0xae, 0xa1, 0xaf, 0x16, 0xaf, 0x8b, + 0xb0, 0x00, 0xb0, 0x75, 0xb0, 0xea, 0xb1, 0x60, 0xb1, 0xd6, 0xb2, 0x4b, + 0xb2, 0xc2, 0xb3, 0x38, 0xb3, 0xae, 0xb4, 0x25, 0xb4, 0x9c, 0xb5, 0x13, + 0xb5, 0x8a, 0xb6, 0x01, 0xb6, 0x79, 0xb6, 0xf0, 0xb7, 0x68, 0xb7, 0xe0, + 0xb8, 0x59, 0xb8, 0xd1, 0xb9, 0x4a, 0xb9, 0xc2, 0xba, 0x3b, 0xba, 0xb5, + 0xbb, 0x2e, 0xbb, 0xa7, 0xbc, 0x21, 0xbc, 0x9b, 0xbd, 0x15, 0xbd, 0x8f, + 0xbe, 0x0a, 0xbe, 0x84, 0xbe, 0xff, 0xbf, 0x7a, 0xbf, 0xf5, 0xc0, 0x70, + 0xc0, 0xec, 0xc1, 0x67, 0xc1, 0xe3, 0xc2, 0x5f, 0xc2, 0xdb, 0xc3, 0x58, + 0xc3, 0xd4, 0xc4, 0x51, 0xc4, 0xce, 0xc5, 0x4b, 0xc5, 0xc8, 0xc6, 0x46, + 0xc6, 0xc3, 0xc7, 0x41, 0xc7, 0xbf, 0xc8, 0x3d, 0xc8, 0xbc, 0xc9, 0x3a, + 0xc9, 0xb9, 0xca, 0x38, 0xca, 0xb7, 0xcb, 0x36, 0xcb, 0xb6, 0xcc, 0x35, + 0xcc, 0xb5, 0xcd, 0x35, 0xcd, 0xb5, 0xce, 0x36, 0xce, 0xb6, 0xcf, 0x37, + 0xcf, 0xb8, 0xd0, 0x39, 0xd0, 0xba, 0xd1, 0x3c, 0xd1, 0xbe, 0xd2, 0x3f, + 0xd2, 0xc1, 0xd3, 0x44, 0xd3, 0xc6, 0xd4, 0x49, 0xd4, 0xcb, 0xd5, 0x4e, + 0xd5, 0xd1, 0xd6, 0x55, 0xd6, 0xd8, 0xd7, 0x5c, 0xd7, 0xe0, 0xd8, 0x64, + 0xd8, 0xe8, 0xd9, 0x6c, 0xd9, 0xf1, 0xda, 0x76, 0xda, 0xfb, 0xdb, 0x80, + 0xdc, 0x05, 0xdc, 0x8a, 0xdd, 0x10, 0xdd, 0x96, 0xde, 0x1c, 0xde, 0xa2, + 0xdf, 0x29, 0xdf, 0xaf, 0xe0, 0x36, 0xe0, 0xbd, 0xe1, 0x44, 0xe1, 0xcc, + 0xe2, 0x53, 0xe2, 0xdb, 0xe3, 0x63, 0xe3, 0xeb, 0xe4, 0x73, 0xe4, 0xfc, + 0xe5, 0x84, 0xe6, 0x0d, 0xe6, 0x96, 0xe7, 0x1f, 0xe7, 0xa9, 0xe8, 0x32, + 0xe8, 0xbc, 0xe9, 0x46, 0xe9, 0xd0, 0xea, 0x5b, 0xea, 0xe5, 0xeb, 0x70, + 0xeb, 0xfb, 0xec, 0x86, 0xed, 0x11, 0xed, 0x9c, 0xee, 0x28, 0xee, 0xb4, + 0xef, 0x40, 0xef, 0xcc, 0xf0, 0x58, 0xf0, 0xe5, 0xf1, 0x72, 0xf1, 0xff, + 0xf2, 0x8c, 0xf3, 0x19, 0xf3, 0xa7, 0xf4, 0x34, 0xf4, 0xc2, 0xf5, 0x50, + 0xf5, 0xde, 0xf6, 0x6d, 0xf6, 0xfb, 0xf7, 0x8a, 0xf8, 0x19, 0xf8, 0xa8, + 0xf9, 0x38, 0xf9, 0xc7, 0xfa, 0x57, 0xfa, 0xe7, 0xfb, 0x77, 0xfc, 0x07, + 0xfc, 0x98, 0xfd, 0x29, 0xfd, 0xba, 0xfe, 0x4b, 0xfe, 0xdc, 0xff, 0x6d, + 0xff, 0xff, 0xff, 0xdb, 0x00, 0x43, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, + 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x04, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x02, 0x02, 0x03, 0x04, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x02, 0x03, 0x05, 0x05, 0x04, 0x04, 0x05, 0x04, 0x04, 0x04, 0x04, 0xff, + 0xdb, 0x00, 0x43, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, + 0x01, 0x02, 0x04, 0x03, 0x02, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0xff, 0xc0, 0x00, 0x11, + 0x08, 0x00, 0x2e, 0x00, 0x2e, 0x03, 0x01, 0x11, 0x00, 0x02, 0x11, 0x01, + 0x03, 0x11, 0x01, 0xff, 0xc4, 0x00, 0x1c, 0x00, 0x00, 0x01, 0x04, 0x03, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x09, 0x05, 0x07, 0x08, 0x0a, 0x01, 0x02, 0x06, 0x03, 0xff, 0xc4, 0x00, + 0x31, 0x10, 0x00, 0x00, 0x06, 0x02, 0x01, 0x03, 0x03, 0x03, 0x03, 0x02, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, + 0x07, 0x08, 0x11, 0x00, 0x09, 0x12, 0x13, 0x14, 0x21, 0x22, 0x31, 0x41, + 0x15, 0x23, 0x32, 0x16, 0x19, 0x35, 0x42, 0x52, 0x61, 0x74, 0x91, 0xb3, + 0xff, 0xc4, 0x00, 0x1e, 0x01, 0x00, 0x02, 0x01, 0x04, 0x03, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x05, + 0x01, 0x04, 0x06, 0x09, 0x02, 0x03, 0x0a, 0x00, 0xff, 0xc4, 0x00, 0x39, + 0x11, 0x00, 0x02, 0x01, 0x03, 0x03, 0x03, 0x02, 0x04, 0x03, 0x05, 0x07, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x11, 0x06, + 0x12, 0x21, 0x00, 0x07, 0x31, 0x08, 0x13, 0x22, 0x32, 0x41, 0x51, 0x14, + 0x23, 0x61, 0x15, 0x42, 0x62, 0x81, 0xb1, 0x09, 0x17, 0x18, 0x24, 0x33, + 0x34, 0x71, 0x52, 0x72, 0x91, 0xa1, 0xd1, 0xff, 0xda, 0x00, 0x0c, 0x03, + 0x01, 0x00, 0x02, 0x11, 0x03, 0x11, 0x00, 0x3f, 0x00, 0x1c, 0x6e, 0xdd, + 0xae, 0x9a, 0xce, 0x4c, 0x77, 0x6b, 0x11, 0x34, 0x94, 0x39, 0x8e, 0xa2, + 0x8e, 0x4c, 0x05, 0x21, 0x4a, 0x22, 0x22, 0x63, 0x18, 0x47, 0xec, 0x00, + 0x1c, 0x88, 0x88, 0xfe, 0x3e, 0x7a, 0xd4, 0xdb, 0x33, 0xef, 0x20, 0x13, + 0xe7, 0xaf, 0x5e, 0x50, 0xc3, 0x1b, 0xa2, 0x05, 0x40, 0x49, 0x03, 0x80, + 0x07, 0x93, 0xf6, 0x03, 0xff, 0x00, 0x40, 0x74, 0xb3, 0x53, 0xae, 0x5e, + 0x6f, 0xd6, 0xa8, 0x5a, 0x1d, 0x0e, 0xb1, 0x71, 0xba, 0xde, 0xec, 0x6e, + 0x45, 0xa4, 0x05, 0x26, 0xb1, 0x0c, 0xee, 0x5e, 0xd7, 0x2c, 0xa1, 0x4b, + 0xe6, 0x72, 0xa4, 0xc4, 0x85, 0xf5, 0x40, 0x0a, 0x41, 0x03, 0x98, 0xe7, + 0x02, 0x90, 0x85, 0x10, 0x31, 0x8c, 0x50, 0x10, 0x11, 0xbd, 0xa0, 0xb6, + 0xdd, 0x2e, 0x95, 0x8b, 0x41, 0x6e, 0x85, 0xe4, 0x99, 0x8e, 0x02, 0xa8, + 0x2c, 0xc7, 0xf9, 0x0c, 0x9f, 0xb9, 0xe3, 0xe8, 0x09, 0xf0, 0x0f, 0x51, + 0xf7, 0x9b, 0xae, 0x9e, 0xd3, 0x76, 0x79, 0xf5, 0x1e, 0xa2, 0xab, 0x82, + 0x96, 0xdd, 0x00, 0xdd, 0x25, 0x44, 0xd2, 0x22, 0x42, 0x80, 0x9c, 0x02, + 0x64, 0x27, 0x6e, 0x49, 0xe0, 0x00, 0x4b, 0x31, 0xc8, 0x00, 0x90, 0x47, + 0x4e, 0x93, 0x0c, 0x13, 0x90, 0x22, 0x32, 0x9d, 0x73, 0x16, 0x67, 0xb7, + 0x32, 0x7a, 0x87, 0xfd, 0x40, 0xba, 0xed, 0x57, 0xc8, 0x3b, 0x23, 0x4e, + 0xb0, 0x54, 0x68, 0xd0, 0x0a, 0x22, 0x82, 0x8a, 0xa6, 0x47, 0x0b, 0x15, + 0xb8, 0x8a, 0x82, 0xb9, 0xc8, 0x54, 0x08, 0x64, 0x44, 0x48, 0x53, 0x28, + 0x06, 0x50, 0xe4, 0x21, 0x4c, 0x60, 0xc8, 0x68, 0xf4, 0x7d, 0xdc, 0x5e, + 0x21, 0xb5, 0x5f, 0xc1, 0xa2, 0x57, 0x24, 0x6f, 0x9d, 0x64, 0x40, 0x30, + 0x09, 0xe7, 0xe0, 0x2d, 0x83, 0x8c, 0x67, 0x6e, 0x39, 0x04, 0x90, 0x32, + 0x46, 0x1d, 0x55, 0xdc, 0x7d, 0x33, 0x59, 0xa3, 0xaa, 0xb5, 0x87, 0x6e, + 0x55, 0x35, 0x27, 0xb2, 0x14, 0x8a, 0x6b, 0x54, 0xf4, 0xd3, 0xd4, 0x48, + 0x19, 0x82, 0x92, 0xa0, 0xc9, 0x85, 0xd8, 0x0e, 0xf6, 0x0c, 0x03, 0x10, + 0x36, 0xa2, 0xb3, 0x90, 0x3a, 0x20, 0x39, 0x0f, 0xb2, 0xae, 0xf0, 0x56, + 0x29, 0x6d, 0x72, 0x36, 0x28, 0x96, 0xc3, 0xbb, 0x51, 0x48, 0x7b, 0x1a, + 0x33, 0x0c, 0xa5, 0x30, 0x3e, 0x41, 0x33, 0x99, 0x49, 0x66, 0xc0, 0x26, + 0x0f, 0x52, 0x39, 0xab, 0xd2, 0x24, 0x83, 0xde, 0x7c, 0x47, 0x80, 0x6a, + 0xe9, 0x43, 0x1b, 0x81, 0x02, 0x94, 0xc3, 0xf1, 0xd1, 0x06, 0xe5, 0xd8, + 0x5d, 0x69, 0x05, 0x17, 0xed, 0x2b, 0x3c, 0xb0, 0xd6, 0x40, 0x40, 0x2a, + 0x61, 0x93, 0x71, 0x23, 0x3c, 0x91, 0xb8, 0x20, 0x60, 0x07, 0x20, 0x26, + 0xe2, 0x7c, 0x01, 0x9e, 0x96, 0xbd, 0x33, 0xeb, 0xe3, 0xd3, 0xed, 0xda, + 0xfc, 0xfa, 0x5b, 0x59, 0x43, 0x5d, 0xa7, 0xee, 0x0a, 0xfb, 0x19, 0x2e, + 0x34, 0xc0, 0x22, 0x3f, 0x1c, 0x4a, 0xf0, 0xb3, 0xbc, 0x3e, 0x79, 0x32, + 0x42, 0xa0, 0x79, 0x24, 0x0e, 0x7a, 0x13, 0x32, 0x4d, 0xe7, 0x61, 0x25, + 0xa5, 0xab, 0xf3, 0xec, 0x67, 0x6b, 0xd6, 0x2a, 0xfc, 0x82, 0x91, 0x36, + 0x0a, 0xe5, 0x81, 0x8b, 0x98, 0x3b, 0x04, 0x03, 0xb4, 0x87, 0x85, 0x1b, + 0x3d, 0x64, 0xb9, 0x48, 0xb2, 0x0a, 0x94, 0x7e, 0xe4, 0x50, 0xa0, 0x3c, + 0x70, 0x21, 0xc8, 0x08, 0x08, 0x85, 0xaa, 0xa9, 0xeb, 0x68, 0x67, 0x6a, + 0x5a, 0xd4, 0x68, 0xe5, 0x5f, 0x2a, 0xc0, 0x86, 0x07, 0xec, 0x41, 0xe4, + 0x11, 0xe0, 0x8f, 0x20, 0xe4, 0x1e, 0x41, 0xe9, 0xd0, 0xa4, 0x96, 0xdd, + 0x71, 0xa2, 0x86, 0xe7, 0x6d, 0x92, 0x39, 0xa9, 0x66, 0x50, 0xf1, 0x4b, + 0x13, 0x24, 0x91, 0x48, 0x87, 0xc3, 0xc7, 0x22, 0x12, 0x8e, 0xa7, 0xee, + 0xa4, 0xfd, 0x8f, 0x3c, 0x74, 0xa3, 0x5e, 0x5d, 0xc2, 0x8f, 0xd4, 0x29, + 0x9c, 0xba, 0x00, 0xf6, 0x67, 0x37, 0xd0, 0xe9, 0x44, 0x87, 0xf9, 0xa5, + 0xf9, 0x01, 0x01, 0xfc, 0xfd, 0xba, 0xa5, 0x33, 0x31, 0x97, 0x19, 0x3e, + 0x0f, 0xd4, 0xfd, 0xc7, 0x56, 0xf7, 0x24, 0x8d, 0x29, 0xc1, 0x08, 0x3e, + 0x61, 0xe4, 0x03, 0xf4, 0x3f, 0x71, 0xd4, 0xaf, 0xd4, 0x1c, 0x73, 0x8e, + 0x9d, 0xcb, 0xe6, 0x7d, 0x9c, 0xcf, 0x30, 0x49, 0xd9, 0xb5, 0xeb, 0x4e, + 0x2a, 0x6d, 0xf2, 0x55, 0xb6, 0x9a, 0xe8, 0xe5, 0x49, 0x86, 0x5c, 0xb7, + 0x49, 0xbe, 0x33, 0x0a, 0x15, 0x29, 0x73, 0x9b, 0x90, 0xf6, 0xef, 0xa4, + 0x13, 0x33, 0x87, 0x60, 0x24, 0x50, 0xbe, 0xdd, 0x88, 0x11, 0x42, 0x0a, + 0x6b, 0x1f, 0xa2, 0x1f, 0x6f, 0x6c, 0xd4, 0x13, 0x4f, 0x5b, 0xaa, 0x6f, + 0x51, 0xfb, 0x94, 0x54, 0x2a, 0x1c, 0xc6, 0x79, 0x12, 0xca, 0xe7, 0x6c, + 0x31, 0x37, 0x04, 0x85, 0x77, 0xe5, 0x8e, 0xd6, 0x1b, 0x12, 0x40, 0x47, + 0x82, 0x02, 0xfd, 0xef, 0xd5, 0x3a, 0xa2, 0x0a, 0x1b, 0x0f, 0x69, 0x7b, + 0x73, 0x52, 0x60, 0xd4, 0xda, 0x9a, 0x67, 0xa4, 0x82, 0x71, 0x92, 0xd4, + 0x54, 0x50, 0xc7, 0xee, 0x5c, 0xab, 0xd4, 0x0c, 0x7e, 0x64, 0x30, 0x10, + 0x90, 0x61, 0x95, 0xbd, 0xd9, 0x37, 0x23, 0x07, 0x41, 0xd1, 0x7a, 0xed, + 0xc9, 0x96, 0xfb, 0x81, 0x63, 0x9b, 0x76, 0xc3, 0x6d, 0xe6, 0x44, 0xed, + 0xf1, 0x98, 0x76, 0x4a, 0xd5, 0xb5, 0x4f, 0x20, 0xe7, 0x8d, 0x93, 0x62, + 0x1c, 0x41, 0xe2, 0xb9, 0x88, 0x78, 0xd6, 0x08, 0x39, 0x21, 0x58, 0x42, + 0x46, 0xc9, 0x01, 0x5f, 0xab, 0x14, 0xa2, 0x4a, 0x47, 0x11, 0xba, 0x64, + 0x2a, 0x65, 0x14, 0xa2, 0x9b, 0x09, 0x85, 0x51, 0x02, 0x9c, 0x0e, 0x3d, + 0xb9, 0xba, 0xeb, 0xfa, 0x3a, 0xeb, 0x8e, 0xae, 0xb9, 0x58, 0xa4, 0xa9, + 0x7a, 0xd2, 0x84, 0x49, 0x91, 0x1b, 0xaa, 0xae, 0xee, 0x15, 0x4a, 0x92, + 0xca, 0xc0, 0xa6, 0x36, 0x9d, 0xb8, 0x45, 0xc1, 0x23, 0x18, 0x48, 0xbd, + 0x52, 0xe8, 0xaf, 0x4d, 0x5a, 0xa2, 0xc9, 0xa6, 0x7b, 0x23, 0xa5, 0xfb, + 0x99, 0x45, 0x63, 0xa3, 0xd3, 0xcb, 0x51, 0x1f, 0xe1, 0x1c, 0x54, 0x56, + 0x24, 0x92, 0xc8, 0xc8, 0x4c, 0x95, 0x13, 0x41, 0x98, 0x16, 0xa5, 0x58, + 0x4a, 0x65, 0x66, 0x2c, 0x77, 0xcd, 0x20, 0x50, 0x83, 0x2a, 0x4a, 0xdd, + 0x7f, 0xb9, 0xe6, 0xa0, 0x66, 0x09, 0x84, 0xb5, 0xef, 0x6d, 0xb1, 0x8d, + 0xe7, 0x59, 0x6e, 0x96, 0xd1, 0xfd, 0x38, 0x31, 0x5e, 0xe9, 0xe2, 0xe4, + 0xa0, 0x29, 0x76, 0xd5, 0x04, 0xe0, 0x90, 0x24, 0xd2, 0x59, 0x70, 0x5a, + 0x25, 0xc1, 0x4d, 0xea, 0x90, 0x08, 0x2b, 0x28, 0x97, 0x98, 0xa8, 0x00, + 0x50, 0x11, 0xf8, 0xe8, 0xb1, 0x07, 0x71, 0x74, 0x9d, 0xe6, 0x4f, 0xd8, + 0x3a, 0xa6, 0x99, 0xe9, 0x64, 0x7e, 0x3d, 0xaa, 0xc8, 0xb6, 0xa3, 0xfd, + 0x0e, 0x0b, 0x65, 0x4a, 0xf3, 0x80, 0x5c, 0x28, 0x39, 0xe3, 0x39, 0x19, + 0x4d, 0x2e, 0x5e, 0x92, 0x3b, 0xdf, 0xa1, 0xe8, 0x4f, 0x73, 0x3b, 0x2b, + 0x77, 0xa7, 0xbe, 0xd0, 0x53, 0x7c, 0x5f, 0x8c, 0xb0, 0xd6, 0x19, 0x67, + 0x84, 0x60, 0xb6, 0x5e, 0x14, 0xf6, 0xea, 0x50, 0x8d, 0xa7, 0x70, 0x45, + 0x7d, 0xa0, 0x65, 0x88, 0x1c, 0xf4, 0xdd, 0x64, 0x1d, 0x15, 0xcc, 0x3a, + 0x43, 0x2d, 0x35, 0xb0, 0xbd, 0xad, 0x64, 0x9c, 0x23, 0x09, 0xe6, 0x13, + 0xd9, 0x4b, 0x42, 0x6d, 0x13, 0x2b, 0xc9, 0x61, 0x9c, 0xb4, 0xd0, 0x82, + 0x2a, 0xbc, 0x5a, 0x9e, 0xa2, 0xa7, 0x39, 0xe1, 0x66, 0x4c, 0x4e, 0x45, + 0x1f, 0x44, 0x45, 0x25, 0x4d, 0xe0, 0x42, 0xf0, 0x42, 0xfb, 0x65, 0xec, + 0x6b, 0xf4, 0x6d, 0xd7, 0x48, 0x4a, 0xd7, 0xee, 0xdc, 0xb9, 0xf6, 0xf3, + 0xba, 0x5a, 0x36, 0x25, 0xa3, 0x94, 0x7d, 0x4c, 0x79, 0x24, 0xab, 0xe3, + 0xc0, 0x07, 0xec, 0x14, 0x80, 0x3d, 0xb7, 0xc9, 0xb4, 0xc7, 0xa8, 0x6d, + 0x0f, 0xea, 0x02, 0x8a, 0x9f, 0xb6, 0x1e, 0xaf, 0x61, 0x06, 0x7e, 0x63, + 0xa4, 0xd4, 0x70, 0xa2, 0xa5, 0x75, 0x13, 0x9c, 0x04, 0x5a, 0xd0, 0xa1, + 0x56, 0xae, 0x94, 0x1f, 0x9f, 0x70, 0xdc, 0xa3, 0x2c, 0x72, 0xe7, 0xde, + 0x8a, 0x3c, 0x6e, 0x06, 0x0a, 0xc0, 0xfd, 0xdf, 0xb5, 0x11, 0xde, 0xe4, + 0x6b, 0x14, 0x1a, 0x90, 0x7b, 0x49, 0x8a, 0xa2, 0x5d, 0xb1, 0x98, 0xac, + 0x3f, 0x62, 0x10, 0xf7, 0xf7, 0xcf, 0x21, 0x12, 0xf5, 0x26, 0xb1, 0xb5, + 0xc1, 0xa8, 0x07, 0x91, 0x9f, 0x22, 0x5f, 0x21, 0x8e, 0x5d, 0x42, 0x89, + 0x88, 0xa9, 0x9b, 0x89, 0x0e, 0x0d, 0xdc, 0x28, 0x06, 0xc5, 0x75, 0xc6, + 0x9c, 0xb0, 0xf7, 0x73, 0x48, 0x3e, 0xa8, 0xb1, 0x47, 0xb6, 0xe5, 0x00, + 0x39, 0x5c, 0x7e, 0x66, 0x54, 0x65, 0xa1, 0x70, 0x3e, 0x66, 0xc7, 0x31, + 0x93, 0xe7, 0x81, 0x95, 0x0d, 0x95, 0x28, 0x76, 0x3b, 0xb8, 0xbd, 0xc6, + 0xf4, 0x45, 0xde, 0xc4, 0xec, 0x5f, 0x76, 0xaa, 0x44, 0xda, 0x3e, 0xe2, + 0xe8, 0xd1, 0xcc, 0xad, 0xee, 0x53, 0x2a, 0x4e, 0x71, 0x05, 0xd6, 0x89, + 0xc9, 0xc0, 0x85, 0x8f, 0x15, 0x48, 0xa4, 0x06, 0x41, 0x20, 0x65, 0x33, + 0x44, 0x98, 0xa9, 0xed, 0x49, 0xc2, 0x4e, 0xdc, 0x91, 0xca, 0x22, 0x61, + 0x49, 0xc4, 0x68, 0xac, 0x9f, 0x99, 0x05, 0x33, 0xf0, 0x63, 0x22, 0x20, + 0x06, 0x28, 0xfc, 0x80, 0xfc, 0xfc, 0x80, 0xfc, 0x80, 0xf2, 0x1d, 0x25, + 0x74, 0xc0, 0xac, 0xe5, 0x4f, 0x90, 0x0f, 0xeb, 0xf5, 0x1d, 0x6e, 0x82, + 0xf3, 0x1b, 0xc3, 0x11, 0x89, 0xfe, 0x65, 0x7c, 0x1f, 0xe4, 0x1b, 0xff, + 0x00, 0x23, 0xf5, 0xe8, 0xe4, 0x76, 0xe3, 0xa4, 0xd1, 0x6d, 0x38, 0xb7, + 0x4d, 0xe8, 0x77, 0x68, 0xa8, 0x97, 0x95, 0x8c, 0xe3, 0xdd, 0x46, 0xcb, + 0x66, 0xbe, 0x92, 0x58, 0xa0, 0x78, 0xeb, 0x31, 0xb1, 0xbe, 0x33, 0x5d, + 0xdd, 0x52, 0x11, 0xf2, 0x46, 0xfd, 0xb5, 0xd0, 0x3c, 0x92, 0x89, 0xac, + 0x0d, 0x95, 0x03, 0x11, 0x55, 0x38, 0x28, 0x94, 0xc0, 0x3c, 0x0b, 0x27, + 0xda, 0xda, 0x0a, 0x2a, 0x9b, 0x1d, 0xa2, 0xdf, 0x70, 0x50, 0x62, 0x9e, + 0xe5, 0x23, 0xb1, 0x3e, 0x0f, 0xb1, 0x4e, 0x1a, 0x28, 0xdb, 0xe8, 0xca, + 0xcf, 0x23, 0x7c, 0x24, 0x1c, 0x96, 0xc1, 0xeb, 0x5e, 0x7e, 0xa9, 0xef, + 0xda, 0x86, 0xcf, 0xac, 0x75, 0xd6, 0xa2, 0xb0, 0x4c, 0xe9, 0x57, 0x6a, + 0xd1, 0xf4, 0x90, 0xd3, 0x6c, 0xf9, 0xa2, 0xfd, 0xa9, 0x76, 0x54, 0xad, + 0xa8, 0x8c, 0x8f, 0x89, 0x24, 0x14, 0xe0, 0xa9, 0x91, 0x08, 0x64, 0x5c, + 0x90, 0x41, 0x19, 0x16, 0x66, 0xda, 0xcc, 0xeb, 0xb4, 0x98, 0x59, 0xf5, + 0x2d, 0xe6, 0x05, 0xd3, 0x59, 0x5d, 0xab, 0xaa, 0x48, 0x36, 0x7a, 0xe3, + 0x21, 0x3d, 0xae, 0xe6, 0x18, 0x6c, 0x7d, 0x67, 0xa7, 0x9d, 0x13, 0x20, + 0x0c, 0xd1, 0x67, 0x16, 0xf5, 0x33, 0x1d, 0xf0, 0xae, 0x53, 0xb8, 0x38, + 0x99, 0x23, 0x00, 0x17, 0xdb, 0x81, 0x04, 0x39, 0x39, 0x47, 0xa6, 0x73, + 0x54, 0x5f, 0x35, 0x35, 0x9a, 0x48, 0x5a, 0xc5, 0x68, 0x35, 0xb1, 0x1c, + 0xfb, 0x84, 0x4c, 0xb1, 0x94, 0xc7, 0x8c, 0x29, 0x56, 0x67, 0xcf, 0xf0, + 0x83, 0xf6, 0xe3, 0xcf, 0x5a, 0x97, 0xec, 0xd7, 0x6e, 0xbb, 0x3f, 0xaf, + 0xa9, 0xae, 0x10, 0xf7, 0x1f, 0x5d, 0xa6, 0x9f, 0xad, 0x43, 0x18, 0xa6, + 0x59, 0x68, 0x67, 0xaa, 0x8a, 0x70, 0xc1, 0xb7, 0xb3, 0xcd, 0x0b, 0x05, + 0x87, 0x61, 0x0a, 0x30, 0xe3, 0x9d, 0xdb, 0x81, 0xc2, 0x9e, 0x98, 0x0c, + 0x73, 0xb4, 0x5a, 0x6d, 0xdc, 0x99, 0x9d, 0xbf, 0x55, 0xb3, 0x9e, 0x22, + 0x95, 0xab, 0xe5, 0x88, 0xa6, 0x2a, 0x39, 0xbb, 0xea, 0x9e, 0xcf, 0x52, + 0xbf, 0xa6, 0x72, 0x2c, 0x72, 0x69, 0x7d, 0x2a, 0x49, 0x42, 0x98, 0xc3, + 0xfb, 0xe5, 0x4c, 0x40, 0x4e, 0x47, 0xb1, 0x8b, 0x15, 0x74, 0x8a, 0x05, + 0x50, 0x41, 0x20, 0x12, 0x98, 0x61, 0x2d, 0xfa, 0x97, 0x49, 0xf7, 0x05, + 0x24, 0xd3, 0x97, 0x9a, 0x53, 0x1d, 0x48, 0xf9, 0xa9, 0xea, 0x13, 0x6c, + 0x83, 0xf8, 0x90, 0xf9, 0xc8, 0x1c, 0x82, 0xa5, 0x64, 0x51, 0x86, 0x21, + 0x7a, 0x25, 0x6a, 0x9e, 0xd0, 0xf7, 0xd3, 0xd2, 0xac, 0xf4, 0x5d, 0xe0, + 0xed, 0xed, 0xed, 0x2a, 0x2c, 0xb2, 0x30, 0x10, 0x5e, 0x2d, 0x33, 0xfb, + 0xb4, 0xac, 0x5b, 0x91, 0x14, 0xe0, 0x7c, 0x85, 0xbc, 0x34, 0x33, 0xa1, + 0x89, 0xce, 0x53, 0x2e, 0x43, 0x00, 0xc5, 0x61, 0xe9, 0x9c, 0x8b, 0xda, + 0xe7, 0x61, 0xb1, 0xce, 0xa7, 0xe5, 0x0b, 0xb4, 0xfe, 0x47, 0xd1, 0x6d, + 0x89, 0x9f, 0x3d, 0x53, 0x53, 0x32, 0xad, 0xd6, 0x40, 0xd2, 0x76, 0xcc, + 0x03, 0x6a, 0x30, 0x7a, 0x8d, 0xb1, 0xcc, 0xeb, 0xf3, 0x7c, 0xac, 0xc1, + 0xe1, 0x79, 0x2c, 0x62, 0xe7, 0xe0, 0x4a, 0x62, 0x81, 0x0a, 0x50, 0x21, + 0x17, 0x14, 0x61, 0x2d, 0x73, 0xd7, 0x76, 0xda, 0xfd, 0x4f, 0xa6, 0x2e, + 0x12, 0x34, 0xb6, 0x6a, 0xa3, 0xb2, 0x9a, 0x46, 0xe4, 0xc3, 0x27, 0xd2, + 0x17, 0x3f, 0xf4, 0x9e, 0x02, 0xf1, 0x8e, 0x41, 0x50, 0x14, 0x49, 0xb4, + 0x87, 0xae, 0x28, 0x34, 0xbf, 0xab, 0xee, 0xd8, 0xdd, 0x3b, 0xcb, 0xa4, + 0x68, 0x23, 0xa1, 0xee, 0x1d, 0x96, 0x31, 0x35, 0xe6, 0x8e, 0x9d, 0x76, + 0xc3, 0x72, 0xa3, 0x1c, 0x3d, 0xd2, 0x9e, 0x31, 0xf2, 0xcd, 0x11, 0xe6, + 0xad, 0x06, 0x72, 0x32, 0xcc, 0x77, 0xb4, 0x42, 0x45, 0x8d, 0x8b, 0x88, + 0x0e, 0xdf, 0xfb, 0xd3, 0x8b, 0xf7, 0x22, 0x98, 0x51, 0x86, 0xd7, 0xcd, + 0xc5, 0xb8, 0xc7, 0x6b, 0xde, 0xe4, 0xd5, 0x99, 0x94, 0x1b, 0x57, 0xa1, + 0xed, 0x0f, 0x45, 0x42, 0x53, 0x32, 0x08, 0xa2, 0x50, 0xf1, 0x4d, 0x61, + 0x5c, 0x55, 0x68, 0xf9, 0x7e, 0x00, 0xa2, 0x45, 0x14, 0x31, 0xbc, 0xd6, + 0x74, 0x63, 0xf5, 0xcb, 0x50, 0x42, 0x34, 0x26, 0xb5, 0xa6, 0xd5, 0x94, + 0x63, 0x6d, 0x05, 0x7b, 0x88, 0x2a, 0xd4, 0x70, 0xa2, 0x43, 0x93, 0x1c, + 0xde, 0x70, 0x3f, 0x79, 0x9d, 0x88, 0xe3, 0x0f, 0xe5, 0xe6, 0xcf, 0x56, + 0x3d, 0xae, 0xae, 0xff, 0x00, 0x12, 0x9e, 0x9e, 0x6e, 0xfd, 0x8d, 0xbf, + 0x7e, 0x6e, 0xa6, 0xd3, 0x30, 0x4b, 0x73, 0xb1, 0xcc, 0xdc, 0xca, 0xf4, + 0x91, 0xe0, 0xd7, 0x5b, 0x72, 0x79, 0x65, 0xd9, 0xb6, 0x4a, 0x74, 0xc9, + 0x3b, 0x82, 0xa8, 0xdb, 0x14, 0x01, 0x7a, 0xa9, 0xa6, 0xca, 0x53, 0x61, + 0x31, 0xd6, 0xe4, 0x6d, 0x65, 0x06, 0xb2, 0x44, 0x93, 0xad, 0xd4, 0xb3, + 0xcd, 0xbe, 0x32, 0x05, 0x24, 0x04, 0xa6, 0x41, 0x06, 0xa7, 0x9a, 0x3b, + 0xb4, 0x91, 0x20, 0x97, 0xe9, 0xf1, 0x48, 0x1c, 0xfa, 0x40, 0x01, 0xf6, + 0xf4, 0xf8, 0xf8, 0xe3, 0x8e, 0x93, 0x0d, 0x65, 0x43, 0x15, 0xbb, 0x5b, + 0xdc, 0xe8, 0xe9, 0xc8, 0xf6, 0xd2, 0x69, 0x42, 0x81, 0x8c, 0x05, 0x12, + 0x10, 0xa3, 0x8f, 0xb0, 0x00, 0x75, 0xba, 0x6e, 0xd4, 0x5f, 0x6e, 0x1a, + 0x9f, 0xb1, 0x9a, 0x37, 0x51, 0xdd, 0x89, 0x35, 0x55, 0x36, 0xda, 0x17, + 0x90, 0x9c, 0xe4, 0xb8, 0xa7, 0x08, 0xcc, 0x73, 0xce, 0x5b, 0x6e, 0xee, + 0x7c, 0xe7, 0x3f, 0x5e, 0x9f, 0x5c, 0x41, 0x2b, 0x3b, 0x7e, 0xd0, 0x5d, + 0x88, 0xa2, 0x52, 0x25, 0x5f, 0x43, 0x65, 0xcd, 0x33, 0xd8, 0xea, 0xfe, + 0xfa, 0x63, 0xf7, 0xd5, 0xb7, 0x0e, 0x1a, 0x5d, 0x9a, 0x57, 0x9d, 0x34, + 0x2d, 0x5e, 0xd9, 0x25, 0x16, 0xaa, 0x40, 0x22, 0x51, 0x85, 0x70, 0x84, + 0x64, 0xaa, 0xa7, 0x1f, 0xe0, 0x51, 0x20, 0x8f, 0x20, 0x22, 0x03, 0x97, + 0x69, 0x9a, 0x9a, 0xaa, 0xfe, 0xde, 0xd7, 0xdb, 0xed, 0x4e, 0x56, 0xb6, + 0x82, 0xa1, 0x2b, 0x53, 0x1f, 0x3b, 0x21, 0x1e, 0xd4, 0x9b, 0x79, 0xca, + 0xac, 0x67, 0xd9, 0x76, 0x6e, 0x36, 0xf2, 0xc0, 0xf1, 0xd0, 0xe7, 0x5c, + 0xd1, 0x5b, 0xb4, 0xdf, 0xa9, 0x2d, 0x31, 0xa8, 0xf5, 0x04, 0x2b, 0x2d, + 0x97, 0x53, 0xda, 0xaa, 0x74, 0xe5, 0x4a, 0xca, 0x15, 0xa9, 0xcd, 0x52, + 0x39, 0xac, 0xa3, 0x8a, 0x60, 0xde, 0x7f, 0x16, 0x8d, 0x2d, 0x32, 0x0f, + 0xde, 0x3b, 0x87, 0x07, 0x07, 0xa2, 0xbb, 0x82, 0x7b, 0xd2, 0xef, 0xfc, + 0x26, 0x15, 0x8c, 0xcd, 0x79, 0xa7, 0x48, 0x24, 0x33, 0x66, 0xbf, 0x56, + 0xcc, 0x2c, 0x6e, 0x1b, 0x29, 0x8e, 0x90, 0x75, 0x8f, 0x82, 0x4d, 0x04, + 0x16, 0x16, 0xae, 0x64, 0xc1, 0x8a, 0x89, 0x2c, 0xc5, 0x4f, 0x49, 0x5e, + 0x48, 0xab, 0x86, 0xfe, 0x83, 0x11, 0x51, 0x33, 0x97, 0xd4, 0x6f, 0xf3, + 0xe0, 0x63, 0xd3, 0x7d, 0xe6, 0xd7, 0x22, 0xc0, 0x97, 0xcb, 0xe5, 0x99, + 0xa6, 0xa3, 0x53, 0x86, 0x9d, 0x15, 0x93, 0x20, 0x70, 0x5f, 0xe5, 0x64, + 0x38, 0x3c, 0x36, 0xd0, 0xab, 0xbb, 0x2b, 0xf0, 0x9e, 0x93, 0x3e, 0xe3, + 0x7a, 0x09, 0xf4, 0xd5, 0x70, 0xd7, 0xd3, 0x68, 0x2d, 0x05, 0xdc, 0x05, + 0xb5, 0x6a, 0x59, 0xfe, 0x28, 0x2d, 0x55, 0x45, 0x2a, 0x76, 0x33, 0x2e, + 0xf4, 0x8b, 0xdc, 0x0d, 0x1c, 0xcb, 0xb9, 0x79, 0x44, 0x7f, 0x72, 0xa3, + 0x69, 0x0d, 0xb6, 0x4e, 0x37, 0x12, 0x8d, 0xbb, 0xc5, 0xf8, 0xdf, 0xb8, + 0x56, 0xa0, 0x52, 0xb7, 0x27, 0x58, 0xa6, 0xd4, 0x89, 0xce, 0xd8, 0xd2, + 0xa0, 0x7c, 0xf3, 0xa9, 0xb9, 0xa6, 0x29, 0xb7, 0xe9, 0x17, 0x58, 0x77, + 0xf1, 0x40, 0xab, 0xc7, 0x35, 0x99, 0x01, 0x00, 0x13, 0x19, 0x07, 0x4a, + 0x36, 0x77, 0x1c, 0xe9, 0x82, 0xc2, 0x74, 0x93, 0x73, 0xc9, 0x84, 0xa6, + 0x02, 0x18, 0xa7, 0x25, 0x6a, 0xba, 0x0b, 0x7e, 0xbb, 0xd2, 0x31, 0xea, + 0xed, 0x38, 0xe5, 0x6b, 0x21, 0x43, 0x35, 0x3c, 0xab, 0x8d, 0xe0, 0xa6, + 0x4b, 0x44, 0x7c, 0x8c, 0xe5, 0x59, 0x70, 0x49, 0x55, 0x90, 0x67, 0x90, + 0x18, 0x32, 0xa1, 0xd9, 0x4d, 0x5b, 0xaa, 0xbd, 0x33, 0x77, 0xba, 0xbf, + 0xb1, 0x3d, 0xdb, 0x80, 0x49, 0xa7, 0x6b, 0xa7, 0x16, 0xeb, 0xcd, 0x03, + 0x9d, 0xf4, 0xef, 0x1c, 0xd8, 0x44, 0xab, 0x8f, 0xc0, 0x0f, 0x1a, 0xba, + 0x4f, 0x14, 0xc9, 0xb5, 0xda, 0x1e, 0x01, 0x52, 0xca, 0x57, 0x39, 0x89, + 0xc4, 0x3f, 0x73, 0x5e, 0xd0, 0x72, 0x19, 0x19, 0x28, 0xf4, 0x62, 0x2d, + 0x19, 0x03, 0x01, 0x06, 0x65, 0xa9, 0x99, 0x98, 0x98, 0x8b, 0x53, 0x2f, + 0x15, 0x74, 0x95, 0x7e, 0x5f, 0xd3, 0xd7, 0x01, 0xf5, 0x13, 0xf4, 0xa5, + 0x22, 0xdd, 0x34, 0x05, 0x4a, 0x20, 0x71, 0x41, 0x63, 0x80, 0xff, 0x00, + 0x23, 0x07, 0x5c, 0x6f, 0x2d, 0x17, 0x70, 0xfb, 0x4e, 0xf7, 0x17, 0x41, + 0xef, 0x34, 0x26, 0x50, 0x17, 0xf7, 0x67, 0x87, 0x3b, 0x82, 0x13, 0xc8, + 0x05, 0xd1, 0xa3, 0xcf, 0x9d, 0x8c, 0x73, 0xe4, 0xf5, 0xf6, 0x87, 0x8a, + 0xb7, 0xd2, 0x77, 0xad, 0xc8, 0xf4, 0xb3, 0x4a, 0x64, 0xa3, 0xa4, 0xb9, + 0x7e, 0x06, 0x6d, 0xc0, 0x11, 0x3d, 0xbe, 0xb0, 0x88, 0xff, 0x00, 0x35, + 0x48, 0xda, 0xc5, 0xa9, 0xa6, 0x49, 0x4a, 0x91, 0xb4, 0x48, 0xaa, 0x47, + 0x80, 0x7a, 0x48, 0xcc, 0x76, 0x98, 0x8d, 0xdc, 0xec, 0x8f, 0x64, 0xc9, + 0x37, 0x99, 0x18, 0xa8, 0x87, 0xb7, 0xcd, 0x42, 0x4b, 0x26, 0x4a, 0x4e, + 0x4c, 0xb9, 0x49, 0xab, 0x18, 0xbb, 0x3d, 0x79, 0x92, 0x72, 0x62, 0xe0, + 0xab, 0x08, 0x00, 0x26, 0x3f, 0xab, 0x44, 0x89, 0x48, 0x21, 0xc0, 0xfe, + 0xe0, 0x14, 0x3e, 0xfc, 0x75, 0xd1, 0x7c, 0x9e, 0x3d, 0x5d, 0xd9, 0x89, + 0xab, 0x6e, 0x25, 0x4b, 0xb5, 0x2f, 0xb8, 0xc4, 0xf0, 0x0c, 0xb0, 0x8d, + 0xc7, 0xfe, 0x03, 0x4a, 0x98, 0x03, 0xec, 0x71, 0xce, 0x71, 0xd5, 0xf6, + 0x84, 0xb4, 0xd6, 0xf6, 0x07, 0xfb, 0x40, 0x29, 0x34, 0xb6, 0x9d, 0x89, + 0xe4, 0x8e, 0x92, 0xf6, 0x69, 0x12, 0x34, 0x04, 0xb3, 0xd1, 0xd5, 0x48, + 0x61, 0x0a, 0x54, 0x64, 0xb7, 0xf9, 0x59, 0xb2, 0xd9, 0xc8, 0xe0, 0x9e, + 0xa9, 0x27, 0x51, 0x50, 0x55, 0x70, 0x9a, 0xa2, 0x45, 0x13, 0x15, 0x63, + 0x05, 0x53, 0x26, 0xb0, 0x88, 0xac, 0x41, 0x39, 0x91, 0x30, 0x81, 0xc4, + 0x7e, 0x7c, 0xb9, 0x11, 0xe4, 0x47, 0xe7, 0x9e, 0x79, 0xe9, 0x00, 0xa6, + 0x18, 0x98, 0xe7, 0xec, 0x7c, 0x7f, 0xc8, 0xeb, 0xd0, 0x15, 0xe9, 0x76, + 0x46, 0x53, 0x20, 0xe1, 0xf1, 0x91, 0xe3, 0x80, 0xc3, 0x8f, 0xd3, 0xed, + 0xfa, 0x74, 0xe7, 0x60, 0xcc, 0xe3, 0x75, 0xd6, 0xec, 0xcf, 0x59, 0xcc, + 0xd4, 0x14, 0x22, 0xe4, 0xe6, 0x2b, 0x0e, 0x9d, 0xb0, 0x99, 0xa9, 0xd8, + 0x52, 0x2b, 0xaa, 0x9e, 0x45, 0x82, 0x91, 0x48, 0xed, 0x26, 0xeb, 0x53, + 0x28, 0x18, 0xa6, 0x2a, 0x8c, 0xa4, 0x5b, 0x1c, 0xe9, 0x1b, 0xc8, 0xa6, + 0xf4, 0xd4, 0x2a, 0x0b, 0x14, 0x3c, 0x92, 0x2f, 0x53, 0xba, 0x63, 0x52, + 0x55, 0xe9, 0x5b, 0xe4, 0x77, 0x6a, 0x50, 0x18, 0x02, 0x43, 0xa3, 0x72, + 0xb2, 0x23, 0x02, 0xae, 0x8e, 0xa7, 0x86, 0x56, 0x52, 0x41, 0x07, 0xef, + 0x91, 0x86, 0xc3, 0x0c, 0x43, 0xb8, 0x7d, 0xbd, 0xb0, 0x77, 0x57, 0x42, + 0x55, 0xe8, 0x4d, 0x48, 0xcf, 0x1c, 0x13, 0x84, 0x68, 0xe6, 0x88, 0xe2, + 0x6a, 0x5a, 0x88, 0x88, 0x7a, 0x7a, 0xb8, 0x18, 0x10, 0x56, 0x58, 0x24, + 0x01, 0x86, 0x08, 0xde, 0xa5, 0xe3, 0x3f, 0x0b, 0x9e, 0xac, 0xbf, 0x6b, + 0xdf, 0xf8, 0x6f, 0xed, 0x9f, 0x31, 0x5a, 0xd1, 0x3d, 0x76, 0xb2, 0x66, + 0x2c, 0x73, 0x1d, 0x87, 0x9e, 0xe1, 0xdb, 0x04, 0x3a, 0x73, 0x68, 0x4f, + 0xdc, 0xb5, 0x45, 0x07, 0xec, 0x97, 0x66, 0x76, 0x37, 0x4a, 0x92, 0x65, + 0x3c, 0xa3, 0xb6, 0xcd, 0x1a, 0x2a, 0xeb, 0xda, 0xca, 0xb4, 0x2a, 0xec, + 0x9d, 0xa6, 0xd0, 0x86, 0x5d, 0xc2, 0x7f, 0x59, 0xce, 0xda, 0x56, 0x6b, + 0xa8, 0xa5, 0xed, 0xac, 0x94, 0xba, 0x1e, 0x81, 0xaa, 0xa9, 0x8c, 0x2d, + 0x11, 0xf8, 0xc3, 0x3d, 0x38, 0x70, 0x54, 0x89, 0x63, 0x20, 0xbb, 0x05, + 0x05, 0xb6, 0xc9, 0x82, 0x8c, 0x14, 0xfb, 0x8c, 0x08, 0x20, 0xea, 0x76, + 0xcd, 0xe9, 0xaa, 0xb8, 0x7a, 0xb0, 0x82, 0xef, 0xea, 0x23, 0x53, 0xc5, + 0x6c, 0xba, 0x3d, 0x74, 0x75, 0xd1, 0x3f, 0xb6, 0xd1, 0x53, 0xde, 0x5a, + 0x39, 0x16, 0x41, 0x25, 0x05, 0x69, 0x2b, 0x4d, 0x14, 0x92, 0xca, 0xa8, + 0x26, 0xa6, 0x94, 0xc7, 0x3c, 0x2d, 0x21, 0x58, 0xa2, 0x6f, 0x84, 0x2b, + 0xd3, 0xdb, 0x5f, 0x35, 0xeb, 0x7e, 0xb5, 0xf6, 0x87, 0x88, 0x97, 0x6d, + 0x9e, 0xf1, 0xed, 0xf1, 0x7c, 0x61, 0x8a, 0x6c, 0xd9, 0x13, 0x22, 0xc4, + 0x30, 0xb2, 0x24, 0x69, 0xda, 0xcc, 0xc4, 0x8a, 0xaf, 0xe5, 0x14, 0xad, + 0x2d, 0x14, 0xb0, 0x95, 0xe2, 0x4e, 0x51, 0x59, 0xd2, 0x2c, 0x0a, 0x45, + 0x12, 0x0f, 0x70, 0xb7, 0xd6, 0x97, 0x9a, 0x6b, 0x26, 0x63, 0x4d, 0x76, + 0xf6, 0xf7, 0xa7, 0xf4, 0xf7, 0x6a, 0x04, 0xc2, 0xba, 0x39, 0x5e, 0x38, + 0xa4, 0x95, 0xd4, 0x30, 0x0c, 0xae, 0xe5, 0x9c, 0x47, 0xb0, 0x90, 0x43, + 0x65, 0x95, 0x06, 0x46, 0x1d, 0x8e, 0xe5, 0xca, 0xb0, 0x3d, 0x60, 0x3e, + 0xaa, 0xf4, 0x0f, 0x74, 0xfb, 0xaf, 0xeb, 0x6e, 0x6a, 0x29, 0x34, 0xdd, + 0x4d, 0x22, 0x57, 0xd6, 0x52, 0x52, 0xd2, 0xc8, 0xd1, 0x37, 0xb7, 0x34, + 0x11, 0x2c, 0x70, 0x8a, 0xa5, 0x99, 0x73, 0x13, 0x46, 0xc8, 0x8d, 0x39, + 0x2a, 0xe7, 0xda, 0x4f, 0x82, 0x4d, 0xaf, 0x1b, 0x01, 0xc5, 0xe8, 0xd6, + 0xd4, 0x6a, 0xfe, 0xb7, 0x76, 0x79, 0xc7, 0x70, 0x37, 0x5d, 0x84, 0xc4, + 0xc7, 0xbc, 0xa3, 0x8a, 0x6d, 0x48, 0x2b, 0x8f, 0x98, 0xdc, 0xda, 0x49, + 0x5e, 0x97, 0xb1, 0xce, 0x38, 0x9a, 0x94, 0x46, 0xb0, 0xda, 0x05, 0x33, + 0x19, 0xf9, 0xde, 0x90, 0xf2, 0x2d, 0xdb, 0x19, 0xba, 0x68, 0x9b, 0xc4, + 0xe2, 0x3f, 0x22, 0x4e, 0x0e, 0x36, 0x3a, 0x1b, 0x52, 0x69, 0x7d, 0x3d, + 0xda, 0x48, 0xe8, 0x9a, 0xe3, 0x13, 0xcc, 0x23, 0x9c, 0x84, 0x12, 0x06, + 0x90, 0xb4, 0x8d, 0x23, 0xaa, 0x6c, 0xce, 0xfd, 0xd8, 0x75, 0x07, 0x8c, + 0x0c, 0xe7, 0x38, 0xe7, 0xa9, 0xef, 0x50, 0xbd, 0x9f, 0xee, 0xf7, 0x75, + 0x3d, 0x71, 0x5c, 0xee, 0x76, 0x2d, 0x33, 0x5a, 0x2d, 0xe6, 0xb2, 0x8c, + 0x8a, 0x96, 0x81, 0xd6, 0x9c, 0x52, 0xd3, 0xa4, 0x10, 0xb5, 0x5b, 0x54, + 0xb0, 0x10, 0x88, 0x48, 0x89, 0xa4, 0x12, 0x19, 0x06, 0x57, 0xf8, 0xb2, + 0x3a, 0x05, 0x77, 0x94, 0x77, 0x2b, 0x1f, 0xf6, 0xf5, 0xa9, 0x62, 0x3d, + 0xa6, 0xce, 0x6a, 0x60, 0xfc, 0x5a, 0xa3, 0x38, 0x77, 0x5a, 0xe9, 0xa5, + 0x93, 0xf5, 0x16, 0xa8, 0xe5, 0xfc, 0xd8, 0x8b, 0x79, 0x5f, 0x74, 0xf5, + 0xfc, 0xca, 0x2d, 0x48, 0x49, 0x18, 0x98, 0x36, 0x2b, 0x19, 0xc3, 0xd4, + 0x55, 0x9d, 0x30, 0x91, 0xcb, 0x86, 0x88, 0x90, 0x5b, 0x97, 0x86, 0xe2, + 0x60, 0x65, 0xf2, 0x3d, 0x67, 0x6c, 0xd0, 0x0d, 0x6e, 0xd4, 0xd7, 0x3f, + 0xc3, 0x52, 0x96, 0x06, 0x9e, 0x91, 0x91, 0x7d, 0xc9, 0x94, 0xb9, 0x62, + 0x5b, 0x68, 0x12, 0x22, 0x29, 0x2c, 0xca, 0x65, 0xc8, 0x2c, 0xa3, 0x6a, + 0xe4, 0x23, 0x8d, 0x88, 0xe9, 0xd7, 0xec, 0x56, 0xa5, 0xf5, 0x33, 0x59, + 0xad, 0x3b, 0x3f, 0xa7, 0x45, 0xd6, 0xee, 0x1a, 0x75, 0xba, 0x5f, 0xa2, + 0x9d, 0xcd, 0x0d, 0xbd, 0x9a, 0x1d, 0x91, 0xc7, 0x03, 0x48, 0x5a, 0x0a, + 0xaa, 0xc9, 0x94, 0x24, 0x2e, 0xb4, 0x60, 0x34, 0x51, 0x3b, 0x37, 0xb8, + 0x7f, 0x34, 0x01, 0xf1, 0x5b, 0xff, 0x00, 0x11, 0x53, 0xfe, 0x11, 0xff, + 0x00, 0xf4, 0x4b, 0xa0, 0xad, 0x2f, 0xfa, 0xbf, 0xc8, 0xff, 0x00, 0x51, + 0xd3, 0x39, 0x74, 0xff, 0x00, 0x6c, 0x3f, 0xee, 0x1f, 0xd0, 0xf5, 0x87, + 0x30, 0x8f, 0x3d, 0xc2, 0xfe, 0x47, 0x6c, 0x06, 0x15, 0x8c, 0x26, 0x02, + 0xa8, 0x73, 0x14, 0x07, 0x91, 0xf8, 0x01, 0xf1, 0x0e, 0x7f, 0xeb, 0xaa, + 0xb4, 0x0d, 0xb8, 0xe4, 0xf5, 0x58, 0x6b, 0xa1, 0x31, 0x29, 0x50, 0x71, + 0x81, 0xf4, 0x1f, 0xfd, 0xeb, 0xa7, 0xa0, 0x59, 0x72, 0x56, 0x26, 0xb8, + 0xc6, 0xe4, 0x3c, 0x53, 0x7e, 0xb2, 0xe3, 0x3b, 0xf4, 0x3a, 0x66, 0x42, + 0x36, 0xe3, 0x46, 0x9f, 0x71, 0x5e, 0x9f, 0x41, 0x23, 0xf2, 0x0a, 0x37, + 0x3a, 0xa9, 0x87, 0x0b, 0x20, 0xa0, 0x09, 0x80, 0xed, 0x97, 0x2a, 0x88, + 0x9c, 0x0c, 0x20, 0x64, 0xcd, 0xcf, 0x52, 0x56, 0x8b, 0x9d, 0xda, 0xc3, + 0x5a, 0xb7, 0x0b, 0x45, 0x43, 0x45, 0x32, 0xf8, 0x65, 0x25, 0x4f, 0x38, + 0xc8, 0xe0, 0x8e, 0x0e, 0x00, 0x23, 0xea, 0x38, 0x3c, 0x75, 0x13, 0xa9, + 0x6c, 0xfa, 0x57, 0x5a, 0x58, 0xe5, 0xd3, 0x1a, 0xca, 0xdb, 0x15, 0x7d, + 0xb6, 0x52, 0x0b, 0xc1, 0x51, 0x1a, 0xcb, 0x19, 0x61, 0xe1, 0x82, 0xb7, + 0x28, 0xeb, 0xe5, 0x64, 0x42, 0xae, 0xa4, 0x0d, 0xac, 0x3a, 0x99, 0x6e, + 0xf7, 0xc2, 0xff, 0x00, 0x72, 0x59, 0xd4, 0x9e, 0x7d, 0xd5, 0xfd, 0x0e, + 0xd9, 0xbb, 0x5b, 0xd5, 0x81, 0x67, 0x99, 0x17, 0x29, 0x6b, 0xab, 0x7a, + 0xfe, 0x4e, 0x92, 0x31, 0x43, 0xf9, 0x3d, 0x99, 0x84, 0x59, 0x97, 0xb8, + 0x30, 0xf2, 0x22, 0x22, 0xa2, 0x3f, 0x71, 0x11, 0xfb, 0x88, 0xf2, 0x41, + 0xfe, 0xf4, 0xae, 0x95, 0x23, 0x37, 0xab, 0x6d, 0x15, 0x54, 0xad, 0xcb, + 0xcb, 0x24, 0x01, 0x64, 0x63, 0xf7, 0x2d, 0x09, 0x8b, 0x3f, 0xae, 0xec, + 0x9f, 0xd7, 0xa0, 0x44, 0x5e, 0x9c, 0x34, 0xd5, 0x8d, 0x12, 0x97, 0xb6, + 0xfa, 0xbb, 0x51, 0xd8, 0x68, 0xd0, 0x61, 0x69, 0x68, 0xee, 0x8d, 0x2d, + 0x22, 0x0f, 0xb4, 0x70, 0x56, 0x25, 0x46, 0xc0, 0x3c, 0x0d, 0xaf, 0xe3, + 0x8e, 0xb5, 0x2e, 0xfc, 0x65, 0xfa, 0xa0, 0xfa, 0xda, 0xf3, 0x83, 0xb4, + 0xc7, 0x51, 0xa5, 0xce, 0xc9, 0x68, 0xe5, 0x6e, 0xda, 0xff, 0x00, 0xaf, + 0x2c, 0x10, 0xca, 0x7e, 0x8a, 0xe4, 0x14, 0xd4, 0x2a, 0x56, 0x69, 0x63, + 0x3e, 0x72, 0x90, 0xf8, 0x88, 0x80, 0x19, 0x12, 0x90, 0x4b, 0xf7, 0x28, + 0x94, 0xdf, 0x3d, 0x51, 0xbb, 0xa7, 0x7b, 0x80, 0x03, 0x64, 0xa1, 0xa3, + 0xa2, 0x90, 0x64, 0x09, 0x20, 0x80, 0x7b, 0x9b, 0x4f, 0xcc, 0x37, 0xc9, + 0xee, 0x38, 0xcf, 0x8c, 0xab, 0x29, 0x1e, 0x47, 0x23, 0xaa, 0x9f, 0x4d, + 0x7a, 0x22, 0xf1, 0x94, 0xee, 0x66, 0xa1, 0xbf, 0x6a, 0x38, 0x37, 0x2b, + 0x8a, 0x7b, 0x9d, 0xd2, 0x43, 0x47, 0xb9, 0x4e, 0x46, 0x69, 0x29, 0x45, + 0x3c, 0x6c, 0x33, 0xc9, 0x0c, 0x58, 0x1f, 0x0d, 0x91, 0xc7, 0x50, 0x82, + 0xc6, 0xbd, 0xbe, 0xe7, 0x64, 0x9a, 0xba, 0x5d, 0xad, 0x33, 0x57, 0x5b, + 0x9d, 0x95, 0xd7, 0xbe, 0xb1, 0xdc, 0x2d, 0xf3, 0xae, 0xec, 0x96, 0x79, + 0xd5, 0xbf, 0xd6, 0xe9, 0xf2, 0xe2, 0x75, 0x4f, 0xc7, 0xf9, 0x4a, 0x26, + 0xf1, 0x20, 0x0f, 0x05, 0x29, 0x43, 0xe3, 0xa1, 0xc5, 0xc2, 0xaa, 0xe1, + 0x75, 0xaa, 0x6a, 0xdb, 0x94, 0xed, 0x2c, 0xac, 0x72, 0x59, 0x89, 0x62, + 0x4f, 0xdc, 0x93, 0xc9, 0x38, 0x03, 0x93, 0xc9, 0xc0, 0xcf, 0x4c, 0x15, + 0xaa, 0x0b, 0x25, 0x86, 0xd5, 0x4f, 0x61, 0xb0, 0x51, 0xc7, 0x4b, 0x41, + 0x00, 0xdb, 0x14, 0x10, 0x46, 0x91, 0x43, 0x1a, 0xfd, 0x92, 0x34, 0xc2, + 0x8f, 0xd4, 0xe3, 0x27, 0xcb, 0x12, 0x79, 0xeb, 0xd6, 0xbd, 0x0a, 0xfc, + 0x24, 0x0f, 0xe9, 0x0b, 0x43, 0x9b, 0xd9, 0x9f, 0x90, 0x51, 0x73, 0xa6, + 0x5e, 0x3c, 0xd2, 0xfc, 0x81, 0x07, 0xfd, 0xbf, 0x1d, 0x74, 0xd3, 0x40, + 0xfe, 0xef, 0xc3, 0x8f, 0x07, 0xfa, 0x8e, 0xb8, 0xdc, 0xeb, 0xa9, 0xc5, + 0x30, 0xdf, 0xbb, 0x1b, 0x87, 0x80, 0x0f, 0xd0, 0xfe, 0xa3, 0xaf, 0xff, + 0xd9 +}; diff --git a/host/class/uvc/usb_host_uvc/host_test/main/streaming/test_streaming.cpp b/host/class/uvc/usb_host_uvc/host_test/main/streaming/test_streaming.cpp new file mode 100644 index 00000000..92b22b62 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/streaming/test_streaming.cpp @@ -0,0 +1,260 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include +#include + +#include "usb/usb_types_stack.h" +#include "usb/uvc_host.h" +#include "uvc_types_priv.h" +#include "uvc_frame_priv.h" + +#include "images/test_logo_jpg.hpp" +#include "test_streaming_helpers.hpp" + +std::function frame_callback; // Define a std::function to hold the lambda with captures +std::function stream_callback; // Define a std::function to hold the lambda with captures + +// `send_frame_function` is a generic std::function that acts as a wrapper for sending frames in the +// test scenarios. By assigning it either `test_streaming_bulk_send_frame` or `test_streaming_isoc_send_frame` +// before calling `run_streaming_frame_reconstruction_scenario()`, we avoid duplicating the entire scenario +// code for each transfer type (bulk or isochronous). Instead, we can dynamically set the appropriate +// frame-sending function, allowing `run_streaming_frame_reconstruction_scenario` to run identical tests +// with either transfer method. +std::function, uint8_t, bool, bool)> send_frame_function; +inline void send_function_wrapper(size_t transfer_size, void *transfer_context, std::span data, uint8_t frame_id = 0, bool error_in_sof = false, bool error_in_eof = false) +{ + send_frame_function(transfer_size, transfer_context, data, frame_id, error_in_sof, error_in_eof); +} + +void run_streaming_frame_reconstruction_scenario(void) +{ + // Variables reused in all tests + constexpr int user_arg = 0x12345678; + uvc_stream_t stream = {}; // Define mock stream + stream.constant.cb_arg = (void *)&user_arg; + // @todo instead of doing this we can + // - uvc_transfers_allocate to allocate all transfers + // - uvc_host_stream_unpause to start the stream + + stream.single_thread.current_frame_id = 2; // Start with invalid frame ID + stream.constant.stream_cb = [](const uvc_host_stream_event_data_t *event, void *user_ctx) { + return stream_callback(event, user_ctx); + }; + stream.constant.frame_cb = [](const uvc_host_frame_t *frame, void *user_ctx) -> bool { + // We cannot have catching lambdas here, so we must call this std::function... + return frame_callback(frame, user_ctx); + }; + + // We don't expect any stream events or frames be default + stream_callback = [&](const uvc_host_stream_event_data_t *event, void *user_ctx) { + FAIL("Unexpected event " + std::to_string(event->type)); + }; + frame_callback = [&](const uvc_host_frame_t *frame, void *user_ctx) -> bool { + FAIL("Got unexpected frame"); + return true; + }; + + GIVEN("Streaming enabled") { + stream.dynamic.streaming = true; + stream.constant.vs_format = { + .h_res = 46, + .v_res = 46, + .fps = 15, + .format = UVC_VS_FORMAT_MJPEG, + }; + + AND_GIVEN("Frame buffer is allocated") { + int frame_callback_called; + frame_callback_called = 0; + // We expect valid frame data + frame_callback = [&](const uvc_host_frame_t *frame, void *user_ctx) -> bool { + frame_callback_called++; + + REQUIRE(user_ctx == stream.constant.cb_arg); // Sanity check + REQUIRE(frame->data_len == logo_jpg.size()); + REQUIRE(frame->vs_format.h_res == stream.constant.vs_format.h_res); + REQUIRE(frame->vs_format.v_res == stream.constant.vs_format.v_res); + REQUIRE(frame->vs_format.fps == stream.constant.vs_format.fps); + REQUIRE(frame->vs_format.format == stream.constant.vs_format.format); + + std::vector frame_data(frame->data, frame->data + frame->data_len); + std::vector original_data(logo_jpg.begin(), logo_jpg.end()); + REQUIRE(frame_data == original_data); + + return true; + }; + + REQUIRE(uvc_frame_allocate(&stream, 1, 100 * 1024, 0) == ESP_OK); + + // Test + for (size_t transfer_size = 512; transfer_size <= 8192; transfer_size += 512) { + WHEN("The frame data contain no errors, transfer_size = " + std::to_string(transfer_size)) { + send_function_wrapper(transfer_size, &stream, std::span(logo_jpg)); + + THEN("The frame callback is called with expected frame data") { + REQUIRE(frame_callback_called == 1); + } + + AND_WHEN("Next frame is send") { + send_function_wrapper(transfer_size, &stream, std::span(logo_jpg), 1); + + THEN("The frame callback is called with expected frame data") { + REQUIRE(frame_callback_called == 2); + } + } + } + } + + WHEN("The frame contains error in SoF") { + send_function_wrapper(1024, &stream, std::span(logo_jpg), 0, true); + THEN("The frame callback is not called") { + REQUIRE(frame_callback_called == 0); + } + + AND_WHEN("Next frame is send") { + send_function_wrapper(1024, &stream, std::span(logo_jpg), 1); + + THEN("The frame callback is called with expected frame data") { + REQUIRE(frame_callback_called == 1); + } + } + } + + WHEN("The frame contains error in EoF") { + send_function_wrapper(1024, &stream, std::span(logo_jpg), 0, false, true); + THEN("The frame callback is not called") { + REQUIRE(frame_callback_called == 0); + } + + AND_WHEN("Next frame is send") { + send_function_wrapper(1024, &stream, std::span(logo_jpg), 1); + + THEN("The frame callback is called with expected frame data") { + REQUIRE(frame_callback_called == 1); + } + } + } + + WHEN("The frame contains error in SoF and EoF") { + send_function_wrapper(1024, &stream, std::span(logo_jpg), 0, true, true); + THEN("The frame callback is not called") { + REQUIRE(frame_callback_called == 0); + } + + AND_WHEN("Next frame is send") { + send_function_wrapper(1024, &stream, std::span(logo_jpg), 1); + + THEN("The frame callback is called with expected frame data") { + REQUIRE(frame_callback_called == 1); + } + } + } + REQUIRE(uvc_frame_are_all_returned(&stream)); + uvc_frame_free(&stream); + } + + AND_GIVEN("Frame buffer is too small") { + + // We expect overflow stream event + enum uvc_host_dev_event event_type = static_cast(-1); // Explicitly set to invalid value + stream_callback = [&](const uvc_host_stream_event_data_t *event, void *user_ctx) { + REQUIRE(user_ctx == stream.constant.cb_arg); // Sanity check + event_type = event->type; + }; + REQUIRE(uvc_frame_allocate(&stream, 1, logo_jpg.size() - 100, 0) == ESP_OK); + + WHEN("The frame is too big") { + send_function_wrapper(1024, &stream, std::span(logo_jpg)); + THEN("Buffer overflow event is generated") { + REQUIRE(event_type == UVC_HOST_FRAME_BUFFER_OVERFLOW); + } + } + + REQUIRE(uvc_frame_are_all_returned(&stream)); + uvc_frame_free(&stream); + } + + AND_GIVEN("There is no free frame buffer") { + // We expect overflow stream event + enum uvc_host_dev_event event_type = static_cast(-1); // Explicitly set to invalid value + stream_callback = [&](const uvc_host_stream_event_data_t *event, void *user_ctx) { + REQUIRE(user_ctx == stream.constant.cb_arg); // Sanity check + event_type = event->type; + }; + + uvc_host_frame_t *temp_frame = nullptr; + REQUIRE(uvc_frame_allocate(&stream, 1, 100 * 1024, 0) == ESP_OK); + temp_frame = uvc_frame_get_empty(&stream); + REQUIRE(temp_frame != nullptr); + + WHEN("The frame callback is called with expected frame data") { + send_function_wrapper(1024, &stream, std::span(logo_jpg)); + THEN("Buffer underflow event is generated") { + REQUIRE(event_type == UVC_HOST_FRAME_BUFFER_UNDERFLOW); + REQUIRE_FALSE(uvc_frame_are_all_returned(&stream)); + } + } + + REQUIRE(uvc_host_frame_return(&stream, temp_frame) == ESP_OK); + REQUIRE(uvc_frame_are_all_returned(&stream)); + uvc_frame_free(&stream); + } + } + + GIVEN("Streaming disabled") { + stream.dynamic.streaming = false; + + WHEN("New data is received") { + usb_transfer_t transfer = { + .data_buffer = nullptr, + .data_buffer_size = 0, + .num_bytes = 0, + .actual_num_bytes = 0, + .flags = 0, + .device_handle = nullptr, + .bEndpointAddress = 0, + .status = USB_TRANSFER_STATUS_COMPLETED, + .timeout_ms = 0, + .callback = nullptr, + .context = &stream, + .num_isoc_packets = 0, + }; + // usb_host_transfer_submit_ExpectNever(); // We don't have this CMock extensions + bulk_transfer_callback(&transfer); + THEN("Transfer is not resubmitted") { + SUCCEED("Transfer was not resubmitted"); + } + } + } + + /* + @todo test + - Error in USB transfer status + */ +} + +SCENARIO("Bulk stream frame reconstruction", "[streaming][bulk]") +{ + send_frame_function = test_streaming_bulk_send_frame; + run_streaming_frame_reconstruction_scenario(); +} + +SCENARIO("Isochronous stream frame reconstruction", "[streaming][isoc]") +{ + send_frame_function = test_streaming_isoc_send_frame; + run_streaming_frame_reconstruction_scenario(); + + /* + @todo ISOC test + - Missed SoF + - Missed EoF + - Error in data packet + - Messed up frame_id + - Unaligned USB transfer sizes + */ +} diff --git a/host/class/uvc/usb_host_uvc/host_test/main/streaming/test_streaming_helpers.hpp b/host/class/uvc/usb_host_uvc/host_test/main/streaming/test_streaming_helpers.hpp new file mode 100644 index 00000000..7c737ca8 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/streaming/test_streaming_helpers.hpp @@ -0,0 +1,214 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include +#include +#include +#include + +#include "usb/usb_types_stack.h" +#include "usb/usb_types_uvc.h" + +extern "C" { +#include "Mockusb_host.h" + void bulk_transfer_callback(usb_transfer_t *transfer); + void isoc_transfer_callback(usb_transfer_t *transfer); +} + +#define HEADER_LEN (12) + +/** + * @brief Send bulk frame to the UVC driver + * + * Only the first and last transfer contains header + * + * @param transfer_size + * @param transfer_context + * @param data + * @param frame_id + * @param error_in_sof + * @param error_in_eof + */ +inline void test_streaming_bulk_send_frame(size_t transfer_size, void *transfer_context, std::span data, uint8_t frame_id = 0, bool error_in_sof = false, bool error_in_eof = false) +{ + assert(transfer_size > HEADER_LEN); + assert(!data.empty()); + uint8_t *data_buffer = new uint8_t[transfer_size]; + assert(data_buffer); + usb_transfer_t _transfer = { + .data_buffer = data_buffer, + .data_buffer_size = transfer_size, + .num_bytes = 0, + .actual_num_bytes = 0, + .flags = 0, + .device_handle = nullptr, + .bEndpointAddress = 0, + .status = USB_TRANSFER_STATUS_COMPLETED, + .timeout_ms = 0, + .callback = nullptr, + .context = transfer_context, + .num_isoc_packets = 0, + }; + usb_transfer_t *transfer = &_transfer; + + + // Reinterpret transfer->data_buffer as a pointer to uvc_payload_header_t + uvc_payload_header_t *header_sof = reinterpret_cast(transfer->data_buffer); + header_sof->bHeaderLength = HEADER_LEN; + header_sof->bmHeaderInfo.val = 0; + header_sof->bmHeaderInfo.end_of_header = 1; + header_sof->bmHeaderInfo.frame_id = frame_id; + header_sof->bmHeaderInfo.error = error_in_sof; + + + // Add Frame data to first SoF transfer + const size_t first_chunk_size = std::min(transfer->data_buffer_size - HEADER_LEN, data.size()); + std::copy_n(data.begin(), first_chunk_size, transfer->data_buffer + HEADER_LEN); + transfer->actual_num_bytes = first_chunk_size + HEADER_LEN; + usb_host_transfer_submit_ExpectAndReturn(transfer, ESP_OK); // Each must be re-submitted + bulk_transfer_callback(transfer); + + // Loop through the large array in chunks with modern C++ + const size_t ChunkSize = transfer->data_buffer_size; + for (size_t offset = first_chunk_size; offset < data.size(); offset += ChunkSize) { + // Get a span representing the current chunk + auto chunk = data.subspan(offset, std::min(ChunkSize, data.size() - offset)); + + // Copy the chunk from the large array to the buffer + std::copy(chunk.begin(), chunk.end(), transfer->data_buffer); + + // Process the chunk + transfer->actual_num_bytes = chunk.size(); + usb_host_transfer_submit_ExpectAndReturn(transfer, ESP_OK); // Each must be re-submitted + bulk_transfer_callback(transfer); + } + + // Send EoF + // Reinterpret transfer->data_buffer as a pointer to uvc_payload_header_t + uvc_payload_header_t *header_eof = reinterpret_cast(transfer->data_buffer); + header_eof->bHeaderLength = HEADER_LEN; + header_eof->bmHeaderInfo.val = 0; + header_eof->bmHeaderInfo.end_of_frame = 1; + header_eof->bmHeaderInfo.end_of_header = 1; + header_eof->bmHeaderInfo.frame_id = frame_id; + header_eof->bmHeaderInfo.error = error_in_eof; + transfer->actual_num_bytes = HEADER_LEN; + usb_host_transfer_submit_ExpectAndReturn(transfer, ESP_OK); // Each must be re-submitted + bulk_transfer_callback(transfer); + delete[] data_buffer; +} + +/** + * @brief Send isoc frame to the UVC driver + * + * Each ISOC packet contains header + * + * @param transfer_size + * @param transfer_context + * @param data + * @param frame_id + * @param error_in_sof + * @param error_in_eof + */ +inline void test_streaming_isoc_send_frame(size_t transfer_size, void *transfer_context, std::span data, uint8_t frame_id = 0, bool error_in_sof = false, bool error_in_eof = false) +{ + assert(transfer_size > HEADER_LEN); + assert(!data.empty()); + uint8_t *data_buffer = new uint8_t[transfer_size]; + assert(data_buffer); + // Define the number of isochronous packets + constexpr int num_isoc_packets = 8; + + // Calculate the allocation size, including space for isoc_packet_desc + size_t allocation_size = sizeof(usb_transfer_t) + num_isoc_packets * sizeof(usb_isoc_packet_desc_t); + + // Allocate memory for usb_transfer_s with extra space for isoc_packet_desc + usb_transfer_t *transfer = static_cast(operator new (allocation_size)); + + // Initialize the struct using placement new + new (transfer) usb_transfer_t{ + .data_buffer = data_buffer, + .data_buffer_size = transfer_size, + .num_bytes = 0, + .actual_num_bytes = 0, + .flags = 0, + .device_handle = nullptr, + .bEndpointAddress = 0, + .status = USB_TRANSFER_STATUS_COMPLETED, + .timeout_ms = 0, + .callback = nullptr, + .context = transfer_context, + .num_isoc_packets = num_isoc_packets, + }; + + // Loop through the large array in chunks with modern C++ + size_t offset = 0; + const size_t transfer_frame_data_size = transfer->data_buffer_size - (transfer->num_isoc_packets * HEADER_LEN); // Each packet contains its header + // printf("frame data in each transfer %zu\n", transfer_frame_data_size); + + while (offset < data.size()) { + // We have new USB transfer, init it to defaults + transfer->actual_num_bytes = 0; + uint8_t *write_ptr = transfer->data_buffer; + + for (int packet_idx = 0; packet_idx < transfer->num_isoc_packets; packet_idx++) { // All ISOC packets must be filled, even if data is empty + transfer->isoc_packet_desc[packet_idx].actual_num_bytes = 0; + transfer->isoc_packet_desc[packet_idx].status = USB_TRANSFER_STATUS_COMPLETED; + transfer->isoc_packet_desc[packet_idx].num_bytes = transfer->data_buffer_size / transfer->num_isoc_packets; + + // **HEADER SECTION** + // All ISOC packets must have its header + // Reinterpret transfer->data_buffer as a pointer to uvc_payload_header_t + uvc_payload_header_t *header = reinterpret_cast(write_ptr); + //printf("\tWriting @ %p\n", write_ptr); + header->bHeaderLength = HEADER_LEN; + header->bmHeaderInfo.val = 0; + header->bmHeaderInfo.end_of_header = 1; + header->bmHeaderInfo.frame_id = frame_id; + + // This is Start of Frame + if (offset == 0) { + //printf("SoF\n"); + uvc_payload_header_t *header = reinterpret_cast(transfer->data_buffer); + header->bmHeaderInfo.error = error_in_sof; + } + write_ptr += HEADER_LEN; // Move write pointer to start of data section + transfer->isoc_packet_desc[packet_idx].actual_num_bytes += HEADER_LEN; + transfer->actual_num_bytes += HEADER_LEN; // This is not actually checked by the UVC driver, leaving it here for completeness + + // **DATA SECTION** + size_t packet_frame_data_size = std::min(transfer_frame_data_size / transfer->num_isoc_packets, data.size() - offset); + + // This is End of Frame + if (packet_frame_data_size < (transfer_frame_data_size / transfer->num_isoc_packets)) { + //printf("EoF\n"); + header->bmHeaderInfo.error = error_in_eof; + header->bmHeaderInfo.end_of_frame = 1; + } + + // Get a span representing the current chunk of frame data + auto chunk = data.subspan(offset, packet_frame_data_size); + + // Copy the chunk from the large array to the buffer + std::copy(chunk.begin(), chunk.end(), write_ptr); + + transfer->actual_num_bytes += chunk.size(); // This is not actually checked by the UVC driver, leaving it here for completeness + transfer->isoc_packet_desc[packet_idx].actual_num_bytes += chunk.size(); + write_ptr += chunk.size(); + offset += chunk.size(); + //printf("\tcreating packet %d bytes\n", transfer->isoc_packet_desc[packet_idx].actual_num_bytes); + } + + // Process the transfer + //printf("\tsending transfer %d bytes\n", transfer->actual_num_bytes); + usb_host_transfer_submit_ExpectAndReturn(transfer, ESP_OK); // Each must be re-submitted + isoc_transfer_callback(transfer); + } + + delete[] data_buffer; +} diff --git a/host/class/uvc/usb_host_uvc/host_test/main/test_main.cpp b/host/class/uvc/usb_host_uvc/host_test/main/test_main.cpp new file mode 100644 index 00000000..c6130ffa --- /dev/null +++ b/host/class/uvc/usb_host_uvc/host_test/main/test_main.cpp @@ -0,0 +1,28 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include +#include + + +extern "C" void app_main(void) +{ + int argc = 1; + const char *argv[2] = { + "target_test_main", + NULL + }; + + auto result = Catch::Session().run(argc, argv); + if (result != 0) { + printf("Test failed with result %d\n", result); + } else { + printf("Test passed.\n"); + } + fflush(stdout); + exit(result); +} diff --git a/host/class/uvc/usb_host_uvc/host_test/main/test_unit_public_api.cpp b/host/class/uvc/usb_host_uvc/host_test/main/test_unit_public_api.cpp deleted file mode 100644 index 56b53bd5..00000000 --- a/host/class/uvc/usb_host_uvc/host_test/main/test_unit_public_api.cpp +++ /dev/null @@ -1,28 +0,0 @@ - -/* - * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#include -#include - -#include "libuvc/libuvc.h" -#include "libuvc_helper.h" -#include "libuvc_adapter.h" - -extern "C" { -#include "Mockusb_host.h" -} - -SCENARIO("UVC Host Handle events") -{ - GIVEN("Libusb has not been initialized") { - - // Call libuvc_adapter_handle_events and expect ESP_ERR_INVALID_STATE - SECTION("s_uvc_driver is NULL") { - REQUIRE(ESP_ERR_INVALID_STATE == libuvc_adapter_handle_events(0)); - } - } -} diff --git a/host/class/uvc/usb_host_uvc/idf_component.yml b/host/class/uvc/usb_host_uvc/idf_component.yml index a4c376d0..a282d00b 100644 --- a/host/class/uvc/usb_host_uvc/idf_component.yml +++ b/host/class/uvc/usb_host_uvc/idf_component.yml @@ -1,10 +1,6 @@ ## IDF Component Manager Manifest File -version: "1.0.4" +version: "2.0.0" description: USB Host UVC driver url: https://github.com/espressif/esp-usb/tree/master/host/class/uvc/usb_host_uvc dependencies: - idf: ">=4.4" -sbom: - manifests: - - path: sbom_libuvc.yml - dest: libuvc + idf: ">=5.0" diff --git a/host/class/uvc/usb_host_uvc/include/esp_private/uvc_control.h b/host/class/uvc/usb_host_uvc/include/esp_private/uvc_control.h new file mode 100644 index 00000000..ca475738 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/include/esp_private/uvc_control.h @@ -0,0 +1,53 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include "usb/uvc_host.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Submit transfer to CTRL endpoint + * + * Sends Control transfer as described in USB specification chapter 9. + * This function can be used by device drivers that use custom/vendor specific commands. + * + * @param stream_hdl UVC stream + * @param[in] bmRequestType Field of USB control request + * @param[in] bRequest Field of USB control request + * @param[in] wValue Field of USB control request + * @param[in] wIndex Field of USB control request + * @param[in] wLength Field of USB control request + * @param[inout] data Field of USB control request + * @return + * - ESP_OK: Transfer succeeded + * - ESP_ERR_TIMEOUT: The transfer could not be completed in time + * - ESP_ERR_INVALID_SIZE: The transfer is too big + * - ESP_ERR_INVALID_ARG: stream_hdl is NULL, or data is not NULL and wValue is greater than zero + * - ESP_ERR_INVALID_RESPONSE: Reply corrupted or too short + */ +esp_err_t uvc_host_usb_ctrl(uvc_host_stream_hdl_t stream_hdl, uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, uint16_t wLength, uint8_t *data); + +/** + * @brief Negotiate UVC stream format + * + * @param stream_hdl UVC stream + * @param[in] vs_format Requested Video Stream format + * @param[out] vs_result_ret Negotiation result. Can be NULL if result is not needed + * @return + * - ESP_OK: Format negotiated and committed + * - ESP_ERR_INVALID_ARG: stream_hdl or vs_format is NULL + * - ESP_ERR_NOT_FOUND: The requested format was not found + * - Else: USB Control transfer error + */ +esp_err_t uvc_host_stream_control_negotiate(uvc_host_stream_hdl_t stream_hdl, const uvc_host_stream_format_t *vs_format, uvc_vs_ctrl_t *vs_result_ret); + +#ifdef __cplusplus +} +#endif diff --git a/host/class/uvc/usb_host_uvc/include/esp_private/uvc_stream.h b/host/class/uvc/usb_host_uvc/include/esp_private/uvc_stream.h new file mode 100644 index 00000000..3c9c3f66 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/include/esp_private/uvc_stream.h @@ -0,0 +1,53 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include "usb/uvc_host.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * This API controls USB transfers to the streaming interface. It can be used to start/stop the stream + * without any other CTRL requests (negotiation, interface setting, endpoint halting...). + * + * Usually, the UVC stream is started with uvc_host_stream_start() and stopped with uvc_host_stream_stop(), + * which internally call this pause/unpause API. + */ + +/** + * @brief Pause UVC stream + * + * After this call, the USB transfers are not re-submitted and the user will stop getting new frame callbacks. + * This function does not issue any CTRL request. In only stops receiving new data from streaming endpoint. + * + * @param[in] stream_hdl UVC handle obtained from uvc_host_stream_open() + * @return + * - ESP_OK: Success - all USB transfers are paused + * - ESP_ERR_INVALID_ARG: stream_hdl is NULL + */ +esp_err_t uvc_host_stream_pause(uvc_host_stream_hdl_t stream_hdl); + +/** + * @brief Unpause UVC stream + * + * After this call, the user will be informed about new frames by frame callback. + * This function does not issue any CTRL request. In only starts receiving new data from streaming endpoint. + * + * @param[in] stream_hdl UVC handle obtained from uvc_host_stream_open() + * @return + * - ESP_OK: Success - all USB transfers were submitted + * - ESP_ERR_INVALID_ARG: stream_hdl is NULL + * - ESP_ERR_INVALID_STATE: Stream is not streaming + * - Others: Failed to submit USB transfer + */ +esp_err_t uvc_host_stream_unpause(uvc_host_stream_hdl_t stream_hdl); + +#ifdef __cplusplus +} +#endif diff --git a/host/class/uvc/usb_host_uvc/include/libuvc_adapter.h b/host/class/uvc/usb_host_uvc/include/libuvc_adapter.h deleted file mode 100644 index 64ffebaf..00000000 --- a/host/class/uvc/usb_host_uvc/include/libuvc_adapter.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ -#pragma once - -#include -#include -#include "esp_err.h" -#include "usb/usb_types_stack.h" -#include "libuvc/libuvc.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - UVC_DEVICE_CONNECTED = 1, - UVC_DEVICE_DISCONNECTED = 2, -} libuvc_adapter_event_t; - -typedef void (*libuvc_adapter_cb_t)(libuvc_adapter_event_t); - -/** - * @brief Configuration structure - */ -typedef struct { - bool create_background_task; /**< Event handling background task is created when set to true. - Otherwise, user has to handle event by calling libuvc_adapter_handle_events */ - uint8_t task_priority; /**< Background task priority */ - uint32_t stack_size; /**< Background task stack size */ - libuvc_adapter_cb_t callback; /**< Callback notifying about connection and disconnection events */ -} libuvc_adapter_config_t; - -/** - * @brief Sets configuration for libuvc adapter - * - * - This function can be called prior to calling `uvc_init` function, - * otherwise default configuration will be used - * - * @param[in] config Configuration structure - */ -void libuvc_adapter_set_config(libuvc_adapter_config_t *config); - -/** - * @brief Prints full configuration descriptor - * - * @param[in] device Device handle obtained from `uvc_open` - * @return esp_err_t - */ -esp_err_t libuvc_adapter_print_descriptors(uvc_device_handle_t *device); - -/** - * @brief Handle USB Client events. - * - * - This function has to be called periodically, if configuration - * was provided with `create_background_task` set to `false`. - * - * @param[in] timeout_ms Timeout in milliseconds - * @return esp_err_t - */ -esp_err_t libuvc_adapter_handle_events(uint32_t timeout_ms); - -/** - * @brief Get information about underlying USB device - * - * @param[in] dev UVC device handle obtained from uvc_find_device() - * @param[out] dev_info Pointer to structure where the information will be saved - */ -esp_err_t libuvc_get_usb_device_info(uvc_device_t *dev, usb_device_info_t *dev_info); - -#ifdef __cplusplus -} -#endif diff --git a/host/class/uvc/usb_host_uvc/include/libuvc_helper.h b/host/class/uvc/usb_host_uvc/include/libuvc_helper.h deleted file mode 100644 index aaa10f4e..00000000 --- a/host/class/uvc/usb_host_uvc/include/libuvc_helper.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ -#pragma once - -#include "libuvc/libuvc.h" - -#ifdef __cplusplus -extern "C" { -#endif - -inline static const char *uvc_error_string(uvc_error_t error) -{ - switch (error) { - case UVC_SUCCESS: return "UVC_SUCCESS"; - case UVC_ERROR_IO: return "UVC_ERROR_IO"; - case UVC_ERROR_INVALID_PARAM: return "UVC_ERROR_INVALID_PARAM"; - case UVC_ERROR_ACCESS: return "UVC_ERROR_ACCESS"; - case UVC_ERROR_NO_DEVICE: return "UVC_ERROR_NO_DEVICE"; - case UVC_ERROR_NOT_FOUND: return "UVC_ERROR_NOT_FOUND"; - case UVC_ERROR_BUSY: return "UVC_ERROR_BUSY"; - case UVC_ERROR_TIMEOUT: return "UVC_ERROR_TIMEOUT"; - case UVC_ERROR_OVERFLOW: return "UVC_ERROR_OVERFLOW"; - case UVC_ERROR_PIPE: return "UVC_ERROR_PIPE"; - case UVC_ERROR_INTERRUPTED: return "UVC_ERROR_INTERRUPTED"; - case UVC_ERROR_NO_MEM: return "UVC_ERROR_NO_MEM"; - case UVC_ERROR_NOT_SUPPORTED: return "UVC_ERROR_NOT_SUPPORTED"; - case UVC_ERROR_INVALID_DEVICE: return "UVC_ERROR_INVALID_DEVICE"; - case UVC_ERROR_INVALID_MODE: return "UVC_ERROR_INVALID_MODE"; - case UVC_ERROR_CALLBACK_EXISTS: return "UVC_ERROR_CALLBACK_EXISTS"; - default: return "Unknown error"; - } -} - -#ifdef __cplusplus -} -#endif diff --git a/host/class/uvc/usb_host_uvc/include/usb/usb_types_uvc.h b/host/class/uvc/usb_host_uvc/include/usb/usb_types_uvc.h new file mode 100644 index 00000000..df17dc0e --- /dev/null +++ b/host/class/uvc/usb_host_uvc/include/usb/usb_types_uvc.h @@ -0,0 +1,432 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +// Definitions from USB UVC specification + +#pragma once + +#include +#include +#include "esp_assert.h" + +#define UVC_VERSION_1_0 0x0100 +#define UVC_VERSION_1_1 0x0110 +#define UVC_VERSION_1_5 0x0150 + +#define USB_DESC_ATTR __attribute__((packed)) + +/** + * @brief UVC request code + * + * @see USB UVC specification ver 1.5, table A.8 + */ +enum uvc_req_code { + UVC_RC_UNDEFINED = 0x00, + UVC_SET_CUR = 0x01, + UVC_GET_CUR = 0x81, + UVC_GET_MIN = 0x82, + UVC_GET_MAX = 0x83, + UVC_GET_RES = 0x84, + UVC_GET_LEN = 0x85, + UVC_GET_INFO = 0x86, + UVC_GET_DEF = 0x87 +}; + +/** + * @brief VideoStreaming interface control selector + * + * @see USB UVC specification ver 1.5, table A.9.8 + */ +enum uvc_vs_ctrl_selector { + UVC_VS_CONTROL_UNDEFINED = 0x00, + UVC_VS_PROBE_CONTROL = 0x01, + UVC_VS_COMMIT_CONTROL = 0x02, + UVC_VS_STILL_PROBE_CONTROL = 0x03, + UVC_VS_STILL_COMMIT_CONTROL = 0x04, + UVC_VS_STILL_IMAGE_TRIGGER_CONTROL = 0x05, + UVC_VS_STREAM_ERROR_CODE_CONTROL = 0x06, + UVC_VS_GENERATE_KEY_FRAME_CONTROL = 0x07, + UVC_VS_UPDATE_FRAME_SEGMENT_CONTROL = 0x08, + UVC_VS_SYNC_DELAY_CONTROL = 0x09 +}; + +/** + * @brief VideoControl interface descriptor subtype + * + * @see USB UVC specification ver 1.5, table A.5 + */ +enum uvc_vc_desc_subtype { + UVC_VC_DESC_SUBTYPE_DESCRIPTOR_UNDEFINED = 0x00, + UVC_VC_DESC_SUBTYPE_HEADER = 0x01, + UVC_VC_DESC_SUBTYPE_INPUT_TERMINAL = 0x02, + UVC_VC_DESC_SUBTYPE_OUTPUT_TERMINAL = 0x03, + UVC_VC_DESC_SUBTYPE_SELECTOR_UNIT = 0x04, + UVC_VC_DESC_SUBTYPE_PROCESSING_UNIT = 0x05, + UVC_VC_DESC_SUBTYPE_EXTENSION_UNIT = 0x06, + UVC_VC_DESC_SUBTYPE_ENCODING_UNIT = 0x07 +}; + +/** + * @brief VideoStreaming interface descriptor subtype + * + * @see USB UVC specification ver 1.5, table A.6 + */ +enum uvc_vs_desc_subtype { + UVC_VS_DESC_SUBTYPE_UNDEFINED = 0x00, + UVC_VS_DESC_SUBTYPE_INPUT_HEADER = 0x01, + UVC_VS_DESC_SUBTYPE_OUTPUT_HEADER = 0x02, + UVC_VS_DESC_SUBTYPE_STILL_IMAGE_FRAME = 0x03, + UVC_VS_DESC_SUBTYPE_FORMAT_UNCOMPRESSED = 0x04, + UVC_VS_DESC_SUBTYPE_FRAME_UNCOMPRESSED = 0x05, + UVC_VS_DESC_SUBTYPE_FORMAT_MJPEG = 0x06, + UVC_VS_DESC_SUBTYPE_FRAME_MJPEG = 0x07, + UVC_VS_DESC_SUBTYPE_FORMAT_MPEG2TS = 0x0a, + UVC_VS_DESC_SUBTYPE_FORMAT_DV = 0x0c, + UVC_VS_DESC_SUBTYPE_COLORFORMAT = 0x0d, + UVC_VS_DESC_SUBTYPE_FORMAT_FRAME_BASED = 0x10, + UVC_VS_DESC_SUBTYPE_FRAME_FRAME_BASED = 0x11, + UVC_VS_DESC_SUBTYPE_FORMAT_STREAM_BASED = 0x12 +}; + +/** + * @brief + * @see USB UVC specification ver 1.5, table 4-75 + */ +typedef struct { + // Version 1.0 + uint16_t bmHint; + uint8_t bFormatIndex; + uint8_t bFrameIndex; + uint32_t dwFrameInterval; + uint16_t wKeyFrameRate; + uint16_t wPFrameRate; + uint16_t wCompQuality; + uint16_t wCompWindowSize; + uint16_t wDelay; + uint32_t dwMaxVideoFrameSize; + uint32_t dwMaxPayloadTransferSize; + // Version 1.1 and above + uint32_t dwClockFrequency; + uint8_t bmFramingInfo; + uint8_t bPreferredVersion; + uint8_t bMinVersion; + uint8_t bMaxVersion; + // Version 1.5 and above + uint8_t bUsage; + uint8_t bBitDepthLuma; + uint8_t bmSettings; + uint8_t bMaxNumberOfRefFramesPlus1; + uint16_t bmRateControlModes; + uint8_t bmLayoutPerStream[8]; +} USB_DESC_ATTR uvc_vs_ctrl_t; +ESP_STATIC_ASSERT(sizeof(uvc_vs_ctrl_t) == 48, "Size of uvc_vs_ctrl_t incorrect"); + +/** + * @brief Video Frame Descriptor + * + * Each format defines its own frame descriptor, but the first 9 fields are always the same. + * + * @see USB Device Class Definition for Video Devices: MJPEG Payload 1.5, table 3-2 + * @see USB Device Class Definition for Video Devices: Frame Based Payload 1.5, table 3-2 + * @see USB Device Class Definition for Video Devices: Uncompressed Payload 1.5, table 3-2 + */ +typedef struct { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bDescriptorSubType; + uint8_t bFrameIndex; + uint8_t bmCapabilities; + uint16_t wWidth; + uint16_t wHeight; + uint32_t dwMinBitRate; + uint32_t dwMaxBitRate; + union { + struct { + uint32_t dwMaxVideoFrameBufferSize; + uint32_t dwDefaultFrameInterval; + uint8_t bFrameIntervalType; /**< 0: Continuous frame interval, 1..255: The number of discrete frame intervals supported (n) */ + union { + struct { + uint32_t dwMinFrameInterval; + uint32_t dwMaxFrameInterval; + uint32_t dwFrameIntervalStep; + }; + uint32_t dwFrameInterval[3]; // We must put a fixed size here because of the union type. This is flexible size array though + }; + } USB_DESC_ATTR mjpeg_uncompressed; + struct { + uint32_t dwDefaultFrameInterval; + uint8_t bFrameIntervalType; /**< 0: Continuous frame interval, 1..255: The number of discrete frame intervals supported (n) */ + uint32_t dwBytesPerLine; + union { + struct { + uint32_t dwMinFrameInterval; + uint32_t dwMaxFrameInterval; + uint32_t dwFrameIntervalStep; + }; + uint32_t dwFrameInterval[3]; // We must put a fixed size here because of the union type. This is flexible size array though + }; + } USB_DESC_ATTR frame_based; + } USB_DESC_ATTR; +} USB_DESC_ATTR uvc_frame_desc_t; + +/** + * @brief Video Stream format descriptor + * + * Each format defines its own format descriptor, but the first 5 fields are always the same. + * + * @see USB Device Class Definition for Video Devices: MJPEG Payload 1.5, table 3-1 + * @see USB Device Class Definition for Video Devices: Uncompressed Payload 1.5, table 3-1 + * @see USB Device Class Definition for Video Devices: Frame Based Payload 1.5, table 3-1 + */ +typedef struct { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bDescriptorSubType; + uint8_t bFormatIndex; + uint8_t bNumFrameDescriptors; + union { + struct { + uint8_t guidFormat[16]; // Globally Unique Identifier used to identify stream-encoding format + uint8_t bBitsPerPixel; // Number of bits per pixel used to specify color in the decoded video frame + uint8_t bDefaultFrameIndex; // Optimum Frame Index (used to select resolution) for this stream + uint8_t bAspectRatioX; // The X dimension of the picture aspect ratio + uint8_t bAspectRatioY; // The Y dimension of the picture aspect ratio + uint8_t bmInterlaceFlags; // Specifies interlace information + uint8_t bCopyProtect; // Specifies whether duplication of the video stream is restricted + } uncompressed_frame_based; + struct { + uint8_t bmFlags; + uint8_t bDefaultFrameIndex; + uint8_t bAspectRatioX; + uint8_t bAspectRatioY; + uint8_t bmInterlaceFlags; + uint8_t bCopyProtect; + } mjpeg; + }; +} USB_DESC_ATTR uvc_format_desc_t; + +/** + * @brief Video Control Interface Header Descriptor + * + * @see USB UVC specification ver 1.5, table 3-3 + */ +typedef struct { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bDescriptorSubType; + uint16_t bcdUVC; + uint16_t wTotalLength; + uint32_t dwClockFrequency; + uint8_t bInCollection; + uint8_t baInterfaceNr[]; +} USB_DESC_ATTR uvc_vc_header_desc_t; + +/** + * @brief Input Terminal Camera Descriptor + * + * @see USB UVC specification ver 1.5, table 3-6 + */ +typedef struct { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bDescriptorSubType; + uint8_t bTerminalID; + uint16_t wTerminalType; + uint8_t bAssocTerminal; + uint8_t iTerminal; + uint16_t wObjectiveFocalLengthMin; + uint16_t wObjectiveFocalLengthMax; + uint16_t wOcularFocalLength; + uint8_t bControlSize; // Typically == 3. From UVC v1.5 must == 3 + uint8_t bmControls[3]; +} USB_DESC_ATTR uvc_input_terminal_camera_desc_t; + +/** + * @brief Media Transport Input Terminal Descriptor + * + * @see USB UVC Video Media Transport Terminal specification ver 1.5, table 3-1 + */ +typedef struct { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bDescriptorSubType; + uint8_t bTerminalID; + uint16_t wTerminalType; + uint8_t bAssocTerminal; + uint8_t iTerminal; + uint8_t bControlSize; + uint8_t bmControls; + uint8_t bTransportModeSize; + uint8_t bmTransportModes[5]; +} USB_DESC_ATTR uvc_input_terminal_media_desc_t; + +/** + * @brief Output Terminal Descriptor + * + * @see USB UVC specification ver 1.5, table 3-5 + */ +typedef struct { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bDescriptorSubType; + uint8_t bTerminalID; + uint16_t wTerminalType; + uint8_t bAssocTerminal; + uint8_t bSourceID; + uint8_t iTerminal; +} USB_DESC_ATTR uvc_output_terminal_desc_t; + +/** + * @brief Selector Unit Descriptor + * + * @see USB UVC specification ver 1.5, table 3-7 + */ +typedef struct { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bDescriptorSubType; + uint8_t bUnitID; + uint8_t bNrInPins; + uint8_t baSourceID1; + uint8_t baSourceID2; + uint8_t iSelector; +} USB_DESC_ATTR uvc_selector_unit_desc_t; + +/** + * @brief Processing Unit Descriptor + * + * @see USB UVC specification ver 1.5, table 3-8 + */ +typedef struct { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bDescriptorSubType; + uint8_t bUnitID; + uint8_t bSourceID; + uint16_t wMaxMultiplier; + uint8_t bControlSize; // Typically == 3. From UVC v1.5 must == 3 + uint8_t bmControls[3]; + uint8_t iProcessing; + uint8_t bmVideoStandards; +} USB_DESC_ATTR uvc_processing_unit_desc_t; + +/** + * @brief Video Streaming Interface Input Header Descriptor + * + * @see USB UVC specification ver 1.5, table 3-14 + */ +typedef struct { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bDescriptorSubType; + uint8_t bNumFormats; + uint16_t wTotalLength; + uint8_t bEndpointAddress; + uint8_t bmInfo; + uint8_t bTerminalLink; + uint8_t bStillCaptureMethod; + uint8_t bTriggerSupport; + uint8_t bTriggerUsage; + uint8_t bControlSize; // Typically == 1 + uint8_t bmaControls[]; // This field is an array with size bNumFormats x bControlSize bytes +} USB_DESC_ATTR uvc_vs_input_header_desc_t; + +/** + * @brief Still Image Frame Descriptor + * + * Please note that this descriptor can have multiple sizes and compressions + * + * @see USB UVC specification ver 1.5, table 3-18 + */ +typedef struct { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bDescriptorSubType; + uint8_t bEndpointAddress; + uint8_t bNumImageSizePatterns; + uint16_t wWidth; + uint16_t wHeight; + uint8_t bNumCompressionPtn; + uint8_t bCompression; +} USB_DESC_ATTR uvc_still_image_frame_desc_t; + +/** + * @brief Color Matching Descriptor + * + * @see USB UVC specification ver 1.5, table 3-19 + */ +typedef struct { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bDescriptorSubType; + uint8_t bColorPrimaries; + uint8_t bTransferCharacteristics; + uint8_t bMatrixCoefficients; +} USB_DESC_ATTR uvc_color_matching_desc_t; + +/** + * @brief Video Interface Subclass Codes + * + * @see USB UVC specification ver 1.5, table A.2 + */ +enum uvc_int_subclass_code { + UVC_SC_UNDEFINED = 0x00, + UVC_SC_VIDEOCONTROL = 0x01, + UVC_SC_VIDEOSTREAMING = 0x02, + UVC_SC_VIDEO_INTERFACE_COLLECTION = 0x03 +}; + +/** + * @brief Video Class-Specific Descriptor Types + * + * @see USB UVC specification ver 1.5, table A.4 + */ +enum uvc_descriptor_type { + UVC_CS_UNDEFINED = 0x20, + UVC_CS_DEVICE = 0x21, + UVC_CS_CONFIGURATION = 0x22, + UVC_CS_STRING = 0x23, + UVC_CS_INTERFACE = 0x24, + UVC_CS_ENDPOINT = 0x25 +}; + +/** + * @brief Video and Still Image Payload Header + * + * The extended fields from table 2-6 are not listed here because this driver does not use them + * and they can be extended in next UVC specification versions + * + * @see USB UVC specification ver 1.5, table 2-5 + */ +typedef struct { + uint8_t bHeaderLength; + union { + struct { + uint8_t frame_id: 1; + uint8_t end_of_frame: 1; + uint8_t presentation_time: 1; + uint8_t source_clock_reference: 1; + uint8_t payload_specific: 1; + uint8_t still_image: 1; + uint8_t error: 1 ; + uint8_t end_of_header: 1; + }; + uint8_t val; + } bmHeaderInfo; +} USB_DESC_ATTR uvc_payload_header_t; + +/** + * @brief Class-specific VC Interrupt Endpoint Descriptor + * + * @see USB UVC specification ver 1.5, table 3-12 + */ +typedef struct { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bDescriptorSubType; + uint16_t wMaxTransferSize; +} USB_DESC_ATTR uvc_vc_interrupt_ep_desc_t; diff --git a/host/class/uvc/usb_host_uvc/include/usb/uvc_host.h b/host/class/uvc/usb_host_uvc/include/usb/uvc_host.h new file mode 100644 index 00000000..685f3eb2 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/include/usb/uvc_host.h @@ -0,0 +1,259 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include +#include "usb/usb_host.h" +#include "usb/usb_types_uvc.h" +#include "esp_err.h" + +// Use this macros for opening a UVC stream with any VID or PID +#define UVC_HOST_ANY_VID (0) +#define UVC_HOST_ANY_PID (0) + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct uvc_host_stream_s *uvc_host_stream_hdl_t; + +/** + * @brief Configuration structure of USB Host UVC driver + */ +typedef struct { + size_t driver_task_stack_size; /**< Stack size of the driver's task */ + unsigned driver_task_priority; /**< Priority of the driver's task */ + int xCoreID; /**< Core affinity of the driver's task */ + bool create_background_task; /**< When set to true, background task handling usb events is created. + Otherwise user has to periodically call uvc_host_handle_events function */ +} uvc_host_driver_config_t; + +/** + * @brief Event types of this driver + */ +enum uvc_host_dev_event { + UVC_HOST_TRANSFER_ERROR, /**< USB transfer error */ + UVC_HOST_DEVICE_DISCONNECTED, /**< Device was suddenly disconnected. The stream is stopped. */ + UVC_HOST_FRAME_BUFFER_OVERFLOW, /**< The received frame was discarded because it exceeded the available frame buffer space. + To resolve this, increase the `frame_size` parameter in `uvc_host_stream_config_t.advanced` to allocate a larger buffer. */ + UVC_HOST_FRAME_BUFFER_UNDERFLOW, /**< The received frame was discarded because no available buffer was free for storage. + To address this, either optimize your processing speed or increase the `number_of_frame_buffers` parameter in + `uvc_host_stream_config_t.advanced` to allocate additional buffers. */ +}; + +/** + * @brief UVC Device Event data structure + */ +typedef struct { + enum uvc_host_dev_event type; + union { + struct { + esp_err_t error; //!< Error code from USB Host + } transfer_error; // UVC_HOST_TRANSFER_ERROR + struct { + uvc_host_stream_hdl_t stream_hdl; //!< Disconnection event + } device_disconnected; // UVC_HOST_DEVICE_DISCONNECTED + struct { + } frame_overflow; // UVC_HOST_FRAME_BUFFER_OVERFLOW + struct { + } frame_underflow; // UVC_HOST_FRAME_BUFFER_UNDERFLOW + }; +} uvc_host_stream_event_data_t; + +/** + * @brief Formats supported by this driver + */ +enum uvc_host_stream_format { + UVC_VS_FORMAT_UNDEFINED = 0, // Invalid format. Do not request this format from the camera. + UVC_VS_FORMAT_MJPEG, + UVC_VS_FORMAT_YUY2, + UVC_VS_FORMAT_H264, + UVC_VS_FORMAT_H265, +}; + +typedef struct { + unsigned h_res; /**< Horizontal resolution */ + unsigned v_res; /**< Vertical resolution */ + float fps; /**< Frames per second */ + enum uvc_host_stream_format format; /**< Frame coding format */ +} uvc_host_stream_format_t; + +/** + * @brief Video Stream frame + * + * This type is returned from frame callback upon receiving new frame + */ +typedef struct { + const uvc_host_stream_format_t vs_format; /**< Format of this frame buffer */ + size_t data_buffer_len; /**< Max data length supported by this frame buffer */ + size_t data_len; /**< Data length of currently store frame */ + uint8_t *data; /**< Frame data */ +} uvc_host_frame_t; + +/** + * @brief Stream event callback type + * + * @param[in] event Event structure + * @param[in] user_ctx User's argument passed to open function + */ +typedef void (*uvc_host_stream_callback_t)(const uvc_host_stream_event_data_t *event, void *user_ctx); + +/** + * @brief Frame callback type + * + * @param[in] frame Received frame + * @param[in] user_ctx User's argument passed to open function + * @return + * - true: The frame was processed by user. The UVC driver owns the frame now. + * - false: The frame was not yet processed by user. + * The user must call uvc_host_frame_return() to return it to UVC driver. + */ +typedef bool (*uvc_host_frame_callback_t)(const uvc_host_frame_t *frame, void *user_ctx); + +/** + * @brief Configuration structure of UVC device + */ +typedef struct { + uvc_host_stream_callback_t event_cb; /**< Stream's event callback function. Can be NULL */ + uvc_host_frame_callback_t frame_cb; /**< Stream's frame callback function */ + void *user_ctx; /**< User's argument that will be passed to the callbacks */ + struct { + uint16_t vid; /**< Device's Vendor ID. Set to 0 for any */ + uint16_t pid; /**< Device's Product ID. Set to 0 for any */ + uint8_t uvc_stream_index; /**< Index of UVC function you want to use. Set to 0 to use first available UVC function */ + } usb; + uvc_host_stream_format_t vs_format; /**< Video Stream format. Resolution, FPS and encoding */ + struct { + int number_of_frame_buffers; /**< Number of frame buffers. These can be very large as they must hold the full frame.*/ + size_t frame_size; /**< 0: Use frame size from format negotiation result (might be too big). + (0; SIZE_MAX>: Use user provide frame size. */ + uint32_t frame_heap_caps; /**< Memory capabilities for frame buffers. Directly passed to heap_caps_malloc() */ + int number_of_urbs; /**< Number of URBs for this stream. Triple buffering scheme is recommended */ + size_t urb_size; /**< Size in bytes of 1 URB, 10kB should be enough for start. + Larger value results in less frequent interrupts at the cost of memory consumption */ + } advanced; +} uvc_host_stream_config_t; + +/** + * @brief Install UVC driver + * + * - USB Host Library must already be installed before calling this function (via usb_host_install()) + * - This function should be called before calling any other UVC driver functions + * + * @param[in] driver_config Driver configuration structure. If set to NULL, a default configuration will be used. + * @return + * - ESP_OK: Success - driver installed + * - ESP_ERR_INVALID_STATE: Driver already installed or USB Host Library is not installed + * - ESP_ERR_NO_MEM: Not enough free memory for the driver + */ +esp_err_t uvc_host_install(const uvc_host_driver_config_t *driver_config); + +/** + * @brief Uninstall UVC driver + * + * - User must ensure that all UVC devices must be closed via uvc_host_stream_close() before calling this function + * + * @return + * - ESP_OK: Success - driver uninstalled + * - ESP_ERR_INVALID_STATE: Driver was not installed before or not all UVC devices are closed + */ +esp_err_t uvc_host_uninstall(void); + +/** + * @brief Handle UVC HOST events + * + * If UVC Host install was called with create_background_task=false configuration, application needs to handle USB Host events. + * Do not call this function if UVC host install was called with create_background_task=true configuration + * + * @param[in] timeout Timeout in FreeRTOS tick + * @return + * - ESP_OK: All events handled + * - ESP_ERR_INVALID_STATE: UVC driver not installed + * - ESP_ERR_TIMEOUT: No events handled within the timeout + * - ESP_FAIL: Event handling finished, driver uninstalled. You do not have to call this function further + */ +esp_err_t uvc_host_handle_events(uint32_t timeout); + +/** + * @brief Open UVC compliant device + * + * @param[in] stream_config Configuration structure of the device + * @param[in] timeout Timeout in FreeRTOS ticks + * @param[out] stream_hdl_ret UVC stream handle + * @return + * - ESP_OK: Success - stream opened + * - ESP_ERR_INVALID_STATE: UVC driver is not installed + * - ESP_ERR_INVALID_ARG: stream_config or stream_hdl_ret is NULL + * - ESP_ERR_NO_MEM: Not enough free memory for the stream + * - ESP_ERR_NOT_FOUND: UVC stream with requested configuration was not found + */ +esp_err_t uvc_host_stream_open(const uvc_host_stream_config_t *stream_config, int timeout, uvc_host_stream_hdl_t *stream_hdl_ret); + +/** + * @brief Start UVC stream + * + * After this call, the user will be informed about new frames by frame callback + * + * @param[in] stream_hdl UVC handle obtained from uvc_host_stream_open() + * @return + * - ESP_OK: Success - streaming started + * - ESP_ERR_INVALID_ARG: stream_hdl is NULL + * - ESP_ERR_INVALID_STATE: Stream already streaming + * - ESP_ERR_NOT_FOUND: Format negotiation error + * - Else: USB lib error + */ +esp_err_t uvc_host_stream_start(uvc_host_stream_hdl_t stream_hdl); + +/** + * @brief Stop UVC stream + * + * @param[in] stream_hdl UVC handle obtained from uvc_host_stream_open() + * @return + * - ESP_OK: Success - streaming stopped + * - ESP_ERR_INVALID_ARG: stream_hdl is NULL + * - Else: USB lib error + */ +esp_err_t uvc_host_stream_stop(uvc_host_stream_hdl_t stream_hdl); + +/** + * @brief Close UVC device and release its resources + * + * @param[in] stream_hdl UVC handle obtained from uvc_host_stream_open() + * @return + * - ESP_OK: Success - device closed + * - ESP_ERR_INVALID_ARG: stream_hdl is NULL + * - ESP_ERR_INVALID_STATE: UVC driver is not installed or some frames were not returned + */ +esp_err_t uvc_host_stream_close(uvc_host_stream_hdl_t stream_hdl); + +/** + * @brief Return processed frame back to the driver + * + * Must not call this function if the frame callback returns true. + * Must call this function after the frame is processed if the frame callback returns false. + * + * @param[in] stream_hdl UVC handle obtained from uvc_host_stream_open() + * @param[in] frame Frame obtained from frame callback + * @return + * - ESP_OK: Success - The frame was returned to the driver + * - ESP_INVALID_ARG: frame or stream_hdl is NULL + * - ESP_FAIL: The frame was not returned to the driver + */ +esp_err_t uvc_host_frame_return(uvc_host_stream_hdl_t stream_hdl, uvc_host_frame_t *frame); + +/** + * @brief Print device's descriptors + * + * Device and full Configuration descriptors are printed in human readable format to stdout. + * + * @param stream_hdl UVC handle obtained from uvc_host_stream_open() + */ +void uvc_host_desc_print(uvc_host_stream_hdl_t stream_hdl); + +#ifdef __cplusplus +} +#endif diff --git a/host/class/uvc/usb_host_uvc/libuvc b/host/class/uvc/usb_host_uvc/libuvc deleted file mode 160000 index 047920bc..00000000 --- a/host/class/uvc/usb_host_uvc/libuvc +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 047920bcdfb1dac42424c90de5cc77dfc9fba04d diff --git a/host/class/uvc/usb_host_uvc/private_include/descriptor.h b/host/class/uvc/usb_host_uvc/private_include/descriptor.h deleted file mode 100644 index 921748d2..00000000 --- a/host/class/uvc/usb_host_uvc/private_include/descriptor.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Converts raw buffer containing config descriptor into libusb_config_descriptor - * - * @note Call clear_config_descriptor when config descriptor is no longer needed. - * - * @param[in] buf buffer containing config descriptor - * @param[in] size size of buffer - * @param[out] config pointer to allocated libusb compatible config descriptor - * @return libusb_error - */ -int raw_desc_to_libusb_config(const uint8_t *buf, int size, struct libusb_config_descriptor **config); - -/** - * @brief Releases memory previously allocated by config raw_desc_to_libusb_config - * - * @param[in] config pointer to allocated config descriptor - */ -void clear_config_descriptor(struct libusb_config_descriptor *config); - -/** - * @brief Prints class specific descriptors - * - * @param[in] desc pointer to usb_standard_desc_t - */ -void print_usb_class_descriptors(const usb_standard_desc_t *desc); - -#ifdef __cplusplus -} -#endif diff --git a/host/class/uvc/usb_host_uvc/private_include/libusb.h b/host/class/uvc/usb_host_uvc/private_include/libusb.h deleted file mode 100644 index 454e09a0..00000000 --- a/host/class/uvc/usb_host_uvc/private_include/libusb.h +++ /dev/null @@ -1,307 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define LIBUSB_CALL static - -#define LIBUSB_DT_DEVICE_SIZE 18 -#define LIBUSB_DT_CONFIG_SIZE 9 -#define LIBUSB_DT_INTERFACE_SIZE 9 -#define LIBUSB_DT_ENDPOINT_SIZE 7 -#define LIBUSB_DT_ENDPOINT_AUDIO_SIZE 9 - -enum libusb_error { - LIBUSB_SUCCESS = 0, - LIBUSB_ERROR_IO = -1, - LIBUSB_ERROR_INVALID_PARAM = -2, - LIBUSB_ERROR_ACCESS = -3, - LIBUSB_ERROR_NO_DEVICE = -4, - LIBUSB_ERROR_NOT_FOUND = -5, - LIBUSB_ERROR_BUSY = -6, - LIBUSB_ERROR_TIMEOUT = -7, - LIBUSB_ERROR_OVERFLOW = -8, - LIBUSB_ERROR_PIPE = -9, - LIBUSB_ERROR_INTERRUPTED = -10, - LIBUSB_ERROR_NO_MEM = -11, - LIBUSB_ERROR_NOT_SUPPORTED = -12, - LIBUSB_ERROR_OTHER = -99 -}; - -enum libusb_descriptor_type { - LIBUSB_DT_DEVICE = 0x01, - LIBUSB_DT_CONFIG = 0x02, - LIBUSB_DT_STRING = 0x03, - LIBUSB_DT_INTERFACE = 0x04, - LIBUSB_DT_ENDPOINT = 0x05, - LIBUSB_DT_BOS = 0x0f, - LIBUSB_DT_DEVICE_CAPABILITY = 0x10, - LIBUSB_DT_HID = 0x21, - LIBUSB_DT_REPORT = 0x22, - LIBUSB_DT_PHYSICAL = 0x23, - LIBUSB_DT_HUB = 0x29, - LIBUSB_DT_SUPERSPEED_HUB = 0x2a, - LIBUSB_DT_SS_ENDPOINT_COMPANION = 0x30 -}; - -struct libusb_device_descriptor { - uint8_t bLength; /**< Size of the descriptor in bytes */ - uint8_t bDescriptorType; /**< DEVICE Descriptor Type */ - uint16_t bcdUSB; /**< USB Specification Release Number in Binary-Coded Decimal (i.e., 2.10 is 210H) */ - uint8_t bDeviceClass; /**< Class code (assigned by the USB-IF) */ - uint8_t bDeviceSubClass; /**< Subclass code (assigned by the USB-IF) */ - uint8_t bDeviceProtocol; /**< Protocol code (assigned by the USB-IF) */ - uint8_t bMaxPacketSize0; /**< Maximum packet size for endpoint zero (only 8, 16, 32, or 64 are valid) */ - uint16_t idVendor; /**< Vendor ID (assigned by the USB-IF) */ - uint16_t idProduct; /**< Product ID (assigned by the manufacturer) */ - uint16_t bcdDevice; /**< Device release number in binary-coded decimal */ - uint8_t iManufacturer; /**< Index of string descriptor describing manufacturer */ - uint8_t iProduct; /**< Index of string descriptor describing product */ - uint8_t iSerialNumber; /**< Index of string descriptor describing the device’s serial number */ - uint8_t bNumConfigurations; /**< Number of possible configurations */ -}; - -struct libusb_endpoint_descriptor { - uint8_t bLength; /**< Size of the descriptor in bytes */ - uint8_t bDescriptorType; /**< ENDPOINT Descriptor Type */ - uint8_t bEndpointAddress; /**< The address of the endpoint on the USB device described by this descriptor */ - uint8_t bmAttributes; /**< This field describes the endpoint’s attributes when it is configured using the bConfigurationValue. */ - uint16_t wMaxPacketSize; /**< Maximum packet size this endpoint is capable of sending or receiving when this configuration is selected. */ - uint8_t bInterval; /**< Interval for polling Isochronous and Interrupt endpoints. Expressed in frames or microframes depending on the device operating speed (1 ms for Low-Speed and Full-Speed or 125 us for USB High-Speed and above). */ - uint8_t *extra; - size_t extra_length; -}; - -struct libusb_interface_descriptor { - uint8_t bLength; /**< Size of the descriptor in bytes */ - uint8_t bDescriptorType; /**< INTERFACE Descriptor Type */ - uint8_t bInterfaceNumber; /**< Number of this interface. */ - uint8_t bAlternateSetting; /**< Value used to select this alternate setting for the interface identified in the prior field */ - uint8_t bNumEndpoints; /**< Number of endpoints used by this interface (excluding endpoint zero). */ - uint8_t bInterfaceClass; /**< Class code (assigned by the USB-IF) */ - uint8_t bInterfaceSubClass; /**< Subclass code (assigned by the USB-IF) */ - uint8_t bInterfaceProtocol; /**< Protocol code (assigned by the USB) */ - uint8_t iInterface; /**< Index of string descriptor describing this interface */ - uint8_t *extra; - size_t extra_length; - struct libusb_endpoint_descriptor *endpoint; -}; - -struct libusb_interface { - size_t num_altsetting; - struct libusb_interface_descriptor *altsetting; -}; - -struct libusb_config_descriptor { - uint8_t bLength; /**< Size of the descriptor in bytes */ - uint8_t bDescriptorType; /**< CONFIGURATION Descriptor Type */ - uint16_t wTotalLength; /**< Total length of data returned for this configuration */ - uint8_t bNumInterfaces; /**< Number of interfaces supported by this configuration */ - uint8_t bConfigurationValue; /**< Value to use as an argument to the SetConfiguration() request to select this configuration */ - uint8_t iConfiguration; /**< Index of string descriptor describing this configuration */ - uint8_t bmAttributes; /**< Configuration characteristics */ - uint8_t bMaxPower; /**< Maximum power consumption of the USB device from the bus in this specific configuration when the device is fully operational. */ - uint8_t *extra; - size_t extra_length; - struct libusb_interface *interface; -}; - -typedef struct libusb_config_descriptor libusb_config_descriptor_t; -typedef struct libusb_interface_descriptor libusb_interface_descriptor_t; -typedef struct libusb_endpoint_descriptor libusb_endpoint_descriptor_t; -typedef struct libusb_interface libusb_interface_t; - -struct libusb_ss_endpoint_companion_descriptor { - uint32_t wBytesPerInterval; -}; - -struct libusb_device; -typedef struct libusb_device libusb_device; - -struct libusb_device_handle; -typedef struct libusb_device_handle libusb_device_handle; - -struct libusb_context; - -typedef enum libusb_transfer_status { - LIBUSB_TRANSFER_COMPLETED, - LIBUSB_TRANSFER_CANCELLED, - LIBUSB_TRANSFER_ERROR, - LIBUSB_TRANSFER_NO_DEVICE, - LIBUSB_TRANSFER_TIMED_OUT, - LIBUSB_TRANSFER_STALL, - LIBUSB_TRANSFER_OVERFLOW, -} libusb_status_t; - -typedef struct libusb_iso_packet_descriptor { - size_t length; - size_t actual_length; - libusb_status_t status; -} libusb_iso_packet_t; - -struct libusb_transfer { - libusb_device_handle *dev_handle; - libusb_status_t status; - uint8_t endpoint; - uint8_t *buffer; - size_t length; - size_t actual_length; - void *user_data; - void (*callback)(struct libusb_transfer *); - size_t timeout; - size_t num_iso_packets; - libusb_iso_packet_t iso_packet_desc[0]; -}; - -typedef void (*libusb_transfer_cb)(struct libusb_transfer *transfer); - -int libusb_init(struct libusb_context **ctx); - -void libusb_exit(struct libusb_context *ctx); - -int libusb_open(libusb_device *dev, libusb_device_handle **dev_handle); - -void libusb_close(libusb_device_handle *dev_handle); - -int32_t libusb_get_device_list(struct libusb_context *ctx, libusb_device ***list); - -void libusb_free_device_list(libusb_device **list, int unref_devices); - -int libusb_handle_events_completed(struct libusb_context *ctx, int *completed); - -int libusb_control_transfer(libusb_device_handle *dev_handle, - uint8_t bmRequestType, - uint8_t bRequest, - uint16_t wValue, - uint16_t wIndex, - unsigned char *data, - uint16_t wLength, - unsigned int timeout); - -void libusb_free_transfer(struct libusb_transfer *transfer); - -int libusb_submit_transfer(struct libusb_transfer *transfer); - -int libusb_cancel_transfer(struct libusb_transfer *transfer); - -inline uint8_t *libusb_get_iso_packet_buffer_simple(struct libusb_transfer *transfer, uint32_t packet_id) -{ - if (packet_id >= transfer->num_iso_packets) { - return NULL; - } - - return &transfer->buffer[transfer->iso_packet_desc[0].length * packet_id]; -} - -struct libusb_transfer *libusb_alloc_transfer(int iso_packets); - -inline void libusb_fill_iso_transfer(struct libusb_transfer *transfer, - libusb_device_handle *dev, - uint8_t bEndpointAddress, - uint8_t *buffer, - size_t total_transfer_size, - size_t packets_per_transfer, - libusb_transfer_cb callback, - void *user_data, - size_t timeout) -{ - transfer->dev_handle = dev; - transfer->endpoint = bEndpointAddress; - transfer->timeout = timeout; - transfer->buffer = buffer; - transfer->length = total_transfer_size; - transfer->num_iso_packets = packets_per_transfer; - transfer->user_data = user_data; - transfer->callback = callback; -} - -inline void libusb_fill_bulk_transfer (struct libusb_transfer *transfer, - libusb_device_handle *dev, - uint8_t bEndpointAddress, - uint8_t *buffer, - size_t length, - libusb_transfer_cb callback, - void *user_data, - size_t timeout) -{ - transfer->dev_handle = dev; - transfer->endpoint = bEndpointAddress; - transfer->buffer = buffer; - transfer->length = length; - transfer->callback = callback; - transfer->user_data = user_data; - transfer->timeout = timeout; - transfer->num_iso_packets = 0; -} - -inline void libusb_fill_interrupt_transfer (struct libusb_transfer *transfer, - libusb_device_handle *dev, - uint8_t bEndpointAddress, - uint8_t *buffer, - size_t length, - libusb_transfer_cb callback, - void *user_data, - size_t timeout) -{ - transfer->dev_handle = dev; - transfer->endpoint = bEndpointAddress; - transfer->buffer = buffer; - transfer->length = length; - transfer->callback = callback; - transfer->user_data = user_data; - transfer->timeout = timeout; - transfer->num_iso_packets = 0; -} - -inline void libusb_set_iso_packet_lengths(struct libusb_transfer *transfer, size_t length) -{ - for (uint32_t i = 0; i < transfer->num_iso_packets; i++) { - transfer->iso_packet_desc[i].length = length; - } -} - -int libusb_set_interface_alt_setting(libusb_device_handle *dev_handle, int32_t interface, int32_t alt_settings); - -int libusb_get_ss_endpoint_companion_descriptor(struct libusb_context *ctx, - const struct libusb_endpoint_descriptor *endpoint, - struct libusb_ss_endpoint_companion_descriptor **ep_comp); - -int libusb_get_device_descriptor(libusb_device *dev, struct libusb_device_descriptor *desc); - -int libusb_get_config_descriptor(libusb_device *dev, uint8_t config_index, struct libusb_config_descriptor **config); - -void libusb_free_config_descriptor(struct libusb_config_descriptor *config); - -int libusb_get_string_descriptor_ascii(libusb_device_handle *dev_handle, uint8_t desc_index, unsigned char *data, int length); - -void libusb_free_ss_endpoint_companion_descriptor(struct libusb_ss_endpoint_companion_descriptor *desc); - -int8_t libusb_get_bus_number(libusb_device *device); - -int8_t libusb_get_device_address(libusb_device *device); - -libusb_device *libusb_ref_device(libusb_device *dev); - -void libusb_unref_device(libusb_device *dev); - -int libusb_claim_interface(libusb_device_handle *dev_handle, int interface); - -int libusb_release_interface(libusb_device_handle *dev_handle, int interface); - -int libusb_attach_kernel_driver(libusb_device_handle *dev_handle, int interface_number); - -int libusb_detach_kernel_driver(libusb_device_handle *dev_handle, int interface_number); - -#ifdef __cplusplus -} -#endif diff --git a/host/class/uvc/usb_host_uvc/private_include/uvc_check_priv.h b/host/class/uvc/usb_host_uvc/private_include/uvc_check_priv.h new file mode 100644 index 00000000..1e4c9db1 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/private_include/uvc_check_priv.h @@ -0,0 +1,21 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +// UVC check macros +#define UVC_CHECK(cond, ret_val) ({ \ + if (!(cond)) { \ + return (ret_val); \ + } \ +}) + +#define UVC_CHECK_FROM_CRIT(cond, ret_val) ({ \ + if (!(cond)) { \ + UVC_EXIT_CRITICAL(); \ + return ret_val; \ + } \ +}) diff --git a/host/class/uvc/usb_host_uvc/private_include/uvc_critical_priv.h b/host/class/uvc/usb_host_uvc/private_include/uvc_critical_priv.h new file mode 100644 index 00000000..1769d6de --- /dev/null +++ b/host/class/uvc/usb_host_uvc/private_include/uvc_critical_priv.h @@ -0,0 +1,22 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include + +#include "freertos/FreeRTOS.h" +#include "freertos/portmacro.h" + +extern portMUX_TYPE uvc_lock; +#define UVC_ENTER_CRITICAL() portENTER_CRITICAL(&uvc_lock) +#define UVC_EXIT_CRITICAL() portEXIT_CRITICAL(&uvc_lock) + +#define UVC_ATOMIC_LOAD(x) __atomic_load_n(&x, __ATOMIC_SEQ_CST) +#define UVC_ATOMIC_SET_IF_NULL(x, new_x) ({ \ + __typeof__(x) expected = NULL; \ + __atomic_compare_exchange_n(&(x), &expected, (new_x), false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); \ + }) diff --git a/host/class/uvc/usb_host_uvc/private_include/uvc_descriptors_priv.h b/host/class/uvc/usb_host_uvc/private_include/uvc_descriptors_priv.h new file mode 100644 index 00000000..b110ff56 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/private_include/uvc_descriptors_priv.h @@ -0,0 +1,80 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +// In this file we want to have clean interface for descriptor parsing +// So we include only files with USB specification definitions +// This interface is also used in host_tests +#include "usb/usb_types_ch9.h" +#include "usb/usb_types_uvc.h" + +#define UVC_DESC_FPS_TO_DWFRAMEINTERVAL(fps) (((fps) != 0) ? 10000000.0f / (fps) : 0) +#define UVC_DESC_DWFRAMEINTERVAL_TO_FPS(dwFrameInterval) (((dwFrameInterval) != 0) ? 10000000.0f / ((float)(dwFrameInterval)) : 0) + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Helper to convert UVC format desc to this driver format + * + * @param[in] format_desc UVC format descriptor + * @return enum uvc_host_stream_format Format enum + */ +int uvc_desc_parse_format(const uvc_format_desc_t *format_desc); + +esp_err_t uvc_desc_get_streaming_interface_num( + const usb_config_desc_t *cfg_desc, + uint8_t uvc_index, + const uvc_host_stream_format_t *vs_format, + uint16_t *bcdUVC, + uint8_t *bInterfaceNumber); + +/** + * @brief Get Streaming Interface and Endpoint descriptors + * + * We go through all alternate interfaces and pick the one that offers endpoint with MPS that: + * * Is lower than or equal to dwMaxPayloadTransferSize + * * Has as few as possible extra transactions per microframe (HS only) + * + * @note The caller is responsible for dwMaxPayloadTransferSize fitting in the IN FIFO + * + * @param[in] cfg_desc Configuration descriptor + * @param[in] bInterfaceNumber Index of Streaming interface + * @param[in] dwMaxPayloadTransferSize Maximum requested MPS + * @param[out] intf_desc_ret Interface descriptor + * @param[out] ep_desc_ret Endpoint descriptor + * @return + * - ESP_OK: Success + * - ESP_ERR_INVALID_ARG: cfg_desc, intf_desc_ret or ep_desc_ret is NULL + * - ESP_ERR_NOT_FOUND: Could not find interface with required parameters + */ +esp_err_t uvc_desc_get_streaming_intf_and_ep( + const usb_config_desc_t *cfg_desc, + uint8_t bInterfaceNumber, + uint16_t dwMaxPayloadTransferSize, + const usb_intf_desc_t **intf_desc_ret, + const usb_ep_desc_t **ep_desc_ret); + +esp_err_t uvc_desc_get_frame_format_by_index( + const usb_config_desc_t *cfg_desc, + uint8_t bInterfaceNumber, + uint8_t bFormatIndex, + uint8_t bFrameIndex, + const uvc_format_desc_t **format_desc_ret, + const uvc_frame_desc_t **frame_desc_ret); + +esp_err_t uvc_desc_get_frame_format_by_format( + const usb_config_desc_t *cfg_desc, + uint8_t bInterfaceNumber, + const uvc_host_stream_format_t *vs_format, + const uvc_format_desc_t **format_desc_ret, + const uvc_frame_desc_t **frame_desc_ret); + +#ifdef __cplusplus +} +#endif diff --git a/host/class/uvc/usb_host_uvc/private_include/uvc_frame_priv.h b/host/class/uvc/usb_host_uvc/private_include/uvc_frame_priv.h new file mode 100644 index 00000000..07f3ec74 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/private_include/uvc_frame_priv.h @@ -0,0 +1,80 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include "usb/uvc_host.h" +#include "uvc_types_priv.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Allocate frame buffers for UVC stream + * + * @param[in] uvc_stream UVC stream handle + * @param[in] nb_of_fb Number of frame buffers to allocate + * @param[in] fb_size Size of 1 frame buffer in bytes + * @param[in] fb_caps Memory capabilities of memory for frame buffers + * @return + * - ESP_OK: Success + * - ESP_ERR_NO_MEM: Not enough memory for frame buffers + * - ESP_ERR_INVALID_ARG: Invalid count or size of frame buffers + */ +esp_err_t uvc_frame_allocate(uvc_stream_t *uvc_stream, int nb_of_fb, size_t fb_size, uint32_t fb_caps); + +/** + * @brief Free allocated frame buffers + * + * @attention The caller must ensure that the frame buffers are not accessed after this call and that streaming is not on + * @param[in] uvc_stream UVC stream + */ +void uvc_frame_free(uvc_stream_t *uvc_stream); + +/** + * @brief Check if all frame buffers are returned to this driver + * + * @param[in] uvc_stream UVC stream + * @return + * - true: All frames returned + * - false: All frames not returned + */ +bool uvc_frame_are_all_returned(uvc_stream_t *uvc_stream); + +/** + * @brief Get empty frame buffer + * + * @param[in] uvc_stream UVC stream + * @return Pointer to empty frame buffer. Can be NULL if not frame buffer is available. + */ +uvc_host_frame_t *uvc_frame_get_empty(uvc_stream_t *uvc_stream); + +/** + * @brief Add data to the frame buffer + * + * @param[in] frame Frame buffer + * @param[in] data Pointer to data + * @param[in] data_len Data length in bytes + * @return + * - ESP_OK: Data added to the frame buffer + * - ESP_ERR_INVALID_ARG: frame or data is NULL + * - ESP_ERR_INVALID_SIZE: Frame buffer overflow + */ +esp_err_t uvc_frame_add_data(uvc_host_frame_t *frame, const uint8_t *data, size_t data_len); + +/** + * @brief Reset a frame buffer + * + * All data in the frame buffer will be lost. + * + * @param[in] frame Frame buffer + */ +void uvc_frame_reset(uvc_host_frame_t *frame); + +#ifdef __cplusplus +} +#endif diff --git a/host/class/uvc/usb_host_uvc/private_include/uvc_idf_version_priv.h b/host/class/uvc/usb_host_uvc/private_include/uvc_idf_version_priv.h new file mode 100644 index 00000000..f682ac3c --- /dev/null +++ b/host/class/uvc/usb_host_uvc/private_include/uvc_idf_version_priv.h @@ -0,0 +1,23 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include "sdkconfig.h" +#include "esp_idf_version.h" + +// @todo fix the hard-coded number here: Should be taken from HAL FIFO config in future versions of esp-idf +#if (CONFIG_IDF_TARGET_ESP32P4) +#define MAX_MPS_IN 4096 +#else +#define MAX_MPS_IN 600 +#endif + +// Definition of USB_EP_DESC_GET_MULT for IDF versions that don't have it. +// It was introduced in IDF v5.3 and backported to v5.2.1 and v5.1.4 +#if !(ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 1, 4) && ESP_IDF_VERSION != ESP_IDF_VERSION_VAL(5, 2, 0)) +#define USB_EP_DESC_GET_MULT(desc_ptr) (((desc_ptr)->wMaxPacketSize & 0x1800) >> 11) +#endif diff --git a/host/class/uvc/usb_host_uvc/private_include/uvc_types_priv.h b/host/class/uvc/usb_host_uvc/private_include/uvc_types_priv.h new file mode 100644 index 00000000..f7346baf --- /dev/null +++ b/host/class/uvc/usb_host_uvc/private_include/uvc_types_priv.h @@ -0,0 +1,63 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include +#include +#include + +#include "usb/usb_host.h" +#include "usb/uvc_host.h" + +#include "freertos/FreeRTOS.h" +#include "freertos/queue.h" + +typedef struct uvc_host_stream_s uvc_stream_t; + +/** + * @brief Enum for simple state machine of Bulk frame data processing + */ +typedef enum { + UVC_STREAM_BULK_PACKET_SOF = 0, + UVC_STREAM_BULK_PACKET_DATA, + UVC_STREAM_BULK_PACKET_EOF, +} uvc_stream_bulk_packet_type_t; + +struct uvc_host_stream_s { + SLIST_ENTRY(uvc_host_stream_s) list_entry; + + struct { + // UVC driver related members + uvc_host_stream_callback_t stream_cb; // User's callback for stream events + uvc_host_frame_callback_t frame_cb; // User's frame callback + void *cb_arg; // Common argument for user's callbacks + uvc_host_stream_format_t vs_format; // Format of the video stream (Runtime format change of opened stream is not supported) + QueueHandle_t empty_fb_queue; // Queue of empty framebuffers + + // Constant USB descriptor values + uint16_t bcdUVC; // Version of UVC specs this device implements + uint8_t bInterfaceNumber; // USB Video Streaming interface claimed by this stream. Needed for ISOC Stream start and CTRL transfers + uint8_t bAlternateSetting; // Alternate setting for selected interface. Needed for ISOC Stream start + uint8_t bEndpointAddress; // Streaming endpoint address. Needed for BULK Stream stop + + // USB host related members + usb_device_handle_t dev_hdl; // USB device handle + unsigned num_of_xfers; // Number of USB transfers + usb_transfer_t **xfers; // Pointer to array of USB transfers. Accessible only by the UVC driver + } constant; // Constant members do no change after installation thus do not require a critical section + + struct { + uvc_host_frame_t *current_frame; // Frame that is being written to + bool streaming; // Flag whether stream is on/off + } dynamic; // Dynamic members require a critical section + + struct { + uvc_stream_bulk_packet_type_t next_bulk_packet; // Bulk only: next expected packet + bool skip_current_frame; // Flag to skip current frame. An error has occurred in the stream + uint8_t current_frame_id; // Frame ID can be only 0 or 1. But we also allow setting it to invalid value = 2. + } single_thread; // Single thread members are only accessed from 1 thread, so they do not need protection +}; diff --git a/host/class/uvc/usb_host_uvc/sbom_libuvc.yml b/host/class/uvc/usb_host_uvc/sbom_libuvc.yml deleted file mode 100644 index bc035a01..00000000 --- a/host/class/uvc/usb_host_uvc/sbom_libuvc.yml +++ /dev/null @@ -1,6 +0,0 @@ -name: libuvc -version: 0.0.7 -supplier: 'Organization: libuvc ' -description: a cross-platform library for USB video devices. -url: https://github.com/libuvc/libuvc - diff --git a/host/class/uvc/usb_host_uvc/src/descriptor.c b/host/class/uvc/usb_host_uvc/src/descriptor.c deleted file mode 100644 index f1d2f723..00000000 --- a/host/class/uvc/usb_host_uvc/src/descriptor.c +++ /dev/null @@ -1,870 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#include -#include -#include -#include - -#include "libusb.h" -#include "esp_log.h" -#include "usb/usb_host.h" -#include "usb/usb_types_ch9.h" -#include "sys/param.h" -#include - -typedef struct { - uint8_t bLength; - uint8_t bDescriptorType; - uint8_t bDescriptorSubtype; -} desc_header_t; - -typedef struct { - const uint8_t *begin; - uint8_t **data; - size_t *len; -} extra_data_t; - -#define DESC_HEADER_LENGTH 2 -#define USB_MAXENDPOINTS 32 -#define USB_MAXINTERFACES 32 -#define USB_MAXCONFIG 8 - -#define TAG "DESC" - -#define USB_DESC_ATTR __attribute__((packed)) - - -#define LIBUSB_GOTO_ON_ERROR(exp) do { \ - int _res_ = exp; \ - if(_res_ != LIBUSB_SUCCESS) { \ - ret = _res_; \ - goto cleanup; \ - } \ -} while(0) - -#define LIBUSB_GOTO_ON_FALSE(exp) do { \ - if((exp) == 0) { \ - goto cleanup; \ - } \ -} while(0) - -static const usb_intf_desc_t *next_interface_desc(const usb_intf_desc_t *desc, size_t len, int *offset) -{ - return (const usb_intf_desc_t *) usb_parse_next_descriptor_of_type( - (const usb_standard_desc_t *)desc, len, USB_B_DESCRIPTOR_TYPE_INTERFACE, offset); -} - -void copy_config_desc(libusb_config_descriptor_t *libusb_desc, const usb_config_desc_t *idf_desc) -{ - libusb_desc->bLength = idf_desc->bLength; - libusb_desc->bDescriptorType = idf_desc->bDescriptorType; - libusb_desc->wTotalLength = idf_desc->wTotalLength; - libusb_desc->bNumInterfaces = idf_desc->bNumInterfaces; - libusb_desc->bConfigurationValue = idf_desc->bConfigurationValue; - libusb_desc->iConfiguration = idf_desc->iConfiguration; - libusb_desc->bmAttributes = idf_desc->bmAttributes; - libusb_desc->bMaxPower = idf_desc->bMaxPower; -} - -void copy_interface_desc(libusb_interface_descriptor_t *libusb_desc, const usb_intf_desc_t *idf_desc) -{ - libusb_desc->bLength = idf_desc->bLength; - libusb_desc->bDescriptorType = idf_desc->bDescriptorType; - libusb_desc->bInterfaceNumber = idf_desc->bInterfaceNumber; - libusb_desc->bAlternateSetting = idf_desc->bAlternateSetting; - libusb_desc->bNumEndpoints = idf_desc->bNumEndpoints; - libusb_desc->bInterfaceClass = idf_desc->bInterfaceClass; - libusb_desc->bInterfaceSubClass = idf_desc->bInterfaceSubClass; - libusb_desc->bInterfaceProtocol = idf_desc->bInterfaceProtocol; - libusb_desc->iInterface = idf_desc->iInterface; -} - -void copy_endpoint_desc(libusb_endpoint_descriptor_t *libusb_desc, const usb_ep_desc_t *idf_desc) -{ - libusb_desc->bLength = idf_desc->bLength; - libusb_desc->bDescriptorType = idf_desc->bDescriptorType; - libusb_desc->bEndpointAddress = idf_desc->bEndpointAddress; - libusb_desc->bmAttributes = idf_desc->bmAttributes; - libusb_desc->wMaxPacketSize = idf_desc->wMaxPacketSize; - libusb_desc->bInterval = idf_desc->bInterval; -} - -static void set_extra_data(extra_data_t *extra, uint8_t **extra_data, size_t *extra_len, const uint8_t *begin) -{ - extra->data = extra_data; - extra->len = extra_len; - extra->begin = begin; -} - -// Copies extra data to previously provided memory. -// The function allocates or realllocates memory depending on provided pointer -static libusb_status_t add_extra_data(extra_data_t *extra, const void *end) -{ - uint8_t *new_memory = NULL; - - int new_size = (int)((uint8_t *)end - extra->begin); - - if (new_size > 0) { - if (*extra->data == NULL) { - new_memory = malloc(new_size); - } else { - new_memory = realloc(*extra->data, *extra->len + new_size); - } - - if (!new_memory) { - return LIBUSB_ERROR_NO_MEM; - } - - memcpy(new_memory + *extra->len, extra->begin, new_size); - *extra->data = new_memory; - *extra->len += new_size; - } - - return LIBUSB_SUCCESS; -} - -void clear_config_descriptor(libusb_config_descriptor_t *config) -{ - if (config) { - if (config->interface) { - for (int i = 0; i < config->bNumInterfaces; i++) { - libusb_interface_t *interface = &config->interface[i]; - if (interface->altsetting) { - for (int j = 0; j < interface->num_altsetting; j++) { - libusb_interface_descriptor_t *alt = &interface->altsetting[j]; - if (alt->endpoint) { - for (int ep = 0; ep < alt->bNumEndpoints; ep++) { - free(alt->endpoint[ep].extra); - } - free(alt->endpoint); - } - free(alt->extra); - } - free(interface->altsetting); - } - } - free(config->interface); - } - free(config->extra); - } -} - -int parse_configuration(libusb_config_descriptor_t *config, const uint8_t *buffer, int size) -{ - int offset = 0; - extra_data_t extra = { 0 }; - const usb_ep_desc_t *ep_desc; - const usb_config_desc_t *config_start = (const usb_config_desc_t *)buffer; - libusb_status_t ret = LIBUSB_ERROR_NO_MEM; - - copy_config_desc(config, (const usb_config_desc_t *)buffer); - config->interface = calloc(config->bNumInterfaces, sizeof(libusb_interface_t)); - LIBUSB_GOTO_ON_FALSE(config->interface); - // set pointers to extra data to be used later for class/vendor specific descriptor - set_extra_data(&extra, &config->extra, &config->extra_length, buffer + LIBUSB_DT_CONFIG_SIZE); - const usb_intf_desc_t *ifc_desc = (const usb_intf_desc_t *)buffer; - - for (int i = 0; i < config->bNumInterfaces; i++) { - ifc_desc = next_interface_desc(ifc_desc, config->wTotalLength, &offset); - // Copy any unknown descriptors into a storage area for drivers to later parse - LIBUSB_GOTO_ON_ERROR( add_extra_data(&extra, ifc_desc) ); - - libusb_interface_t *interface = &config->interface[i]; - // Obtain number of alternate interfaces to given interface number - int alt_interfaces = usb_parse_interface_number_of_alternate(config_start, ifc_desc->bInterfaceNumber) + 1; - interface->altsetting = calloc(alt_interfaces, sizeof(libusb_interface_descriptor_t)); - LIBUSB_GOTO_ON_FALSE(interface->altsetting); - interface->num_altsetting = alt_interfaces; - - for (int alt = 0; alt < alt_interfaces; alt++) { - libusb_interface_descriptor_t *altsetting = &interface->altsetting[alt]; - copy_interface_desc(altsetting, ifc_desc); - set_extra_data(&extra, &altsetting->extra, &altsetting->extra_length, ((uint8_t *)ifc_desc) + LIBUSB_DT_INTERFACE_SIZE); - uint8_t endpoints = ifc_desc->bNumEndpoints; - - altsetting->endpoint = calloc(altsetting->bNumEndpoints, sizeof(libusb_endpoint_descriptor_t)); - LIBUSB_GOTO_ON_FALSE(interface->altsetting); - - for (int ep = 0; ep < endpoints; ep++) { - int intf_offset = offset; // Current offset is interface offset in the configuration descriptor - ep_desc = usb_parse_endpoint_descriptor_by_index(ifc_desc, ep, config->wTotalLength, &intf_offset); - libusb_endpoint_descriptor_t *endpoint = &altsetting->endpoint[ep]; - copy_endpoint_desc(endpoint, ep_desc); - LIBUSB_GOTO_ON_ERROR( add_extra_data(&extra, ep_desc) ); - set_extra_data(&extra, &endpoint->extra, &endpoint->extra_length, ((uint8_t *)ep_desc) + ep_desc->bLength); - } - if (alt + 1 < alt_interfaces) { - // go over next alternate interface - ifc_desc = next_interface_desc(ifc_desc, config->wTotalLength, &offset); - LIBUSB_GOTO_ON_ERROR( add_extra_data(&extra, ifc_desc) ); - extra.begin = ((uint8_t *)ifc_desc) + LIBUSB_DT_INTERFACE_SIZE; - } - } - } - // Save any remaining descriptors to extra data - LIBUSB_GOTO_ON_ERROR( add_extra_data(&extra, &buffer[config->wTotalLength]) ); - - return LIBUSB_SUCCESS; - -cleanup: - clear_config_descriptor(config); - return ret; -} - -int raw_desc_to_libusb_config(const uint8_t *buf, int size, struct libusb_config_descriptor **config_desc) -{ - libusb_config_descriptor_t *config = calloc(1, sizeof(*config)); - - if (!config) { - return LIBUSB_ERROR_NO_MEM; - } - - int r = parse_configuration(config, buf, size); - if (r < 0) { - ESP_LOGE(TAG, "parse_configuration failed with error %d", r); - free(config); - return r; - } - - *config_desc = config; - return LIBUSB_SUCCESS; -} - -typedef struct { - uint8_t bLength; - uint8_t bDescriptorType; - uint8_t bFirstInterface; - uint8_t bInterfaceCount; - uint8_t bFunctionClass; - uint8_t bFunctionSubClass; - uint8_t bFunctionProtocol; - uint8_t iFunction; -} USB_DESC_ATTR ifc_assoc_desc_t; - -typedef struct { - uint8_t bLength; - uint8_t bDescriptorType; - uint8_t bDescriptorSubType; - uint16_t bcdUVC; - uint16_t wTotalLength; - uint32_t dwClockFrequency; - uint8_t bFunctionProtocol; - uint8_t bInCollection; - uint8_t baInterfaceNr; -} USB_DESC_ATTR vc_interface_desc_t; - -typedef struct { - uint8_t bLength; - uint8_t bDescriptorType; - uint8_t bDescriptorSubType; - uint8_t bNumFormats; - uint16_t wTotalLength; - uint8_t bEndpointAddress; - uint8_t bFunctionProtocol; - uint8_t bmInfo; - uint8_t bTerminalLink; - uint8_t bStillCaptureMethod; - uint8_t bTriggerSupport; - uint8_t bTriggerUsage; - uint8_t bControlSize; - uint8_t bmaControls; - -} USB_DESC_ATTR vs_interface_desc_t; - -typedef struct { - uint8_t bLength; - uint8_t bDescriptorType; - uint8_t bDescriptorSubType; - uint8_t bTerminalID; - uint16_t wTerminalType; - uint8_t bAssocTerminal; - uint8_t iTerminal; - uint16_t wObjectiveFocalLengthMin; - uint16_t wObjectiveFocalLengthMax; - uint16_t wOcularFocalLength; - uint8_t bControlSize; - uint16_t bmControls; -} USB_DESC_ATTR input_terminal_camera_desc_t; - -typedef struct { - uint8_t bLength; - uint8_t bDescriptorType; - uint8_t bDescriptorSubType; - uint8_t bTerminalID; - uint16_t wTerminalType; - uint8_t bAssocTerminal; - uint8_t iTerminal; -} USB_DESC_ATTR input_terminal_composite_desc_t; - -typedef struct { - uint8_t bLength; - uint8_t bDescriptorType; - uint8_t bDescriptorSubType; - uint8_t bTerminalID; - uint16_t wTerminalType; - uint8_t bAssocTerminal; - uint8_t iTerminal; - uint8_t bControlSize; - uint8_t bmControls; - uint8_t bTransportModeSize; - uint8_t bmTransportModes[5]; -} USB_DESC_ATTR input_terminal_media_desc_t; - -typedef struct { - uint8_t bLength; - uint8_t bDescriptorType; - uint8_t bDescriptorSubType; - uint8_t bTerminalID; - uint16_t wTerminalType; - uint8_t bAssocTerminal; - uint8_t bSourceID; - uint8_t iTerminal; -} USB_DESC_ATTR output_terminal_desc_t; - -typedef struct { - uint8_t bLength; - uint8_t bDescriptorType; - uint8_t bDescriptorSubType; - uint8_t bUnitID; - uint8_t bNrInPins; - uint8_t baSourceID1; - uint8_t baSourceID2; - uint8_t iSelector; -} USB_DESC_ATTR selector_unit_desc_t; - -typedef struct { - uint8_t bLength; - uint8_t bDescriptorType; - uint8_t bDescriptorSubType; - uint8_t bUnitID; - uint8_t bSourceID; - uint16_t wMaxMultiplier; - uint8_t bControlSize; - uint16_t bmControls; - uint8_t iProcessing; - uint8_t bmVideoStandards; -} USB_DESC_ATTR processing_unit_desc_t; - -typedef struct { - uint8_t bLength; - uint8_t bDescriptorType; - uint8_t bDescriptorSubType; - uint16_t wMaxTransferSize; -} USB_DESC_ATTR class_specific_endpoint_desc_t; - -typedef struct { - uint8_t bLength; - uint8_t bDescriptorType; - uint8_t bDescriptorSubType; - uint8_t bFormatIndex; - uint8_t bNumFrameDescriptors; - uint8_t bmFlags; - uint8_t bDefaultFrameIndex; - uint8_t bAspectRatioX; - uint8_t bAspectRatioY; - uint8_t bmInterlaceFlags; - uint8_t bCopyProtect; -} USB_DESC_ATTR vs_format_desc_t; - -typedef struct { - uint8_t bLength; - uint8_t bDescriptorType; - uint8_t bDescriptorSubType; - uint8_t bFrameIndex; - uint8_t bmCapabilities; - uint16_t wWidth; - uint16_t wHeight; - uint32_t dwMinBitRate; - uint32_t dwMaxBitRate; - uint32_t dwMaxVideoFrameBufSize; - uint32_t dwDefaultFrameInterval; - uint8_t bFrameIntervalType; - union { - uint32_t dwFrameInterval[16]; - struct { - uint32_t dwMinFrameInterval; - uint32_t dwMaxFrameInterval; - uint32_t dwFrameIntervalStep; - }; - }; -} USB_DESC_ATTR vs_frame_desc_t; - - -typedef struct { - uint8_t bLength; - uint8_t bDescriptorType; - uint8_t bDescriptorSubType; - uint8_t bFormatIndex; - uint8_t bNumFrameDescriptors; - uint8_t guidFormat[16]; - uint8_t bBitsPerPixel; - uint8_t bDefaultFrameIndex; - uint8_t bAspectRatioX; - uint8_t bAspectRatioY; - uint8_t bmInterlaceFlags; - uint8_t bCopyProtect; - uint8_t bVariableSize; -} USB_DESC_ATTR vs_format_frame_based_desc_t; - -typedef struct { - uint8_t bLength; - uint8_t bDescriptorType; - uint8_t bDescriptorSubType; - uint8_t bFrameIndex; - uint8_t bmCapabilities; - uint16_t wWidth; - uint16_t wHeight; - uint32_t dwMinBitRate; - uint32_t dwMaxBitRate; - uint32_t dwDefaultFrameInterval; - uint8_t bFrameIntervalType; - uint32_t dwBytesPerLine; - union { - uint32_t dwFrameInterval[16]; - struct { - uint32_t dwMinFrameInterval; - uint32_t dwMaxFrameInterval; - uint32_t dwFrameIntervalStep; - }; - }; -} USB_DESC_ATTR vs_frame_frame_based_desc_t; - -// Helper struct -typedef struct { - uint16_t wWidth; - uint16_t wHeight; -} USB_DESC_ATTR WidthHeight_t; - -// Helper struct -typedef struct { - uint8_t bNumCompressionPtn; - uint8_t bCompression; -} USB_DESC_ATTR Compression_t; - -typedef struct { - uint8_t bLength; - uint8_t bDescriptorType; - uint8_t bDescriptorSubType; - uint8_t bEndpointAddress; - uint8_t bNumImageSizePatterns; - uint16_t wWidth; - uint16_t wHeight; - uint8_t bNumCompressionPtn; - uint8_t bCompression; -} USB_DESC_ATTR still_image_frame_desc_t; - -typedef struct { - uint8_t bLength; - uint8_t bDescriptorType; - uint8_t bDescriptorSubType; - uint8_t bColorPrimaries; - uint8_t bTransferCharacteristics; - uint8_t bMatrixCoefficients; -} USB_DESC_ATTR color_format_desc_t; - -#define TERMINAL_INPUT_CAMERA_TYPE 0x0201 -#define TERMINAL_INPUT_COMPOSITE_TYPE 0x0401 -#define ITT_MEDIA_TRANSPORT_INPUT 0x0202 - -#define CC_VIDEO 0x0E - -#define USB_DESC_ASC_SIZE 8 - -typedef enum { - CONFIG_DESC = 0x02, - STRING_DESC = 0x03, - INTERFACE_DESC = 0x04, - ENDPOINT_DESC = 0x05, - INTERFACE_ASSOC_DESC = 0x0B, - CS_INTERFACE_DESC = 0x24, - CS_ENDPOINT_DESC = 0x25, -} descriptor_types_t; - -typedef enum { - VC_HEADER = 0x01, - VC_INPUT_TERMINAL = 0x02, - VC_OUTPUT_TERMINAL = 0x03, - VC_SELECTOR_UNIT = 0x04, - VC_PROCESSING_UNIT = 0x05, - VS_FORMAT_MJPEG = 0x06, - VS_FRAME_MJPEG = 0x07, - VS_FORMAT_FRAME_BASED = 0x10, - VS_FRAME_FRAME_BASED = 0x11, - VS_STILL_FRAME = 0x03, - VS_COLORFORMAT = 0x0D, -} descriptor_subtypes_t; - -typedef enum { - SC_VIDEOCONTROL = 1, - SC_VIDEOSTREAMING = 2, -} interface_sub_class_t; - -static interface_sub_class_t interface_sub_class = SC_VIDEOCONTROL; - -static void print_cs_endpoint_desc(const uint8_t *buff) -{ - class_specific_endpoint_desc_t *class_desc = (class_specific_endpoint_desc_t *)buff; - printf("\t\t*** Class-specific Interrupt Endpoint Descriptor ***\n"); - printf("\t\tbLength 0x%x\n", class_desc->bLength); - printf("\t\tbDescriptorType 0x%x\n", class_desc->bDescriptorType); - printf("\t\tbDescriptorSubType %d\n", class_desc->bDescriptorSubType); - printf("\t\twMaxTransferSize %d\n", class_desc->wMaxTransferSize); -} - -static void print_interface_assoc_desc(const uint8_t *buff) -{ - const ifc_assoc_desc_t *asc_desc = (const ifc_assoc_desc_t *) buff; - printf("\t*** Interface Association Descriptor ***\n"); - printf("\tbLength 0x%x\n", asc_desc->bLength); - printf("\tbDescriptorType 0x%x\n", asc_desc->bDescriptorType); - printf("\tbInterfaceCount %u\n", asc_desc->bInterfaceCount); - printf("\tbFirstInterface %d\n", asc_desc->bFirstInterface); - printf("\tbFunctionClass %d\n", asc_desc->bFunctionClass); - printf("\tbFunctionSubClass %d\n", asc_desc->bFunctionSubClass); - printf("\tbFunctionProtocol %d\n", asc_desc->bFunctionProtocol); - printf("\tiFunction 0x%x\n", asc_desc->iFunction); -} - - -static void print_class_header_desc(const uint8_t *buff) -{ - if (interface_sub_class == SC_VIDEOCONTROL) { - const vc_interface_desc_t *desc = (const vc_interface_desc_t *) buff; - printf("\t*** Class-specific VC Interface Descriptor ***\n"); - printf("\tbLength 0x%x\n", desc->bLength); - printf("\tbDescriptorType 0x%x\n", desc->bDescriptorType); - printf("\tbDescriptorSubType %u\n", desc->bDescriptorSubType); - printf("\tbcdUVC %x\n", desc->bcdUVC); - printf("\twTotalLength %u\n", desc->wTotalLength); - printf("\tdwClockFrequency %"PRIu32"\n", desc->dwClockFrequency); - printf("\tbFunctionProtocol %u\n", desc->bFunctionProtocol); - printf("\tbInCollection %u\n", desc->bInCollection); - printf("\tbaInterfaceNr %u\n", desc->baInterfaceNr); - } else if (interface_sub_class == SC_VIDEOSTREAMING) { - const vs_interface_desc_t *desc = (const vs_interface_desc_t *) buff; - printf("\t*** Class-specific VS Interface Descriptor ***\n"); - printf("\tbLength 0x%x\n", desc->bLength); - printf("\tbDescriptorType 0x%x\n", desc->bDescriptorType); - printf("\tbDescriptorSubType %u\n", desc->bDescriptorSubType); - printf("\tbNumFormats %x\n", desc->bNumFormats); - printf("\twTotalLength %u\n", desc->wTotalLength); - printf("\tbEndpointAddress %u\n", desc->bEndpointAddress); - printf("\tbFunctionProtocol %u\n", desc->bFunctionProtocol); - printf("\tbmInfo 0x%x\n", desc->bmInfo); - printf("\tbTerminalLink %u\n", desc->bTerminalLink); - printf("\tbStillCaptureMethod %u\n", desc->bStillCaptureMethod); - printf("\tbTriggerSupport %u\n", desc->bTriggerSupport); - printf("\tbTriggerUsage %u\n", desc->bTriggerUsage); - printf("\tbControlSize %u\n", desc->bControlSize); - printf("\tbmaControls 0x%x\n", desc->bmaControls); - } -} - -static void print_vc_input_terminal_desc(const uint8_t *buff) -{ - const input_terminal_camera_desc_t *desc = (const input_terminal_camera_desc_t *) buff; - - const char *type = NULL; - - switch (desc->wTerminalType) { - case TERMINAL_INPUT_CAMERA_TYPE: type = "Camera"; break; - case TERMINAL_INPUT_COMPOSITE_TYPE: type = "Composite"; break; - case ITT_MEDIA_TRANSPORT_INPUT: type = "Media"; break; - default: printf("!!!!! Unknown Input terminal descriptor !!!!!\n"); return; - - } - - printf("\t*** Input Terminal Descriptor (%s) ***\n", type); - printf("\tbLength 0x%x\n", desc->bLength); - printf("\tbDescriptorType 0x%x\n", desc->bDescriptorType); - printf("\tbDescriptorSubType %u\n", desc->bDescriptorSubType); - printf("\tbTerminalID %x\n", desc->bTerminalID); - printf("\twTerminalType %x\n", desc->wTerminalType); - printf("\tbAssocTerminal %u\n", desc->bAssocTerminal); - printf("\tiTerminal %u\n", desc->iTerminal); - - if (desc->wTerminalType == TERMINAL_INPUT_COMPOSITE_TYPE) { - return; - } else if (desc->wTerminalType == TERMINAL_INPUT_CAMERA_TYPE) { - printf("\twObjectiveFocalLengthMin %u\n", desc->wObjectiveFocalLengthMin); - printf("\twObjectiveFocalLengthMax %u\n", desc->wObjectiveFocalLengthMax); - printf("\twOcularFocalLength %u\n", desc->wOcularFocalLength); - printf("\tbControlSize %u\n", desc->bControlSize); - printf("\tbmControls 0x%x\n", desc->bmControls); - } else if (desc->wTerminalType == ITT_MEDIA_TRANSPORT_INPUT) { - const input_terminal_media_desc_t *desc = (const input_terminal_media_desc_t *) buff; - printf("\tbControlSize %u\n", desc->bControlSize); - printf("\tbmControls 0x%x\n", desc->bmControls); - printf("\tbTransportModeSize %u\n", desc->bTransportModeSize); - printf("\tbmTransportModes 0x%x 0x%x 0x%x 0x%x 0x%x\n", - desc->bmTransportModes[0], - desc->bmTransportModes[1], - desc->bmTransportModes[2], - desc->bmTransportModes[3], - desc->bmTransportModes[4]); - } -} - -static void print_vc_output_terminal_desc(const uint8_t *buff) -{ - const output_terminal_desc_t *desc = (const output_terminal_desc_t *) buff; - printf("\t*** Output Terminal Descriptor ***\n"); - printf("\tbLength 0x%x\n", desc->bLength); - printf("\tbDescriptorType 0x%x\n", desc->bDescriptorType); - printf("\tbDescriptorSubType %u\n", desc->bDescriptorSubType); - printf("\tbTerminalID %u\n", desc->bTerminalID); - printf("\twTerminalType %x\n", desc->wTerminalType); - printf("\tbAssocTerminal %u\n", desc->bAssocTerminal); - printf("\tbSourceID %u\n", desc->bSourceID); - printf("\tiTerminal %u\n", desc->iTerminal); -} - -static void print_vc_selector_unit_desc(const uint8_t *buff) -{ - const selector_unit_desc_t *desc = (const selector_unit_desc_t *) buff; - printf("\t*** Selector Unit Descriptor ***\n"); - printf("\tbLength 0x%x\n", desc->bLength); - printf("\tbDescriptorType 0x%x\n", desc->bDescriptorType); - printf("\tbDescriptorSubType %u\n", desc->bDescriptorSubType); - printf("\tbUnitID %u\n", desc->bUnitID); - printf("\tbNrInPins %u\n", desc->bNrInPins); - printf("\tbaSourceID1 %u\n", desc->baSourceID1); - printf("\tbaSourceID2 %u\n", desc->baSourceID2); - printf("\tiSelector %u\n", desc->iSelector); -} - -static void print_vc_processing_unit_desc(const uint8_t *buff) -{ - const processing_unit_desc_t *desc = (const processing_unit_desc_t *) buff; - printf("\t*** Processing Unit Descriptor ***\n"); - printf("\tbLength 0x%x\n", desc->bLength); - printf("\tbDescriptorType 0x%x\n", desc->bDescriptorType); - printf("\tbDescriptorSubType %u\n", desc->bDescriptorSubType); - printf("\tbUnitID %u\n", desc->bUnitID); - printf("\tbSourceID %u\n", desc->bSourceID); - printf("\twMaxMultiplier %u\n", desc->wMaxMultiplier); - printf("\tbControlSize %u\n", desc->bControlSize); - printf("\tbmControls 0x%x\n", desc->bmControls); - printf("\tiProcessing %u\n", desc->iProcessing); - printf("\tbmVideoStandards 0x%x\n", desc->bmVideoStandards); -} - -static void print_vs_format_mjpeg_desc(const uint8_t *buff) -{ - const vs_format_desc_t *desc = (const vs_format_desc_t *) buff; - printf("\t*** VS Format Descriptor ***\n"); - printf("\tbLength 0x%x\n", desc->bLength); - printf("\tbDescriptorType 0x%x\n", desc->bDescriptorType); - printf("\tbDescriptorSubType 0x%x\n", desc->bDescriptorSubType); - printf("\tbFormatIndex 0x%x\n", desc->bFormatIndex); - printf("\tbNumFrameDescriptors %u\n", desc->bNumFrameDescriptors); - printf("\tbmFlags 0x%x\n", desc->bmFlags); - printf("\tbDefaultFrameIndex %u\n", desc->bDefaultFrameIndex); - printf("\tbAspectRatioX %u\n", desc->bAspectRatioX); - printf("\tbAspectRatioY %u\n", desc->bAspectRatioY); - printf("\tbmInterlaceFlags 0x%x\n", desc->bmInterlaceFlags); - printf("\tbCopyProtect %u\n", desc->bCopyProtect); -} - -static void print_vs_frame_mjpeg_desc(const uint8_t *buff) -{ - // Copy to local buffer due to potential misalignment issues. - uint32_t raw_desc[25]; - uint32_t desc_size = ((const vs_frame_desc_t *)buff)->bLength; - memcpy(raw_desc, buff, desc_size); - - const vs_frame_desc_t *desc = (const vs_frame_desc_t *) raw_desc; - printf("\t*** VS Frame Descriptor ***\n"); - printf("\tbLength 0x%x\n", desc->bLength); - printf("\tbDescriptorType 0x%x\n", desc->bDescriptorType); - printf("\tbDescriptorSubType 0x%x\n", desc->bDescriptorSubType); - printf("\tbFrameIndex 0x%x\n", desc->bFrameIndex); - printf("\tbmCapabilities 0x%x\n", desc->bmCapabilities); - printf("\twWidth %u\n", desc->wWidth); - printf("\twHeigh %u\n", desc->wHeight); - printf("\tdwMinBitRate %"PRIu32"\n", desc->dwMinBitRate); - printf("\tdwMaxBitRate %"PRIu32"\n", desc->dwMaxBitRate); - printf("\tdwMaxVideoFrameBufSize %"PRIu32"\n", desc->dwMaxVideoFrameBufSize); - printf("\tdwDefaultFrameInterval %"PRIu32"\n", desc->dwDefaultFrameInterval); - printf("\tbFrameIntervalType %u\n", desc->bFrameIntervalType); - - if (desc->bFrameIntervalType == 0) { - // Continuous Frame Intervals - printf("\tdwMinFrameInterval %"PRIu32"\n", desc->dwMinFrameInterval); - printf("\tdwMaxFrameInterval %"PRIu32"\n", desc->dwMaxFrameInterval); - printf("\tdwFrameIntervalStep %"PRIu32"\n", desc->dwFrameIntervalStep); - } else { - // Discrete Frame Intervals - size_t max_intervals = sizeof(desc->dwFrameInterval) / sizeof(desc->dwFrameInterval[0]); - size_t num_of_intervals = MIN((desc->bLength - 26) / 4, max_intervals); - for (int i = 0; i < num_of_intervals; ++i) { - printf("\tFrameInterval[%d] %"PRIu32"\n", i, desc->dwFrameInterval[i]); - } - } -} - -static void print_vs_format_frame_based_desc(const uint8_t *buff) -{ - const vs_format_frame_based_desc_t *desc = (const vs_format_frame_based_desc_t *) buff; - printf("\t*** VS Format Frame-Based Descriptor ***\n"); - printf("\tbLength 0x%x\n", desc->bLength); - printf("\tbDescriptorType 0x%x\n", desc->bDescriptorType); - printf("\tbDescriptorSubType 0x%x\n", desc->bDescriptorSubType); - printf("\tbFormatIndex 0x%x\n", desc->bFormatIndex); - printf("\tbNumFrameDescriptors %u\n", desc->bNumFrameDescriptors); - printf("\tguidFormat %.*s\n", 16, desc->guidFormat); - printf("\tbDefaultFrameIndex %u\n", desc->bDefaultFrameIndex); - printf("\tbAspectRatioX %u\n", desc->bAspectRatioX); - printf("\tbAspectRatioY %u\n", desc->bAspectRatioY); - printf("\tbmInterlaceFlags 0x%x\n", desc->bmInterlaceFlags); - printf("\tbCopyProtect %u\n", desc->bCopyProtect); -} - -static void print_vs_frame_frame_based_desc(const uint8_t *buff) -{ - // Copy to local buffer due to potential misalignment issues. - uint32_t raw_desc[25]; - uint32_t desc_size = ((const vs_frame_desc_t *)buff)->bLength; - memcpy(raw_desc, buff, desc_size); - - const vs_frame_frame_based_desc_t *desc = (const vs_frame_frame_based_desc_t *) raw_desc; - printf("\t*** VS Frame Frame-Based Descriptor ***\n"); - printf("\tbLength 0x%x\n", desc->bLength); - printf("\tbDescriptorType 0x%x\n", desc->bDescriptorType); - printf("\tbDescriptorSubType 0x%x\n", desc->bDescriptorSubType); - printf("\tbFrameIndex 0x%x\n", desc->bFrameIndex); - printf("\tbmCapabilities 0x%x\n", desc->bmCapabilities); - printf("\twWidth %u\n", desc->wWidth); - printf("\twHeight %u\n", desc->wHeight); - printf("\tdwMinBitRate %"PRIu32"\n", desc->dwMinBitRate); - printf("\tdwMaxBitRate %"PRIu32"\n", desc->dwMaxBitRate); - printf("\tdwDefaultFrameInterval %"PRIu32"\n", desc->dwDefaultFrameInterval); - printf("\tbFrameIntervalType %u\n", desc->bFrameIntervalType); - printf("\tdwBytesPerLine %"PRIu32"\n", desc->dwBytesPerLine); - - if (desc->bFrameIntervalType == 0) { - // Continuous Frame Intervals - printf("\tdwMinFrameInterval %"PRIu32"\n", desc->dwMinFrameInterval); - printf("\tdwMaxFrameInterval %"PRIu32"\n", desc->dwMaxFrameInterval); - printf("\tdwFrameIntervalStep %"PRIu32"\n", desc->dwFrameIntervalStep); - } else { - // Discrete Frame Intervals - size_t max_intervals = sizeof(desc->dwFrameInterval) / sizeof(desc->dwFrameInterval[0]); - size_t num_of_intervals = MIN((desc->bLength - 26) / 4, max_intervals); - for (int i = 0; i < num_of_intervals; ++i) { - printf("\tFrameInterval[%d] %"PRIu32"\n", i, desc->dwFrameInterval[i]); - } - } -} - -static void print_vs_still_frame_desc(const uint8_t *buff) -{ - const still_image_frame_desc_t *desc = (const still_image_frame_desc_t *) buff; - printf("\t*** VS Still Format Descriptor ***\n"); - printf("\tbLength 0x%x\n", desc->bLength); - printf("\tbDescriptorType 0x%x\n", desc->bDescriptorType); - printf("\tbDescriptorSubType 0x%x\n", desc->bDescriptorSubType); - printf("\tbEndpointAddress 0x%x\n", desc->bEndpointAddress); - printf("\tbNumImageSizePatterns 0x%x\n", desc->bNumImageSizePatterns); - - WidthHeight_t *wh = (WidthHeight_t *)&desc->wWidth; - for (int i = 0; i < desc->bNumImageSizePatterns; ++i, wh++) { - printf("\t[%d]: wWidth: %u, wHeight: %u\n", i, wh->wWidth, wh->wHeight); - } - - Compression_t *c = (Compression_t *)wh; - printf("\tbNumCompressionPtn %u\n", c->bNumCompressionPtn); - printf("\tbCompression %u\n", c->bCompression); -} - -static void print_vs_color_format_desc(const uint8_t *buff) -{ - const color_format_desc_t *desc = (const color_format_desc_t *) buff; - printf("\t*** VS Color Format Descriptor ***\n"); - printf("\tbLength 0x%x\n", desc->bLength); - printf("\tbDescriptorType 0x%x\n", desc->bDescriptorType); - printf("\tbDescriptorSubType 0x%x\n", desc->bDescriptorSubType); - printf("\tbColorPrimaries 0x%x\n", desc->bColorPrimaries); - printf("\tbTransferCharacteristics %u\n", desc->bTransferCharacteristics); - printf("\tbMatrixCoefficients 0x%x\n", desc->bMatrixCoefficients); -} - -static void unknown_desc(const desc_header_t *header) -{ - printf(" *** Unknown Descriptor Length: %d Type: %d Subtype: %d ***\n", - header->bLength, header->bDescriptorType, header->bDescriptorSubtype); -} - -static void print_class_specific_desc(const uint8_t *buff) -{ - desc_header_t *header = (desc_header_t *)buff; - - switch (header->bDescriptorSubtype) { - case VC_HEADER: - print_class_header_desc(buff); - break; - case VC_INPUT_TERMINAL: - print_vc_input_terminal_desc(buff); - break; - case VC_SELECTOR_UNIT: - print_vc_selector_unit_desc(buff); - break; - case VC_PROCESSING_UNIT: - print_vc_processing_unit_desc(buff); - break; - case VS_FORMAT_MJPEG: - if (interface_sub_class == SC_VIDEOCONTROL) { - printf("\t*** Extension Unit Descriptor unsupported, skipping... ***\n");; - return; - } - print_vs_format_mjpeg_desc(buff); - break; - case VS_FRAME_MJPEG: - print_vs_frame_mjpeg_desc(buff); - break; - case VS_FORMAT_FRAME_BASED: - print_vs_format_frame_based_desc(buff); - break; - case VS_FRAME_FRAME_BASED: - print_vs_frame_frame_based_desc(buff); - break; - case VS_COLORFORMAT: - print_vs_color_format_desc(buff); - break; - case VC_OUTPUT_TERMINAL: // same as VS_STILL_FRAME - if (interface_sub_class == SC_VIDEOCONTROL) { - print_vc_output_terminal_desc(buff); - } else { - print_vs_still_frame_desc(buff); - } - break; - default: - unknown_desc(header); - break; - } -} - -void print_usb_class_descriptors(const usb_standard_desc_t *desc) -{ - const uint8_t *buff = (uint8_t *)desc; - desc_header_t *header = (desc_header_t *)desc; - - switch (header->bDescriptorType) { - case INTERFACE_ASSOC_DESC: - print_interface_assoc_desc(buff); - break; - case CS_INTERFACE_DESC: - print_class_specific_desc(buff); - break; - case CS_ENDPOINT_DESC: - print_cs_endpoint_desc(buff); - break; - default: - unknown_desc(header); - break; - } -} diff --git a/host/class/uvc/usb_host_uvc/src/libusb_adapter.c b/host/class/uvc/usb_host_uvc/src/libusb_adapter.c deleted file mode 100644 index f3c74626..00000000 --- a/host/class/uvc/usb_host_uvc/src/libusb_adapter.c +++ /dev/null @@ -1,839 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ -#include "libusb.h" -#include -#include -#include -#include -#include -#include -#include -#include "esp_pthread.h" -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" -#include "freertos/semphr.h" -#include "esp_log.h" -#include "esp_check.h" -#include "usb/usb_host.h" -#include "usb/usb_types_ch9.h" -#include "usb/usb_types_stack.h" -#include "usb/usb_helpers.h" -#include "descriptor.h" -#include "sdkconfig.h" -#include "libuvc/libuvc.h" -#include "libuvc/libuvc_internal.h" -#include "libuvc_adapter.h" - -#define TAG "libusb adapter" - -#define GOTO_ON_FALSE(exp) ESP_GOTO_ON_FALSE(exp, ESP_ERR_NO_MEM, fail, TAG, "") - -#define RETURN_ON_ERROR(exp) ESP_RETURN_ON_ERROR(exp, TAG, "err: %s", esp_err_to_name(err_rc_)) - -#define GOTO_ON_ERROR(exp) ESP_GOTO_ON_ERROR(exp, fail, TAG, "") - -#define RETURN_ON_ERROR_LIBUSB(exp) do { \ - esp_err_t _err_ = (exp); \ - if(_err_ != ESP_OK) { \ - return esp_to_libusb_error(_err_); \ - } \ -} while(0) - -#define UVC_ENTER_CRITICAL() portENTER_CRITICAL(&s_uvc_lock) -#define UVC_EXIT_CRITICAL() portEXIT_CRITICAL(&s_uvc_lock) - -#define COUNT_OF(array) (sizeof(array) / sizeof(array[0])) - -typedef struct { - usb_transfer_t *xfer; - struct libusb_transfer libusb_xfer; -} uvc_transfer_t; - -typedef struct opened_camera { - uint8_t address; - uint8_t open_count; - uint16_t endpoint_mps; // interrupt endpoint - uint8_t active_alt_setting; - usb_device_handle_t handle; - usb_transfer_t *control_xfer; - SemaphoreHandle_t transfer_done; - usb_transfer_status_t transfer_status; - STAILQ_ENTRY(opened_camera) tailq_entry; -} uvc_camera_t; - -typedef struct { - usb_host_client_handle_t client; - volatile bool delete_client_task; - SemaphoreHandle_t client_task_deleted; - STAILQ_HEAD(opened_devs, opened_camera) opened_devices_tailq; -} uvc_driver_t; - -static portMUX_TYPE s_uvc_lock = portMUX_INITIALIZER_UNLOCKED; -static uvc_driver_t *s_uvc_driver; - -static libuvc_adapter_config_t s_config = { - .create_background_task = true, - .task_priority = 5, - .stack_size = 4096, - .callback = NULL, -}; - -static const usb_standard_desc_t *next_interface_desc(const usb_standard_desc_t *desc, size_t len, int *offset) -{ - return usb_parse_next_descriptor_of_type(desc, len, USB_W_VALUE_DT_INTERFACE, offset); -} - -static const usb_standard_desc_t *next_endpoint_desc(const usb_standard_desc_t *desc, size_t len, int *offset) -{ - return usb_parse_next_descriptor_of_type(desc, len, USB_B_DESCRIPTOR_TYPE_ENDPOINT, (int *)offset); -} - -// Find endpoint number under specified interface. -static esp_err_t find_endpoint_of_interface(const usb_config_desc_t *config_desc, uint8_t interface, uint8_t *endpoint) -{ - int offset = 0; - size_t total_length = config_desc->wTotalLength; - const usb_standard_desc_t *next_desc = (const usb_standard_desc_t *)config_desc; - - next_desc = next_interface_desc(next_desc, total_length, &offset); - - while ( next_desc ) { - - const usb_intf_desc_t *ifc_desc = (const usb_intf_desc_t *)next_desc; - - if ( ifc_desc->bInterfaceNumber == interface && ifc_desc->bNumEndpoints != 0) { - next_desc = next_endpoint_desc(next_desc, total_length, &offset); - if (next_desc == NULL) { - return ESP_ERR_NOT_SUPPORTED; - } - *endpoint = ((const usb_ep_desc_t *)next_desc)->bEndpointAddress; - return ESP_OK; - } - - next_desc = next_interface_desc(next_desc, total_length, &offset); - }; - - return ESP_ERR_NOT_SUPPORTED; -} - - -static uint16_t get_interupt_endpoint_mps(const usb_config_desc_t *config_desc) -{ - int offset = 0; - size_t total_length = config_desc->wTotalLength; - const usb_standard_desc_t *next_desc = (const usb_standard_desc_t *)config_desc; - - while ( (next_desc = next_endpoint_desc(next_desc, total_length, &offset)) ) { - const usb_ep_desc_t *ep_desc = (const usb_ep_desc_t *)next_desc; - if (USB_EP_DESC_GET_XFERTYPE(ep_desc) == USB_BM_ATTRIBUTES_XFER_INT) { - return ep_desc->wMaxPacketSize; - } - }; - - return 32; -} - -void libuvc_adapter_set_config(libuvc_adapter_config_t *config) -{ - if (config == NULL) { - return; - } - - s_config = *config; -} - -static void print_str_desc(const usb_str_desc_t *desc, const char *name) -{ - wchar_t str[32]; - size_t str_len = MIN((desc->bLength - USB_STANDARD_DESC_SIZE) / 2, COUNT_OF(str) - 1); - - // Copy utf-16 to wchar_t array - for (size_t i = 0; i < str_len; i++) { - str[i] = desc->wData[i]; - } - str[str_len] = '\0'; - - wprintf(L"%s: %S \n", name, str); -} - -static void print_string_descriptors(usb_device_info_t *dev_info) -{ - printf("*** String Descriptors ***\n"); - - if (dev_info->str_desc_product) { - print_str_desc(dev_info->str_desc_product, "iProduct"); - } - if (dev_info->str_desc_manufacturer) { - print_str_desc(dev_info->str_desc_manufacturer, "iManufacturer"); - } - if (dev_info->str_desc_serial_num) { - print_str_desc(dev_info->str_desc_serial_num, "iSerialNumber"); - } -} - -esp_err_t libuvc_adapter_print_descriptors(uvc_device_handle_t *device) -{ - uvc_camera_t *camera = (uvc_camera_t *)(device->usb_devh); - const usb_config_desc_t *config_desc; - const usb_device_desc_t *device_desc; - usb_device_info_t dev_info; - - RETURN_ON_ERROR( usb_host_get_device_descriptor(camera->handle, &device_desc) ); - RETURN_ON_ERROR( usb_host_get_active_config_descriptor(camera->handle, &config_desc) ); - RETURN_ON_ERROR( usb_host_device_info(camera->handle, &dev_info) ); - - usb_print_device_descriptor(device_desc); - usb_print_config_descriptor(config_desc, print_usb_class_descriptors); - print_string_descriptors(&dev_info); - - return ESP_OK; -} - -esp_err_t libuvc_get_usb_device_info(uvc_device_t *dev, usb_device_info_t *dev_info) -{ - uvc_error_t ret; - struct libusb_device_handle *usb_devh; - - ret = libusb_open(dev->usb_dev, &usb_devh); - UVC_DEBUG("libusb_open() = %d", ret); - if (ret != UVC_SUCCESS) { - return ESP_FAIL; - } - - uvc_camera_t *camera = (uvc_camera_t *)(usb_devh); - RETURN_ON_ERROR( usb_host_device_info(camera->handle, dev_info) ); - - libusb_close(usb_devh); - return ESP_OK; -} - -esp_err_t libuvc_adapter_handle_events(uint32_t timeout_ms) -{ - if (s_uvc_driver == NULL) { - return ESP_ERR_INVALID_STATE; - } - - return usb_host_client_handle_events(s_uvc_driver->client, pdMS_TO_TICKS(timeout_ms)); -} - -static int esp_to_libusb_error(esp_err_t err) -{ - switch (err) { - case ESP_ERR_TIMEOUT: return LIBUSB_ERROR_TIMEOUT; - case ESP_ERR_NO_MEM: return LIBUSB_ERROR_NO_MEM; - case ESP_FAIL: return LIBUSB_ERROR_PIPE; - case ESP_OK: return LIBUSB_SUCCESS; - default: return LIBUSB_ERROR_OTHER; - } -} - -static enum libusb_transfer_status eps_to_libusb_status(usb_transfer_status_t esp_status) -{ - switch (esp_status) { - case USB_TRANSFER_STATUS_COMPLETED: return LIBUSB_TRANSFER_COMPLETED; - case USB_TRANSFER_STATUS_TIMED_OUT: return LIBUSB_TRANSFER_TIMED_OUT; - case USB_TRANSFER_STATUS_CANCELED: return LIBUSB_TRANSFER_CANCELLED; - case USB_TRANSFER_STATUS_NO_DEVICE: return LIBUSB_TRANSFER_NO_DEVICE; - case USB_TRANSFER_STATUS_OVERFLOW: return LIBUSB_TRANSFER_OVERFLOW; - case USB_TRANSFER_STATUS_STALL: return LIBUSB_TRANSFER_STALL; - default: return LIBUSB_TRANSFER_ERROR; - } -} - -static void usb_client_event_handler(void *arg) -{ - ulTaskNotifyTake(false, pdMS_TO_TICKS(1000)); - - do { - usb_host_client_handle_events(s_uvc_driver->client, pdMS_TO_TICKS(50)); - } while (!s_uvc_driver->delete_client_task); - - xSemaphoreGive(s_uvc_driver->client_task_deleted); - vTaskDelete(NULL); -} - - -static void client_event_cb(const usb_host_client_event_msg_t *event, void *arg) -{ - if (s_config.callback) { - switch (event->event) { - case USB_HOST_CLIENT_EVENT_NEW_DEV: - ESP_LOGD(TAG, "USB device connected"); - s_config.callback(UVC_DEVICE_CONNECTED); - break; - - case USB_HOST_CLIENT_EVENT_DEV_GONE: - ESP_LOGD(TAG, "USB device disconnected"); - s_config.callback(UVC_DEVICE_DISCONNECTED); - break; - - default: - break; - } - } -} - -int libusb_init(struct libusb_context **ctx) -{ - uvc_driver_t *driver = NULL; - TaskHandle_t client_task_handle = NULL; - esp_err_t ret = ESP_ERR_NO_MEM; - - usb_host_client_config_t client_config = { - .async.client_event_callback = client_event_cb, - .async.callback_arg = NULL, - .max_num_event_msg = 5, - }; - - esp_pthread_cfg_t cfg = esp_pthread_get_default_config(); - esp_pthread_set_cfg(&cfg); - - GOTO_ON_FALSE( driver = calloc(1, sizeof(uvc_driver_t)) ); - GOTO_ON_ERROR( usb_host_client_register(&client_config, &driver->client) ); - GOTO_ON_FALSE( driver->client_task_deleted = xSemaphoreCreateBinary() ); - - STAILQ_INIT(&driver->opened_devices_tailq); - - if (s_config.create_background_task) { - GOTO_ON_FALSE( xTaskCreate(usb_client_event_handler, "uvc_events", s_config.stack_size, - NULL, s_config.task_priority, &client_task_handle) ); - } - - UVC_ENTER_CRITICAL(); - if (s_uvc_driver != NULL) { - UVC_EXIT_CRITICAL(); - ret = ESP_ERR_TIMEOUT; - goto fail; - } - s_uvc_driver = driver; - UVC_EXIT_CRITICAL(); - - if (client_task_handle) { - xTaskNotifyGive(client_task_handle); - } - - *ctx = (struct libusb_context *)driver; - return LIBUSB_SUCCESS; - -fail: - if (driver) { - if (driver->client) { - usb_host_client_deregister(driver->client); - }; - if (driver->client_task_deleted) { - vSemaphoreDelete(driver->client_task_deleted); - } - free(driver); - } - if (client_task_handle) { - vTaskDelete(client_task_handle); - } - return esp_to_libusb_error(ret); -} - -void libusb_exit(struct libusb_context *ctx) -{ - uvc_driver_t *driver = (uvc_driver_t *)ctx; - UVC_ENTER_CRITICAL(); - if (driver == NULL) { - UVC_EXIT_CRITICAL(); - return; - - } - UVC_EXIT_CRITICAL(); - - if (s_config.create_background_task) { - driver->delete_client_task = true; - } - - usb_host_client_unblock(driver->client); - xSemaphoreTake(s_uvc_driver->client_task_deleted, portMAX_DELAY); - if (usb_host_client_deregister(driver->client) != ESP_OK) { - ESP_LOGE(TAG, "Failed to deregister USB client"); - } - - vSemaphoreDelete(s_uvc_driver->client_task_deleted); - s_uvc_driver = NULL; - free(driver); -} - -int32_t libusb_get_device_list(struct libusb_context *ctx, libusb_device ***list) -{ - static const size_t DEV_LIST_SIZE = 5; - - int actual_count; - uint8_t dev_addr_list[DEV_LIST_SIZE]; - usb_host_device_addr_list_fill(DEV_LIST_SIZE, dev_addr_list, &actual_count); - - libusb_device **dev_list = calloc(actual_count + 1, sizeof(libusb_device *)); - if (dev_list == NULL) { - return 0; - } - - for (size_t i = 0; i < actual_count; i++) { - dev_list[i] = (libusb_device *)(uintptr_t)dev_addr_list[i]; - } - *list = (libusb_device **)dev_list; - return actual_count; -} - -void libusb_free_device_list(libusb_device **list, int unref_devices) -{ - free(list); -} - -// As opposed to LIBUSB, USB_HOST library does not allows to open devices recursively and get descriptors without opening device. -// Thus, libusb_adapter keeps track of how many times the device is opened and closes it only when the count reaches zero. -static esp_err_t open_device_if_closed(uint8_t device_addr, uvc_camera_t **handle) -{ - uvc_camera_t *device; - esp_err_t ret = ESP_ERR_NO_MEM; - - uvc_camera_t *new_device = calloc(1, sizeof(uvc_camera_t)); - if (new_device == NULL) { - return ESP_ERR_NO_MEM; - } - - UVC_ENTER_CRITICAL(); - - STAILQ_FOREACH(device, &s_uvc_driver->opened_devices_tailq, tailq_entry) { - if (device_addr == device->address) { - *handle = device; - device->open_count++; - UVC_EXIT_CRITICAL(); - free(new_device); - return ESP_OK; - } - } - - new_device->open_count++; - new_device->address = device_addr; - STAILQ_INSERT_TAIL(&s_uvc_driver->opened_devices_tailq, new_device, tailq_entry); - - UVC_EXIT_CRITICAL(); - - GOTO_ON_ERROR( usb_host_device_open(s_uvc_driver->client, device_addr, &new_device->handle) ); - GOTO_ON_ERROR( usb_host_transfer_alloc(128, 0, &new_device->control_xfer) ); - GOTO_ON_FALSE( new_device->transfer_done = xSemaphoreCreateBinary() ); - - *handle = new_device; - return ESP_OK; - -fail: - UVC_ENTER_CRITICAL(); - STAILQ_REMOVE(&s_uvc_driver->opened_devices_tailq, new_device, opened_camera, tailq_entry); - UVC_EXIT_CRITICAL(); - free(new_device); - return ret; -} - -static esp_err_t close_device(uvc_camera_t *device) -{ - bool close = false; - - UVC_ENTER_CRITICAL(); - if (--device->open_count == 0) { - STAILQ_REMOVE(&s_uvc_driver->opened_devices_tailq, device, opened_camera, tailq_entry); - close = true; - } - UVC_EXIT_CRITICAL(); - - if (close) { - RETURN_ON_ERROR( usb_host_device_close(s_uvc_driver->client, device->handle) ); - RETURN_ON_ERROR( usb_host_transfer_free(device->control_xfer) ); - vSemaphoreDelete(device->transfer_done); - free(device); - } - - return LIBUSB_SUCCESS; -} - -int libusb_open(libusb_device *dev, libusb_device_handle **dev_handle) -{ - uint8_t device_addr = (uint8_t)(uintptr_t)dev; - uvc_camera_t *device; - - RETURN_ON_ERROR_LIBUSB( open_device_if_closed(device_addr, &device) ); - - *dev_handle = (libusb_device_handle *)device; - return LIBUSB_SUCCESS; -} - -void libusb_close(libusb_device_handle *dev_handle) -{ - esp_err_t err = close_device((uvc_camera_t *)dev_handle); - if (err) { - ESP_LOGE(TAG, "Failed to close device"); - } -} - -void libusb_free_transfer(struct libusb_transfer *transfer) -{ - uvc_transfer_t *trans = __containerof(transfer, uvc_transfer_t, libusb_xfer); - usb_host_transfer_free(trans->xfer); - free(trans); -} - -struct libusb_transfer *libusb_alloc_transfer(int iso_packets) -{ - size_t alloc_size = sizeof(uvc_transfer_t) + - sizeof(struct libusb_iso_packet_descriptor) * iso_packets; - - uvc_transfer_t *xfer = calloc(1, alloc_size); - if (xfer == NULL) { - return NULL; - } - - return &xfer->libusb_xfer; -} - -static inline bool is_in_endpoint(uint8_t endpoint) -{ - return endpoint & USB_B_ENDPOINT_ADDRESS_EP_DIR_MASK ? true : false; -} - -// Copies data from usb_transfer_t back to libusb_transfer and invokes user provided callback -void transfer_cb(usb_transfer_t *xfer) -{ - uvc_transfer_t *trans = xfer->context; - struct libusb_transfer *libusb_trans = &trans->libusb_xfer; - - size_t isoc_actual_length = 0; - - for (int i = 0; i < xfer->num_isoc_packets; i++) { - libusb_trans->iso_packet_desc[i].actual_length = xfer->isoc_packet_desc[i].actual_num_bytes; - libusb_trans->iso_packet_desc[i].status = eps_to_libusb_status(xfer->isoc_packet_desc[i].status); - - if (libusb_trans->iso_packet_desc[i].status == LIBUSB_TRANSFER_COMPLETED) { - isoc_actual_length += xfer->isoc_packet_desc[i].actual_num_bytes; - } - } - - libusb_trans->status = eps_to_libusb_status(xfer->status); - libusb_trans->actual_length = xfer->num_isoc_packets ? isoc_actual_length : xfer->actual_num_bytes; - - if (is_in_endpoint(libusb_trans->endpoint)) { - memcpy(libusb_trans->buffer, xfer->data_buffer, libusb_trans->length); - } - - libusb_trans->callback(libusb_trans); -} - -// This function copies libusb_transfer data into usb_transfer_t structure -int libusb_submit_transfer(struct libusb_transfer *libusb_trans) -{ - uvc_transfer_t *trans = __containerof(libusb_trans, uvc_transfer_t, libusb_xfer); - esp_err_t err; - - int length = libusb_trans->length; - int num_iso_packets = libusb_trans->num_iso_packets; - uvc_camera_t *device = (uvc_camera_t *)libusb_trans->dev_handle; - - // Workaround: libuvc submits interrupt INTR transfers with transfer size - // of 32 bytes, event though MSP of the endpoint might be 64. - // Make in transfer rounded up to MSP of interrupt endpoint. - // ISO transfers should be effected by this, as there are supposed to be 512 bytes long - if (is_in_endpoint(libusb_trans->endpoint)) { - length = usb_round_up_to_mps(length, device->endpoint_mps); - } - - // Transfers are allocated/reallocated based on transfer size, as libusb - // doesn't store buffers in DMA capable region - if (!trans->xfer || trans->xfer->data_buffer_size < libusb_trans->length) { - if (trans->xfer) { - usb_host_transfer_free(trans->xfer); - } - err = usb_host_transfer_alloc(length, num_iso_packets, &trans->xfer); - if (err) { - ESP_LOGE(TAG, "Failed to allocate transfer with length: %u", length); - return esp_to_libusb_error(err); - } - } - - if (!is_in_endpoint(libusb_trans->endpoint)) { - memcpy(trans->xfer->data_buffer, libusb_trans->buffer, libusb_trans->length); - } - - trans->xfer->device_handle = device->handle; - trans->xfer->bEndpointAddress = libusb_trans->endpoint; - trans->xfer->timeout_ms = libusb_trans->timeout; - trans->xfer->callback = transfer_cb; - trans->xfer->num_bytes = length; - trans->xfer->context = trans; - - for (int i = 0; i < num_iso_packets; i++) { - trans->xfer->isoc_packet_desc[i].num_bytes = libusb_trans->iso_packet_desc[i].length; - } - - err = usb_host_transfer_submit(trans->xfer); - return esp_to_libusb_error(err); -} - -int libusb_cancel_transfer(struct libusb_transfer *transfer) -{ - return 0; -} - -static bool is_in_request(uint8_t bmRequestType) -{ - return (bmRequestType & USB_BM_REQUEST_TYPE_DIR_IN) != 0 ? true : false; - -} - -static bool is_out_request(uint8_t bmRequestType) -{ - return (bmRequestType & USB_BM_REQUEST_TYPE_DIR_IN) == 0 ? true : false; -} - -static void common_xfer_cb(usb_transfer_t *transfer) -{ - uvc_camera_t *device = (uvc_camera_t *)transfer->context; - - if (transfer->status != USB_TRANSFER_STATUS_COMPLETED) { - ESP_EARLY_LOGE("Transfer failed", "Status %d", transfer->status); - } - - device->transfer_status = transfer->status; - xSemaphoreGive(device->transfer_done); -} - -static esp_err_t wait_for_transmition_done(usb_transfer_t *xfer) -{ - uvc_camera_t *device = (uvc_camera_t *)xfer->context; - BaseType_t received = xSemaphoreTake(device->transfer_done, pdMS_TO_TICKS(xfer->timeout_ms)); - - if (received != pdTRUE) { - usb_host_endpoint_halt(xfer->device_handle, xfer->bEndpointAddress); - usb_host_endpoint_flush(xfer->device_handle, xfer->bEndpointAddress); - xSemaphoreTake(device->transfer_done, portMAX_DELAY); - return ESP_ERR_TIMEOUT; - } - - if (device->transfer_status != USB_TRANSFER_STATUS_COMPLETED) { - printf("transfer_status: %d", device->transfer_status); - return ESP_FAIL; - } - - return ESP_OK; -} - -static int control_transfer(libusb_device_handle *dev_handle, - usb_setup_packet_t *request, - unsigned char *data, - unsigned int timeout) -{ - return libusb_control_transfer(dev_handle, request->bmRequestType, request->bRequest, - request->wValue, request->wIndex, data, - request->wLength, timeout); -} - -int libusb_control_transfer(libusb_device_handle *dev_handle, - uint8_t bmRequestType, - uint8_t bRequest, - uint16_t wValue, - uint16_t wIndex, - unsigned char *data, - uint16_t wLength, - unsigned int timeout) -{ - uvc_camera_t *device = (uvc_camera_t *)dev_handle; - usb_transfer_t *xfer = device->control_xfer; - usb_setup_packet_t *ctrl_req = (usb_setup_packet_t *)xfer->data_buffer; - - ctrl_req->bmRequestType = bmRequestType; - ctrl_req->bRequest = bRequest; - ctrl_req->wValue = wValue; - ctrl_req->wIndex = wIndex; - ctrl_req->wLength = wLength; - - xfer->device_handle = device->handle; - xfer->bEndpointAddress = 0; - xfer->callback = common_xfer_cb; - xfer->timeout_ms = MAX(timeout, 100); - xfer->num_bytes = USB_SETUP_PACKET_SIZE + wLength; - xfer->context = device; - - if (is_out_request(bmRequestType)) { - memcpy(xfer->data_buffer + sizeof(usb_setup_packet_t), data, wLength); - } - - RETURN_ON_ERROR_LIBUSB( usb_host_transfer_submit_control(s_uvc_driver->client, xfer) ); - RETURN_ON_ERROR_LIBUSB( wait_for_transmition_done(xfer) ); - - if (is_in_request(bmRequestType)) { - memcpy(data, xfer->data_buffer + sizeof(usb_setup_packet_t), wLength); - } - - return xfer->actual_num_bytes; -} - -int libusb_get_device_descriptor(libusb_device *dev, struct libusb_device_descriptor *desc) -{ - uint8_t device_addr = (uint8_t)(uintptr_t)dev; - const usb_device_desc_t *device_desc; - uvc_camera_t *device; - - // Open device if closed, as USB host doesn't allow to get descriptor without opening device - RETURN_ON_ERROR_LIBUSB( open_device_if_closed(device_addr, &device) ); - - RETURN_ON_ERROR_LIBUSB( usb_host_get_device_descriptor(device->handle, &device_desc) ); - - desc->bLength = device_desc->bLength; - desc->bDescriptorType = device_desc->bDescriptorType; - desc->bcdUSB = device_desc->bcdUSB; - desc->bDeviceClass = device_desc->bDeviceClass; - desc->bDeviceSubClass = device_desc->bDeviceSubClass; - desc->bDeviceProtocol = device_desc->bDeviceProtocol; - desc->bMaxPacketSize0 = device_desc->bMaxPacketSize0; - desc->idVendor = device_desc->idVendor; - desc->idProduct = device_desc->idProduct; - desc->bcdDevice = device_desc->bcdDevice; - desc->iManufacturer = device_desc->iManufacturer; - desc->iProduct = device_desc->iProduct; - desc->iSerialNumber = device_desc->iSerialNumber; - desc->bNumConfigurations = device_desc->bNumConfigurations; - - RETURN_ON_ERROR_LIBUSB( close_device(device) ); - - return LIBUSB_SUCCESS; -} - -int libusb_get_config_descriptor(libusb_device *dev, - uint8_t config_index, - struct libusb_config_descriptor **config) -{ - uint8_t device_addr = (uint8_t)(uintptr_t)dev; - const usb_config_desc_t *config_desc; - uvc_camera_t *device; - - // Open device if closed, as USB host doesn't allow to get descriptor without opening device - RETURN_ON_ERROR_LIBUSB( open_device_if_closed(device_addr, &device) ); - - RETURN_ON_ERROR_LIBUSB( usb_host_get_active_config_descriptor(device->handle, &config_desc) ); - - int res = raw_desc_to_libusb_config(&config_desc->val[0], config_desc->wTotalLength, config); - - device->endpoint_mps = get_interupt_endpoint_mps(config_desc); - - RETURN_ON_ERROR_LIBUSB( close_device(device) ); - - return res; -} - -void libusb_free_config_descriptor(struct libusb_config_descriptor *config) -{ - clear_config_descriptor(config); - free(config); -} - -int libusb_get_string_descriptor_ascii(libusb_device_handle *dev_handle, - uint8_t desc_index, - unsigned char *data, - int length) -{ -#define US_LANG_ID 0x409 - usb_setup_packet_t ctrl_req; - USB_SETUP_PACKET_INIT_GET_STR_DESC(&ctrl_req, desc_index, US_LANG_ID, length); - return control_transfer(dev_handle, &ctrl_req, data, 1000); -} - -int libusb_get_ss_endpoint_companion_descriptor(struct libusb_context *ctx, - const struct libusb_endpoint_descriptor *endpoint, - struct libusb_ss_endpoint_companion_descriptor **ep_comp) -{ - return 0; -} - -void libusb_free_ss_endpoint_companion_descriptor(struct libusb_ss_endpoint_companion_descriptor *ep_comp) -{ - -} - -libusb_device *libusb_ref_device(libusb_device *dev) -{ - return dev; -} - -void libusb_unref_device(libusb_device *dev) -{ - -} - -int libusb_claim_interface(libusb_device_handle *dev_handle, int interface) -{ - uvc_camera_t *device = (uvc_camera_t *)dev_handle; - - // Alternate interface will be claimed in libusb_set_interface_alt_setting function, - // as libusb only support claming interface without alternate settings. - return esp_to_libusb_error( usb_host_interface_claim(s_uvc_driver->client, device->handle, interface, 0) ); -} - -int libusb_release_interface(libusb_device_handle *dev_handle, int interface) -{ - uvc_camera_t *device = (uvc_camera_t *)dev_handle; - const usb_config_desc_t *config_desc; - uint8_t endpoint; - - RETURN_ON_ERROR_LIBUSB( usb_host_get_active_config_descriptor(device->handle, &config_desc) ); - - RETURN_ON_ERROR_LIBUSB( find_endpoint_of_interface(config_desc, interface, &endpoint) ); - - // Cancel any ongoing transfers before releasing interface - usb_host_endpoint_halt(device->handle, endpoint); - usb_host_endpoint_flush(device->handle, endpoint); - usb_host_endpoint_clear(device->handle, endpoint); - - return esp_to_libusb_error( usb_host_interface_release(s_uvc_driver->client, device->handle, interface) ); -} - -int libusb_set_interface_alt_setting(libusb_device_handle *dev_handle, int32_t interface, int32_t alt_settings) -{ - uvc_camera_t *device = (uvc_camera_t *)dev_handle; - usb_host_client_handle_t client = s_uvc_driver->client; - uint8_t data[sizeof(usb_setup_packet_t)]; - usb_setup_packet_t request; - - // Setting alternate interface 0.0 is special case in UVC specs. - // No interface is to be released, just send control transfer. - if (interface != 0 || alt_settings != 0) { - RETURN_ON_ERROR_LIBUSB( usb_host_interface_release(client, device->handle, interface) ); - RETURN_ON_ERROR_LIBUSB( usb_host_interface_claim(client, device->handle, interface, alt_settings) ); - } - - USB_SETUP_PACKET_INIT_SET_INTERFACE(&request, interface, alt_settings); - int result = control_transfer(dev_handle, &request, data, 2000); - return result > 0 ? LIBUSB_SUCCESS : result; -} - -int libusb_attach_kernel_driver(libusb_device_handle *dev_handle, int interface_number) -{ - return 0; -} - -int libusb_detach_kernel_driver(libusb_device_handle *dev_handle, int interface_number) -{ - return 0; -} - -int libusb_handle_events_completed(struct libusb_context *ctx, int *completed) -{ - // USB events are handled either in client task or by user invoking libuvc_adapter_handle_events, - // as LIBUVC calls this handler only after opening device. USB Host requires to call client handler - // prior to opening device in order to receive USB_HOST_CLIENT_EVENT_NEW_DEV event. - vTaskDelay(pdMS_TO_TICKS(1000)); - return 0; -} - -int8_t libusb_get_bus_number(libusb_device *device) -{ - return 0; -} - -int8_t libusb_get_device_address(libusb_device *device) -{ - // Device address is stored directly in libusb_device - return (uint8_t)(uintptr_t)device; -} diff --git a/host/class/uvc/usb_host_uvc/test_app/CMakeLists.txt b/host/class/uvc/usb_host_uvc/test_app/CMakeLists.txt deleted file mode 100644 index 58750896..00000000 --- a/host/class/uvc/usb_host_uvc/test_app/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -# The following lines of boilerplate have to be in your project's -# CMakeLists in this exact order for cmake to work correctly -cmake_minimum_required(VERSION 3.16) -include($ENV{IDF_PATH}/tools/cmake/project.cmake) - -set(EXTRA_COMPONENT_DIRS - ../../usb_host_uvc - ) - -# "Trim" the build. Include the minimal set of components, main, and anything it depends on. -set(COMPONENTS main) - -project(test_app_usb_host_uvc) diff --git a/host/class/uvc/usb_host_uvc/test_app/README.md b/host/class/uvc/usb_host_uvc/test_app/README.md deleted file mode 100644 index 9af09c7b..00000000 --- a/host/class/uvc/usb_host_uvc/test_app/README.md +++ /dev/null @@ -1,12 +0,0 @@ -| Supported Targets | ESP32-S2 | ESP32-S3 | ESP32-P4 | -| ----------------- | -------- | -------- | -------- | - -# USB: UVC Class test application - -## UVC driver - -UVC descriptor parsing is checked - -### Hardware Required - -This test requires an ESP32 development board with USB-OTG support. \ No newline at end of file diff --git a/host/class/uvc/usb_host_uvc/test_app/main/CMakeLists.txt b/host/class/uvc/usb_host_uvc/test_app/main/CMakeLists.txt deleted file mode 100644 index fed0f106..00000000 --- a/host/class/uvc/usb_host_uvc/test_app/main/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -idf_component_register(SRCS "test_uvc.c" "libusb_parse.c" "test_app_main.c" - INCLUDE_DIRS "." "../../private_include" - REQUIRES usb_host_uvc usb unity - WHOLE_ARCHIVE) diff --git a/host/class/uvc/usb_host_uvc/test_app/main/libusb_parse.c b/host/class/uvc/usb_host_uvc/test_app/main/libusb_parse.c deleted file mode 100644 index a70112c3..00000000 --- a/host/class/uvc/usb_host_uvc/test_app/main/libusb_parse.c +++ /dev/null @@ -1,470 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2007 Daniel Drake - * SPDX-FileCopyrightText: 2001 Johannes Erdfelt - * - * SPDX-License-Identifier: LGPL-2.1-or-later - * - * SPDX-FileContributor: 2022 Espressif Systems (Shanghai) CO LTD - */ - -/* - * USB descriptor handling functions for libusb - * Copyright © 2007 Daniel Drake - * Copyright © 2001 Johannes Erdfelt - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include -#include -#include -#include -#include -#include "libusb.h" - -#include "esp_log.h" -#include "usb/usb_host.h" -#include "usb/usb_types_ch9.h" - -#define DESC_HEADER_LENGTH 2 -#define USB_MAXENDPOINTS 32 -#define USB_MAXINTERFACES 32 -#define USB_MAXCONFIG 8 - -const char *TAG = "LIBUSB_PARSE"; - -typedef struct { - uint8_t bLength; - uint8_t bDescriptorType; - uint8_t bDescriptorSubtype; -} desc_header_t; - - -static void parse_descriptor(const void *source, const char *descriptor, void *dest) -{ - const uint8_t *sp = source; - uint8_t *dp = dest; - char field_type; - - while (*descriptor) { - field_type = *descriptor++; - switch (field_type) { - case 'b': /* 8-bit byte */ - *dp++ = *sp++; - break; - case 'w': /* 16-bit word, convert from little endian to CPU */ - dp += ((uintptr_t)dp & 1); /* Align to 16-bit word boundary */ - - // *((uint16_t *)dp) = le16toh(*((uint16_t *)sp)); - *((uint16_t *)dp) = le16toh((uint16_t)sp[0] | sp[1] << 8); - sp += 2; - dp += 2; - break; - case 'd': /* 32-bit word, convert from little endian to CPU */ - dp += 4 - ((uintptr_t)dp & 3); /* Align to 32-bit word boundary */ - - *((uint32_t *)dp) = le32toh(((uint32_t)sp[0] | sp[1] << 8 | sp[2] << 16 | sp[3] << 24)); - sp += 4; - dp += 4; - break; - case 'u': /* 16 byte UUID */ - memcpy(dp, sp, 16); - sp += 16; - dp += 16; - break; - } - } -} - -static void clear_endpoint(struct libusb_endpoint_descriptor *endpoint) -{ - free((void *)endpoint->extra); -} - -static int parse_endpoint(struct libusb_endpoint_descriptor *endpoint, const uint8_t *buffer, int size) -{ - const desc_header_t *header; - const uint8_t *begin; - void *extra; - int parsed = 0; - int len; - - if (size < DESC_HEADER_LENGTH) { - ESP_LOGE(TAG, "short endpoint descriptor read %d/%d", - size, DESC_HEADER_LENGTH); - return LIBUSB_ERROR_IO; - } - - header = (const desc_header_t *)buffer; - if (header->bDescriptorType != LIBUSB_DT_ENDPOINT) { - ESP_LOGE(TAG, "unexpected descriptor 0x%x (expected 0x%x)", - header->bDescriptorType, LIBUSB_DT_ENDPOINT); - return parsed; - } else if (header->bLength < LIBUSB_DT_ENDPOINT_SIZE) { - ESP_LOGE(TAG, "invalid endpoint bLength (%u)", header->bLength); - return LIBUSB_ERROR_IO; - } else if (header->bLength > size) { - ESP_LOGW(TAG, "short endpoint descriptor read %d/%u", - size, header->bLength); - return parsed; - } - - if (header->bLength >= LIBUSB_DT_ENDPOINT_AUDIO_SIZE) { - parse_descriptor(buffer, "bbbbwbbb", endpoint); - } else { - parse_descriptor(buffer, "bbbbwb", endpoint); - } - - buffer += header->bLength; - size -= header->bLength; - parsed += header->bLength; - - /* Skip over the rest of the Class Specific or Vendor Specific */ - /* descriptors */ - begin = buffer; - while (size >= DESC_HEADER_LENGTH) { - header = (const desc_header_t *)buffer; - if (header->bLength < DESC_HEADER_LENGTH) { - ESP_LOGE(TAG, "invalid extra ep desc len (%u)", - header->bLength); - return LIBUSB_ERROR_IO; - } else if (header->bLength > size) { - ESP_LOGW(TAG, "short extra ep desc read %d/%u", - size, header->bLength); - return parsed; - } - - /* If we find another "proper" descriptor then we're done */ - if (header->bDescriptorType == LIBUSB_DT_ENDPOINT || - header->bDescriptorType == LIBUSB_DT_INTERFACE || - header->bDescriptorType == LIBUSB_DT_CONFIG || - header->bDescriptorType == LIBUSB_DT_DEVICE) { - break; - } - - ESP_LOGD(TAG, "skipping descriptor 0x%x", header->bDescriptorType); - buffer += header->bLength; - size -= header->bLength; - parsed += header->bLength; - } - - /* Copy any unknown descriptors into a storage area for drivers */ - /* to later parse */ - len = (int)(buffer - begin); - if (len <= 0) { - return parsed; - } - - extra = malloc((size_t)len); - if (!extra) { - return LIBUSB_ERROR_NO_MEM; - } - - memcpy(extra, begin, len); - endpoint->extra = extra; - endpoint->extra_length = len; - - return parsed; -} - -static void clear_interface(struct libusb_interface *usb_interface) -{ - int i; - - if (usb_interface->altsetting) { - for (i = 0; i < usb_interface->num_altsetting; i++) { - struct libusb_interface_descriptor *ifp = - (struct libusb_interface_descriptor *) - usb_interface->altsetting + i; - - free((void *)ifp->extra); - if (ifp->endpoint) { - uint8_t j; - - for (j = 0; j < ifp->bNumEndpoints; j++) - clear_endpoint((struct libusb_endpoint_descriptor *) - ifp->endpoint + j); - } - free((void *)ifp->endpoint); - } - } - free((void *)usb_interface->altsetting); - usb_interface->altsetting = NULL; -} - -static int parse_interface(struct libusb_interface *usb_interface, const uint8_t *buffer, int size) -{ - int len; - int r; - int parsed = 0; - int interface_number = -1; - const desc_header_t *header; - const usb_intf_desc_t *if_desc; - struct libusb_interface_descriptor *ifp; - const uint8_t *begin; - - while (size >= LIBUSB_DT_INTERFACE_SIZE) { - struct libusb_interface_descriptor *altsetting; - - altsetting = realloc((void *)usb_interface->altsetting, - sizeof(*altsetting) * (size_t)(usb_interface->num_altsetting + 1)); - if (!altsetting) { - r = LIBUSB_ERROR_NO_MEM; - goto err; - } - usb_interface->altsetting = altsetting; - - ifp = altsetting + usb_interface->num_altsetting; - parse_descriptor(buffer, "bbbbbbbbb", ifp); - if (ifp->bDescriptorType != LIBUSB_DT_INTERFACE) { - ESP_LOGE(TAG, "unexpected descriptor 0x%x (expected 0x%x)", - ifp->bDescriptorType, LIBUSB_DT_INTERFACE); - return parsed; - } else if (ifp->bLength < LIBUSB_DT_INTERFACE_SIZE) { - ESP_LOGE(TAG, "invalid interface bLength (%u)", - ifp->bLength); - r = LIBUSB_ERROR_IO; - goto err; - } else if (ifp->bLength > size) { - ESP_LOGW(TAG, "short intf descriptor read %d/%u", - size, ifp->bLength); - return parsed; - } else if (ifp->bNumEndpoints > USB_MAXENDPOINTS) { - ESP_LOGE(TAG, "too many endpoints (%u)", ifp->bNumEndpoints); - r = LIBUSB_ERROR_IO; - goto err; - } - - usb_interface->num_altsetting++; - ifp->extra = NULL; - ifp->extra_length = 0; - ifp->endpoint = NULL; - - if (interface_number == -1) { - interface_number = ifp->bInterfaceNumber; - } - - /* Skip over the interface */ - buffer += ifp->bLength; - parsed += ifp->bLength; - size -= ifp->bLength; - - begin = buffer; - - /* Skip over any interface, class or vendor descriptors */ - while (size >= DESC_HEADER_LENGTH) { - header = (const desc_header_t *)buffer; - if (header->bLength < DESC_HEADER_LENGTH) { - ESP_LOGE(TAG, "invalid extra intf desc len (%u)", header->bLength); - r = LIBUSB_ERROR_IO; - goto err; - } else if (header->bLength > size) { - ESP_LOGW(TAG, "short extra intf desc read %d/%u", size, header->bLength); - return parsed; - } - - /* If we find another "proper" descriptor then we're done */ - if (header->bDescriptorType == LIBUSB_DT_INTERFACE || - header->bDescriptorType == LIBUSB_DT_ENDPOINT || - header->bDescriptorType == LIBUSB_DT_CONFIG || - header->bDescriptorType == LIBUSB_DT_DEVICE) { - break; - } - - buffer += header->bLength; - parsed += header->bLength; - size -= header->bLength; - } - - /* Copy any unknown descriptors into a storage area for */ - /* drivers to later parse */ - len = (int)(buffer - begin); - if (len > 0) { - void *extra = malloc((size_t)len); - - if (!extra) { - r = LIBUSB_ERROR_NO_MEM; - goto err; - } - - memcpy(extra, begin, len); - ifp->extra = extra; - ifp->extra_length = len; - } - - if (ifp->bNumEndpoints > 0) { - struct libusb_endpoint_descriptor *endpoint; - uint8_t i; - - endpoint = calloc(ifp->bNumEndpoints, sizeof(*endpoint)); - if (!endpoint) { - r = LIBUSB_ERROR_NO_MEM; - goto err; - } - - ifp->endpoint = endpoint; - for (i = 0; i < ifp->bNumEndpoints; i++) { - r = parse_endpoint(endpoint + i, buffer, size); - if (r < 0) { - goto err; - } - if (r == 0) { - ifp->bNumEndpoints = i; - break; - } - - buffer += r; - parsed += r; - size -= r; - } - } - - /* We check to see if it's an alternate to this one */ - if_desc = (const usb_intf_desc_t *)buffer; - if (size < LIBUSB_DT_INTERFACE_SIZE || - if_desc->bDescriptorType != LIBUSB_DT_INTERFACE || - if_desc->bInterfaceNumber != interface_number) { - return parsed; - } - } - - return parsed; -err: - clear_interface(usb_interface); - return r; -} - -void libusb_clear_config_descriptor(struct libusb_config_descriptor *config) -{ - uint8_t i; - - if (config->interface) { - for (i = 0; i < config->bNumInterfaces; i++) { - clear_interface((struct libusb_interface *) config->interface + i); - } - } - free((void *)config->interface); - free((void *)config->extra); -} - -int libusb_parse_configuration(struct libusb_config_descriptor *config, const uint8_t *buffer, int size) -{ - uint8_t i; - int r; - const desc_header_t *header; - struct libusb_interface *usb_interface; - - if (size < LIBUSB_DT_CONFIG_SIZE) { - ESP_LOGE(TAG, "short config descriptor read %d/%d", - size, LIBUSB_DT_CONFIG_SIZE); - return LIBUSB_ERROR_IO; - } - - parse_descriptor(buffer, "bbwbbbbb", config); - if (config->bDescriptorType != LIBUSB_DT_CONFIG) { - ESP_LOGE(TAG, "unexpected descriptor 0x%x (expected 0x%x)", - config->bDescriptorType, LIBUSB_DT_CONFIG); - return LIBUSB_ERROR_IO; - } else if (config->bLength < LIBUSB_DT_CONFIG_SIZE) { - ESP_LOGE(TAG, "invalid config bLength (%u)", config->bLength); - return LIBUSB_ERROR_IO; - } else if (config->bLength > size) { - ESP_LOGE(TAG, "short config descriptor read %d/%u", - size, config->bLength); - return LIBUSB_ERROR_IO; - } else if (config->bNumInterfaces > USB_MAXINTERFACES) { - ESP_LOGE(TAG, "too many interfaces (%u)", config->bNumInterfaces); - return LIBUSB_ERROR_IO; - } - - usb_interface = calloc(config->bNumInterfaces, sizeof(*usb_interface)); - if (!usb_interface) { - return LIBUSB_ERROR_NO_MEM; - } - - config->interface = usb_interface; - - buffer += config->bLength; - size -= config->bLength; - - for (i = 0; i < config->bNumInterfaces; i++) { - int len; - const uint8_t *begin; - - /* Skip over the rest of the Class Specific or Vendor */ - /* Specific descriptors */ - begin = buffer; - while (size >= DESC_HEADER_LENGTH) { - header = (const desc_header_t *)buffer; - if (header->bLength < DESC_HEADER_LENGTH) { - ESP_LOGE(TAG, "invalid extra config desc len (%u)", header->bLength); - r = LIBUSB_ERROR_IO; - goto err; - } else if (header->bLength > size) { - ESP_LOGW(TAG, "short extra config desc read %d/%u", size, header->bLength); - config->bNumInterfaces = i; - return size; - } - - /* If we find another "proper" descriptor then we're done */ - if (header->bDescriptorType == LIBUSB_DT_ENDPOINT || - header->bDescriptorType == LIBUSB_DT_INTERFACE || - header->bDescriptorType == LIBUSB_DT_CONFIG || - header->bDescriptorType == LIBUSB_DT_DEVICE) { - break; - } - - ESP_LOGD(TAG, "skipping descriptor 0x%x", header->bDescriptorType); - buffer += header->bLength; - size -= header->bLength; - } - - /* Copy any unknown descriptors into a storage area for */ - /* drivers to later parse */ - len = (int)(buffer - begin); - if (len > 0) { - uint8_t *extra = realloc((void *)config->extra, - (size_t)(config->extra_length + len)); - - if (!extra) { - r = LIBUSB_ERROR_NO_MEM; - goto err; - } - - memcpy(extra + config->extra_length, begin, len); - config->extra = extra; - config->extra_length += len; - } - - r = parse_interface(usb_interface + i, buffer, size); - if (r < 0) { - goto err; - } - if (r == 0) { - config->bNumInterfaces = i; - break; - } - - buffer += r; - size -= r; - } - - return size; - -err: - libusb_clear_config_descriptor(config); - return r; -} diff --git a/host/class/uvc/usb_host_uvc/test_app/main/test_app_main.c b/host/class/uvc/usb_host_uvc/test_app/main/test_app_main.c deleted file mode 100644 index ce807923..00000000 --- a/host/class/uvc/usb_host_uvc/test_app/main/test_app_main.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#include -#include -#include "unity.h" -#include "unity_test_runner.h" -#include "unity_test_utils_memory.h" - -void setUp(void) -{ - unity_utils_record_free_mem(); -} - -void tearDown(void) -{ - unity_utils_evaluate_leaks(); -} - -void app_main(void) -{ - // ____ ___ ___________________ __ __ - // | | \/ _____/\______ \ _/ |_ ____ _______/ |_ - // | | /\_____ \ | | _/ \ __\/ __ \ / ___/\ __\. - // | | / / \ | | \ | | \ ___/ \___ \ | | - // |______/ /_______ / |______ / |__| \___ >____ > |__| - // \/ \/ \/ \/ - printf(" ____ ___ ___________________ __ __ \r\n"); - printf("| | \\/ _____/\\______ \\ _/ |_ ____ _______/ |_ \r\n"); - printf("| | /\\_____ \\ | | _/ \\ __\\/ __ \\ / ___/\\ __\\\r\n"); - printf("| | / / \\ | | \\ | | \\ ___/ \\___ \\ | | \r\n"); - printf("|______/ /_______ / |______ / |__| \\___ >____ > |__| \r\n"); - printf(" \\/ \\/ \\/ \\/ \r\n"); - - unity_utils_setup_heap_record(80); - unity_utils_set_leak_level(530); - unity_run_menu(); -} diff --git a/host/class/uvc/usb_host_uvc/test_app/pytest_usb_host_uvc.py b/host/class/uvc/usb_host_uvc/test_app/pytest_usb_host_uvc.py deleted file mode 100644 index bd41ad03..00000000 --- a/host/class/uvc/usb_host_uvc/test_app/pytest_usb_host_uvc.py +++ /dev/null @@ -1,13 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD -# SPDX-License-Identifier: Apache-2.0 - -import pytest -from pytest_embedded_idf.dut import IdfDut - - -@pytest.mark.esp32s2 -@pytest.mark.esp32s3 -@pytest.mark.esp32p4 -@pytest.mark.usb_host -def test_usb_host_uvc(dut: IdfDut) -> None: - dut.run_all_single_board_cases(group='usb_uvc') diff --git a/host/class/uvc/usb_host_uvc/test_app/sdkconfig.defaults b/host/class/uvc/usb_host_uvc/test_app/sdkconfig.defaults deleted file mode 100644 index 5faa2854..00000000 --- a/host/class/uvc/usb_host_uvc/test_app/sdkconfig.defaults +++ /dev/null @@ -1,18 +0,0 @@ -# Configure TinyUSB, it will be used to mock USB devices -CONFIG_TINYUSB_MSC_ENABLED=n -CONFIG_TINYUSB_CDC_ENABLED=n -CONFIG_TINYUSB_CDC_COUNT=0 -CONFIG_TINYUSB_HID_COUNT=0 - -# Disable watchdogs, they'd get triggered during unity interactive menu -CONFIG_ESP_INT_WDT=n -CONFIG_ESP_TASK_WDT=n - -# Run-time checks of Heap and Stack -CONFIG_HEAP_POISONING_COMPREHENSIVE=y -CONFIG_COMPILER_STACK_CHECK_MODE_STRONG=y -CONFIG_COMPILER_STACK_CHECK=y - -CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL=y - -CONFIG_COMPILER_CXX_EXCEPTIONS=y diff --git a/host/class/uvc/usb_host_uvc/uvc_bulk.c b/host/class/uvc/usb_host_uvc/uvc_bulk.c new file mode 100644 index 00000000..9f8212f5 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/uvc_bulk.c @@ -0,0 +1,192 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include // For memcpy + +#include "esp_log.h" + +#include "uvc_stream.h" // For uvc_host_stream_pause() +#include "uvc_types_priv.h" +#include "uvc_check_priv.h" +#include "uvc_frame_priv.h" +#include "uvc_critical_priv.h" + +static const char *TAG = "uvc-bulk"; + +/** + * @brief Callback function for handling Bulk USB transfers from a UVC camera. + * + * This function processes Bulk transfer packets, managing frame data according to a state machine. The characteristics + * and requirements of Bulk transfers are as follows: + * + * - **CRC Included**: Ensures no errors in frame data. + * - **ACK Mechanism**: Missed packets are retransmitted, ensuring reliable data delivery. + * - **Packet Headers**: Not all packets contain headers; the end of a transfer is indicated by a short packet + * (less than the maximum packet size), and the next packet usually contains a header. + * + * To process these packets, a state machine is implemented to track the next expected Bulk packet type: + * - Start of Frame (SoF), usually followed by data packets in the same transfer + * - Data packets (no header) + * - End of Frame (EoF) + * + * The function handles USB transfer statuses, manages frame buffers, and invokes user-defined callbacks for + * completed frames. + * + * @param[in] transfer Pointer to the completed USB transfer structure. + */ +void bulk_transfer_callback(usb_transfer_t *transfer) +{ + ESP_LOGD(TAG, "%s", __FUNCTION__); + uvc_stream_t *uvc_stream = (uvc_stream_t *)transfer->context; + + // Check USB transfer status + switch (transfer->status) { + case USB_TRANSFER_STATUS_COMPLETED: + break; + case USB_TRANSFER_STATUS_NO_DEVICE: + case USB_TRANSFER_STATUS_CANCELED: + case USB_TRANSFER_STATUS_ERROR: + case USB_TRANSFER_STATUS_OVERFLOW: + case USB_TRANSFER_STATUS_STALL: + // On Bulk errors we stop the stream + //@todo Stall, error and overflow errors should be propagated to the user + ESP_ERROR_CHECK(uvc_host_stream_pause(uvc_stream)); // This should never fail + break; + case USB_TRANSFER_STATUS_TIMED_OUT: + case USB_TRANSFER_STATUS_SKIPPED: // Should never happen to BULK transfer + default: + assert(false); + } + + if (!UVC_ATOMIC_LOAD(uvc_stream->dynamic.streaming)) { + return; // If the streaming was turned off, we don't have to do anything + } + + // In BULK implementation, 'payload' is a constant pointer to constant data, + // meaning both the pointer and the data it points to cannot be changed. + // This contrasts with the ISOC implementation, where 'payload' is a variable + // pointer and is increased after every ISOC packet processing + const uint8_t *const payload = transfer->data_buffer; + const uint8_t *payload_data = payload; + size_t payload_data_len = transfer->actual_num_bytes; + + // Note for developers: + // The order of SoF, Data, and EoF handling is intentional and represents a workaround for detecting EoF in the Bulk stream. + // Normally, a complete Sample transfer includes two short packets: one marking the last data packet and another with the EoF header. + // However, if the last data packet has a size equal to the Maximum Packet Size (MPS), there is no zero-length packet between the data and the EoF header. + // Consequently, it becomes impossible to distinguish between the last data packet and the EoF header. + // To address this, the hack discards all frames whose last data packet has the MPS size. + switch (uvc_stream->single_thread.next_bulk_packet) { + case UVC_STREAM_BULK_PACKET_EOF: { + const uvc_payload_header_t *payload_header = (const uvc_payload_header_t *)payload; + uvc_stream->single_thread.next_bulk_packet = UVC_STREAM_BULK_PACKET_SOF; + + if (payload_header->bmHeaderInfo.end_of_frame) { + assert(payload_header->bmHeaderInfo.frame_id == uvc_stream->single_thread.current_frame_id); + if (payload_header->bmHeaderInfo.error) { + uvc_stream->single_thread.skip_current_frame = true; + } + + // Get the current frame being processed and clear it from the stream, + // so no more data is written to this frame after the end of frame + UVC_ENTER_CRITICAL(); // Enter critical section to safely check and modify the stream state. + uvc_host_frame_t *this_frame = uvc_stream->dynamic.current_frame; + uvc_stream->dynamic.current_frame = NULL; + + // Determine if we should invoke the frame callback: + // Only invoke the callback if streaming is active, a frame callback exists, + // and we have a valid frame to pass to the user. + const bool invoke_fb_callback = (uvc_stream->dynamic.streaming && uvc_stream->constant.frame_cb && this_frame && !uvc_stream->single_thread.skip_current_frame); + UVC_EXIT_CRITICAL(); + + bool return_frame = true; // Default to returning the frame in case streaming has been stopped + if (invoke_fb_callback) { + memcpy((uvc_host_stream_format_t *)&this_frame->vs_format, &uvc_stream->constant.vs_format, sizeof(uvc_host_stream_format_t)); + + // Call the user's frame callback. If the callback returns false, + // we do not return the frame to the empty queue (i.e., the user wants to keep it for processing) + return_frame = uvc_stream->constant.frame_cb(this_frame, uvc_stream->constant.cb_arg); + } + if (return_frame) { + // If the user has processed the frame (or the stream is stopped), return it to the empty frame queue + uvc_host_frame_return(uvc_stream, this_frame); + } + break; + } + + __attribute__((fallthrough)); // Fall through! This is not EoF but SoF! + } + case UVC_STREAM_BULK_PACKET_SOF: { + const uvc_payload_header_t *payload_header = (const uvc_payload_header_t *)payload; + assert(!payload_header->bmHeaderInfo.end_of_frame); + + // We detected start of new frame. Update Frame ID and start fetching this frame + uvc_stream->single_thread.current_frame_id = payload_header->bmHeaderInfo.frame_id; + uvc_stream->single_thread.skip_current_frame = payload_header->bmHeaderInfo.error; // Check for error flag + + // Get free frame buffer for this new frame + UVC_ENTER_CRITICAL(); + const bool need_new_frame = (uvc_stream->dynamic.streaming && !uvc_stream->dynamic.current_frame); + if (need_new_frame) { + UVC_EXIT_CRITICAL(); + uvc_stream->dynamic.current_frame = uvc_frame_get_empty(uvc_stream); + if (uvc_stream->dynamic.current_frame == NULL) { + // There is no free frame buffer now, skipping this frame + uvc_stream->single_thread.skip_current_frame = true; + + // Inform the user about the underflow + uvc_host_stream_callback_t stream_cb = uvc_stream->constant.stream_cb; + if (stream_cb) { + const uvc_host_stream_event_data_t event = { + .type = UVC_HOST_FRAME_BUFFER_UNDERFLOW, + }; + stream_cb(&event, uvc_stream->constant.cb_arg); + } + } + } else { + // We received SoF but current_frame is not NULL: We missed EoF - reset the frame buffer + uvc_frame_reset(uvc_stream->dynamic.current_frame); + UVC_EXIT_CRITICAL(); + } + + payload_data += payload_header->bHeaderLength; // Pointer arithmetic! + payload_data_len -= payload_header->bHeaderLength; + uvc_stream->single_thread.next_bulk_packet = UVC_STREAM_BULK_PACKET_DATA; + __attribute__((fallthrough)); // Fall through! There can be data after SoF! + } + case UVC_STREAM_BULK_PACKET_DATA: { + // We got short packet in data section, next packet is EoF + if (transfer->data_buffer_size > transfer->actual_num_bytes) { + uvc_stream->single_thread.next_bulk_packet = UVC_STREAM_BULK_PACKET_EOF; + } + // Add received data to frame buffer + if (!uvc_stream->single_thread.skip_current_frame) { + uvc_host_frame_t *current_frame = UVC_ATOMIC_LOAD(uvc_stream->dynamic.current_frame); + esp_err_t ret = uvc_frame_add_data(current_frame, payload_data, payload_data_len); + if (ret != ESP_OK) { + // Frame buffer overflow + uvc_stream->single_thread.skip_current_frame = true; + + // Inform the user about the overflow + uvc_host_stream_callback_t stream_cb = uvc_stream->constant.stream_cb; + if (stream_cb) { + const uvc_host_stream_event_data_t event = { + .type = UVC_HOST_FRAME_BUFFER_OVERFLOW, + }; + stream_cb(&event, uvc_stream->constant.cb_arg); + } + } + } + break; + } + default: abort(); + } + + if (UVC_ATOMIC_LOAD(uvc_stream->dynamic.streaming)) { + usb_host_transfer_submit(transfer); // Restart the transfer + } +} diff --git a/host/class/uvc/usb_host_uvc/uvc_control.c b/host/class/uvc/usb_host_uvc/uvc_control.c new file mode 100644 index 00000000..4059822c --- /dev/null +++ b/host/class/uvc/usb_host_uvc/uvc_control.c @@ -0,0 +1,163 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +// This file will contain all Class-Specific request from USB UVC specification chapter 4 + +#include // For memset + +#include "esp_check.h" + +#include "uvc_control.h" +#include "usb/usb_types_ch9.h" +#include "usb/usb_types_uvc.h" +#include "uvc_types_priv.h" +#include "uvc_descriptors_priv.h" +#include "uvc_check_priv.h" + +static const char *TAG = "uvc-control"; + +static uint16_t uvc_vs_control_size(uint16_t uvc_version) +{ + if (uvc_version < UVC_VERSION_1_1) { + return 26; + } else if (uvc_version < UVC_VERSION_1_5) { + return 34; + } else { + return 48; + } +} + +static esp_err_t uvc_host_stream_control(uvc_host_stream_hdl_t stream_hdl, uvc_vs_ctrl_t *vs_control, uvc_host_stream_format_t *vs_format, enum uvc_req_code req_code, bool commit) +{ + uvc_stream_t *uvc_stream = (uvc_stream_t *)stream_hdl; + uint8_t bmRequestType, bRequest; + uint16_t wValue, wIndex, wLength; + const usb_config_desc_t *cfg_desc; + ESP_ERROR_CHECK(usb_host_get_active_config_descriptor(uvc_stream->constant.dev_hdl, &cfg_desc)); + esp_err_t ret = ESP_OK; + const bool set = (req_code == UVC_SET_CUR) ? true : false; + + bmRequestType = USB_BM_REQUEST_TYPE_TYPE_CLASS | USB_BM_REQUEST_TYPE_RECIP_INTERFACE; + bmRequestType |= set ? USB_BM_REQUEST_TYPE_DIR_OUT : USB_BM_REQUEST_TYPE_DIR_IN; + bRequest = (uint8_t)req_code; + wValue = (commit ? UVC_VS_COMMIT_CONTROL : UVC_VS_PROBE_CONTROL) << 8; + wIndex = uvc_stream->constant.bInterfaceNumber; + wLength = uvc_vs_control_size(uvc_stream->constant.bcdUVC); + + if (set) { + // Set Video Stream control parameters + // see USB UVC specification ver 1.5, table 4-75 + const uvc_format_desc_t *format_desc; + const uvc_frame_desc_t *frame_desc; + + ESP_RETURN_ON_ERROR( + uvc_desc_get_frame_format_by_format(cfg_desc, uvc_stream->constant.bInterfaceNumber, vs_format, &format_desc, &frame_desc), + TAG, "Could not find format that matches required format"); + UVC_CHECK(format_desc && frame_desc, ESP_ERR_NOT_FOUND); + + vs_control->bFormatIndex = format_desc->bFormatIndex; + vs_control->bFrameIndex = frame_desc->bFrameIndex; + vs_control->dwFrameInterval = UVC_DESC_FPS_TO_DWFRAMEINTERVAL(vs_format->fps); // Implicit conversion from float to uint32_t + } + + // Issue CTRL request + ESP_RETURN_ON_ERROR( + uvc_host_usb_ctrl(stream_hdl, bmRequestType, bRequest, wValue, wIndex, wLength, (uint8_t *)vs_control), + TAG, "Control request failed"); + + if (!set) { + // Get Video Stream control parameters from the received data and parse it to user + const uvc_format_desc_t *format_desc = NULL; + const uvc_frame_desc_t *frame_desc = NULL; + ESP_RETURN_ON_ERROR( + uvc_desc_get_frame_format_by_index(cfg_desc, uvc_stream->constant.bInterfaceNumber, vs_control->bFormatIndex, vs_control->bFrameIndex, &format_desc, &frame_desc), + TAG, "Could not find requested frame format"); + + vs_format->format = uvc_desc_parse_format(format_desc); + vs_format->h_res = frame_desc->wWidth; + vs_format->v_res = frame_desc->wHeight; + vs_format->fps = UVC_DESC_DWFRAMEINTERVAL_TO_FPS(vs_control->dwFrameInterval); + } + return ret; +} + +static inline esp_err_t uvc_host_stream_control_probe_set(uvc_host_stream_hdl_t stream_hdl, uvc_vs_ctrl_t *vs_control, const uvc_host_stream_format_t *vs_format) +{ + return uvc_host_stream_control(stream_hdl, vs_control, (uvc_host_stream_format_t *)vs_format, UVC_SET_CUR, false); +} + +static inline esp_err_t uvc_host_stream_control_probe_get(uvc_host_stream_hdl_t stream_hdl, uvc_vs_ctrl_t *vs_control, uvc_host_stream_format_t *vs_format) +{ + return uvc_host_stream_control(stream_hdl, vs_control, vs_format, UVC_GET_CUR, false); +} + +static inline esp_err_t uvc_host_stream_control_probe_get_max(uvc_host_stream_hdl_t stream_hdl, uvc_vs_ctrl_t *vs_control, uvc_host_stream_format_t *vs_format) +{ + return uvc_host_stream_control(stream_hdl, vs_control, vs_format, UVC_GET_MAX, false); +} + +static inline esp_err_t uvc_host_stream_control_probe_get_min(uvc_host_stream_hdl_t stream_hdl, uvc_vs_ctrl_t *vs_control, uvc_host_stream_format_t *vs_format) +{ + return uvc_host_stream_control(stream_hdl, vs_control, vs_format, UVC_GET_MIN, false); +} + +static inline esp_err_t uvc_host_stream_control_commit(uvc_host_stream_hdl_t stream_hdl, uvc_vs_ctrl_t *vs_control, const uvc_host_stream_format_t *vs_format) +{ + return uvc_host_stream_control(stream_hdl, vs_control, (uvc_host_stream_format_t *)vs_format, UVC_SET_CUR, true); +} + +static inline bool uvc_is_vs_format_equal(const uvc_host_stream_format_t *a, const uvc_host_stream_format_t *b) +{ + if (a->h_res == b->h_res && + a->v_res == b->v_res && + a->fps == b->fps && + a->format == b->format) { + return true; + } + return false; +} + +esp_err_t uvc_host_stream_control_negotiate(uvc_host_stream_hdl_t stream_hdl, const uvc_host_stream_format_t *vs_format, uvc_vs_ctrl_t *vs_result_ret) +{ + /* + This is not a 'real' negotiation as we return OK only if set the format exactly as expected. + In future, we can make vs_format parameter inout. This way we would return the real (close enough) set VS format. + */ + UVC_CHECK(stream_hdl && vs_format, ESP_ERR_INVALID_ARG); + esp_err_t ret = ESP_ERR_NOT_FOUND; + uvc_vs_ctrl_t vs_result = {0}; + + // Try 2x. Some camera may return error on first try + uvc_host_stream_format_t set_format, fake_format; + for (int i = 0; i < 2; i++) { + // We do this to mimic Windows driver + uvc_host_stream_control_probe_get(stream_hdl, &vs_result, &fake_format); + uvc_host_stream_control_probe_set(stream_hdl, &vs_result, &fake_format); + uvc_host_stream_control_probe_get_max(stream_hdl, &vs_result, &fake_format); + uvc_host_stream_control_probe_get_min(stream_hdl, &vs_result, &fake_format); + + // The real negotiation starts here. Zeroize the vs_result struct and start over + memset(&vs_result, 0, sizeof(uvc_vs_ctrl_t)); + ret = uvc_host_stream_control_probe_set(stream_hdl, &vs_result, vs_format); + ret |= uvc_host_stream_control_probe_get(stream_hdl, &vs_result, &set_format); + UVC_CHECK(ret == ESP_OK, ret); + if (uvc_is_vs_format_equal(&set_format, vs_format)) { + break; + } + } + + ESP_LOGD(TAG, "Frame format negotiation:\n\tRequested: %dx%d@%2.1fFPS\n\tGot: %dx%d@%2.1fFPS", + vs_format->h_res, vs_format->v_res, vs_format->fps, set_format.h_res, set_format.v_res, set_format.fps); + + // Commit the negotiated format + ret = uvc_host_stream_control_commit(stream_hdl, &vs_result, vs_format); + + // Pass the result to user + if (vs_result_ret) { + memcpy(vs_result_ret, &vs_result, sizeof(uvc_vs_ctrl_t)); + } + + return ret; +} diff --git a/host/class/uvc/usb_host_uvc/uvc_descriptor_parsing.c b/host/class/uvc/usb_host_uvc/uvc_descriptor_parsing.c new file mode 100644 index 00000000..2f891609 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/uvc_descriptor_parsing.c @@ -0,0 +1,377 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include // strncmp for guid format parsing +#include // fabs for float comparison +#include "usb/usb_helpers.h" +#include "usb/uvc_host.h" +#include "uvc_check_priv.h" +#include "uvc_descriptors_priv.h" + +#define FLOAT_EQUAL(a, b) (fabs(a - b) < 0.0001f) // For comparing float values with acceptable difference (epsilon value) + +static const uvc_vs_input_header_desc_t *uvc_desc_get_streaming_input_header(const usb_config_desc_t *cfg_desc, uint8_t bInterfaceNumber) +{ + UVC_CHECK(cfg_desc, NULL); + + // Find Interface with alternate settings = 0. All Video Streaming descriptors should be after this descriptor. + int offset = 0; + const usb_intf_desc_t *intf_desc = usb_parse_interface_descriptor(cfg_desc, bInterfaceNumber, 0, &offset); + UVC_CHECK(intf_desc, NULL); + UVC_CHECK(intf_desc->bInterfaceClass == USB_CLASS_VIDEO, NULL); + UVC_CHECK(intf_desc->bInterfaceSubClass == UVC_SC_VIDEOSTREAMING, NULL); + + // Find Video Input Header Descriptor + const usb_standard_desc_t *std_desc = usb_parse_next_descriptor_of_type((const usb_standard_desc_t *)intf_desc, cfg_desc->wTotalLength, UVC_CS_INTERFACE, &offset); + const uvc_vs_input_header_desc_t *input_header = (uvc_vs_input_header_desc_t *)std_desc; + UVC_CHECK(input_header, NULL); + UVC_CHECK(input_header->bDescriptorSubType == UVC_VS_DESC_SUBTYPE_INPUT_HEADER, NULL); + return input_header; +} + +esp_err_t uvc_desc_get_streaming_intf_and_ep( + const usb_config_desc_t *cfg_desc, + uint8_t bInterfaceNumber, + uint16_t dwMaxPayloadTransferSize, + const usb_intf_desc_t **intf_desc_ret, + const usb_ep_desc_t **ep_desc_ret) +{ + UVC_CHECK(cfg_desc && intf_desc_ret && ep_desc_ret, ESP_ERR_INVALID_ARG); + + const usb_intf_desc_t *intf_desc = NULL; + const usb_ep_desc_t *ep_desc = NULL; + int offset = 0; + + const uint8_t num_of_alternate = usb_parse_interface_number_of_alternate(cfg_desc, bInterfaceNumber); + uint16_t last_mps = 0; // Looking for maximum MPS: init to zero + uint8_t last_mult = UINT8_MAX; // Looking for minimum: init to max + for (int i = 0; i <= num_of_alternate; i++) { + // Check Interface desc + intf_desc = usb_parse_interface_descriptor(cfg_desc, bInterfaceNumber, i, &offset); + UVC_CHECK(intf_desc, ESP_ERR_NOT_FOUND); + UVC_CHECK(intf_desc->bInterfaceClass == USB_CLASS_VIDEO, ESP_ERR_NOT_FOUND); + UVC_CHECK(intf_desc->bInterfaceSubClass == UVC_SC_VIDEOSTREAMING, ESP_ERR_NOT_FOUND); + if (intf_desc->bNumEndpoints == 0 && i == 0) { + continue; // This is Alternate setting 0 for ISOC cameras. + } + UVC_CHECK(intf_desc->bNumEndpoints == 1, ESP_ERR_NOT_FOUND); // Only 1 endpoint is expected + + // Check EP desc + ep_desc = usb_parse_endpoint_descriptor_by_index(intf_desc, 0, cfg_desc->wTotalLength, &offset); + UVC_CHECK(ep_desc, ESP_ERR_NOT_FOUND); + + // Here we look for an interface that offers the largest MPS with minimum multiple transactions in a microframe + // and that is not bigger that max. requests MPS + const uint16_t current_mps = USB_EP_DESC_GET_MPS(ep_desc); + const uint8_t current_mult = USB_EP_DESC_GET_MULT(ep_desc); + if (current_mps >= last_mps && current_mult <= last_mult && current_mps <= dwMaxPayloadTransferSize) { + last_mps = current_mps; + last_mult = current_mult; + *ep_desc_ret = ep_desc; + *intf_desc_ret = intf_desc; + } else { + break; + } + } + + return ESP_OK; +} + +/** + * @brief Check if this descriptor is Format descriptor + * + * @param[in] _desc USB descriptor + * @return true Is format descriptor + * @return false Is NOT format descriptor + */ +static bool uvc_desc_is_format_desc(const usb_standard_desc_t *_desc) +{ + assert(_desc); + const uvc_format_desc_t *desc = (const uvc_format_desc_t *)_desc; + const bool is_format_desc = desc->bDescriptorType == UVC_CS_INTERFACE && ( + desc->bDescriptorSubType == UVC_VS_DESC_SUBTYPE_FORMAT_UNCOMPRESSED || + desc->bDescriptorSubType == UVC_VS_DESC_SUBTYPE_FORMAT_MJPEG || + desc->bDescriptorSubType == UVC_VS_DESC_SUBTYPE_FORMAT_MPEG2TS || + desc->bDescriptorSubType == UVC_VS_DESC_SUBTYPE_FORMAT_DV || + desc->bDescriptorSubType == UVC_VS_DESC_SUBTYPE_FORMAT_FRAME_BASED || + desc->bDescriptorSubType == UVC_VS_DESC_SUBTYPE_FORMAT_STREAM_BASED + ); + + return is_format_desc; +} + +/** + * @brief Check if this descriptor is Frame descriptor + * + * @param[in] _desc USB descriptor + * @return true Is frame descriptor + * @return false Is NOT frame descriptor + */ +static bool uvc_desc_is_frame_desc(const usb_standard_desc_t *_desc) +{ + assert(_desc); + const uvc_frame_desc_t *desc = (const uvc_frame_desc_t *)_desc; + const bool is_frame_desc = desc->bDescriptorType == UVC_CS_INTERFACE && ( + desc->bDescriptorSubType == UVC_VS_DESC_SUBTYPE_FRAME_UNCOMPRESSED || + desc->bDescriptorSubType == UVC_VS_DESC_SUBTYPE_FRAME_MJPEG || + desc->bDescriptorSubType == UVC_VS_DESC_SUBTYPE_FRAME_FRAME_BASED + ); + + return is_frame_desc; +} + +int uvc_desc_parse_format(const uvc_format_desc_t *format_desc) +{ + // Input checks + assert(format_desc); + UVC_CHECK(uvc_desc_is_format_desc((const usb_standard_desc_t *)format_desc), UVC_VS_FORMAT_UNDEFINED); + + int ret = UVC_VS_FORMAT_UNDEFINED; + switch (format_desc->bDescriptorSubType) { + case UVC_VS_DESC_SUBTYPE_FORMAT_UNCOMPRESSED: + const char *guid = (const char *)(format_desc->uncompressed_frame_based.guidFormat); + // We do not check full guid, but only the first 4 characters that show human readable format + if (strncmp(guid, "YUY2", 4) == 0) { + ret = UVC_VS_FORMAT_YUY2; + } + break; + case UVC_VS_DESC_SUBTYPE_FORMAT_MJPEG: + ret = UVC_VS_FORMAT_MJPEG; + break; + case UVC_VS_DESC_SUBTYPE_FORMAT_FRAME_BASED: { + const char *guid = (const char *)(format_desc->uncompressed_frame_based.guidFormat); + // We do not check full guid, but only the first 4 characters that show human readable format + if (strncmp(guid, "H265", 4) == 0) { + ret = UVC_VS_FORMAT_H265; + } else if (strncmp(guid, "H264", 4) == 0) { + ret = UVC_VS_FORMAT_H264; + } + break; + } + case UVC_VS_DESC_SUBTYPE_UNDEFINED: + ret = UVC_VS_FORMAT_UNDEFINED; + break; + default: break; + } + return ret; +} + +static bool uvc_desc_format_is_equal(const uvc_frame_desc_t *frame_desc, const uvc_host_stream_format_t *vs_format) +{ + assert(frame_desc && vs_format); + UVC_CHECK(uvc_desc_is_frame_desc((const usb_standard_desc_t *)frame_desc), false); + + if (frame_desc->wWidth == vs_format->h_res && frame_desc->wHeight == vs_format->v_res) { + uint8_t bFrameIntervalType; + uint32_t dwMinFrameInterval, dwMaxFrameInterval, dwFrameIntervalStep; + + switch (frame_desc->bDescriptorSubType) { + case UVC_VS_DESC_SUBTYPE_FRAME_FRAME_BASED: + bFrameIntervalType = frame_desc->frame_based.bFrameIntervalType; + if (bFrameIntervalType == 0) { + + dwMinFrameInterval = frame_desc->frame_based.dwMinFrameInterval; + dwMaxFrameInterval = frame_desc->frame_based.dwMaxFrameInterval; + dwFrameIntervalStep = frame_desc->frame_based.dwFrameIntervalStep; + // This stream does not support discrete Frame Interval. Check all supported intervals + uint32_t current_frame_interval = dwMinFrameInterval; + while (current_frame_interval <= dwMaxFrameInterval) { + if (FLOAT_EQUAL(vs_format->fps, UVC_DESC_DWFRAMEINTERVAL_TO_FPS(current_frame_interval))) { + return true; + } + current_frame_interval += dwFrameIntervalStep; + } + } else { + // This stream support discrete Frame Intervals. Check supported intervals + for (int i = 0; i < bFrameIntervalType; i++) { + if (FLOAT_EQUAL(vs_format->fps, UVC_DESC_DWFRAMEINTERVAL_TO_FPS(frame_desc->frame_based.dwFrameInterval[i]))) { + return true; + } + } + } + break; + case UVC_VS_DESC_SUBTYPE_FRAME_UNCOMPRESSED: + case UVC_VS_DESC_SUBTYPE_FRAME_MJPEG: + bFrameIntervalType = frame_desc->mjpeg_uncompressed.bFrameIntervalType; + if (bFrameIntervalType == 0) { + + dwMinFrameInterval = frame_desc->mjpeg_uncompressed.dwMinFrameInterval; + dwMaxFrameInterval = frame_desc->mjpeg_uncompressed.dwMaxFrameInterval; + dwFrameIntervalStep = frame_desc->mjpeg_uncompressed.dwFrameIntervalStep; + // This stream does not support discrete Frame Interval. Check all supported intervals + uint32_t current_frame_interval = dwMinFrameInterval; + while (current_frame_interval <= dwMaxFrameInterval) { + if (FLOAT_EQUAL(vs_format->fps, UVC_DESC_DWFRAMEINTERVAL_TO_FPS(current_frame_interval))) { + return true; + } + current_frame_interval += dwFrameIntervalStep; + } + } else { + // This stream support discrete Frame Intervals. Check supported intervals + for (int i = 0; i < bFrameIntervalType; i++) { + if (FLOAT_EQUAL(vs_format->fps, UVC_DESC_DWFRAMEINTERVAL_TO_FPS(frame_desc->mjpeg_uncompressed.dwFrameInterval[i]))) { + return true; + } + } + } + break; + default: + assert(!"This subtype is not supported!"); + return false; + } + } + return false; +} + +esp_err_t uvc_desc_get_frame_format_by_format( + const usb_config_desc_t *cfg_desc, + uint8_t bInterfaceNumber, + const uvc_host_stream_format_t *vs_format, + const uvc_format_desc_t **format_desc_ret, + const uvc_frame_desc_t **frame_desc_ret) +{ + UVC_CHECK(cfg_desc && vs_format, ESP_ERR_INVALID_ARG); + + const uvc_vs_input_header_desc_t *input_header = uvc_desc_get_streaming_input_header(cfg_desc, bInterfaceNumber); + UVC_CHECK(input_header, ESP_ERR_NOT_FOUND); + + // Find requested Format descriptors + esp_err_t ret = ESP_ERR_NOT_FOUND; + int format_offset = 0; + const usb_standard_desc_t *current_desc = (const usb_standard_desc_t *) input_header; + while ((current_desc = usb_parse_next_descriptor_of_type(current_desc, input_header->wTotalLength, UVC_CS_INTERFACE, &format_offset))) { + if (uvc_desc_is_format_desc(current_desc)) { + const uvc_format_desc_t *this_format = (const uvc_format_desc_t *)(current_desc); + if (vs_format->format == uvc_desc_parse_format(this_format)) { + if (format_desc_ret) { + *format_desc_ret = this_format; + } + // We found required Format Descriptor + // Now we look for correct Frame Descriptors which should be directly after Format + while ((current_desc = usb_parse_next_descriptor_of_type(current_desc, input_header->wTotalLength, UVC_CS_INTERFACE, &format_offset))) { + uvc_frame_desc_t *this_frame = (uvc_frame_desc_t *)current_desc; + if (uvc_desc_format_is_equal(this_frame, vs_format)) { + if (frame_desc_ret) { + *frame_desc_ret = this_frame; + } + ret = ESP_OK; + break; + } + } + break; + } + } + } + return ret; +} + +static inline bool uvc_desc_is_format_supported( + const usb_config_desc_t *cfg_desc, + uint8_t bInterfaceNumber, + const uvc_host_stream_format_t *vs_format) +{ + return (ESP_OK == uvc_desc_get_frame_format_by_format(cfg_desc, bInterfaceNumber, vs_format, NULL, NULL)); +} + +static const uvc_vc_header_desc_t *uvc_desc_get_control_interface_header(const usb_config_desc_t *cfg_desc, unsigned uvc_idx) +{ + UVC_CHECK(cfg_desc, NULL); + + // Find IAD UVC descriptor with desired index + const uvc_vc_header_desc_t *header_desc_ret = NULL; + int offset = 0; + int uvc_iad_idx = 0; + const usb_standard_desc_t *current_desc = (const usb_standard_desc_t *)cfg_desc; + while ((current_desc = usb_parse_next_descriptor_of_type(current_desc, cfg_desc->wTotalLength, USB_B_DESCRIPTOR_TYPE_INTERFACE_ASSOCIATION, &offset))) { + const usb_iad_desc_t *iad_desc = (usb_iad_desc_t *)current_desc; + if (iad_desc->bFunctionClass == USB_CLASS_VIDEO && iad_desc->bFunctionSubClass == UVC_SC_VIDEO_INTERFACE_COLLECTION) { + if (uvc_idx == uvc_iad_idx) { + // This is the IAD that we are looking for. Find its first Video Control interface header descriptor + header_desc_ret = (const uvc_vc_header_desc_t *)usb_parse_next_descriptor_of_type(current_desc, cfg_desc->wTotalLength, UVC_CS_INTERFACE, &offset); + UVC_CHECK(header_desc_ret->bDescriptorSubType == UVC_VC_DESC_SUBTYPE_HEADER, NULL); + break; + } else { + // The user requires next UVC function + uvc_iad_idx++; + } + } + } + return header_desc_ret; +} + +esp_err_t uvc_desc_get_frame_format_by_index( + const usb_config_desc_t *cfg_desc, + uint8_t bInterfaceNumber, + uint8_t bFormatIndex, + uint8_t bFrameIndex, + const uvc_format_desc_t **format_desc_ret, + const uvc_frame_desc_t **frame_desc_ret) +{ + UVC_CHECK(bFormatIndex > 0, ESP_ERR_INVALID_ARG); // Formats are indexed from 1 + UVC_CHECK(bFrameIndex > 0, ESP_ERR_INVALID_ARG); // Frames are indexed from 1 + UVC_CHECK(format_desc_ret && frame_desc_ret && cfg_desc, ESP_ERR_INVALID_ARG); + + const uvc_vs_input_header_desc_t *input_header = uvc_desc_get_streaming_input_header(cfg_desc, bInterfaceNumber); + UVC_CHECK(input_header, ESP_ERR_NOT_FOUND); + UVC_CHECK(input_header->bNumFormats >= bFormatIndex, ESP_ERR_NOT_FOUND); + + // Find requested Format and Frame descriptors + esp_err_t ret = ESP_ERR_NOT_FOUND; + int format_offset = 0; + const usb_standard_desc_t *current_desc = (const usb_standard_desc_t *) input_header; + while ((current_desc = usb_parse_next_descriptor_of_type(current_desc, input_header->wTotalLength, UVC_CS_INTERFACE, &format_offset))) { + const uvc_format_desc_t *this_format = (const uvc_format_desc_t *)current_desc; + if (uvc_desc_is_format_desc(current_desc)) { + if (this_format->bFormatIndex == bFormatIndex) { + UVC_CHECK(this_format->bNumFrameDescriptors >= bFrameIndex, ESP_ERR_NOT_FOUND); + *format_desc_ret = (const uvc_format_desc_t *)this_format; + // We found required Format Descriptor + // Now we look for correct Frame Descriptors which should be directly after Format + while ((current_desc = usb_parse_next_descriptor_of_type(current_desc, input_header->wTotalLength, UVC_CS_INTERFACE, &format_offset))) { + uvc_frame_desc_t *this_frame = (uvc_frame_desc_t *)current_desc; + if (this_frame->bFrameIndex == bFrameIndex) { + *frame_desc_ret = this_frame; + ret = ESP_OK; + break; + } + } + break; + } + } + } + return ret; +} + +esp_err_t uvc_desc_get_streaming_interface_num( + const usb_config_desc_t *cfg_desc, + uint8_t uvc_index, + const uvc_host_stream_format_t *vs_format, + uint16_t *bcdUVC, + uint8_t *bInterfaceNumber) +{ + UVC_CHECK(cfg_desc && vs_format && bcdUVC && bInterfaceNumber, ESP_ERR_INVALID_ARG); + + esp_err_t ret = ESP_ERR_NOT_FOUND; + + // Get Interface header with uvc_index + const uvc_vc_header_desc_t *vc_header_desc = uvc_desc_get_control_interface_header(cfg_desc, uvc_index); + if (!vc_header_desc) { + return ESP_ERR_NOT_FOUND; + } + *bcdUVC = vc_header_desc->bcdUVC; + + // Find video streaming interface that offers the requested format + for (int streaming_if = 0; streaming_if < vc_header_desc->bInCollection; streaming_if++) { + uint8_t current_bInterfaceNumber = vc_header_desc->baInterfaceNr[streaming_if]; + if (uvc_desc_is_format_supported(cfg_desc, current_bInterfaceNumber, vs_format)) { + *bInterfaceNumber = current_bInterfaceNumber; + ret = ESP_OK; + break; + } + } + return ret; +} diff --git a/host/class/uvc/usb_host_uvc/uvc_descriptor_printing.c b/host/class/uvc/usb_host_uvc/uvc_descriptor_printing.c new file mode 100644 index 00000000..e0d54a3d --- /dev/null +++ b/host/class/uvc/usb_host_uvc/uvc_descriptor_printing.c @@ -0,0 +1,394 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +#include "usb/usb_host.h" +#include "usb/uvc_host.h" +#include "uvc_types_priv.h" + +#define TERMINAL_INPUT_CAMERA_TYPE 0x0201 +#define TERMINAL_INPUT_COMPOSITE_TYPE 0x0401 +#define ITT_MEDIA_TRANSPORT_INPUT 0x0202 + +static enum uvc_int_subclass_code interface_sub_class = UVC_SC_VIDEOCONTROL; + +static void unknown_desc(const usb_standard_desc_t *header) +{ + printf(" *** Unknown Descriptor Length: %d Type: %d ***\n", + header->bLength, header->bDescriptorType); +} + +static void print_cs_endpoint_desc(const usb_standard_desc_t *_desc) +{ + uvc_vc_interrupt_ep_desc_t *class_desc = (uvc_vc_interrupt_ep_desc_t *)_desc; + printf("\t\t*** Class-specific Interrupt Endpoint Descriptor ***\n"); + printf("\t\tbLength %u\n", class_desc->bLength); + printf("\t\tbDescriptorType 0x%02X\n", class_desc->bDescriptorType); + printf("\t\tbDescriptorSubType %d\n", class_desc->bDescriptorSubType); + printf("\t\twMaxTransferSize %d\n", class_desc->wMaxTransferSize); +} + +static void print_class_header_desc(const usb_standard_desc_t *_desc) +{ + if (interface_sub_class == UVC_SC_VIDEOCONTROL) { + const uvc_vc_header_desc_t *desc = (const uvc_vc_header_desc_t *) _desc; + printf("\t*** Class-specific VC Interface Descriptor ***\n"); + printf("\tbLength %u\n", desc->bLength); + printf("\tbDescriptorType 0x%02X\n", desc->bDescriptorType); + printf("\tbDescriptorSubType 0x%02X\n", desc->bDescriptorSubType); + printf("\tbcdUVC %04x\n", desc->bcdUVC); + printf("\twTotalLength %u\n", desc->wTotalLength); + printf("\tdwClockFrequency %"PRIu32"\n", desc->dwClockFrequency); + printf("\tbInCollection %u\n", desc->bInCollection); + for (int i = 0; i < desc->bInCollection; i++) { + printf("\tbaInterfaceNr[%i] %u\n", i, desc->baInterfaceNr[i]); + } + } else if (interface_sub_class == UVC_SC_VIDEOSTREAMING) { + const uvc_vs_input_header_desc_t *desc = (const uvc_vs_input_header_desc_t *) _desc; + printf("\t*** Class-specific VS Interface Descriptor ***\n"); + printf("\tbLength %u\n", desc->bLength); + printf("\tbDescriptorType 0x%02X\n", desc->bDescriptorType); + printf("\tbDescriptorSubType 0x%02X\n", desc->bDescriptorSubType); + printf("\tbNumFormats 0x%X\n", desc->bNumFormats); + printf("\twTotalLength %u\n", desc->wTotalLength); + printf("\tbEndpointAddress 0x%02X\n", desc->bEndpointAddress); + printf("\tbmInfo 0x%X\n", desc->bmInfo); + printf("\tbTerminalLink %u\n", desc->bTerminalLink); + printf("\tbStillCaptureMethod %u\n", desc->bStillCaptureMethod); + printf("\tbTriggerSupport %u\n", desc->bTriggerSupport); + printf("\tbTriggerUsage %u\n", desc->bTriggerUsage); + printf("\tbControlSize %u\n", desc->bControlSize); + for (int format = 0; format < desc->bNumFormats; format++) { + printf("\tbmaControls[%d] 0x%X\n", format, desc->bmaControls[format * desc->bControlSize]); + } + } +} + +static void print_vc_input_terminal_desc(const usb_standard_desc_t *_desc) +{ + const uvc_input_terminal_camera_desc_t *desc = (const uvc_input_terminal_camera_desc_t *) _desc; + + const char *type = NULL; + + switch (desc->wTerminalType) { + case TERMINAL_INPUT_CAMERA_TYPE: type = "Camera"; break; + case TERMINAL_INPUT_COMPOSITE_TYPE: type = "Composite"; break; + case ITT_MEDIA_TRANSPORT_INPUT: type = "Media"; break; + default: printf("!!!!! Unknown Input terminal descriptor !!!!!\n"); return; + } + + printf("\t*** Input Terminal Descriptor (%s) ***\n", type); + printf("\tbLength %u\n", desc->bLength); + printf("\tbDescriptorType 0x%02X\n", desc->bDescriptorType); + printf("\tbDescriptorSubType 0x%02X\n", desc->bDescriptorSubType); + printf("\tbTerminalID 0x%X\n", desc->bTerminalID); + printf("\twTerminalType 0x%X\n", desc->wTerminalType); + printf("\tbAssocTerminal %u\n", desc->bAssocTerminal); + printf("\tiTerminal %u\n", desc->iTerminal); + + if (desc->wTerminalType == TERMINAL_INPUT_COMPOSITE_TYPE) { + return; + } else if (desc->wTerminalType == TERMINAL_INPUT_CAMERA_TYPE) { + printf("\twObjectiveFocalLengthMin %u\n", desc->wObjectiveFocalLengthMin); + printf("\twObjectiveFocalLengthMax %u\n", desc->wObjectiveFocalLengthMax); + printf("\twOcularFocalLength %u\n", desc->wOcularFocalLength); + printf("\tbControlSize %u\n", desc->bControlSize); + printf("\tbmControls 0x%X 0x%X 0x%X\n", + desc->bmControls[0], + desc->bmControls[1], + desc->bmControls[2]); + } else if (desc->wTerminalType == ITT_MEDIA_TRANSPORT_INPUT) { + const uvc_input_terminal_media_desc_t *desc = (const uvc_input_terminal_media_desc_t *) _desc; + printf("\tbControlSize %u\n", desc->bControlSize); + printf("\tbmControls 0x%X\n", desc->bmControls); + printf("\tbTransportModeSize %u\n", desc->bTransportModeSize); + printf("\tbmTransportModes 0x%X 0x%X 0x%X 0x%X 0x%X\n", + desc->bmTransportModes[0], + desc->bmTransportModes[1], + desc->bmTransportModes[2], + desc->bmTransportModes[3], + desc->bmTransportModes[4]); + } +} + +static void print_vc_output_terminal_desc(const usb_standard_desc_t *_desc) +{ + const uvc_output_terminal_desc_t *desc = (const uvc_output_terminal_desc_t *) _desc; + printf("\t*** Output Terminal Descriptor ***\n"); + printf("\tbLength %u\n", desc->bLength); + printf("\tbDescriptorType 0x%02X\n", desc->bDescriptorType); + printf("\tbDescriptorSubType 0x%02X\n", desc->bDescriptorSubType); + printf("\tbTerminalID %u\n", desc->bTerminalID); + printf("\twTerminalType 0x%X\n", desc->wTerminalType); + printf("\tbAssocTerminal %u\n", desc->bAssocTerminal); + printf("\tbSourceID %u\n", desc->bSourceID); + printf("\tiTerminal %u\n", desc->iTerminal); +} + +static void print_vc_selector_unit_desc(const usb_standard_desc_t *_desc) +{ + const uvc_selector_unit_desc_t *desc = (const uvc_selector_unit_desc_t *) _desc; + printf("\t*** Selector Unit Descriptor ***\n"); + printf("\tbLength %u\n", desc->bLength); + printf("\tbDescriptorType 0x%02X\n", desc->bDescriptorType); + printf("\tbDescriptorSubType 0x%02X\n", desc->bDescriptorSubType); + printf("\tbUnitID %u\n", desc->bUnitID); + printf("\tbNrInPins %u\n", desc->bNrInPins); + printf("\tbaSourceID1 %u\n", desc->baSourceID1); + printf("\tbaSourceID2 %u\n", desc->baSourceID2); + printf("\tiSelector %u\n", desc->iSelector); +} + +static void print_vc_processing_unit_desc(const usb_standard_desc_t *_desc) +{ + const uvc_processing_unit_desc_t *desc = (const uvc_processing_unit_desc_t *) _desc; + printf("\t*** Processing Unit Descriptor ***\n"); + printf("\tbLength %u\n", desc->bLength); + printf("\tbDescriptorType 0x%02X\n", desc->bDescriptorType); + printf("\tbDescriptorSubType 0x%02X\n", desc->bDescriptorSubType); + printf("\tbUnitID %u\n", desc->bUnitID); + printf("\tbSourceID %u\n", desc->bSourceID); + printf("\twMaxMultiplier %u\n", desc->wMaxMultiplier); + printf("\tbControlSize %u\n", desc->bControlSize); + printf("\tbmControls 0x%X 0x%X 0x%X\n", + desc->bmControls[0], + desc->bmControls[1], + desc->bmControls[2]); + printf("\tiProcessing %u\n", desc->iProcessing); + printf("\tbmVideoStandards 0x%X\n", desc->bmVideoStandards); +} + +static void print_vs_format_mjpeg_desc(const usb_standard_desc_t *_desc) +{ + const uvc_format_desc_t *desc = (const uvc_format_desc_t *) _desc; + printf("\t*** VS Format Descriptor ***\n"); + printf("\tbLength %u\n", desc->bLength); + printf("\tbDescriptorType 0x%02X\n", desc->bDescriptorType); + printf("\tbDescriptorSubType 0x%02X\n", desc->bDescriptorSubType); + printf("\tbFormatIndex %u\n", desc->bFormatIndex); + printf("\tbNumFrameDescriptors %u\n", desc->bNumFrameDescriptors); + + printf("\tbmFlags 0x%X\n", desc->mjpeg.bmFlags); + printf("\tbDefaultFrameIndex %u\n", desc->mjpeg.bDefaultFrameIndex); + printf("\tbAspectRatioX %u\n", desc->mjpeg.bAspectRatioX); + printf("\tbAspectRatioY %u\n", desc->mjpeg.bAspectRatioY); + printf("\tbmInterlaceFlags 0x%X\n", desc->mjpeg.bmInterlaceFlags); + printf("\tbCopyProtect %u\n", desc->mjpeg.bCopyProtect); +} + +static void print_vs_frame_mjpeg_desc(const usb_standard_desc_t *_desc) +{ + // Copy to local buffer due to potential misalignment issues. + uint32_t raw_desc[25]; + uint32_t desc_size = ((const uvc_frame_desc_t *)_desc)->bLength; + memcpy(raw_desc, _desc, desc_size); + + const uvc_frame_desc_t *desc = (const uvc_frame_desc_t *) raw_desc; + printf("\t*** VS Frame Descriptor ***\n"); + printf("\tbLength %u\n", desc->bLength); + printf("\tbDescriptorType 0x%02X\n", desc->bDescriptorType); + printf("\tbDescriptorSubType 0x%02X\n", desc->bDescriptorSubType); + printf("\tbFrameIndex %u\n", desc->bFrameIndex); + printf("\tbmCapabilities 0x%X\n", desc->bmCapabilities); + printf("\twWidth %u\n", desc->wWidth); + printf("\twHeigh %u\n", desc->wHeight); + printf("\tdwMinBitRate %"PRIu32"\n", desc->dwMinBitRate); + printf("\tdwMaxBitRate %"PRIu32"\n", desc->dwMaxBitRate); + printf("\tdwMaxVideoFrameBufSize %"PRIu32"\n", desc->mjpeg_uncompressed.dwMaxVideoFrameBufferSize); + printf("\tdwDefaultFrameInterval %"PRIu32"\n", desc->mjpeg_uncompressed.dwDefaultFrameInterval); + printf("\tbFrameIntervalType %u\n", desc->mjpeg_uncompressed.bFrameIntervalType); + + if (desc->mjpeg_uncompressed.bFrameIntervalType == 0) { + // Continuous Frame Intervals + printf("\tdwMinFrameInterval %"PRIu32"\n", desc->mjpeg_uncompressed.dwMinFrameInterval); + printf("\tdwMaxFrameInterval %"PRIu32"\n", desc->mjpeg_uncompressed.dwMaxFrameInterval); + printf("\tdwFrameIntervalStep %"PRIu32"\n", desc->mjpeg_uncompressed.dwFrameIntervalStep); + } else { + // Discrete Frame Intervals + for (int i = 0; i < desc->mjpeg_uncompressed.bFrameIntervalType; ++i) { + printf("\tFrameInterval[%d] %"PRIu32"\n", i, desc->mjpeg_uncompressed.dwFrameInterval[i]); + } + } +} + +static void print_vs_format_frame_based_desc(const usb_standard_desc_t *_desc) +{ + const uvc_format_desc_t *desc = (const uvc_format_desc_t *) _desc; + printf("\t*** VS Format Frame-Based Descriptor ***\n"); + printf("\tbLength %u\n", desc->bLength); + printf("\tbDescriptorType 0x%02X\n", desc->bDescriptorType); + printf("\tbDescriptorSubType 0x%02X\n", desc->bDescriptorSubType); + printf("\tbFormatIndex %u\n", desc->bFormatIndex); + printf("\tbNumFrameDescriptors %u\n", desc->bNumFrameDescriptors); + printf("\tguidFormat %.*s\n", 16, desc->uncompressed_frame_based.guidFormat); + printf("\tbDefaultFrameIndex %u\n", desc->uncompressed_frame_based.bDefaultFrameIndex); + printf("\tbAspectRatioX %u\n", desc->uncompressed_frame_based.bAspectRatioX); + printf("\tbAspectRatioY %u\n", desc->uncompressed_frame_based.bAspectRatioY); + printf("\tbmInterlaceFlags 0x%X\n", desc->uncompressed_frame_based.bmInterlaceFlags); + printf("\tbCopyProtect %u\n", desc->uncompressed_frame_based.bCopyProtect); +} + +static void print_vs_frame_frame_based_desc(const usb_standard_desc_t *_desc) +{ + // Copy to local buffer due to potential misalignment issues. + uint32_t raw_desc[25]; + uint32_t desc_size = ((const uvc_frame_desc_t *)_desc)->bLength; + memcpy(raw_desc, _desc, desc_size); + + const uvc_frame_desc_t *desc = (const uvc_frame_desc_t *) raw_desc; + printf("\t*** VS Frame Frame-Based Descriptor ***\n"); + printf("\tbLength %u\n", desc->bLength); + printf("\tbDescriptorType 0x%02X\n", desc->bDescriptorType); + printf("\tbDescriptorSubType 0x%02X\n", desc->bDescriptorSubType); + printf("\tbFrameIndex %u\n", desc->bFrameIndex); + printf("\tbmCapabilities 0x%X\n", desc->bmCapabilities); + printf("\twWidth %u\n", desc->wWidth); + printf("\twHeight %u\n", desc->wHeight); + printf("\tdwMinBitRate %"PRIu32"\n", desc->dwMinBitRate); + printf("\tdwMaxBitRate %"PRIu32"\n", desc->dwMaxBitRate); + printf("\tdwDefaultFrameInterval %"PRIu32"\n", desc->frame_based.dwDefaultFrameInterval); + printf("\tbFrameIntervalType %u\n", desc->frame_based.bFrameIntervalType); + printf("\tdwBytesPerLine %"PRIu32"\n", desc->frame_based.dwBytesPerLine); + + if (desc->frame_based.bFrameIntervalType == 0) { + // Continuous Frame Intervals + printf("\tdwMinFrameInterval %"PRIu32"\n", desc->frame_based.dwMinFrameInterval); + printf("\tdwMaxFrameInterval %"PRIu32"\n", desc->frame_based.dwMaxFrameInterval); + printf("\tdwFrameIntervalStep %"PRIu32"\n", desc->frame_based.dwFrameIntervalStep); + } else { + // Discrete Frame Intervals + for (int i = 0; i < desc->frame_based.bFrameIntervalType; ++i) { + printf("\tFrameInterval[%d] %"PRIu32"\n", i, desc->frame_based.dwFrameInterval[i]); + } + } +} + +// Helper structs +typedef struct { + uint16_t wWidth; + uint16_t wHeight; +} USB_DESC_ATTR WidthHeight_t; +typedef struct { + uint8_t bNumCompressionPtn; + uint8_t bCompression; +} USB_DESC_ATTR Compression_t; + +static void print_vs_still_frame_desc(const usb_standard_desc_t *_desc) +{ + const uvc_still_image_frame_desc_t *desc = (const uvc_still_image_frame_desc_t *) _desc; + printf("\t*** VS Still Format Descriptor ***\n"); + printf("\tbLength %u\n", desc->bLength); + printf("\tbDescriptorType 0x%02X\n", desc->bDescriptorType); + printf("\tbDescriptorSubType 0x%02X\n", desc->bDescriptorSubType); + printf("\tbEndpointAddress 0x%02X\n", desc->bEndpointAddress); + printf("\tbNumImageSizePatterns 0x%X\n", desc->bNumImageSizePatterns); + + WidthHeight_t *wh = (WidthHeight_t *)&desc->wWidth; + for (int i = 0; i < desc->bNumImageSizePatterns; ++i, wh++) { + printf("\t[%d]: wWidth: %u, wHeight: %u\n", i, wh->wWidth, wh->wHeight); + } + + Compression_t *c = (Compression_t *)wh; + printf("\tbNumCompressionPtn %u\n", c->bNumCompressionPtn); + printf("\tbCompression %u\n", c->bCompression); +} + +static void print_vs_color_format_desc(const usb_standard_desc_t *_desc) +{ + const uvc_color_matching_desc_t *desc = (const uvc_color_matching_desc_t *) _desc; + printf("\t*** VS Color Format Descriptor ***\n"); + printf("\tbLength %u\n", desc->bLength); + printf("\tbDescriptorType 0x%02X\n", desc->bDescriptorType); + printf("\tbDescriptorSubType 0x%02X\n", desc->bDescriptorSubType); + printf("\tbColorPrimaries 0x%X\n", desc->bColorPrimaries); + printf("\tbTransferCharacteristics %u\n", desc->bTransferCharacteristics); + printf("\tbMatrixCoefficients 0x%X\n", desc->bMatrixCoefficients); +} + +static void print_class_specific_desc(const usb_standard_desc_t *_desc) +{ + switch (((uvc_vc_header_desc_t *)_desc)->bDescriptorSubType) { + case UVC_VC_DESC_SUBTYPE_HEADER: + print_class_header_desc(_desc); + break; + case UVC_VC_DESC_SUBTYPE_INPUT_TERMINAL: + print_vc_input_terminal_desc(_desc); + break; + case UVC_VC_DESC_SUBTYPE_SELECTOR_UNIT: + print_vc_selector_unit_desc(_desc); + break; + case UVC_VC_DESC_SUBTYPE_PROCESSING_UNIT: + print_vc_processing_unit_desc(_desc); + break; + case UVC_VS_DESC_SUBTYPE_FORMAT_MJPEG: + if (interface_sub_class == UVC_SC_VIDEOCONTROL) { + printf("\t*** Extension Unit Descriptor unsupported, skipping... ***\n");; + return; + } + print_vs_format_mjpeg_desc(_desc); + break; + case UVC_VS_DESC_SUBTYPE_FRAME_MJPEG: + print_vs_frame_mjpeg_desc(_desc); + break; + case UVC_VS_DESC_SUBTYPE_FORMAT_FRAME_BASED: + print_vs_format_frame_based_desc(_desc); + break; + case UVC_VS_DESC_SUBTYPE_FRAME_FRAME_BASED: + print_vs_frame_frame_based_desc(_desc); + break; + case UVC_VS_DESC_SUBTYPE_COLORFORMAT: + print_vs_color_format_desc(_desc); + break; + case UVC_VC_DESC_SUBTYPE_OUTPUT_TERMINAL: // same as UVC_VS_DESC_SUBTYPE_STILL_FRAME + if (interface_sub_class == UVC_SC_VIDEOCONTROL) { + print_vc_output_terminal_desc(_desc); + } else { + print_vs_still_frame_desc(_desc); + } + break; + default: + unknown_desc(_desc); + break; + } +} + +/** + * @brief Print UVC specific descriptor in human readable form + * + * This is a callback function that is called from USB Host library, + * when it wants to print full configuration descriptor to stdout. + * + * @param[in] _desc UVC specific descriptor + */ +static void uvc_print_desc(const usb_standard_desc_t *_desc) +{ + switch (_desc->bDescriptorType) { + case UVC_CS_INTERFACE: + print_class_specific_desc(_desc); + break; + case UVC_CS_ENDPOINT: + print_cs_endpoint_desc(_desc); + break; + default: + unknown_desc(_desc); + break; + } +} + +void uvc_host_desc_print(uvc_host_stream_hdl_t stream_hdl) +{ + assert(stream_hdl); + uvc_stream_t *uvc_stream = (uvc_stream_t *)stream_hdl; + + const usb_device_desc_t *device_desc; + const usb_config_desc_t *config_desc; + ESP_ERROR_CHECK_WITHOUT_ABORT(usb_host_get_device_descriptor(uvc_stream->constant.dev_hdl, &device_desc)); + ESP_ERROR_CHECK_WITHOUT_ABORT(usb_host_get_active_config_descriptor(uvc_stream->constant.dev_hdl, &config_desc)); + usb_print_device_descriptor(device_desc); + usb_print_config_descriptor(config_desc, &uvc_print_desc); +} diff --git a/host/class/uvc/usb_host_uvc/uvc_frame.c b/host/class/uvc/usb_host_uvc/uvc_frame.c new file mode 100644 index 00000000..616f611f --- /dev/null +++ b/host/class/uvc/usb_host_uvc/uvc_frame.c @@ -0,0 +1,127 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include // For memcpy +#include + +#include "esp_check.h" +#include "esp_heap_caps.h" + +#include "usb/uvc_host.h" +#include "uvc_frame_priv.h" +#include "uvc_types_priv.h" +#include "uvc_check_priv.h" + +#include "freertos/FreeRTOS.h" +#include "freertos/queue.h" + +static const char *TAG = "uvc-frame"; + +esp_err_t uvc_host_frame_return(uvc_host_stream_hdl_t stream_hdl, uvc_host_frame_t *frame) +{ + UVC_CHECK(stream_hdl && frame, ESP_ERR_INVALID_ARG); + uvc_stream_t *uvc_stream = (uvc_stream_t *)stream_hdl; + uvc_frame_reset(frame); + BaseType_t result = xQueueSend(uvc_stream->constant.empty_fb_queue, &frame, 0); + UVC_CHECK(pdPASS == result, ESP_FAIL); + return ESP_OK; +} + +esp_err_t uvc_frame_allocate(uvc_stream_t *uvc_stream, int nb_of_fb, size_t fb_size, uint32_t fb_caps) +{ + UVC_CHECK(uvc_stream, ESP_ERR_INVALID_ARG); + esp_err_t ret; + + // We will be passing the frame buffers by reference + uvc_stream->constant.empty_fb_queue = xQueueCreate(nb_of_fb, sizeof(uvc_host_frame_t *)); + UVC_CHECK(uvc_stream->constant.empty_fb_queue, ESP_ERR_NO_MEM); + for (int i = 0; i < nb_of_fb; i++) { + // Allocate the frame buffer + uvc_host_frame_t *this_fb = malloc(sizeof(uvc_host_frame_t)); + if (fb_caps == 0) { + fb_caps = MALLOC_CAP_DEFAULT; // In case the user did not fill the config, set it to default + } + uint8_t *this_data = heap_caps_malloc(fb_size, fb_caps); + if (this_data == NULL || this_fb == NULL) { + free(this_fb); + free(this_data); + ret = ESP_ERR_NO_MEM; + ESP_LOGE(TAG, "Not enough memory for frame buffers %zu", fb_size); + goto err; + } + + // Set members to default + this_fb->data = this_data; + this_fb->data_buffer_len = fb_size; + this_fb->data_len = 0; + + // Add the frame to Queue of empty frames + const BaseType_t result = xQueueSend(uvc_stream->constant.empty_fb_queue, &this_fb, 0); + assert(pdPASS == result); + } + return ESP_OK; + +err: + uvc_frame_free(uvc_stream); + return ret; +} + +void uvc_frame_free(uvc_stream_t *uvc_stream) +{ + if (!uvc_stream || !uvc_stream->constant.empty_fb_queue) { + return; + } + + // Free all Frame Buffers and the Queue itself + uvc_host_frame_t *this_fb; + while (xQueueReceive(uvc_stream->constant.empty_fb_queue, &this_fb, 0) == pdPASS) { + free(this_fb->data); + free(this_fb); + } + vQueueDelete(uvc_stream->constant.empty_fb_queue); + uvc_stream->constant.empty_fb_queue = NULL; +} + +bool uvc_frame_are_all_returned(uvc_stream_t *uvc_stream) +{ + UVC_CHECK(uvc_stream, false); + UVC_CHECK(uvc_stream->constant.empty_fb_queue, false); + + // In case the user returns 'false' from uvc_host_frame_callback_t, he must return the frame buffers with uvc_host_frame_return() + // Here we check whether all allocated frame buffers are in the 'empty_fb_queue' + const UBaseType_t uxSpacesAvailable = uxQueueSpacesAvailable(uvc_stream->constant.empty_fb_queue); + return (uxSpacesAvailable == 0); +} + +uvc_host_frame_t *uvc_frame_get_empty(uvc_stream_t *uvc_stream) +{ + UVC_CHECK(uvc_stream, NULL); + uvc_host_frame_t *this_fb; + if (xQueueReceive(uvc_stream->constant.empty_fb_queue, &this_fb, 0) == pdPASS) { + return this_fb; + } else { + return NULL; + } +} + +esp_err_t uvc_frame_add_data(uvc_host_frame_t *frame, const uint8_t *data, size_t data_len) +{ + if (data_len == 0) { + return ESP_OK; // Fast return in case of zero data + } + UVC_CHECK(frame && data, ESP_ERR_INVALID_ARG); + UVC_CHECK(frame->data_len + data_len <= frame->data_buffer_len, ESP_ERR_INVALID_SIZE); + + memcpy(frame->data + frame->data_len, data, data_len); + frame->data_len += data_len; + return ESP_OK; +} + +void uvc_frame_reset(uvc_host_frame_t *frame) +{ + assert(frame); + frame->data_len = 0; +} diff --git a/host/class/uvc/usb_host_uvc/uvc_host.c b/host/class/uvc/usb_host_uvc/uvc_host.c new file mode 100644 index 00000000..9fc0852c --- /dev/null +++ b/host/class/uvc/usb_host_uvc/uvc_host.c @@ -0,0 +1,839 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include +#include +#include +#include + +#include "esp_log.h" +#include "esp_check.h" +#include "esp_system.h" + +#include "usb/usb_host.h" +#include "usb/uvc_host.h" +#include "uvc_control.h" +#include "uvc_stream.h" +#include "uvc_types_priv.h" +#include "uvc_frame_priv.h" +#include "uvc_descriptors_priv.h" +#include "uvc_check_priv.h" +#include "uvc_critical_priv.h" +#include "uvc_idf_version_priv.h" + +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "freertos/semphr.h" +#include "freertos/queue.h" +#include "freertos/event_groups.h" + +static const char *TAG = "uvc"; + +// UVC spinlock +portMUX_TYPE uvc_lock = portMUX_INITIALIZER_UNLOCKED; + +// UVC driver status +#define UVC_STARTED BIT0 // UVC driver events handling started +#define UVC_TEARDOWN BIT1 // UVC is being uninstalled +#define UVC_TEARDOWN_COMPLETE BIT2 // UVC uninstall finished + +// Transfer callbacks +static void ctrl_xfer_cb(usb_transfer_t *transfer); +void isoc_transfer_callback(usb_transfer_t *transfer); +void bulk_transfer_callback(usb_transfer_t *transfer); + +// UVC driver object +typedef struct { + usb_host_client_handle_t usb_client_hdl; /*!< USB Host handle reused for all UVC devices in the system */ + SemaphoreHandle_t open_close_mutex; /*!< Protects list of opened devices from concurrent access */ + EventGroupHandle_t driver_status; /*!< Holds status of the driver */ + usb_transfer_t *ctrl_transfer; /*!< CTRL (endpoint 0) transfer */ + SemaphoreHandle_t ctrl_mutex; /*!< CTRL mutex */ + SLIST_HEAD(list_dev, uvc_host_stream_s) uvc_stream_list; /*!< List of open streams */ +} uvc_host_driver_t; + +static uvc_host_driver_t *p_uvc_host_driver = NULL; + +/** + * @brief USB Host Client event callback + * + * Handling of USB device connection/disconnection to/from USB device tree. + * + * @param[in] event_msg Event message type + * @param[in] arg Caller's argument (not used in this driver) + */ +static void usb_event_cb(const usb_host_client_event_msg_t *event_msg, void *arg) +{ + switch (event_msg->event) { + case USB_HOST_CLIENT_EVENT_NEW_DEV: + ESP_LOGD(TAG, "New device connected"); + break; + case USB_HOST_CLIENT_EVENT_DEV_GONE: { + ESP_LOGD(TAG, "Device suddenly disconnected"); + // Find UVC pseudo-devices associated with this USB device and close them + uvc_stream_t *uvc_stream; + uvc_stream_t *tusb_stream; + // We are using 'SAFE' version of 'SLIST_FOREACH' which enables user to close the disconnected device in the callback + SLIST_FOREACH_SAFE(uvc_stream, &p_uvc_host_driver->uvc_stream_list, list_entry, tusb_stream) { + if (uvc_stream->constant.dev_hdl == event_msg->dev_gone.dev_hdl) { + // The suddenly disconnected device was opened by this driver: pause the stream and inform user about this + ESP_ERROR_CHECK(uvc_host_stream_pause(uvc_stream)); // This should never fail + if (uvc_stream->constant.stream_cb) { + const uvc_host_stream_event_data_t disconn_event = { + .type = UVC_HOST_DEVICE_DISCONNECTED, + .device_disconnected.stream_hdl = (uvc_host_stream_hdl_t) uvc_stream, + }; + uvc_stream->constant.stream_cb(&disconn_event, uvc_stream->constant.cb_arg); + } + } + } + break; + } + default: + assert(false); + break; + } +} + +esp_err_t uvc_host_handle_events(uint32_t timeout) +{ + static bool called = false; + uvc_host_driver_t *uvc_obj = UVC_ATOMIC_LOAD(p_uvc_host_driver); // Make local copy of the driver's handle + UVC_CHECK(uvc_obj, ESP_ERR_INVALID_STATE); + + // We use this static variable so we don't have to call FreeRTOS API in every handling call + if (!called) { + xEventGroupSetBits(uvc_obj->driver_status, UVC_STARTED); + called = true; + } + + ESP_LOGV(TAG, "USB UVC handling"); + esp_err_t ret = usb_host_client_handle_events(uvc_obj->usb_client_hdl, portMAX_DELAY); + EventBits_t events = xEventGroupGetBits(uvc_obj->driver_status); + if (events & UVC_TEARDOWN) { + xEventGroupSetBits(uvc_obj->driver_status, UVC_TEARDOWN_COMPLETE); + ret = ESP_FAIL; + } + return ret; +} + +/** + * @brief UVC driver handling task + * + * @param[in] arg User's argument. Handle of a task that started this task. + */ +static void uvc_client_task(void *arg) +{ + ulTaskNotifyTake(pdTRUE, portMAX_DELAY); + + ESP_LOGD(TAG, "USB UVC handling start"); + // Start handling client's events + while (uvc_host_handle_events(portMAX_DELAY) != ESP_FAIL) { + } + ESP_LOGD(TAG, "USB UVC handling stop"); + vTaskDelete(NULL); +} + +/** + * @brief Free USB transfers used by this device + * + * @note There can be no transfers in flight, at the moment of calling this function. + * @param[in] uvc_stream Pointer to UVC stream + */ +static void uvc_transfers_free(uvc_stream_t *uvc_stream) +{ + assert(uvc_stream); + for (unsigned i = 0; i < uvc_stream->constant.num_of_xfers; i++) { + usb_host_transfer_free(uvc_stream->constant.xfers[i]); + } + free(uvc_stream->constant.xfers); +} + +/** + * @brief Allocate UVC transfers + * + * This function can allocate more memory than the caller requested. + * The requested size is rounded up to integer multiple of MPS. + * + * @param[in] uvc_stream Pointer to UVC stream + * @param[in] num_of_transfers Number of USB transfers allocated for this stream + * @param[in] transfer_size Size of 1 USB transfer in bytes + * @param[in] ep_desc Descriptor of the streaming endpoint + * @return + * - ESP_OK: Success + * - ESP_ERR_NO_MEM: Not enough memory for transfers allocation + * - ESP_ERR_INVALID_ARG: Max packet size is invalid or ep_desc is NULL + */ +static esp_err_t uvc_transfers_allocate(uvc_stream_t *uvc_stream, unsigned num_of_transfers, size_t transfer_size, const usb_ep_desc_t *ep_desc) +{ + esp_err_t ret = ESP_OK; + UVC_CHECK(ep_desc, ESP_ERR_INVALID_ARG); + unsigned num_isoc_packets = 0; + const bool is_isoc = (USB_EP_DESC_GET_XFERTYPE(ep_desc) == USB_BM_ATTRIBUTES_XFER_ISOC); + uint16_t max_packet_size = USB_EP_DESC_GET_MPS(ep_desc); + UVC_CHECK(max_packet_size > 0, ESP_ERR_INVALID_ARG); + + if (is_isoc) { + // Multiply MPS by number of transactions in microframe: This is the minimum size we can request in IN transfer + max_packet_size *= (USB_EP_DESC_GET_MULT(ep_desc) + 1); + // Divide the transfer data buffer into ISOC packets + num_isoc_packets = usb_round_up_to_mps(transfer_size, max_packet_size) / max_packet_size; + } + + // Make sure that we allocate size integer multiple of MPS buffer: This is required for all IN transfers + transfer_size = usb_round_up_to_mps(transfer_size, max_packet_size); + + ESP_LOGD(TAG, "Allocating %d USB transfers. Each: %zu bytes, %d ISOC packets, %d MPS", + num_of_transfers, transfer_size, num_isoc_packets, max_packet_size); + + // Allocate array of transfers + uvc_stream->constant.xfers = malloc(num_of_transfers * sizeof(usb_transfer_t *)); + UVC_CHECK(uvc_stream->constant.xfers, ESP_ERR_NO_MEM); + + // Allocate and init all the transfers + for (unsigned i = 0; i < num_of_transfers; i++) { + ESP_GOTO_ON_ERROR( + usb_host_transfer_alloc(transfer_size, num_isoc_packets, &uvc_stream->constant.xfers[i]), + err, TAG, "Could not allocate USB transfers"); + + uvc_stream->constant.num_of_xfers++; + usb_transfer_t *this_transfer = uvc_stream->constant.xfers[i]; + this_transfer->device_handle = uvc_stream->constant.dev_hdl; + this_transfer->context = uvc_stream; + this_transfer->timeout_ms = 1000; + this_transfer->bEndpointAddress = ep_desc->bEndpointAddress; + + if (is_isoc) { + this_transfer->callback = isoc_transfer_callback; + this_transfer->num_bytes = num_isoc_packets * max_packet_size; + for (unsigned j = 0; j < num_isoc_packets; j++) { + this_transfer->isoc_packet_desc[j].num_bytes = max_packet_size; + } + } else { + this_transfer->callback = bulk_transfer_callback; + this_transfer->num_bytes = transfer_size; + } + } + return ESP_OK; + +err: + uvc_transfers_free(uvc_stream); + return ret; +} + +/** + * @brief Helper function that releases resources claimed by UVC device + * + * Close underlying USB device, free device driver memory + * + * @note All interfaces claimed by this device must be release before calling this function + * @param uvc_stream UVC stream handle to be removed + */ +static void uvc_device_remove(uvc_stream_t *uvc_stream) +{ + assert(uvc_stream); + uvc_transfers_free(uvc_stream); + uvc_frame_free(uvc_stream); + // We don't check the error code of usb_host_device_close, as the close might fail, if someone else is still using the device (not all interfaces are released) + usb_host_device_close(p_uvc_host_driver->usb_client_hdl, uvc_stream->constant.dev_hdl); // Gracefully continue on error + free(uvc_stream); +} + +/** + * @brief Open USB device with requested VID/PID + * + * This function has two regular return paths: + * 1. USB device with matching VID/PID is already opened by this driver: allocate new UVC device on top of the already opened USB device. + * 2. USB device with matching VID/PID is NOT opened by this driver yet: poll USB connected devices until it is found. + * + * @note This function will block for timeout_ticks, if the device is not enumerated at the moment of calling this function. + * @param[in] vid Vendor ID + * @param[in] pid Product ID + * @param[in] timeout_ticks Connection timeout in FreeRTOS ticks + * @param[out] dev UVC device + * @return + * - ESP_OK: Success - device opened + * - ESP_ERR_NOT_FOUND: Device not found in given timeout + */ +static esp_err_t uvc_find_and_open_usb_device(uint16_t vid, uint16_t pid, TickType_t timeout_ticks, uvc_stream_t **dev) +{ + assert(p_uvc_host_driver); + assert(dev); + + *dev = calloc(1, sizeof(uvc_stream_t)); + if (*dev == NULL) { + return ESP_ERR_NO_MEM; + } + + // First, check list of already opened UVC devices + ESP_LOGD(TAG, "Checking list of opened USB devices"); + uvc_stream_t *uvc_stream; + SLIST_FOREACH(uvc_stream, &p_uvc_host_driver->uvc_stream_list, list_entry) { + const usb_device_desc_t *device_desc; + ESP_ERROR_CHECK(usb_host_get_device_descriptor(uvc_stream->constant.dev_hdl, &device_desc)); + if ((vid == device_desc->idVendor || vid == UVC_HOST_ANY_VID) && + (pid == device_desc->idProduct || pid == UVC_HOST_ANY_PID)) { + // Return path 1: + (*dev)->constant.dev_hdl = uvc_stream->constant.dev_hdl; + return ESP_OK; + } + } + + // Second, poll connected devices until new device is connected or timeout + TickType_t timeout = timeout_ticks; + TimeOut_t connection_timeout; + vTaskSetTimeOutState(&connection_timeout); + + ESP_LOGD(TAG, "Checking list of connected USB devices"); + do { + uint8_t dev_addr_list[10]; + int num_of_devices; + ESP_ERROR_CHECK(usb_host_device_addr_list_fill(sizeof(dev_addr_list), dev_addr_list, &num_of_devices)); + + // Go through device address list and find the one we are looking for + for (int i = 0; i < num_of_devices; i++) { + usb_device_handle_t current_device; + // Open USB device + if (usb_host_device_open(p_uvc_host_driver->usb_client_hdl, dev_addr_list[i], ¤t_device) != ESP_OK) { + continue; // In case we failed to open this device, continue with next one in the list + } + assert(current_device); + const usb_device_desc_t *device_desc; + ESP_ERROR_CHECK(usb_host_get_device_descriptor(current_device, &device_desc)); + if ((vid == device_desc->idVendor || vid == UVC_HOST_ANY_VID) && + (pid == device_desc->idProduct || pid == UVC_HOST_ANY_PID)) { + // Return path 2: + (*dev)->constant.dev_hdl = current_device; + return ESP_OK; + } + usb_host_device_close(p_uvc_host_driver->usb_client_hdl, current_device); + } + vTaskDelay(pdMS_TO_TICKS(50)); + } while (xTaskCheckForTimeOut(&connection_timeout, &timeout) == pdFALSE); + + // Timeout was reached, clean-up + free(*dev); + *dev = NULL; + return ESP_ERR_NOT_FOUND; +} + +static esp_err_t uvc_find_streaming_intf(uvc_stream_t *uvc_stream, uint8_t uvc_index, const uvc_host_stream_format_t *vs_format) +{ + UVC_CHECK(uvc_stream && vs_format, ESP_ERR_INVALID_ARG); + + const usb_config_desc_t *cfg_desc; + ESP_ERROR_CHECK(usb_host_get_active_config_descriptor(uvc_stream->constant.dev_hdl, &cfg_desc)); + + // Find UVC USB function with desired index + uint16_t bcdUVC = 0; + uint8_t bInterfaceNumber = 0; + + ESP_RETURN_ON_ERROR( + uvc_desc_get_streaming_interface_num(cfg_desc, uvc_index, vs_format, &bcdUVC, &bInterfaceNumber), + TAG, "Could not find frame format %dx%d@%2.1fFPS", + vs_format->h_res, vs_format->v_res, vs_format->fps); + + // Here we only save the interface number that can meet our format requirement + // bAlternateSetting and bEndpointAddress are saved during interface claim + uvc_stream->constant.bInterfaceNumber = bInterfaceNumber; + uvc_stream->constant.bcdUVC = bcdUVC; + return ESP_OK; +} + +/** + * @brief Claim streaming interface + * + * @param[in] uvc_stream UVC stream handle + * @param[out] ep_desc_ret Pointer of associated streaming endpoint + * @return + * - ESP_OK: Success - interface claimed + * - Else: Error + */ +static esp_err_t uvc_claim_interface(uvc_stream_t *uvc_stream, const usb_ep_desc_t **ep_desc_ret) +{ + const usb_intf_desc_t *intf_desc; + const usb_ep_desc_t *ep_desc; + const usb_config_desc_t *cfg_desc; + ESP_ERROR_CHECK(usb_host_get_active_config_descriptor(uvc_stream->constant.dev_hdl, &cfg_desc)); + + ESP_RETURN_ON_ERROR( + uvc_desc_get_streaming_intf_and_ep(cfg_desc, uvc_stream->constant.bInterfaceNumber, MAX_MPS_IN, &intf_desc, &ep_desc), + TAG, "Could not find Streaming interface %d", uvc_stream->constant.bInterfaceNumber); + + // Save all required parameters + uvc_stream->constant.bAlternateSetting = intf_desc->bAlternateSetting; + uvc_stream->constant.bEndpointAddress = ep_desc->bEndpointAddress; + *ep_desc_ret = ep_desc; + + return usb_host_interface_claim(p_uvc_host_driver->usb_client_hdl, uvc_stream->constant.dev_hdl, intf_desc->bInterfaceNumber, intf_desc->bAlternateSetting); +} + +esp_err_t uvc_host_install(const uvc_host_driver_config_t *driver_config) +{ + UVC_CHECK(!UVC_ATOMIC_LOAD(p_uvc_host_driver), ESP_ERR_INVALID_STATE); + + // In case user did not provide driver_config, use default settings + const uvc_host_driver_config_t default_driver_config = { + .driver_task_stack_size = 5 * 1024, + .driver_task_priority = 5, + .xCoreID = tskNO_AFFINITY, + .create_background_task = true, + }; + if (driver_config == NULL) { + driver_config = &default_driver_config; + } + + // Allocate all we need for this driver + esp_err_t ret; + uvc_host_driver_t *uvc_obj = heap_caps_calloc(1, sizeof(uvc_host_driver_t), MALLOC_CAP_DEFAULT); + EventGroupHandle_t driver_status = xEventGroupCreate(); + SemaphoreHandle_t mutex = xSemaphoreCreateMutex(); + SemaphoreHandle_t ctrl_mutex = xSemaphoreCreateMutex(); + SemaphoreHandle_t ctrl_sem = xSemaphoreCreateBinary(); + usb_transfer_t *ctrl_xfer = NULL; + usb_host_transfer_alloc(64, 0, &ctrl_xfer); // Worst case HS MPS + TaskHandle_t driver_task_h = NULL; + + if (driver_config->create_background_task) { + xTaskCreatePinnedToCore( + uvc_client_task, "USB-UVC", driver_config->driver_task_stack_size, NULL, + driver_config->driver_task_priority, &driver_task_h, driver_config->xCoreID); + } + + if (uvc_obj == NULL || (driver_task_h == NULL && driver_config->create_background_task) || driver_status == NULL || + mutex == NULL || ctrl_mutex == NULL || ctrl_xfer == NULL || ctrl_sem == NULL) { + ret = ESP_ERR_NO_MEM; + goto err; + } + + // Register USB Host client + usb_host_client_handle_t usb_client = NULL; + const usb_host_client_config_t client_config = { + .is_synchronous = false, + .max_num_event_msg = 3, + .async.client_event_callback = usb_event_cb, + .async.callback_arg = NULL + }; + ESP_GOTO_ON_ERROR(usb_host_client_register(&client_config, &usb_client), err, TAG, "Failed to register USB host client"); + + // Initialize UVC driver structure + SLIST_INIT(&(uvc_obj->uvc_stream_list)); + uvc_obj->driver_status = driver_status; + uvc_obj->open_close_mutex = mutex; + uvc_obj->usb_client_hdl = usb_client; + uvc_obj->ctrl_mutex = ctrl_mutex; + uvc_obj->ctrl_transfer = ctrl_xfer; + uvc_obj->ctrl_transfer->context = ctrl_sem; + uvc_obj->ctrl_transfer->bEndpointAddress = 0; + uvc_obj->ctrl_transfer->timeout_ms = 5000; + uvc_obj->ctrl_transfer->callback = ctrl_xfer_cb; + + // Between 1st call of this function and following section, another task might try to install this driver: + // Make sure that there is only one instance of this driver in the system + if (!UVC_ATOMIC_SET_IF_NULL(p_uvc_host_driver, uvc_obj)) { + ret = ESP_ERR_INVALID_STATE; + goto client_err; + } + + // Everything OK: Start UVC-Driver task and return + if (driver_task_h) { + xTaskNotifyGive(driver_task_h); + } + return ESP_OK; + +client_err: + usb_host_client_deregister(usb_client); +err: // Clean-up + free(uvc_obj); + if (driver_status) { + vEventGroupDelete(driver_status); + } + if (driver_task_h) { + vTaskDelete(driver_task_h); + } + if (mutex) { + vSemaphoreDelete(mutex); + } + if (ctrl_mutex) { + vSemaphoreDelete(ctrl_mutex); + } + if (ctrl_xfer) { + usb_host_transfer_free(ctrl_xfer); + } + if (ctrl_sem) { + vSemaphoreDelete(ctrl_sem); + } + return ret; +} + +esp_err_t uvc_host_uninstall() +{ + esp_err_t ret; + uvc_host_driver_t *uvc_obj = UVC_ATOMIC_LOAD(p_uvc_host_driver); // Save Driver's handle to temporary handle + UVC_CHECK(uvc_obj, ESP_ERR_INVALID_STATE); + + xSemaphoreTake(uvc_obj->open_close_mutex, portMAX_DELAY); // Wait for all open/close calls to finish + xSemaphoreTake(uvc_obj->ctrl_mutex, portMAX_DELAY); // Wait for all CTRL transfers to finish + + UVC_ENTER_CRITICAL(); + if (SLIST_EMPTY(&uvc_obj->uvc_stream_list)) { // Check that device list is empty (all devices closed) + p_uvc_host_driver = NULL; // NULL static driver pointer: No open/close calls form this point + } else { + ret = ESP_ERR_INVALID_STATE; + UVC_EXIT_CRITICAL(); + goto unblock; + } + UVC_EXIT_CRITICAL(); + + // Signal to UVC task to stop, unblock it and wait for its deletion + xEventGroupSetBits(uvc_obj->driver_status, UVC_TEARDOWN); + EventBits_t driver_status = xEventGroupGetBits(uvc_obj->driver_status); + if (driver_status & UVC_STARTED) { + usb_host_client_unblock(uvc_obj->usb_client_hdl); + ESP_GOTO_ON_FALSE( + xEventGroupWaitBits(uvc_obj->driver_status, UVC_TEARDOWN_COMPLETE, pdFALSE, pdFALSE, pdMS_TO_TICKS(100)), + ESP_ERR_NOT_FINISHED, unblock, TAG,); + } + + ESP_LOGD(TAG, "Deregistering client"); + ESP_ERROR_CHECK(usb_host_client_deregister(uvc_obj->usb_client_hdl)); + + // Free remaining resources and return + vEventGroupDelete(uvc_obj->driver_status); + xSemaphoreGive(uvc_obj->open_close_mutex); + vSemaphoreDelete(uvc_obj->open_close_mutex); + xSemaphoreGive(uvc_obj->ctrl_mutex); + vSemaphoreDelete(uvc_obj->ctrl_mutex); + vSemaphoreDelete(uvc_obj->ctrl_transfer->context); + usb_host_transfer_free(uvc_obj->ctrl_transfer); + free(uvc_obj); + return ESP_OK; + +unblock: + xSemaphoreGive(uvc_obj->open_close_mutex); + xSemaphoreGive(uvc_obj->ctrl_mutex); + return ret; +} + +esp_err_t uvc_host_stream_open(const uvc_host_stream_config_t *stream_config, int timeout, uvc_host_stream_hdl_t *stream_hdl_ret) +{ + esp_err_t ret; + UVC_CHECK(UVC_ATOMIC_LOAD(p_uvc_host_driver), ESP_ERR_INVALID_STATE); + UVC_CHECK(stream_config, ESP_ERR_INVALID_ARG); + UVC_CHECK(stream_hdl_ret, ESP_ERR_INVALID_ARG); + + uvc_stream_t *uvc_stream; + xSemaphoreTake(p_uvc_host_driver->open_close_mutex, portMAX_DELAY); + + // Find underlying USB device + ret = uvc_find_and_open_usb_device(stream_config->usb.vid, stream_config->usb.pid, timeout, &uvc_stream); + if (ESP_OK != ret) { + goto not_found; + } + + // Find the streaming interface + ESP_GOTO_ON_ERROR( + uvc_find_streaming_intf(uvc_stream, stream_config->usb.uvc_stream_index, &stream_config->vs_format), + err, TAG, "Could not find streaming interface"); + + // Negotiate the frame format + uvc_vs_ctrl_t vs_result; + ESP_GOTO_ON_ERROR( + uvc_host_stream_control_negotiate(uvc_stream, &stream_config->vs_format, &vs_result), + err, TAG, "Failed to negotiate requested Video Stream format"); + + // Claim Video Streaming interface + const usb_ep_desc_t *ep_desc; + ESP_GOTO_ON_ERROR( + uvc_claim_interface(uvc_stream, &ep_desc), + claim_err, TAG, "Could not claim Streaming interface"); + ESP_LOGD(TAG, "Claimed interface index %d with MPS %d", uvc_stream->constant.bInterfaceNumber, USB_EP_DESC_GET_MPS(ep_desc)); + + // Allocate USB transfers + ESP_GOTO_ON_ERROR( + uvc_transfers_allocate(uvc_stream, stream_config->advanced.number_of_urbs, stream_config->advanced.urb_size, ep_desc), + err, TAG,); + + // Allocate Frame buffers + size_t frame_buffer_size; + if (stream_config->advanced.frame_size != 0) { + frame_buffer_size = stream_config->advanced.frame_size; // If user provided custom frame size, use it + } else { + frame_buffer_size = vs_result.dwMaxVideoFrameSize; // Use value from frame format negotiation + }; + + ESP_GOTO_ON_ERROR( + uvc_frame_allocate( + uvc_stream, + stream_config->advanced.number_of_frame_buffers, + frame_buffer_size, + stream_config->advanced.frame_heap_caps), + err, TAG,); + + // Save info + memcpy((uvc_host_stream_format_t *)&uvc_stream->constant.vs_format, &stream_config->vs_format, sizeof(uvc_host_stream_format_t)); + uvc_stream->constant.stream_cb = stream_config->event_cb; + uvc_stream->constant.frame_cb = stream_config->frame_cb; + uvc_stream->constant.cb_arg = stream_config->user_ctx; + + // Everything OK, add the device into list + UVC_ENTER_CRITICAL(); + SLIST_INSERT_HEAD(&p_uvc_host_driver->uvc_stream_list, uvc_stream, list_entry); + UVC_EXIT_CRITICAL(); + *stream_hdl_ret = (uvc_host_stream_hdl_t)uvc_stream; + xSemaphoreGive(p_uvc_host_driver->open_close_mutex); + return ESP_OK; + +err: + usb_host_interface_release(p_uvc_host_driver->usb_client_hdl, uvc_stream->constant.dev_hdl, uvc_stream->constant.bInterfaceNumber); +claim_err: + uvc_device_remove(uvc_stream); +not_found: + xSemaphoreGive(p_uvc_host_driver->open_close_mutex); + *stream_hdl_ret = NULL; + return ret; +} + +esp_err_t uvc_host_stream_close(uvc_host_stream_hdl_t stream_hdl) +{ + UVC_CHECK(UVC_ATOMIC_LOAD(p_uvc_host_driver), ESP_ERR_INVALID_STATE); + UVC_CHECK(stream_hdl, ESP_ERR_INVALID_ARG); + + esp_err_t ret = ESP_OK; + xSemaphoreTake(p_uvc_host_driver->open_close_mutex, portMAX_DELAY); + + // Make sure that the device is in the devices list (that it is not already closed) + uvc_stream_t *uvc_stream; + bool device_found = false; + UVC_ENTER_CRITICAL(); + SLIST_FOREACH(uvc_stream, &p_uvc_host_driver->uvc_stream_list, list_entry) { + if (uvc_stream == (uvc_stream_t *)stream_hdl) { + device_found = true; + break; + } + } + UVC_EXIT_CRITICAL(); + + // Device was not found in the uvc_stream_list; it was already closed, return OK + if (!device_found) { + ret = ESP_OK; + goto exit; + } + + if (UVC_ATOMIC_LOAD(uvc_stream->dynamic.streaming)) { + uvc_host_stream_stop(stream_hdl); + } + + // @todo create a function that will wait for all frames to be returned + if (!uvc_frame_are_all_returned(uvc_stream)) { + vTaskDelay(pdMS_TO_TICKS(70)); // Wait 70ms so the user can return all frames + if (!uvc_frame_are_all_returned(uvc_stream)) { + ESP_LOGW(TAG, "Not all frames are returned, cannot close!"); + ret = ESP_ERR_INVALID_STATE; + goto exit; + } + } + + // Release all interfaces + ESP_ERROR_CHECK(usb_host_interface_release(p_uvc_host_driver->usb_client_hdl, uvc_stream->constant.dev_hdl, uvc_stream->constant.bInterfaceNumber)); + + UVC_ENTER_CRITICAL(); + SLIST_REMOVE(&p_uvc_host_driver->uvc_stream_list, uvc_stream, uvc_host_stream_s, list_entry); + UVC_EXIT_CRITICAL(); + + uvc_device_remove(uvc_stream); + +exit: + xSemaphoreGive(p_uvc_host_driver->open_close_mutex); + return ret; +} + +static esp_err_t uvc_set_interface(uvc_host_stream_hdl_t stream_hdl, bool stream_on) +{ + uvc_stream_t *uvc_stream = (uvc_stream_t *)stream_hdl; + return uvc_host_usb_ctrl( + stream_hdl, + USB_BM_REQUEST_TYPE_DIR_OUT | USB_BM_REQUEST_TYPE_TYPE_STANDARD | USB_BM_REQUEST_TYPE_RECIP_INTERFACE, + USB_B_REQUEST_SET_INTERFACE, + stream_on ? uvc_stream->constant.bAlternateSetting : 0, + uvc_stream->constant.bInterfaceNumber, + 0, + NULL); +} + +static esp_err_t uvc_clear_endpoint_feature(uvc_host_stream_hdl_t stream_hdl) +{ + uvc_stream_t *uvc_stream = (uvc_stream_t *)stream_hdl; + usb_host_endpoint_halt(uvc_stream->constant.dev_hdl, uvc_stream->constant.bEndpointAddress); + usb_host_endpoint_flush(uvc_stream->constant.dev_hdl, uvc_stream->constant.bEndpointAddress); + usb_host_endpoint_clear(uvc_stream->constant.dev_hdl, uvc_stream->constant.bEndpointAddress); + return uvc_host_usb_ctrl( + stream_hdl, + USB_BM_REQUEST_TYPE_DIR_OUT | USB_BM_REQUEST_TYPE_TYPE_STANDARD | USB_BM_REQUEST_TYPE_RECIP_ENDPOINT, + USB_B_REQUEST_CLEAR_FEATURE, + 0, // 0 means HALT + uvc_stream->constant.bEndpointAddress, + 0, + NULL); +} + +esp_err_t uvc_host_stream_start(uvc_host_stream_hdl_t stream_hdl) +{ + UVC_CHECK(stream_hdl, ESP_ERR_INVALID_ARG); + UVC_CHECK(UVC_ATOMIC_LOAD(stream_hdl->dynamic.streaming) == false, ESP_ERR_INVALID_STATE); + + uvc_stream_t *uvc_stream = (uvc_stream_t *)stream_hdl; + + // 1. Negotiate the frame format + // @see USB UVC specification ver 1.5, figure 4-1 + ESP_RETURN_ON_ERROR( + uvc_host_stream_control_negotiate(uvc_stream, &uvc_stream->constant.vs_format, NULL), + TAG, "Failed to negotiate requested Video Stream format"); + vTaskDelay(pdMS_TO_TICKS(10)); // Some cameras need delay between format Commit and SetInterface + + // 2. Send command to the camera to start streaming: ISOC only + if (uvc_stream->constant.bAlternateSetting != 0) { + ESP_RETURN_ON_ERROR( + uvc_set_interface(stream_hdl, true), + TAG, "Could not Set Interface %d-%d", uvc_stream->constant.bInterfaceNumber, uvc_stream->constant.bAlternateSetting); + } + + // 3. Unpause: Submit all URBs + ESP_RETURN_ON_ERROR( + uvc_host_stream_unpause(stream_hdl), + TAG, "Could not unpause the stream"); + + return ESP_OK; +} + +esp_err_t uvc_host_stream_stop(uvc_host_stream_hdl_t stream_hdl) +{ + UVC_CHECK(stream_hdl, ESP_ERR_INVALID_ARG); + uvc_stream_t *uvc_stream = (uvc_stream_t *)stream_hdl; + + ESP_RETURN_ON_ERROR(uvc_host_stream_pause(stream_hdl), TAG, "Could not pause the stream"); + + //@todo this is not a clean solution + vTaskDelay(pdMS_TO_TICKS(50)); // Wait for all transfers to finish + + if (uvc_stream->constant.bAlternateSetting != 0) { // if (is_isoc_stream) + // ISOC streams are stopped by setting alternate interface 0 + return uvc_set_interface(stream_hdl, false); + } else { + // BULK streams are stopped by halting the endpoint + return uvc_clear_endpoint_feature(stream_hdl); + } +} + +esp_err_t uvc_host_stream_pause(uvc_host_stream_hdl_t stream_hdl) +{ + UVC_CHECK(stream_hdl, ESP_ERR_INVALID_ARG); + uvc_stream_t *uvc_stream = (uvc_stream_t *)stream_hdl; + + // We do not cancel the ongoing transfers here, it is not supported by USB Host Library + // By setting uvc_stream->dynamic.streaming = false; no frame callbacks will be called and the transfer can gracefully finish + UVC_ENTER_CRITICAL(); + UVC_CHECK_FROM_CRIT(uvc_stream->dynamic.streaming, ESP_OK); // Return immediately if already paused + uvc_stream->dynamic.streaming = false; + uvc_host_frame_t *current_frame = uvc_stream->dynamic.current_frame; + uvc_stream->dynamic.current_frame = NULL; + UVC_EXIT_CRITICAL(); + + if (current_frame) { + uvc_host_frame_return(uvc_stream, current_frame); + } + + return ESP_OK; +} + +esp_err_t uvc_host_stream_unpause(uvc_host_stream_hdl_t stream_hdl) +{ + UVC_CHECK(stream_hdl, ESP_ERR_INVALID_ARG); + uvc_stream_t *uvc_stream = (uvc_stream_t *)stream_hdl; + esp_err_t ret = ESP_OK; + + UVC_ENTER_CRITICAL(); + UVC_CHECK_FROM_CRIT(!uvc_stream->dynamic.streaming, ESP_ERR_INVALID_STATE); + uvc_stream->dynamic.streaming = true; + // Start of Frame is detected when received FrameID != current_frame_id + // We set current_frame_id to illegal value (FrameID can be 0 or 1) so we catch SoF of the very first frame + uvc_stream->single_thread.current_frame_id = 2; + uvc_stream->single_thread.next_bulk_packet = UVC_STREAM_BULK_PACKET_SOF; + UVC_EXIT_CRITICAL(); + + for (int i = 0; i < uvc_stream->constant.num_of_xfers; i++) { + ESP_GOTO_ON_ERROR( + usb_host_transfer_submit(uvc_stream->constant.xfers[i]), + stop_stream, TAG, "Could not submit transfer %d", i); + } + return ret; + +stop_stream: + uvc_host_stream_pause(stream_hdl); + return ret; +} + +static void ctrl_xfer_cb(usb_transfer_t *transfer) +{ + ESP_LOGD(TAG, "ctrl xfer cb"); + assert(transfer->context); + xSemaphoreGive((SemaphoreHandle_t)transfer->context); +} + +esp_err_t uvc_host_usb_ctrl(uvc_host_stream_hdl_t stream_hdl, uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, uint16_t wLength, uint8_t *data) +{ + UVC_CHECK(stream_hdl, ESP_ERR_INVALID_ARG); + uvc_stream_t *uvc_stream = (uvc_stream_t *)stream_hdl; + if (wLength > 0) { + UVC_CHECK(data, ESP_ERR_INVALID_ARG); + } + UVC_CHECK(p_uvc_host_driver->ctrl_transfer->data_buffer_size >= wLength, ESP_ERR_INVALID_SIZE); + + esp_err_t ret; + + // Take Mutex and fill the CTRL request + BaseType_t taken = xSemaphoreTake(p_uvc_host_driver->ctrl_mutex, pdMS_TO_TICKS(5000)); + if (!taken) { + return ESP_ERR_TIMEOUT; + } + usb_setup_packet_t *req = (usb_setup_packet_t *)(p_uvc_host_driver->ctrl_transfer->data_buffer); + uint8_t *start_of_data = (uint8_t *)req + sizeof(usb_setup_packet_t); + req->bmRequestType = bmRequestType; + req->bRequest = bRequest; + req->wValue = wValue; + req->wIndex = wIndex; + req->wLength = wLength; + + // Bind the transfer and the device + p_uvc_host_driver->ctrl_transfer->device_handle = uvc_stream->constant.dev_hdl; + p_uvc_host_driver->ctrl_transfer->num_bytes = wLength + sizeof(usb_setup_packet_t); + + // For IN transfers we must transfer data ownership to the driver + const bool in_transfer = bmRequestType & USB_BM_REQUEST_TYPE_DIR_IN; + if (!in_transfer) { + memcpy(start_of_data, data, wLength); + } + + ESP_GOTO_ON_ERROR( + usb_host_transfer_submit_control(p_uvc_host_driver->usb_client_hdl, p_uvc_host_driver->ctrl_transfer), + unblock, TAG, "CTRL transfer failed"); + + taken = xSemaphoreTake((SemaphoreHandle_t)p_uvc_host_driver->ctrl_transfer->context, pdMS_TO_TICKS(5000)); // This is a fixed timeout. Every device should be able to respond to CTRL transfer in 5 seconds + ESP_GOTO_ON_FALSE(taken, ESP_ERR_TIMEOUT, unblock, TAG, "CTRL timeout"); + ESP_GOTO_ON_FALSE(p_uvc_host_driver->ctrl_transfer->status == USB_TRANSFER_STATUS_COMPLETED, ESP_ERR_INVALID_RESPONSE, unblock, TAG, "Control transfer error"); + ESP_GOTO_ON_FALSE(p_uvc_host_driver->ctrl_transfer->actual_num_bytes == p_uvc_host_driver->ctrl_transfer->num_bytes, ESP_ERR_INVALID_RESPONSE, unblock, TAG, "Incorrect number of bytes transferred"); + + // For OUT transfers, we must transfer data ownership to user + if (in_transfer) { + memcpy(data, start_of_data, wLength); + } + ret = ESP_OK; + +unblock: + xSemaphoreGive(p_uvc_host_driver->ctrl_mutex); + return ret; +} diff --git a/host/class/uvc/usb_host_uvc/uvc_isoc.c b/host/class/uvc/usb_host_uvc/uvc_isoc.c new file mode 100644 index 00000000..78d9df16 --- /dev/null +++ b/host/class/uvc/usb_host_uvc/uvc_isoc.c @@ -0,0 +1,183 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include // For memcpy + +#include "esp_log.h" + +#include "uvc_stream.h" // For uvc_host_stream_pause() +#include "uvc_types_priv.h" +#include "uvc_check_priv.h" +#include "uvc_frame_priv.h" +#include "uvc_critical_priv.h" + +static const char *TAG = "uvc-isoc"; + +/** + * @brief Callback function for handling Isochronous USB transfers from a UVC camera. + * + * This function processes isochronous transfer packets, which may contain video frame data. The following key points + * are handled in the transfer: + * + * - **Start of Frame (SoF)**: Detected by a change in Frame ID, which toggles between 0 and 1. + * - **End of Frame (EoF)**: Signaled in the packet header. + * - **Transfer Characteristics**: + * - **No CRC**: Data corruption is possible. + * - **No ACK**: Packets can be missed. + * - **Packet Header**: Each packet includes a header used to detect errors, missed packets, and other issues. + * + * The callback performs the following tasks: + * 1. Checks the status of each isochronous packet and handles various USB transfer statuses (e.g., completed, + * error, device disconnected). + * 2. Parses packet headers to detect the start of new frames, handles errors, and manages frame buffers. + * 3. Aggregates valid data into a frame buffer, ensuring no buffer overflow occurs. + * 4. Signals the end of a frame and invokes user-defined callbacks if necessary. + * + * @param[in] transfer Pointer to the completed USB transfer structure. + */ +void isoc_transfer_callback(usb_transfer_t *transfer) +{ + ESP_LOGD(TAG, "%s", __FUNCTION__); + uvc_stream_t *uvc_stream = (uvc_stream_t *)transfer->context; + + // USB_TRANSFER_STATUS_NO_DEVICE is set in transfer->status. + // Other error codes are saved in status of each ISOC packet descriptor + if (transfer->status == USB_TRANSFER_STATUS_NO_DEVICE) { + ESP_ERROR_CHECK(uvc_host_stream_pause(uvc_stream)); // This should never fail + } + + if (!UVC_ATOMIC_LOAD(uvc_stream->dynamic.streaming)) { + return; // If the streaming was turned off, we don't have to do anything + } + + const uint8_t *payload = transfer->data_buffer; + for (int i = 0; i < transfer->num_isoc_packets; i++) { + usb_isoc_packet_desc_t *isoc_desc = &transfer->isoc_packet_desc[i]; + + // Check USB status + switch (isoc_desc->status) { + case USB_TRANSFER_STATUS_COMPLETED: + break; + case USB_TRANSFER_STATUS_NO_DEVICE: + case USB_TRANSFER_STATUS_CANCELED: + ESP_ERROR_CHECK(uvc_host_stream_pause(uvc_stream)); // This should never fail + return; // No need to process the rest + case USB_TRANSFER_STATUS_ERROR: + case USB_TRANSFER_STATUS_OVERFLOW: + case USB_TRANSFER_STATUS_STALL: + ESP_LOGW(TAG, "usb err %d", isoc_desc->status); + uvc_stream->single_thread.skip_current_frame = true; + goto next_isoc_packet; // Data corrupted + + case USB_TRANSFER_STATUS_TIMED_OUT: + case USB_TRANSFER_STATUS_SKIPPED: + goto next_isoc_packet; // Skipped and timed out ISOC transfers are not an issue + default: + assert(false); + } + + // Check for Zero Length Packet + if (isoc_desc->actual_num_bytes == 0) { + goto next_isoc_packet; + } + + // Check for start of new frame + const uvc_payload_header_t *payload_header = (const uvc_payload_header_t *)payload; + const bool start_of_frame = (uvc_stream->single_thread.current_frame_id != payload_header->bmHeaderInfo.frame_id); + if (start_of_frame) { + // We detected start of new frame. Update Frame ID and start fetching this frame + uvc_stream->single_thread.current_frame_id = payload_header->bmHeaderInfo.frame_id; + uvc_stream->single_thread.skip_current_frame = payload_header->bmHeaderInfo.error; + + // Get free frame buffer for this new frame + UVC_ENTER_CRITICAL(); + const bool need_new_frame = (uvc_stream->dynamic.streaming && !uvc_stream->dynamic.current_frame); + if (need_new_frame) { + UVC_EXIT_CRITICAL(); + uvc_stream->dynamic.current_frame = uvc_frame_get_empty(uvc_stream); + if (uvc_stream->dynamic.current_frame == NULL) { + // There is no free frame buffer now, skipping this frame + uvc_stream->single_thread.skip_current_frame = true; + + // Inform the user about the underflow + uvc_host_stream_callback_t stream_cb = uvc_stream->constant.stream_cb; + if (stream_cb) { + const uvc_host_stream_event_data_t event = { + .type = UVC_HOST_FRAME_BUFFER_UNDERFLOW, + }; + stream_cb(&event, uvc_stream->constant.cb_arg); + } + goto next_isoc_packet; + } + } else { + // We received SoF but current_frame is not NULL: We missed EoF - reset the frame buffer + uvc_frame_reset(uvc_stream->dynamic.current_frame); + UVC_EXIT_CRITICAL(); + } + } + + // Check for error flag + if (payload_header->bmHeaderInfo.error) { + uvc_stream->single_thread.skip_current_frame = true; + } + + // Add received data to frame buffer + if (!uvc_stream->single_thread.skip_current_frame) { + const uint8_t *payload_data = payload + payload_header->bHeaderLength; + const size_t payload_data_len = isoc_desc->actual_num_bytes - payload_header->bHeaderLength; + uvc_host_frame_t *current_frame = UVC_ATOMIC_LOAD(uvc_stream->dynamic.current_frame); + + esp_err_t ret = uvc_frame_add_data(current_frame, payload_data, payload_data_len); + if (ret != ESP_OK) { + // Frame buffer overflow, skip this frame + uvc_stream->single_thread.skip_current_frame = true; + + // Inform the user about the overflow + uvc_host_stream_callback_t stream_cb = uvc_stream->constant.stream_cb; + if (stream_cb) { + const uvc_host_stream_event_data_t event = { + .type = UVC_HOST_FRAME_BUFFER_OVERFLOW, + }; + stream_cb(&event, uvc_stream->constant.cb_arg); + } + goto next_isoc_packet; + } + } + + // End of Frame. Pass the frame to user + if (payload_header->bmHeaderInfo.end_of_frame) { + bool return_frame = true; // In case streaming is stopped ATM, we must return the frame + + // Check if the user did not stop the stream in the meantime + UVC_ENTER_CRITICAL(); + uvc_host_frame_t *this_frame = uvc_stream->dynamic.current_frame; + uvc_stream->dynamic.current_frame = NULL; // Stop writing more data to this frame + + // Determine if we should invoke the frame callback: + // Only invoke the callback if streaming is active, a frame callback exists, + // and we have a valid frame to pass to the user. + const bool invoke_fb_callback = (uvc_stream->dynamic.streaming && uvc_stream->constant.frame_cb && this_frame && !uvc_stream->single_thread.skip_current_frame); + UVC_EXIT_CRITICAL(); + + if (invoke_fb_callback) { + memcpy((uvc_host_stream_format_t *)&this_frame->vs_format, &uvc_stream->constant.vs_format, sizeof(uvc_host_stream_format_t)); + return_frame = uvc_stream->constant.frame_cb(this_frame, uvc_stream->constant.cb_arg); + } + if (return_frame) { + // The user has processed the frame in his callback, return it back to empty queue + uvc_host_frame_return(uvc_stream, this_frame); + } + } +next_isoc_packet: + payload += isoc_desc->num_bytes; + continue; + } + + if (UVC_ATOMIC_LOAD(uvc_stream->dynamic.streaming)) { + usb_host_transfer_submit(transfer); // Restart the transfer + } +}