Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
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 >:
roc::packet::IComposer roc::core::NonCopyable< Tag >

Public Member Functions

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

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: