MCPcopy Create free account
hub / github.com/FastLED/FastLED / VideoFxWrapper

Method VideoFxWrapper

src/fl/fx/video.cpp.hpp:149–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149VideoFxWrapper::VideoFxWrapper(fl::shared_ptr<Fx> fx) : Fx1d(fx->getNumLeds()), mFx(fx) {
150 if (!mFx->hasFixedFrameRate(&mFps)) {
151 FL_WARN("VideoFxWrapper: Fx does not have a fixed frame rate, "
152 "assuming 30fps.");
153 mFps = 30.0f;
154 }
155 mVideo = fl::make_shared<VideoImpl>(mFx->getNumLeds(), mFps, 2);
156 mByteStream = fl::make_shared<memorybuf>(mFx->getNumLeds() * sizeof(CRGB));
157 mVideo->begin(mByteStream);
158}
159
160VideoFxWrapper::~VideoFxWrapper() FL_NOEXCEPT = default;
161

Callers

nothing calls this directly

Calls 3

getNumLedsMethod · 0.80
hasFixedFrameRateMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected