Drain GPU outputs independently of capture and verify lossless recovery

This commit is contained in:
evgeny committed 2026-10-19 17:28:13 +02:00
1 parent 0bc2715a30
commit 5f772fa97f
4 files changed
+31 -16

No files matched your search

+3 -3
View File
@@ -8,7 +8,7 @@ static const int64_t origin = 1000000;
static void simulate(unsigned pause_ms, int cpu, int64_t quantum, int accelerated_audio) {
struct call_video_playout p; call_video_playout_init(&p, 7);
enum { COUNT = 240 };
enum { COUNT = 480 };
struct call_video_playout_frame frames[COUNT];
for (int i = 0; i < COUNT; ++i) {
int64_t arrival = origin + i * 33333ll;
@@ -17,8 +17,8 @@ static void simulate(unsigned pause_ms, int cpu, int64_t quantum, int accelerate
frames[i] = (struct call_video_playout_frame){origin + i * 33333ll, arrival};
}
unsigned shown = 0, accelerated = 0;
int64_t last_show = 0, recovered_lag = INT64_MAX, audio_pts = origin;
for (int64_t now = origin; now < origin + 12000000 && shown < COUNT; now += quantum) {
int64_t last_show = 0, recovered_lag = INT64_MAX, audio_pts = origin - (accelerated_audio ? 150000 : 0);
for (int64_t now = origin; now < origin + 20000000 && shown < COUNT; now += quantum) {
uint32_t rate = accelerated_audio && now >= origin + 1500000 && now < origin + 2500000 ? 1100000 : 1000000;
if (now > origin) audio_pts += quantum * rate / 1000000;
if (cpu && now >= origin + 1000000 && now < origin + 1000000 + pause_ms * 1000ll) continue;