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::PacketPool &packet_pool, core::BufferPool< uint8_t > &buffer_pool, core::IAllocator &allocator)
 Initialize. More...
 
bool valid () const
 Check if object is successfully constructed. More...
 
bool 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 void write (const packet::PacketPtr &)
 Write packet. More...
 

Detailed Description

FEC writer.

Definition at line 44 of file writer.h.

Constructor & Destructor Documentation

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::PacketPool packet_pool,
core::BufferPool< uint8_t > &  buffer_pool,
core::IAllocator allocator 
)

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_pool is used to allocate repair packets
  • buffer_pool is used to allocate buffers for repair packets
  • allocator is used to initialize a packet array

Member Function Documentation

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

Check if writer is still working.

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

Set number of source packets per block.

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

Check if object is successfully constructed.

virtual void 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: