Skip to main content

Module segment

Module segment 

Source
Available on crate features hls or record only.
Expand description

Keyframe-boundary segmentation timing, shared by the HLS packager and the recorder.

Both packager and record need the same decision: hold frames until the first keyframe, then cut a new segment at the first keyframe at or after a target duration. SegmentClock captures exactly that state machine so the two consumers share one tested implementation rather than re-deriving it.

Structs§

SegmentClock
Tracks segment boundaries from a frame stream’s keyframes and timestamps.
SegmentDecision
What a consumer should do with a frame, per SegmentClock::observe.