| 257 | } |
| 258 | |
| 259 | void 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 | |
| 289 | void BitstreamAnalysisWidget::hideEvent(QHideEvent *event) |
| 290 | { |
no test coverage detected