Drain GPU outputs independently of capture and verify lossless recovery
This commit is contained in:
1 parent
0bc2715a30
commit
5f772fa97f
4 files changed
+31
-16
No files matched your search
@@ -51,14 +51,16 @@ int main(int argc, char** argv) {
|
||||
if (!encoder.encode(image, 1000000 + i * 33333ll, i == 0, output, completion) || output.size() != 1) return 3;
|
||||
frames.push_back(output.front());
|
||||
}
|
||||
CallVideoEngine engine; std::vector<int64_t> published;
|
||||
QObject::connect(&engine, &CallVideoEngine::imageChanged, [&](const QImage& frame) {
|
||||
CallVideoEngine engine; engine.setPresentationDriven(true); std::vector<int64_t> published;
|
||||
QObject::connect(&engine, &CallVideoEngine::imageChanged, [&](const QImage& frame, quint64 serial) {
|
||||
if (!frame.isNull()) published.push_back(nowUs());
|
||||
// Подтверждение потребления отдельно от доставки signal, как paintEvent окна.
|
||||
QTimer::singleShot(5, &engine, [&engine, serial] { engine.imagePresented(serial); });
|
||||
});
|
||||
for (int scenario = 0; scenario < 2; ++scenario) {
|
||||
disturbed = scenario != 0; cursor = 0; published.clear();
|
||||
start = nowUs(); engine.start(7); QElapsedTimer timer; timer.start(); bool uiPaused = false;
|
||||
while (timer.elapsed() < 3200) {
|
||||
while (timer.elapsed() < 4000) {
|
||||
if (disturbed && !uiPaused && timer.elapsed() >= 1500) { QThread::msleep(60); uiPaused = true; }
|
||||
app.processEvents(); QThread::msleep(2);
|
||||
}
|
||||
@@ -71,7 +73,7 @@ int main(int argc, char** argv) {
|
||||
"gap_p50_us=%lld gap_p95_us=%lld gap_max_us=%lld audio_epochs=32", disturbed, published.size(), requests.load(), rejects.load(),
|
||||
(long long)(gaps.empty() ? 0 : gaps[gaps.size() / 2]), (long long)(gaps.empty() ? 0 : gaps[gaps.size() * 95 / 100]),
|
||||
(long long)(gaps.empty() ? 0 : gaps.back()));
|
||||
if (published.size() < (disturbed ? 82u : 85u) || requests || rejects) return 1;
|
||||
if (published.size() != frames.size() || requests || rejects) return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user