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

Method createAndConnectNewParser

YUViewLib/src/ui/widgets/BitstreamAnalysisWidget.cpp:259–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

257}
258
259void BitstreamAnalysisWidget::createAndConnectNewParser(InputFormat inputFormat)
260{
261 Q_ASSERT_X(
262 !this->parser, Q_FUNC_INFO, "Error reinitlaizing parser. The current parser is not null.");
263 if (inputFormat == InputFormat::AnnexBHEVC)
264 this->parser.reset(new parser::ParserAnnexBHEVC(this));
265 if (inputFormat == InputFormat::AnnexBVVC)
266 this->parser.reset(new parser::ParserAnnexBVVC(this));
267 else if (inputFormat == InputFormat::AnnexBAVC)
268 this->parser.reset(new parser::ParserAnnexBAVC(this));
269 else if (inputFormat == InputFormat::Libav)
270 this->parser.reset(new parser::ParserAVFormat(this));
271 this->parser->enableModel();
272 const bool parsingLimitSet = !this->ui.parseEntireFileCheckBox->isChecked();
273 this->parser->setParsingLimitEnabled(parsingLimitSet);
274
275 this->connect(this->parser.data(),
276 &parser::Parser::modelDataUpdated,
277 this,
278 &BitstreamAnalysisWidget::updateParserItemModel);
279 this->connect(this->parser.data(),
280 &parser::Parser::streamInfoUpdated,
281 this,
282 &BitstreamAnalysisWidget::updateStreamInfo);
283 this->connect(this->parser.data(),
284 &parser::Parser::backgroundParsingDone,
285 this,
286 &BitstreamAnalysisWidget::backgroundParsingDone);
287}
288
289void BitstreamAnalysisWidget::hideEvent(QHideEvent *event)
290{

Callers 1

Calls 3

enableModelMethod · 0.80
dataMethod · 0.45

Tested by

no test coverage detected