MPEG-1 part 2 video encoder wrapper around TinyMPGEncoder.
More...
#include <CodecMPG.h>
MPEG-1 part 2 video encoder wrapper around TinyMPGEncoder.
This mirrors the API shape of H264Encoder in CodecH264.h.
Note: Requires TinyMPG (TinyMPGEncoder.h) to be installed and reachable by the compiler include path: https://github.com/pschatzmann/TinyMPG
◆ MPGEncoder() [1/3]
◆ MPGEncoder() [2/3]
◆ MPGEncoder() [3/3]
◆ begin()
Initializes the encoder (allocates its picture buffers, etc).
Implements VideoEncoder.
◆ driver()
| tinympg::TinyMPGEncoder< tinympg::PSRAMAllocatorESP32< uint8_t > > & driver |
( |
| ) |
|
|
inline |
◆ end()
◆ ensureBitstreamBuffer()
| bool ensureBitstreamBuffer |
( |
| ) |
|
|
inlineprotected |
◆ setBitstreamBufferSize()
| void setBitstreamBufferSize |
( |
size_t |
bytes | ) |
|
|
inline |
◆ setFrameRate()
| void setFrameRate |
( |
int |
fps | ) |
|
|
inline |
◆ setOutput() [1/2]
| void setOutput |
( |
Print & |
out | ) |
|
|
inlineoverridevirtual |
Defines the target the encoded bitstream is written to.
Implements VideoEncoder.
◆ setOutput() [2/2]
◆ setQp()
◆ setSize()
| void setSize |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
|
inline |
◆ setVideoFormat()
Selects the raw picture format write() expects - e.g. VideoFormat::I420 (planar Y/U/V, concatenated in one buffer), YUV422 (packed YUYV), RGB565/RGB666/RGB888 (packed). Not every encoder backend supports every value - 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 the first write().
Implements VideoEncoder.
◆ videoInfo()
◆ write()
| size_t write |
( |
const uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
inlineoverridevirtual |
Encodes one raw picture (in setVideoFormat()'s format, sized for the encoder's configured width/height) and writes the result to setOutput()'s target, returning the number of bytes written (0 if nothing was, e.g. setOutput()/size wasn't configured, or the format is unsupported).
Implements VideoEncoder.
◆ writeOut()
template<typename Fn >
| size_t writeOut |
( |
Fn |
encodeInto | ) |
|
|
inlineprotected |
◆ bitstream_buffer
| Vector<uint8_t> bitstream_buffer |
|
protected |
◆ encoder_
| tinympg::TinyMPGEncoder< tinympg::PSRAMAllocatorESP32<uint8_t> > encoder_ |
|
protected |
◆ height_
◆ input_format
◆ kMaxGrowRetries
| constexpr int kMaxGrowRetries = 4 |
|
staticconstexprprotected |
◆ p_out
◆ p_out_video
◆ width_
The documentation for this class was generated from the following file: