4#include "H264Decoder.h"
5#include "H264Encoder.h"
48template <
typename Alloc = H264_DEFAULT_ALLOCATOR>
53 config_.output_format = ESP_H264_RAW_FMT_RGB565_LE;
54 config_.frame_callback = [
this](
const uint8_t *frame, uint32_t w,
55 uint32_t h, esp_h264_raw_format_t fmt) {
57 size_t bytes = (size_t)(w * h * ESP_H264_GET_BPP_BY_PIC_TYPE(fmt));
84 config_.output_format = ESP_H264_RAW_FMT_RGB565_LE;
87 config_.output_format = ESP_H264_RAW_FMT_I420;
90 LOGW(
"H264DecoderESP32S3: unsupported VideoFormat %d", (
int)format);
104 uint32_t w = 0, h = 0;
105 if (
decoder_.getFrameDimensions(w, h)) {
106 info.
width = (uint16_t)w;
107 info.
height = (uint16_t)h;
131 size_t write(
const uint8_t *data,
size_t len)
override {
150 typename esp_h264::H264Decoder<Alloc>::Config
config_;
183template <
typename Alloc = H264_DEFAULT_ALLOCATOR>
198 size_t write(
const uint8_t *data,
size_t len)
override {
244 LOGW(
"H264EncoderESP32S3: unsupported VideoFormat %d", (
int)format);
303 size_t write(
const uint8_t *data,
size_t len)
override {
329 typename esp_h264::H264Encoder<Alloc>::Config
config_;
#define LOGW(...)
Definition AudioLoggerIDF.h:29
virtual size_t write(const uint8_t *data, size_t len)
Definition Arduino.h:120
VideoFormat
Video codec/pixel-format identifier, shared by two unrelated uses: the (single) video stream of a con...
Definition Video.h:43