14#define DBG FASTLED_DBG
16using fl::ByteStreamPtr;
17using fl::FileHandlePtr;
35 mImpl->setFade(fadeInTime, fadeOutTime);
48 FASTLED_WARN(
"Video::begin: mImpl is null, manually constructed videos "
49 "must include full parameters.");
53 mError =
"FileHandle is null";
68 mError =
"FileHandle is null";
77 mImpl->beginStream(bs);
106 return mImpl->durationMicros();
115 return mImpl->draw(now, frame);
135 return mImpl->timeScale();
144 return mImpl->pixelsPerFrame();
158 return mImpl->rewind();
162 if (!mFx->hasFixedFrameRate(&mFps)) {
163 FASTLED_WARN(
"VideoFxWrapper: Fx does not have a fixed frame rate, "
167 mVideo = VideoImplPtr::New(mFx->getNumLeds(), mFps, 2);
168 mByteStream = ByteStreamMemoryPtr::New(mFx->getNumLeds() *
sizeof(
CRGB));
169 mVideo->beginStream(mByteStream);
175 Str out =
"video_fx_wrapper: ";
194 mVideo->setFade(fadeInTime, fadeOutTime);
Str & append(const T &val)
const char * c_str() const
void pause(uint32_t now) override
void draw(DrawContext context) override
void setFade(uint32_t fadeInTime, uint32_t fadeOutTime)
bool begin(fl::FileHandlePtr h)
Str fxName() const override
size_t pixelsPerFrame() const
bool beginStream(fl::ByteStreamPtr s)
void setTimeScale(float timeScale)
Video & operator=(const Video &)
void resume(uint32_t now) override
int32_t durationMicros() const
Str fxName() const override
ByteStreamMemoryPtr mByteStream
void draw(DrawContext context) override
~VideoFxWrapper() override
void setFade(uint32_t fadeInTime, uint32_t fadeOutTime)
Defines the red, green, and blue (RGB) pixel struct.
Implements the FastLED namespace macros.
Implements a simple red square effect for 2D LED grids.
#define FASTLED_SMART_PTR(type)
Representation of an RGB pixel (Red, Green, Blue)