15#define DBG FASTLED_DBG
17using fl::FileHandlePtr;
18using fl::ByteStreamPtr;
36 mImpl->setFade(fadeInTime, fadeOutTime);
53 FASTLED_WARN(
"Video::begin: mImpl is null, manually constructed videos must include full parameters.");
57 mError =
"FileHandle is null";
72 mError =
"FileHandle is null";
81 mImpl->beginStream(bs);
110 return mImpl->durationMicros();
121 return mImpl->draw(now, frame);
141 return mImpl->timeScale();
152 return mImpl->pixelsPerFrame();
166 return mImpl->rewind();
171 if (!mFx->hasFixedFrameRate(&mFps)) {
172 FASTLED_WARN(
"VideoFxWrapper: Fx does not have a fixed frame rate, assuming 30fps.");
175 mVideo = VideoImplPtr::New(mFx->getNumLeds(), mFps, 2);
176 mByteStream = ByteStreamMemoryPtr::New(mFx->getNumLeds() *
sizeof(
CRGB));
177 mVideo->beginStream(mByteStream);
184 Str out =
"video_fx_wrapper: ";
201 mVideo->setFade(fadeInTime, fadeOutTime);
Str & append(const char *str)
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.
#define FASTLED_SMART_PTR(type)
Implements the FastLED namespace macros.
Implements a simple red square effect for 2D LED grids.
Representation of an RGB pixel (Red, Green, Blue)