ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
esphome::runtime_image::DecodeSource Class Referenceabstract

Input that a decoder reads itself as it goes, so the whole image never has to be in memory at once. More...

#include <image_decoder.h>

Inheritance diagram for esphome::runtime_image::DecodeSource:
esphome::online_image::DownloadSource

Public Member Functions

virtual ~DecodeSource ()=default
 
virtual int32_t read (uint8_t *buf, uint32_t len)=0
 Read up to len bytes at the current position.
 
virtual bool seek (uint32_t position)=0
 Move to a position counted from the start. Returns false on error.
 

Detailed Description

Input that a decoder reads itself as it goes, so the whole image never has to be in memory at once.

Definition at line 59 of file image_decoder.h.

Constructor & Destructor Documentation

◆ ~DecodeSource()

virtual esphome::runtime_image::DecodeSource::~DecodeSource ( )
virtualdefault

Member Function Documentation

◆ read()

virtual int32_t esphome::runtime_image::DecodeSource::read ( uint8_t * buf,
uint32_t len )
pure virtual

Read up to len bytes at the current position.

Returns the number read, which is less than len, even 0, when no more has arrived yet or at the end of the input, or negative on error.

Implemented in esphome::online_image::DownloadSource.

◆ seek()

virtual bool esphome::runtime_image::DecodeSource::seek ( uint32_t position)
pure virtual

Move to a position counted from the start. Returns false on error.

Implemented in esphome::online_image::DownloadSource.


The documentation for this class was generated from the following file: