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

Method addFrameToList

YUViewLib/src/parser/ParserAnnexB.cpp:61–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61bool ParserAnnexB::addFrameToList(int poc,
62 std::optional<pairUint64> fileStartEndPos,
63 bool randomAccessPoint)
64{
65 for (const auto &f : this->frameListCodingOrder)
66 if (f.poc == poc)
67 return false;
68
69 if (!this->pocOfFirstRandomAccessFrame && randomAccessPoint)
70 this->pocOfFirstRandomAccessFrame = poc;
71 if (poc >= this->pocOfFirstRandomAccessFrame.value())
72 {
73 // We don't add frames which we can not decode because they are before the first RA (I) frame
74 AnnexBFrame newFrame;
75 newFrame.poc = poc;
76 newFrame.fileStartEndPos = fileStartEndPos;
77 newFrame.randomAccessPoint = randomAccessPoint;
78 this->frameListCodingOrder.push_back(newFrame);
79 this->frameListDisplayOder.clear();
80 }
81 return true;
82}
83
84void ParserAnnexB::logNALSize(const ByteVector & data,
85 std::shared_ptr<TreeItem> root,

Callers 3

handleNewAUMethod · 0.80
parseAndAddNALUnitMethod · 0.80
parseAndAddNALUnitMethod · 0.80

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected