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

◆ parseH264Info()

H264Info fl::H264::parseH264Info ( fl::span< const fl::u8 > mp4Data,
fl::string * error_message = nullptr )
static

Definition at line 196 of file h264.cpp.hpp.

196 {
197 H264Info info;
198
199 Mp4TrackInfo track = parseMp4(mp4Data, error_message);
200 if (!track.isValid) return info;
201
202 // Use dimensions from avc1 box
203 info.width = track.width;
204 info.height = track.height;
205 info.profile = track.profile;
206 info.level = track.level;
207
208 // Parse SPS for more detailed info if available
209 if (!track.sps.empty()) {
210 fl::string spsError;
211 H264Info spsInfo = parseSPS(track.sps[0], &spsError);
212 if (spsInfo.isValid) {
213 // SPS-parsed dimensions are more authoritative
214 info.width = spsInfo.width;
215 info.height = spsInfo.height;
216 info.profile = spsInfo.profile;
217 info.level = spsInfo.level;
218 info.numRefFrames = spsInfo.numRefFrames;
219 }
220 }
221
222 info.isValid = true;
223 return info;
224}
static H264Info parseSPS(fl::span< const fl::u8 > spsData, fl::string *error_message=nullptr)
Definition h264.cpp.hpp:85
Mp4TrackInfo parseMp4(fl::span< const fl::u8 > data, fl::string *error)

References fl::vector_basic::empty(), fl::H264Info::height, fl::Mp4TrackInfo::height, fl::H264Info::isValid, fl::Mp4TrackInfo::isValid, fl::H264Info::level, fl::Mp4TrackInfo::level, fl::H264Info::numRefFrames, fl::parseMp4(), parseSPS(), fl::H264Info::profile, fl::Mp4TrackInfo::profile, fl::Mp4TrackInfo::sps, fl::H264Info::width, and fl::Mp4TrackInfo::width.

Referenced by AutoResearchRemoteControl::registerFunctions().

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