LiveFrameRate
pub struct LiveFrameRate
Real frames per second over the time the scene was being measured: the frame rate to show a user.
MeasuredFrameRate::measured_hz counts real frames over wall time,
so it dips towards zero through every shutter cycle and falls to zero
while a replay is paused. This is the same count over live time:
the intervals that ended in a repeated frame (the shutter flag
closed, in motion, or settling after it reopens) and the time a
replay is paused are left out, numerator and divisor alike. A healthy
shutter cycle reads the camera's rate throughout and a paused replay
keeps the rate it had; a camera that stops delivering still reads 0
and a dropped frame still lowers it. Exactly
real_frames / window.
LiveFrameRate — fields
valid: bool
Whether there is live time to divide by. false until two
frames have arrived and a quarter of a second of live time has
passed; can be later than MeasuredFrameRate::valid for a
stream that started with the flag closed. Once true it stays
so through any closure or pause.
hz: f32
Real frames per second over LiveFrameRate::window of live
time.
window: Duration
How much live time LiveFrameRate::hz was counted over.
real_frames: u32
Real frames in the live window.