Skip to main content

stream_prefix

Function stream_prefix 

Source
fn stream_prefix(
    codec: Codec,
    payload: &[u8],
    index: u64,
    size: (u16, u16),
    fps: FrameRate,
) -> Vec<u8> ⓘ
Expand description

The container bytes a client’s stream needs ahead of its indexth frame: an IVF file header (on the first frame) and frame header for VP8 and VP9, a temporal delimiter for an AV1 unit that does not open with one, nothing for the Annex-B codecs. The IVF header’s time base is one frame at fps, which the frame index counts in.