MCPcopy Create free account
hub / github.com/IENT/YUView / parse

Method parse

YUViewLib/src/parser/AVFormat/HVCC.cpp:40–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38using namespace reader;
39
40void HVCCNalUnit::parse(unsigned unitID,
41 SubByteReaderLogging &reader,
42 ParserAnnexBHEVC * hevcParser,
43 BitratePlotModel * bitrateModel)
44{
45 SubByteReaderLoggingSubLevel subLevel(reader, "nal unit " + std::to_string(unitID));
46
47 this->nalUnitLength = reader.readBits("nalUnitLength", 16);
48
49 // Get the bytes of the raw nal unit to pass to the "real" hevc parser
50 auto nalData = reader.readBytes("", nalUnitLength, Options().withLoggingDisabled());
51
52 // Let the hevc annexB parser parse this
53 auto parseResult =
54 hevcParser->parseAndAddNALUnit(unitID, nalData, {}, {}, reader.getCurrentItemTree());
55 if (parseResult.success && bitrateModel != nullptr && parseResult.bitrateEntry)
56 bitrateModel->addBitratePoint(0, *parseResult.bitrateEntry);
57}
58
59void HVCCNalArray::parse(unsigned arrayID,
60 SubByteReaderLogging &reader,

Callers 1

parseExtradata_hevcMethod · 0.45

Calls 9

OptionsClass · 0.85
getCurrentItemTreeMethod · 0.80
addBitratePointMethod · 0.80
readFlagMethod · 0.80
to_stringFunction · 0.50
readBitsMethod · 0.45
readBytesMethod · 0.45
parseAndAddNALUnitMethod · 0.45

Tested by

no test coverage detected