| 38 | using namespace reader; |
| 39 | |
| 40 | void 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 | |
| 59 | void HVCCNalArray::parse(unsigned arrayID, |
| 60 | SubByteReaderLogging &reader, |
no test coverage detected