Skip to main content

Module frames

Module frames 

Source
Expand description

Latest-frame-wins video frames, with a cursor per handle.

Players and sources both hand out this type, and every renderer reads it. It wraps a tokio::sync::watch channel. The producer overwrites one value, so a reader that falls behind skips to the newest picture instead of draining a backlog. Each frame keeps the instant it was sent, which a reader gets from VideoFrames::sent_at.

A frame also carries how many keyframes its producer had asked for when it was sent. The count only grows, so a request survives the frames a reader skips: the next frame the reader gets reports it through VideoFrames::keyframe_requested.

Structsยง

FrameSlot
The producing end of a frame stream.
VideoFrames
Latest-frame-wins video frames.