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

Method parseExtradata_hevc

YUViewLib/src/parser/AVFormat/ParserAVFormat.cpp:189–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189bool ParserAVFormat::parseExtradata_hevc(ByteVector &extradata)
190{
191 if (extradata.empty() || !packetModel->rootItem)
192 return true;
193
194 if (extradata.at(0) == 1)
195 {
196 auto hevcParser = dynamic_cast<ParserAnnexBHEVC *>(this->annexBParser.get());
197 if (!hevcParser)
198 return false;
199
200 try
201 {
202 avformat::HVCC hvcc;
203 hvcc.parse(extradata, packetModel->rootItem, hevcParser, this->bitratePlotModel.data());
204 }
205 catch (...)
206 {
207 DEBUG_AVFORMAT("ParserAVFormat::parseExtradata_hevc Error parsing HEVC Extradata");
208 return false;
209 }
210 }
211 else if (extradata.at(0) == 0)
212 {
213 auto item = packetModel->rootItem->createChildItem("Extradata (Raw HEVC NAL units)");
214 this->parseByteVectorAnnexBStartCodes(extradata, PacketDataFormat::RawNAL, {}, item);
215 }
216 else
217 {
218 packetModel->rootItem->createChildItem(
219 "Unsupported extradata format (configurationVersion != 1)"s, {}, {}, {}, {}, true);
220 return false;
221 }
222
223 return true;
224}
225
226bool ParserAVFormat::parseExtradata_mpeg2(ByteVector &extradata)
227{

Callers 1

parseExtradataMethod · 0.95

Calls 5

createChildItemMethod · 0.80
atMethod · 0.45
parseMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected