TinyUVC 0.1.0
Header-only USB Video Class (UVC) device: turn an MCU into a USB webcam
Loading...
Searching...
No Matches
Classes | Namespaces
UVCHostSimulator.h File Reference

Desktop only: plays the USB host (and the TinyUSB core) for a UVCDevice, so the complete device side - descriptors, class driver, probe/commit and payload streaming - can be run and tested on a PC. More...

#include <functional>
#include <string>
#include <vector>
#include "../UVCDevice.h"
#include "TinyUSBSim.h"
Include dependency graph for UVCHostSimulator.h:

Go to the source code of this file.

Classes

class  tinyuvc::UVCHostSimulator
 Desktop only: a simulated USB host (modeled on Linux' uvcvideo) that enumerates, negotiates and streams from a UVCDevice. More...
 
struct  tinyuvc::UVCHostSimulator::Frame
 A frame received from the device. More...
 
struct  tinyuvc::UVCHostSimulator::HostFrame
 Frame descriptor as parsed by the host. More...
 
struct  tinyuvc::UVCHostSimulator::HostFormat
 Format descriptor as parsed by the host. More...
 

Namespaces

namespace  tinyuvc
 TinyUVC: USB Video Class (UVC) device for Arduino and the desktop.
 

Detailed Description

Desktop only: plays the USB host (and the TinyUSB core) for a UVCDevice, so the complete device side - descriptors, class driver, probe/commit and payload streaming - can be run and tested on a PC.

The host side follows the Linux uvcvideo driver: the bulk endpoint is read with URBs of at most 32 packets, a payload ends with a short packet (or zero length packet) or when dwMaxPayloadTransferSize bytes were received, frames are delimited by the FID/EOF header bits, payloads that are out of sync are dropped and uncompressed frames of the wrong size are flagged as errors.