FastLED 3.9.15
Loading...
Searching...
No Matches

◆ FASTLED_SMART_PTR() [31/52]

fl::FASTLED_SMART_PTR ( PixelStream )

Definition at line 20 of file video_impl.h.

22 {
23 public:
24 enum {
25 kSizeRGB8 = 3,
26 };
27 // frameHistoryCount is the number of frames to keep in the buffer after
28 // draw. This allows for time based effects like syncing video speed to
29 // audio triggers.
30 VideoImpl(size_t pixelsPerFrame, float fpsVideo,
31 size_t frameHistoryCount = 0);
32 ~VideoImpl();
33 // Api
34 void begin(fl::FileHandlePtr h);
35 void beginStream(fl::ByteStreamPtr s);
36 void setFade(fl::u32 fadeInTime, fl::u32 fadeOutTime);
37 bool draw(fl::u32 now, CRGB *leds);
38 void end();
39 bool rewind();
40 // internal use
41 bool draw(fl::u32 now, Frame *frame);
42 bool full() const;
43 void setTimeScale(float timeScale);
44 float timeScale() const { return mTimeScale; }
45 size_t pixelsPerFrame() const { return mPixelsPerFrame; }
46 void pause(fl::u32 now);
47 void resume(fl::u32 now);
48 bool needsFrame(fl::u32 now) const;
49 int32_t durationMicros() const; // -1 if this is a stream.
50
51 private:
52 bool updateBufferIfNecessary(fl::u32 prev, fl::u32 now);
53 bool updateBufferFromFile(fl::u32 now, bool forward);
54 bool updateBufferFromStream(fl::u32 now);
55 fl::u32 mPixelsPerFrame = 0;
56 PixelStreamPtr mStream;
57 fl::u32 mPrevNow = 0;
58 FrameInterpolatorPtr mFrameInterpolator;
59 TimeWarpPtr mTime;
60 fl::u32 mFadeInTime = 1000;
61 fl::u32 mFadeOutTime = 1000;
62 float mTimeScale = 1.0f;
63};
CRGB leds[NUM_LEDS]
TimeWarp timeScale(0, 1.0f)
void draw(float pos)
Definition curr.h:538
constexpr T * begin(T(&array)[N]) noexcept
Definition range_access.h:9
constexpr T * end(T(&array)[N]) noexcept
constexpr T && forward(typename remove_reference< T >::type &t) noexcept
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:86

References begin(), draw(), end(), forward(), leds, and timeScale().

+ Here is the call graph for this function: