|
TinyGPU
|
Writes a simple AVI movie containing RGB565 frames. More...
#include <AVIWriter.h>
Public Member Functions | |
| AVIWriter (Print &out) | |
| Creates an AVI writer that streams data to the provided Print output. | |
| ~AVIWriter () | |
| Finalizes the AVI stream if it is still open. | |
| bool | begin (const ISurface< RGB_T > &surface, uint16_t fps=30, uint32_t frameCount=0) |
| void | end () |
| Finalizes the AVI stream and writes the optional frame index. | |
| bool | add (const ISurface< RGB_T > &surface) |
| Appends one RGB565 frame to the AVI stream. | |
Protected Member Functions | |
| void | resetState () |
| Resets the writer state after finishing or aborting a stream. | |
| void | writeHeader () |
| Writes the RIFF, AVI, stream, and movi headers. | |
| void | writeFrame (const ISurface< RGB_T > &surface) |
| Writes one surface as a bottom-up padded RGB565 AVI frame. | |
| void | writeIndex () |
| Writes the idx1 frame index when a frame count was provided. | |
| void | writeFourCC (const char *value) |
| Writes a four-character AVI chunk identifier. | |
| void | writeU8 (uint8_t value) |
| Writes a single byte to the output stream. | |
| void | writeU16 (uint16_t value) |
| Writes a 16-bit little-endian value to the output stream. | |
| void | writeU32 (uint32_t value) |
| Writes a 32-bit little-endian value to the output stream. | |
| void | writeBytes (const uint8_t *data, size_t length) |
| Writes a raw byte sequence to the output stream. | |
Static Protected Member Functions | |
| static uint32_t | frameRowStride (uint32_t width) |
| Returns the padded byte stride of one RGB565 frame row. | |
| static uint32_t | paddedChunkSize (uint32_t dataSize) |
| Returns the data size rounded up to an even AVI chunk length. | |
Protected Attributes | |
| Print & | out_ |
| uint32_t | width_ = 0 |
| uint32_t | height_ = 0 |
| uint16_t | fps_ = 30 |
| uint32_t | rowStride_ = 0 |
| uint32_t | frameSize_ = 0 |
| uint32_t | expectedFrameCount_ = 0 |
| uint32_t | frameCount_ = 0 |
| bool | isOpen_ = false |
Writes a simple AVI movie containing RGB565 frames.
The implementation writes frames directly to the output stream as they are added. When the expected frame count is provided in begin(), the AVI headers and optional idx1 index can be precomputed without buffering the frame data. Frames are encoded as uncompressed 16-bit BI_BITFIELDS video using RGB565 channel masks.
|
inline |
Creates an AVI writer that streams data to the provided Print output.
|
inline |
Finalizes the AVI stream if it is still open.
|
inline |
Starts a new AVI stream using the surface dimensions and optional frame count.
|
inline |
Finalizes the AVI stream and writes the optional frame index.
|
inlinestaticprotected |
Returns the padded byte stride of one RGB565 frame row.
|
inlinestaticprotected |
Returns the data size rounded up to an even AVI chunk length.
|
inlineprotected |
Resets the writer state after finishing or aborting a stream.
|
inlineprotected |
Writes a raw byte sequence to the output stream.
|
inlineprotected |
Writes a four-character AVI chunk identifier.
|
inlineprotected |
Writes one surface as a bottom-up padded RGB565 AVI frame.
|
inlineprotected |
Writes the RIFF, AVI, stream, and movi headers.
|
inlineprotected |
Writes the idx1 frame index when a frame count was provided.
|
inlineprotected |
Writes a 16-bit little-endian value to the output stream.
|
inlineprotected |
Writes a 32-bit little-endian value to the output stream.
|
inlineprotected |
Writes a single byte to the output stream.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |