updateFrameBudget method

void updateFrameBudget(
  1. int budgetUs
)

Applies a resolved frame budget. No-op in captureMode (bracket recordings use the fixed fpsTarget budget), when explicit thresholds were passed to the constructor, or for a non-positive budgetUs.

Implementation

void updateFrameBudget(int budgetUs) {
  if (captureMode || _explicitThresholds || budgetUs <= 0) return;
  warningBudgetUs = budgetUs;
  criticalBudgetUs = budgetUs * 2;
}