Retain jitter tolerance across desktop camera phase drift
This commit is contained in:
1 parent
5666da8859
commit
f8e960c844
2 files changed
+24
-8
No files matched your search
@@ -51,6 +51,19 @@ private slots:
|
||||
QVERIFY(jittered.accept(30000000)); // Долгая пауза не создаёт догоняющий burst.
|
||||
QVERIFY(!jittered.accept(30001000));
|
||||
}
|
||||
void captureCadenceDrift() {
|
||||
CallVideoCadence camera;
|
||||
// Квантование камерой до миллисекунд и медленный уход фазы относительно сетки 30 fps.
|
||||
for (int i = 0; i < 18000; i++) {
|
||||
const int64_t pts = 1000000 + (i * 33340LL / 1000) * 1000 + (i % 2 ? -1500 : 1500);
|
||||
QVERIFY2(camera.accept(pts), qPrintable(QString("Dropped camera frame %1 at %2").arg(i).arg(pts)));
|
||||
QVERIFY(!camera.accept(pts));
|
||||
}
|
||||
CallVideoCadence fast;
|
||||
int accepted = 0;
|
||||
for (int i = 0; i < 24000; i++) if (fast.accept(1000000 + i * 25000LL)) accepted++;
|
||||
QCOMPARE(accepted, 18000); // Допуск не превращает ограничение 30 fps в 40 fps.
|
||||
}
|
||||
void initTestCase() {
|
||||
debug_config_init(); debug_set_level(DEBUG_LEVEL_WARN); debug_set_category_level(DEBUG_CATEGORY_CALL, DEBUG_LEVEL_DEBUG);
|
||||
av_log_set_level(AV_LOG_ERROR);
|
||||
|
||||
Reference in new issue
Block a user