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

Method testConversionSpeed

YUViewLib/src/video/VideoCache.cpp:1459–1495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1457}
1458
1459void VideoCache::testConversionSpeed()
1460{
1461 // Get the item that we will use.
1462 auto selection = playlist->getSelectedItems();
1463 if (selection[0] == nullptr)
1464 {
1465 QMessageBox::information(parentWidget,
1466 "Test error",
1467 "Please select an item from the playlist to perform the test on.");
1468 return;
1469 }
1470 testItem = selection.at(0);
1471
1472 // Stop playback if running
1473 if (playback->playing())
1474 playback->on_stopButton_clicked();
1475
1476 assert(parentWidget != nullptr);
1477 assert(testProgressDialog.isNull());
1478 testProgressDialog =
1479 new QProgressDialog("Running conversion test...", "Cancel", 0, 1000, parentWidget);
1480 testProgressDialog->setWindowModality(Qt::WindowModal);
1481
1482 testLoopCount = 1000;
1483 testMode = true;
1484 testProgrssUpdateTimer.start(200);
1485
1486 if (workersState == workersIdle)
1487 {
1488 // Start caching (in test mode)
1489 testDuration.start();
1490 startCaching();
1491 }
1492 else
1493 // Request a restart (in test mode)
1494 workersState = workersIntReqRestart;
1495}
1496
1497QStringList VideoCache::getCacheStatusText()
1498{

Callers 1

performanceTestMethod · 0.80

Calls 4

getSelectedItemsMethod · 0.80
playingMethod · 0.80
on_stopButton_clickedMethod · 0.80
atMethod · 0.45

Tested by

no test coverage detected