FastLED 3.9.15
|
Files | |
frame_interpolator.cpp | |
frame_interpolator.h | |
frame_tracker.cpp | |
frame_tracker.h | |
pixel_stream.cpp | |
pixel_stream.h | |
video_impl.cpp | |
video_impl.h | |
This folder implements a simple video playback pipeline for LED arrays. It reads frames from a file or stream, buffers them, and interpolates between them to produce smooth animation at your desired output rate.
PixelStream
(pixel_stream.h
): Reads pixel data as bytes from either a file (FileHandle
) or a live ByteStream
. Knows the bytesPerFrame
, can read by pixel, by frame, or at an absolute frame number. Reports availability and end-of-stream.FrameTracker
(frame_tracker.h
): Converts wall‑clock time to frame numbers (current and next) at a fixed FPS. Also exposes exact timestamps and frame interval in microseconds.FrameInterpolator
(frame_interpolator.h
): Holds a small history of frames and, given the current time, blends the nearest two frames to produce an in‑between result. Supports non‑monotonic time (e.g., pause/rewind, audio sync).VideoImpl
(video_impl.h
): High‑level orchestrator. Owns a PixelStream
and a FrameInterpolator
, manages fade‑in/out, time scaling, pause/resume, and draws into either a Frame
or your CRGB*
buffer.VideoImpl
with your pixelsPerFrame
and the source FPS.begin(...)
with a FileHandle
or ByteStream
.video.draw(now, leds)
.setFade(...)
, pause(...)
, resume(...)
, and setTimeScale(...)
as needed.end()
or rewind()
to manage lifecycle.rewind
) may be limited.durationMicros()
reports the full duration for file sources, and -1
for streams.This subsystem is optional, intended for MCUs with adequate RAM and I/O throughput.
examples/FxGfx2Video/FxGfx2Video.ino
): examples/FxSdCard/FxSdCard.ino
):