Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
roc::fec::Writer Class Reference

FEC writer. More...

#include <writer.h>

Inheritance diagram for roc::fec::Writer:
roc::packet::IWriter roc::core::NonCopyable< Tag >

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::IArena &arena)
 Initialize.
bool is_valid () const
 Check if object is successfully constructed.
bool is_alive () const
 Check if writer is still working.
bool resize (size_t sblen, size_t rblen)
 Set number of source packets per block.
virtual ROC_ATTR_NODISCARD status::StatusCode write (const packet::PacketPtr &)
 Write packet.

Detailed Description

FEC writer.

Definition at line 43 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::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: