Skip to main content

Module cmaf_util

Module cmaf_util 

Source
Expand description

Shared CMAF/HLS helpers used by the job engine and the multi-GPU orchestrator: segment-boundary flushing, per-rung contribution merging, bandwidth measurement, and AV1 codec-string extraction.

Structs§

RungContribution
One encoder worker’s contribution to a rung (a slice of its segments).

Functions§

add_audio_sample_with_segment_flush
Add one audio sample to a CmafAudioMuxer with segment flushing on the same time grid.
add_packet_with_segment_flush
Add one encoded video packet to a CmafVideoMuxer, flushing the prior segment first when the next packet is a keyframe and the buffered duration has reached the segment target (so each segment opens on an IDR).
av1_codec_string_from_init
Parse the AV1 codec string (av01.…) from a rendition’s init segment.
keyframe_interval_for_segment
Keyframe interval (frames) for a target segment length at a frame rate.
measure_bandwidth
(average, peak) bandwidth in bits/sec across a manifest’s segments.
merge_rung_contributions
Merge several workers’ segment lists for one rung into a single ordered manifest, detecting duplicate segment numbers and internal gaps.
total_segments_for_rung
Number of CMAF segments a rung will produce (ceil division).