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

◆ Frame() [2/3]

fl::Frame::Frame ( fl::u8 * pixels,
fl::u16 width,
fl::u16 height,
PixelFormat format,
fl::u32 timestamp = 0 )

Definition at line 21 of file frame.cpp.hpp.

22 : mPixelsCount(static_cast<size_t>(width) * height), mRgb(),
24
25 mRgb.resize(mPixelsCount);
26
27 if (pixels && width > 0 && height > 0) {
29 } else if (mPixelsCount > 0) {
30 fl::memset((u8*)mRgb.data(), 0, mPixelsCount * sizeof(CRGB));
31 }
32}
PixelFormat mFormat
Definition frame.h:70
fl::u16 mHeight
Definition frame.h:69
fl::vector_psram< CRGB > mRgb
Definition frame.h:65
void convertPixelsToRgb(fl::u8 *pixels, PixelFormat format)
bool mIsFromCodec
Definition frame.h:72
const size_t mPixelsCount
Definition frame.h:64
fl::u32 mTimestamp
Definition frame.h:71
fl::u16 mWidth
Definition frame.h:68
unsigned char u8
Definition stdint.h:131
fl::CRGB CRGB
Definition video.h:15
u8 u8 height
Definition blur.h:186
void * memset(void *s, int c, size_t n) FL_NOEXCEPT
u8 width
Definition blur.h:186
fl::string format(const char *fmt)
Format with no arguments.
Definition format.h:439

References convertPixelsToRgb(), fl::format(), fl::height, fl::memset(), mFormat, mHeight, mIsFromCodec, mPixelsCount, mRgb, mTimestamp, mWidth, and fl::width.

+ Here is the call graph for this function: