Definition at line 87 of file codec_processor.cpp.
87 {
88 Serial.println(
"\n=== Processing GIF ===");
89
91 Serial.println(
"GIF decoding not supported on this platform");
92 return;
93 }
94
95
98
99
103
104
107
108 if (!decoder) {
109 Serial.print(
"Failed to create GIF decoder: ");
111 return;
112 }
113
114
116 stream->write(gifData);
117
118
119 if (!decoder->begin(stream)) {
120 fl::string error;
121 decoder->hasError(&error);
122 Serial.print(
"Failed to begin GIF decoding: ");
124 return;
125 }
126
127
129
131 fl::Frame frame = decoder->getCurrentFrame();
135 } else {
136 Serial.println(
"Invalid GIF frame received");
137 }
138 } else {
139 fl::string error;
140 decoder->hasError(&error);
141 Serial.print(
"GIF frame decode error: ");
143 }
144
145 decoder->end();
146}
static IDecoderPtr createDecoder(const GifConfig &config, fl::string *error_message=nullptr)
static bool isSupported()
const char * c_str() const FL_NOEXCEPT
const size_t sampleGifDataLength
const uint8_t sampleGifData[]
void displayFrameOnLEDs(const fl::Frame &frame)
void showDecodedMessage(const char *format)
void * memcopy(void *dest, const void *src, size_t n) FL_NOEXCEPT
shared_ptr< T > make_shared(Args &&... args) FL_NOEXCEPT
expected< T, E > result
Alias for expected (Rust-style naming)
References fl::basic_string::c_str(), fl::Gif::createDecoder(), fl::vector< T >::data(), displayFrameOnLEDs(), fl::GifConfig::format, fl::Gif::isSupported(), fl::Frame::isValid(), fl::make_shared(), fl::memcopy(), fl::GifConfig::mode, fl::RGB888, CodecData::sampleGifData, CodecData::sampleGifDataLength, Serial, showDecodedMessage(), fl::GifConfig::SingleFrame, fl::vector_basic::size(), and fl::Success.
Referenced by loop().