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

@@ -0,0 +1,34 @@
#pragma once
#include <cstdint>
enum class VideoUnderrunBehavior
{
ReuseLastCompletedFrame,
BlackFrame
};
struct VideoPlayoutPolicy
{
unsigned outputFramePoolSize = 10;
unsigned targetPrerollFrames = 12;
unsigned targetReadyFrames = 2;
unsigned maxReadyFrames = 4;
unsigned minimumSpareDeviceFrames = 1;
uint64_t lateOrDropCatchUpFrames = 2;
VideoUnderrunBehavior underrunBehavior = VideoUnderrunBehavior::ReuseLastCompletedFrame;
bool adaptiveHeadroomEnabled = false;
};
inline VideoPlayoutPolicy NormalizeVideoPlayoutPolicy(VideoPlayoutPolicy policy)
{
if (policy.outputFramePoolSize == 0)
policy.outputFramePoolSize = 1;
if (policy.targetPrerollFrames == 0)
policy.targetPrerollFrames = 1;
if (policy.targetReadyFrames == 0)
policy.targetReadyFrames = 1;
if (policy.maxReadyFrames < policy.targetReadyFrames)
policy.maxReadyFrames = policy.targetReadyFrames;
return policy;
}