|
TinyUVC 0.1.0
Header-only USB Video Class (UVC) device: turn an MCU into a USB webcam
|
A growing byte buffer for one frame, allocated with UVCMemory (so in PSRAM where available). It grows in steps while a frame is written and keeps its memory when it is cleared, so after the first frames no more allocations happen. More...
#include <UVCMemory.h>
Public Member Functions | |
| UVCFrameBuffer ()=default | |
| UVCFrameBuffer (const UVCFrameBuffer &)=delete | |
| UVCFrameBuffer & | operator= (const UVCFrameBuffer &)=delete |
| ~UVCFrameBuffer () | |
| void | setMemoryType (UVCMemoryType type) |
| UVCMemoryType | memoryType () const |
| bool | reserve (size_t size) |
| Makes sure that size bytes fit without a new allocation. | |
| bool | append (const uint8_t *data, size_t len) |
| Appends data; false if no memory is left (the buffer is unchanged) | |
| void | clear () |
| void | release () |
| Frees the memory. | |
| uint8_t * | data () |
| const uint8_t * | data () const |
| size_t | size () const |
| size_t | capacity () const |
| bool | empty () const |
Protected Attributes | |
| uint8_t * | data_ = nullptr |
| size_t | size_ = 0 |
| size_t | capacity_ = 0 |
| UVCMemoryType | type_ = UVCMemoryType::Auto |
A growing byte buffer for one frame, allocated with UVCMemory (so in PSRAM where available). It grows in steps while a frame is written and keeps its memory when it is cleared, so after the first frames no more allocations happen.
|
default |
|
delete |
|
inline |
Appends data; false if no memory is left (the buffer is unchanged)
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
delete |
|
inline |
Frees the memory.
Makes sure that size bytes fit without a new allocation.
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |