Definition at line 40 of file pixel_stream.cpp.hpp.
40 {
43 return false;
44 }
57
60
61
62
66 const bool hasFledMagic = got >= 4
67 &&
static_cast<fl::u8>(hdr[0]) == kFledMagic[0]
69 &&
static_cast<fl::u8>(hdr[2]) == kFledMagic[2]
71 if (hasFledMagic) {
73 &&
static_cast<fl::u8>(hdr[4]) == kFledVersionV1
74 &&
static_cast<fl::u8>(hdr[6]) == 0
75 &&
static_cast<fl::u8>(hdr[7]) == 0
77 if (!supportedFled) {
79 return false;
80 }
82 const fl::u32 jsonLen =
83 static_cast<fl::u32
>(
static_cast<fl::u8>(hdr[8]))
84 | (
static_cast<fl::u32
>(
static_cast<fl::u8>(hdr[9])) << 8)
85 | (
static_cast<fl::u32
>(
static_cast<fl::u8>(hdr[10])) << 16)
86 | (
static_cast<fl::u32
>(
static_cast<fl::u8>(hdr[11])) << 24);
87
88
89
90
95 if (jsonInRange) {
99 : 0;
100 if (jr == jsonLenSz) {
107 return false;
108 }
113 bytesPerLed) {
115 return false;
116 }
121 return false;
122 }
123 fl::json envelope;
126 }
129 if (!validEnvelope) {
131 return false;
132 }
133 const bool colorOk =
138 if (!colorOk) {
139 fled::PixelStorage storage;
144 return false;
145 }
146 FL_WARN(
"FLED video.color rejected; using explicit best-effort RGB8 playback");
147 }
148
150 }
152 }
153
154
156 return false;
157 }
158
160 }
162 }
163
164
168 return false;
169 }
170 return true;
171}
bool is_object() const FL_NO_EXCEPT
bool has_value() const FL_NO_EXCEPT
static json parse(const fl::string &txt) FL_NO_EXCEPT
const fl::i32 mBaseBytesPerFrame
bool probeStreamingMagic() const FL_NO_EXCEPT
fl::size_t mPayloadOffset
bool pixelStorage(fled::PixelStorage *out) const FL_NO_EXCEPT
bool mStreamingProbePending
fl::size_t mStreamingPrefixPos
void close() FL_NO_EXCEPT
fl::size_t mStreamingPrefixSize
fled::VideoColor mVideoColor
fl::string mEmbeddedScreenMapJson
fl::u8 bytesPerLed(fl::u8 pixelFormat) FL_NO_EXCEPT
ColorStatus resolveVideoColor(const fl::json &envelope, fl::u8 pixelFormat, VideoColor *out) FL_NO_EXCEPT
constexpr fl::u8 kFledMagic[4]
constexpr fl::size_t kFledMaxJsonBytes
constexpr fl::size_t kFledHeaderBytes
static constexpr T max() FL_NO_EXCEPT
References fl::beg, fl::fled::bytesPerLed(), close(), fl::FL_NO_EXCEPT, FL_WARN, fl::json::has_value(), fl::json::is_object(), kFile, kStreaming, fl::numeric_limits< T >::max(), mBaseBytesPerFrame, mBestEffortFled, mbytesPerFrame, mEmbeddedScreenMapJson, mFledBytesPerLed, mFledPixelFormat, fl::fled::PixelStorage::mFormat, mHandle, mHasFledContainer, mHasVideoColor, mPayloadOffset, mStreamingPrefixPos, mStreamingPrefixSize, mStreamingProbePending, mStreamingRejected, mType, mVideoColor, fl::fled::Ok, fl::json::parse(), pixelStorage(), probeStreamingMagic(), fl::fled::resolveVideoColor(), and fl::Rgb8.