Skip to main content

periodic_idr_due

Function periodic_idr_due 

Source
pub fn periodic_idr_due(
    settings: &RustCaptureSettings,
    frame_counter: u16,
) -> bool
Expand description

Whether a scheduled keyframe is due this tick.

The default (keyframe_interval_s <= 0) is an infinite GOP with no scheduled IDRs. A positive interval buys a fixed ~N-second recovery cadence for consumers that cannot request one on demand.

§Arguments

  • settings - Capture settings; reads keyframe_interval_s and target_fps.
  • frame_counter - Current frame number (wrapping u16).

§Returns

true if a periodic IDR should be forced on this frame.