Definition at line 148 of file codec_processor.cpp.
148 {
149 Serial.println(
"\n=== Processing MPEG1 ===");
150
152 Serial.println(
"MPEG1 decoding not supported on this platform");
153 return;
154 }
155
156
159
160
166
167
170
171 if (!decoder) {
172 Serial.print(
"Failed to create MPEG1 decoder: ");
174 return;
175 }
176
177
179 stream->write(mpegData);
180
181
182 if (!decoder->begin(stream)) {
183 fl::string error;
184 decoder->hasError(&error);
185 Serial.print(
"Failed to begin MPEG1 decoding: ");
187 return;
188 }
189
190
192
194 fl::Frame frame = decoder->getCurrentFrame();
198 } else {
199 Serial.println(
"Invalid MPEG1 frame received");
200 }
201 } else {
202 fl::string error;
203 decoder->hasError(&error);
204 Serial.print(
"MPEG1 frame decode error: ");
206 }
207
208 decoder->end();
209}
static bool isSupported()
static IDecoderPtr createDecoder(const Mpeg1Config &config, fl::string *error_message=nullptr)
const char * c_str() const FL_NOEXCEPT
const uint8_t sampleMpeg1Data[]
const size_t sampleMpeg1DataLength
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)
third_party::Mpeg1Config Mpeg1Config
References fl::basic_string::c_str(), fl::Mpeg1::createDecoder(), fl::vector< T >::data(), displayFrameOnLEDs(), fl::Mpeg1::isSupported(), fl::Frame::isValid(), fl::third_party::Mpeg1Config::looping, fl::make_shared(), fl::memcopy(), fl::third_party::Mpeg1Config::mode, CodecData::sampleMpeg1Data, CodecData::sampleMpeg1DataLength, Serial, showDecodedMessage(), fl::third_party::Mpeg1Config::SingleFrame, fl::vector_basic::size(), fl::third_party::Mpeg1Config::skipAudio, fl::Success, TARGET_FPS, and fl::third_party::Mpeg1Config::targetFps.
Referenced by loop().