52 , _encoded_data(encoded_data)
54 , _fec_scheme(fec_scheme) {}
64 uint32_t
id()
const {
return _id; };
74 void decode_to(
char* buffer,
size_t max_length)
const;
79 size_t encode_to(
char* buffer,
size_t max_length)
const;
84 size_t len()
const {
return _data_len; };
88 uint32_t _source_block_number = 0;
A class for handling FEC encoding symbols.
EncodingSymbol(uint32_t id, uint32_t source_block_number, char *encoded_data, size_t data_len, FecScheme fec_scheme)
Default constructor.
uint32_t source_block_number() const
Get the source block number.
virtual ~EncodingSymbol()
Default destructor.
static size_t to_payload(const std::vector< EncodingSymbol > &, char *encoded_data, size_t data_len, const FecOti &fec_oti, ContentEncoding encoding)
Write encoding symbols to a packet payload buffer.
uint32_t id() const
Get the encoding symbol ID.
size_t encode_to(char *buffer, size_t max_length) const
Encode to a buffer.
size_t len() const
Get the data length.
static std::vector< EncodingSymbol > from_payload(char *encoded_data, size_t data_len, const FecOti &fec_oti, ContentEncoding encoding)
Parse and construct all encoding symbols from a payload data buffer.
void decode_to(char *buffer, size_t max_length) const
Decode to a buffer.
FecScheme
Error correction schemes.
ContentEncoding
Content Encodings.