Phase 7 step 2
All checks were successful
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Successful in 2m44s
CI / Windows Release Package (push) Successful in 2m57s

This commit is contained in:
Aiden
2026-05-11 20:45:58 +10:00
parent 6b0638336a
commit 52eaf16a8c
9 changed files with 97 additions and 12 deletions

View File

@@ -50,6 +50,33 @@ void TestLateAndDroppedSkipAhead()
Expect(scheduler.NextScheduleTime().streamTime == 6000, "dropped completion preserves the existing two-frame skip policy");
}
void TestLateAndDroppedRecoveryUsesPolicy()
{
VideoPlayoutPolicy policy;
policy.lateOrDropCatchUpFrames = 4;
VideoPlayoutScheduler scheduler;
scheduler.Configure(1000, 50000, policy);
(void)scheduler.NextScheduleTime();
scheduler.AccountForCompletionResult(VideoIOCompletionResult::Dropped);
Expect(scheduler.NextScheduleTime().streamTime == 5000, "drop recovery uses policy catch-up frame count");
}
void TestPolicyNormalization()
{
VideoPlayoutPolicy policy;
policy.outputFramePoolSize = 0;
policy.targetPrerollFrames = 0;
policy.targetReadyFrames = 5;
policy.maxReadyFrames = 2;
VideoPlayoutPolicy normalized = NormalizeVideoPlayoutPolicy(policy);
Expect(normalized.outputFramePoolSize == 1, "policy normalization keeps at least one output frame");
Expect(normalized.targetPrerollFrames == 1, "policy normalization keeps at least one preroll frame");
Expect(normalized.maxReadyFrames == normalized.targetReadyFrames, "policy normalization keeps max ready frames above target");
}
void TestFrameBudgets()
{
VideoPlayoutScheduler scheduler;
@@ -68,6 +95,8 @@ int main()
{
TestScheduleAdvancesFromZero();
TestLateAndDroppedSkipAhead();
TestLateAndDroppedRecoveryUsesPolicy();
TestPolicyNormalization();
TestFrameBudgets();
if (gFailures != 0)