FastLED 3.10.8
Loading...
Searching...
No Matches

◆ findBox()

fl::size fl::anonymous_namespace{mp4_parser.cpp.hpp}::findBox ( fl::span< const fl::u8 > data,
fl::size start,
fl::size end,
const char * type )

Definition at line 33 of file mp4_parser.cpp.hpp.

33 {
34 fl::size pos = start;
35 while (pos + 8 <= end) {
36 bool ok = true;
37 fl::u32 boxSize = readU32BE(data, pos, ok);
38 if (!ok || boxSize < 8) break;
39 if (boxIs(data, pos + 4, type)) return pos;
40 pos += boxSize;
41 }
42 return fl::size(-1); // not found
43}
uint8_t pos
Definition Blur.ino:11
constexpr T * end(T(&array)[N]) FL_NO_EXCEPT
fl::u32 readU32BE(fl::span< const fl::u8 > data, fl::size offset, bool &ok) FL_NO_EXCEPT
bool boxIs(fl::span< const fl::u8 > data, fl::size offset, const char *type) FL_NO_EXCEPT

References boxIs(), fl::adl_barrier::end(), findBox(), fl::FL_NO_EXCEPT, pos, and readU32BE().

Referenced by findBox().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: