Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::fec::Composer< PayloadID, Type, Pos > Class Template Reference

FECFRAME packet composer. More...

#include <composer.h>

Inheritance diagram for roc::fec::Composer< PayloadID, Type, Pos >:
Collaboration diagram for roc::fec::Composer< PayloadID, Type, Pos >:

Public Member Functions

 Composer (packet::IComposer *inner_composer)
 Initialization. More...
 
virtual bool align (core::Slice< uint8_t > &buffer, size_t header_size, size_t payload_alignment)
 Adjust buffer to align payload. More...
 
virtual bool prepare (packet::Packet &packet, core::Slice< uint8_t > &buffer, size_t payload_size)
 Prepare buffer for composing a packet. More...
 
virtual bool pad (packet::Packet &packet, size_t padding_size)
 Pad packet. More...
 
virtual bool compose (packet::Packet &packet)
 Compose packet to buffer. More...
 

Detailed Description

template<class PayloadID, PayloadID_Type Type, PayloadID_Pos Pos>
class roc::fec::Composer< PayloadID, Type, Pos >

FECFRAME packet composer.

Definition at line 26 of file composer.h.

Constructor & Destructor Documentation

◆ Composer()

template<class PayloadID , PayloadID_Type Type, PayloadID_Pos Pos>
roc::fec::Composer< PayloadID, Type, Pos >::Composer ( packet::IComposer< PayloadID, Type, Pos > *  inner_composer)
inline

Initialization.

Remarks
Composes FECFRAME header or footer and passes the rest to inner_composer if it's not null.

Definition at line 32 of file composer.h.

Member Function Documentation

◆ align()

template<class PayloadID , PayloadID_Type Type, PayloadID_Pos Pos>
virtual bool roc::fec::Composer< PayloadID, Type, Pos >::align ( core::Slice< uint8_t > &  buffer,
size_t  header_size,
size_t  payload_alignment 
)
inlinevirtual

Adjust buffer to align payload.

Implements roc::packet::IComposer.

Definition at line 38 of file composer.h.

◆ compose()

template<class PayloadID , PayloadID_Type Type, PayloadID_Pos Pos>
virtual bool roc::fec::Composer< PayloadID, Type, Pos >::compose ( packet::Packet packet)
inlinevirtual

Compose packet to buffer.

Implements roc::packet::IComposer.

Definition at line 133 of file composer.h.

◆ pad()

template<class PayloadID , PayloadID_Type Type, PayloadID_Pos Pos>
virtual bool roc::fec::Composer< PayloadID, Type, Pos >::pad ( packet::Packet packet,
size_t  padding_size 
)
inlinevirtual

Pad packet.

Implements roc::packet::IComposer.

Definition at line 123 of file composer.h.

◆ prepare()

template<class PayloadID , PayloadID_Type Type, PayloadID_Pos Pos>
virtual bool roc::fec::Composer< PayloadID, Type, Pos >::prepare ( packet::Packet packet,
core::Slice< uint8_t > &  buffer,
size_t  payload_size 
)
inlinevirtual

Prepare buffer for composing a packet.

Implements roc::packet::IComposer.

Definition at line 67 of file composer.h.


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