Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::packet::FEC Struct Reference

FECFRAME packet. More...

#include <fec.h>

Collaboration diagram for roc::packet::FEC:

Public Member Functions

 FEC ()
 Construct zero FEC packet. More...
 
int compare (const FEC &) const
 Determine packet order. More...
 

Public Attributes

FecScheme fec_scheme
 The FEC scheme to which the packet belongs to. More...
 
size_t encoding_symbol_id
 The index number of packet in a block ("esi"). More...
 
blknum_t source_block_number
 Number of a source block in a packet stream ("sbn"). More...
 
size_t source_block_length
 Number of source packets in block to which this packet belongs ("sblen"). More...
 
size_t block_length
 Number of source + repair packets in block to which this packet belongs ("blen"). More...
 
core::Slice< uint8_t > payload_id
 FECFRAME header or footer. More...
 
core::Slice< uint8_t > payload
 FECFRAME payload. More...
 

Detailed Description

FECFRAME packet.

Definition at line 35 of file fec.h.

Constructor & Destructor Documentation

◆ FEC()

roc::packet::FEC::FEC ( )

Construct zero FEC packet.

Member Function Documentation

◆ compare()

int roc::packet::FEC::compare ( const FEC ) const

Determine packet order.

Member Data Documentation

◆ block_length

size_t roc::packet::FEC::block_length

Number of source + repair packets in block to which this packet belongs ("blen").

Remarks
Different blocks can have different number of packets. Always larger than source_block_length. This field is not supported on all FEC schemes.

Definition at line 66 of file fec.h.

◆ encoding_symbol_id

size_t roc::packet::FEC::encoding_symbol_id

The index number of packet in a block ("esi").

Remarks
Source packets are numbered in range [0; k). Repair packets are numbered in range [k; k + n), where k is a number of source packets per block (source_block_length) n is a number of repair packets per block.

Definition at line 47 of file fec.h.

◆ fec_scheme

FecScheme roc::packet::FEC::fec_scheme

The FEC scheme to which the packet belongs to.

Remarks
Defines both FEC header or footer format and FEC payalod format.

Definition at line 39 of file fec.h.

◆ payload

core::Slice<uint8_t> roc::packet::FEC::payload

FECFRAME payload.

Remarks
Doesn't include FECFRAME header or footer.

Definition at line 74 of file fec.h.

◆ payload_id

core::Slice<uint8_t> roc::packet::FEC::payload_id

FECFRAME header or footer.

Definition at line 69 of file fec.h.

◆ source_block_length

size_t roc::packet::FEC::source_block_length

Number of source packets in block to which this packet belongs ("sblen").

Remarks
Different blocks can have different number of source packets.

Definition at line 59 of file fec.h.

◆ source_block_number

blknum_t roc::packet::FEC::source_block_number

Number of a source block in a packet stream ("sbn").

Remarks
Source block is formed from the source packets. Blocks are numbered sequentially starting from a random number. Block number can wrap.

Definition at line 54 of file fec.h.


The documentation for this struct was generated from the following file: