Skip to main content

split_packet

Function split_packet 

Source
pub fn split_packet(
    packet_id: u16,
    data: &[u8],
    config: &SplitterConfig,
) -> SplitterResult<Vec<Fragment>>
Expand description

Split a packet into fragments that each fit within config.max_packet_size.

If the packet already fits in a single fragment it is still wrapped in a single-element Vec<Fragment> for uniform handling.

ยงParameters

  • packet_id: Caller-supplied identifier that groups all fragments of a packet.
  • data: The raw packet payload (e.g., one or more NAL units in AnnexB/AVCC).
  • config: Splitter configuration.