Skip to main content

Module repacketizer

Module repacketizer 

Source
Expand description

Port of libopus src/repacketizer.c + the packet helpers from src/opus.c: split Opus packets into frames and recombine/re-frame/pad them WITHOUT re-encoding. Used to merge several packets into a longer one, split a multi-frame packet, or pad a packet to a target size (e.g. for CBR transport). All frames in a repacketizer must share the same TOC config (mode/bandwidth/frame-size); only the code (0..3) and framing change.

Structs§

Repacketizer
opus_repacketizer: accumulate frames from one or more same-config packets, then emit them as a single re-framed packet.

Functions§

pad_packet
opus_packet_pad: grow packet in place to new_len bytes by adding opus padding (no re-encode). No-op if already new_len; errors if new_len is smaller.
unpad_packet
opus_packet_unpad: strip opus padding, returning the minimal packet.