5#if defined(USE_ESP32) && defined(USE_SENDSPIN_ARTWORK)
13#include <sendspin/artwork_role.h>
46 void set_frame(
const uint8_t *data,
int width,
int height) {
109 void setup()
override;
Mutex implementation, with API based on the unavailable std::mutex.
const uint8_t * data_start_
Image(const uint8_t *data_start, int width, int height, ImageType type, Transparency transparency)
lv_image_dsc_t * get_lv_image_dsc()
void draw(int x, int y, display::Display *display, Color color_on, Color color_off) override
A dynamic image that can be loaded and decoded at runtime.
RuntimeImage(ImageFormat format, image::ImageType type, image::Transparency transparency, image::Image *placeholder=nullptr, bool is_big_endian=false, int fixed_width=0, int fixed_height=0)
Construct a new RuntimeImage object.
Decode-only RuntimeImage that decodes into a buffer owned by SendspinImageSlot.
bool decoded_into(const uint8_t *buffer) const
True when the decode ended with the given buffer still in place.
A non-owning image::Image view over a buffer owned by SendspinImageSlot.
void set_frame(const uint8_t *data, int width, int height)
void set_showing_artwork(bool showing_artwork)
Records whether the frame on show is real artwork rather than the black it starts as.
void set_placeholder(image::Image *placeholder)
void draw(int x, int y, display::Display *display, Color color_on, Color color_off) override
image::Image * placeholder_
Base class for all sendspin subcomponents.
A single artwork slot: owns the frame buffers and publishes them to its image views.
LazyCallbackManager< void()> image_error_callback_
void on_display_(uint32_t lateness_ms)
void add_on_image_display_callback(F &&callback)
ArtworkDecodeSink decode_sink_
void transition_finished()
Signals that the display transition for the last frame has finished.
void add_on_image_clear_callback(F &&callback)
ArtworkImageView * current_image_
void on_decode_(const uint8_t *data, size_t length)
void apply_frames_(bool transition_is_artwork)
void add_on_image_error_callback(F &&callback)
void finish_transition_()
void dump_config() override
LazyCallbackManager< void()> image_clear_callback_
bool decode_frame_(const uint8_t *data, size_t length, const uint8_t *target)
ArtworkImageView * transition_image_
void set_transition_image(ArtworkImageView *transition_image)
Sets the optional view a transition draws the outgoing artwork from.
SendspinImageSlot(uint8_t slot, ArtworkImageView *current_image, int width, int height, runtime_image::ImageFormat format, image::ImageType type, image::Transparency transparency, bool is_big_endian)
LazyCallbackManager< void(uint32_t)> image_display_callback_
std::array< uint8_t *, 2 > buffers_
ImageFormat
Image format types that can be decoded dynamically.
const char int const __FlashStringHelper * format