TinyUVC 0.1.0
Header-only USB Video Class (UVC) device: turn an MCU into a USB webcam
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
tinyuvc::UVCVideoCopy Class Reference

Streams the frames of an audio-tools VideoFrameSource (e.g. CameraFrameSourceTinyCamera) to a UVCDevice. More...

#include <AudioTools.h>

Collaboration diagram for tinyuvc::UVCVideoCopy:
Collaboration graph
[legend]

Public Member Functions

 UVCVideoCopy (UVCDevice &uvc, audio_tools::VideoFrameSource &source)
 
bool begin (uint32_t maxJpegSize=0)
 
void setPixelFormat (PixelFormat format)
 Pixel format of the source frames (set by begin())
 
bool copy ()
 

Protected Attributes

UVCDevice & uvc_
 
audio_tools::VideoFrameSource & source_
 
PixelFormat format_ = PixelFormat::MJPEG
 
uint32_t lastUs_ = 0
 
bool sent_ = false
 

Detailed Description

Streams the frames of an audio-tools VideoFrameSource (e.g. CameraFrameSourceTinyCamera) to a UVCDevice.

void setup() {
copier.begin(); // offers the source's resolution, starts uvc
}
void loop() { copier.copy(); }
USB Video Class (UVC 1.1) device - a USB webcam.
Definition UVCDevice.h:95
TinyGPU DisplayDriver that sends the written surfaces as webcam frames to the USB host: uncompressed ...
Definition TinyGPU.h:110
bool begin() override
Starts the UVC device (if it is not running yet)
Definition TinyGPU.h:159
Streams the frames of an audio-tools VideoFrameSource (e.g. CameraFrameSourceTinyCamera) to a UVCDevi...
Definition AudioTools.h:224

Constructor & Destructor Documentation

◆ UVCVideoCopy()

tinyuvc::UVCVideoCopy::UVCVideoCopy ( UVCDevice &  uvc,
audio_tools::VideoFrameSource &  source 
)
inline

Member Function Documentation

◆ begin()

bool tinyuvc::UVCVideoCopy::begin ( uint32_t  maxJpegSize = 0)
inline

Offers the resolution of the source (if the device is not started yet) and starts the device

◆ copy()

bool tinyuvc::UVCVideoCopy::copy ( )
inline

Sends the next frame of the source when the device is ready and the frame interval selected by the host has passed. Returns true if a frame was sent.

◆ setPixelFormat()

void tinyuvc::UVCVideoCopy::setPixelFormat ( PixelFormat  format)
inline

Pixel format of the source frames (set by begin())

Member Data Documentation

◆ format_

PixelFormat tinyuvc::UVCVideoCopy::format_ = PixelFormat::MJPEG
protected

◆ lastUs_

uint32_t tinyuvc::UVCVideoCopy::lastUs_ = 0
protected

◆ sent_

bool tinyuvc::UVCVideoCopy::sent_ = false
protected

◆ source_

audio_tools::VideoFrameSource& tinyuvc::UVCVideoCopy::source_
protected

◆ uvc_

UVCDevice& tinyuvc::UVCVideoCopy::uvc_
protected

The documentation for this class was generated from the following file: