Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::fec::Writer Class Reference

FEC writer. More...

#include <writer.h>

Inheritance diagram for roc::fec::Writer:
Collaboration diagram for roc::fec::Writer:

Public Member Functions

 Writer (const WriterConfig &config, packet::FecScheme fec_scheme, IBlockEncoder &encoder, packet::IWriter &writer, packet::IComposer &source_composer, packet::IComposer &repair_composer, packet::PacketFactory &packet_factory, core::BufferFactory< uint8_t > &buffer_factory, core::IArena &arena)
 Initialize. More...
 
bool is_valid () const
 Check if object is successfully constructed. More...
 
bool is_alive () const
 Check if writer is still working. More...
 
bool resize (size_t sblen, size_t rblen)
 Set number of source packets per block. More...
 
virtual ROC_ATTR_NODISCARD status::StatusCode write (const packet::PacketPtr &)
 Write packet. More...
 

Detailed Description

FEC writer.

Definition at line 44 of file writer.h.

Constructor & Destructor Documentation

◆ Writer()

roc::fec::Writer::Writer ( const WriterConfig config,
packet::FecScheme  fec_scheme,
IBlockEncoder encoder,
packet::IWriter writer,
packet::IComposer source_composer,
packet::IComposer repair_composer,
packet::PacketFactory packet_factory,
core::BufferFactory< uint8_t > &  buffer_factory,
core::IArena arena 
)

Initialize.

Parameters

  • config contains FEC scheme parameters
  • encoder is used to encode repair packets
  • writer is used to write source and repair packets
  • source_composer is used to format source packets
  • repair_composer is used to format repair packets
  • packet_factory is used to allocate repair packets
  • buffer_factory is used to allocate buffers for repair packets
  • arena is used to initialize a packet array

Member Function Documentation

◆ is_alive()

bool roc::fec::Writer::is_alive ( ) const

Check if writer is still working.

◆ is_valid()

bool roc::fec::Writer::is_valid ( ) const

Check if object is successfully constructed.

◆ resize()

bool roc::fec::Writer::resize ( size_t  sblen,
size_t  rblen 
)

Set number of source packets per block.

◆ write()

virtual ROC_ATTR_NODISCARD status::StatusCode roc::fec::Writer::write ( const packet::PacketPtr )
virtual

Write packet.

Remarks
  • writes the given source packet to the output writer
  • generates repair packets and also writes them to the output writer

Implements roc::packet::IWriter.


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