MPEG-1 (part 2) video decoder wrapper around TinyMPGDecoder.
More...
#include <CodecMPG.h>
|
| void | writeFrame (tinympg::TinyMPGDecoder< tinympg::PSRAMAllocatorESP32< uint8_t > > &decoder) |
| |
| size_t | writeToOutput (uint8_t *data, size_t len) |
| |
|
| static void | onFrame (tinympg::TinyMPGDecoder< tinympg::PSRAMAllocatorESP32< uint8_t > > &decoder, void *userData) |
| |
MPEG-1 (part 2) video decoder wrapper around TinyMPGDecoder.
The class mirrors the usage style of CodecH264.h: feed MPEG-1 bitstream data via write(), and receive decoded frames on the configured output.
Note: Requires TinyMPG (TinyMPGDecoder.h) to be installed and reachable by the compiler include path: https://github.com/pschatzmann/TinyMPG
◆ MPGDecoder() [1/3]
◆ MPGDecoder() [2/3]
◆ MPGDecoder() [3/3]
◆ begin()
Initializes the decoder (allocates its picture buffers, etc).
Implements VideoDecoder.
◆ driver()
| tinympg::TinyMPGDecoder< tinympg::PSRAMAllocatorESP32< uint8_t > > & driver |
( |
| ) |
|
|
inline |
◆ end()
◆ flush()
Finalizes the frame most recently written via one or more write() calls - see class comment. Default no-op for implementations that display/decode synchronously in write() instead.
Reimplemented from VideoOutput.
◆ hasError()
◆ onFrame()
| static void onFrame |
( |
tinympg::TinyMPGDecoder< tinympg::PSRAMAllocatorESP32< uint8_t > > & |
decoder, |
|
|
void * |
userData |
|
) |
| |
|
inlinestaticprotected |
◆ setOutput() [1/2]
| void setOutput |
( |
Print & |
out | ) |
|
|
inlineoverridevirtual |
Defines the target each decoded picture is written to.
Implements VideoDecoder.
◆ setOutput() [2/2]
◆ setVideoFormat()
Selects the pixel format written to setOutput()'s target - e.g. VideoFormat::RGB565 (the common TFT wire format), RGB666/RGB888 for higher color depth displays, or I420 to pass the decoded planes through unconverted. Not every decoder backend supports every value (e.g. RGB666/RGB888 are TinyH264-only, not available on the esp_h264 backend) - unsupported values are logged and ignored (the previously selected format stays in effect); see the concrete class for exactly which ones it supports. Call before begin().
Implements VideoDecoder.
◆ videoInfo()
Reports the format/dimensions of the picture written to setOutput()'s target - VideoInfo::format is always the format most recently selected via setVideoFormat() (RGB565 if never called), the reliable way to determine it (rather than assuming); width/ height reflect the most recently decoded picture, 0 before any picture has been decoded.
Implements VideoDecoder.
◆ write()
| size_t write |
( |
const uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
inlineoverridevirtual |
◆ writeFrame()
| void writeFrame |
( |
tinympg::TinyMPGDecoder< tinympg::PSRAMAllocatorESP32< uint8_t > > & |
decoder | ) |
|
|
inlineprotected |
◆ writeToOutput()
| size_t writeToOutput |
( |
uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
inlineprotected |
◆ decoder_
| tinympg::TinyMPGDecoder< tinympg::PSRAMAllocatorESP32<uint8_t> > decoder_ |
|
protected |
◆ frame_buffer
◆ p_out
◆ p_out_video
◆ pixel_format
The documentation for this class was generated from the following file: