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

FEC reader. More...

#include <reader.h>

Inheritance diagram for roc::fec::Reader:
Collaboration diagram for roc::fec::Reader:

Public Member Functions

 Reader (const ReaderConfig &config, packet::FecScheme fec_scheme, IBlockDecoder &decoder, packet::IReader &source_reader, packet::IReader &repair_reader, packet::IParser &parser, packet::PacketFactory &packet_factory, core::IArena &arena)
 Initialize. More...
 
bool is_valid () const
 Check if object is successfully constructed. More...
 
bool is_started () const
 Did decoder catch block beginning? More...
 
bool is_alive () const
 Is decoder alive? More...
 
virtual ROC_ATTR_NODISCARD status::StatusCode read (packet::PacketPtr &)
 Read packet. More...
 

Detailed Description

FEC reader.

Definition at line 40 of file reader.h.

Constructor & Destructor Documentation

◆ Reader()

roc::fec::Reader::Reader ( const ReaderConfig config,
packet::FecScheme  fec_scheme,
IBlockDecoder decoder,
packet::IReader source_reader,
packet::IReader repair_reader,
packet::IParser parser,
packet::PacketFactory packet_factory,
core::IArena arena 
)

Initialize.

Parameters

  • config contains FEC scheme parameters
  • decoder specifies FEC codec implementation;
  • source_reader specifies input queue with data packets;
  • repair_reader specifies input queue with FEC packets;
  • parser specifies packet parser for restored packets.
  • arena is used to initialize a packet array

Member Function Documentation

◆ is_alive()

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

Is decoder alive?

◆ is_started()

bool roc::fec::Reader::is_started ( ) const

Did decoder catch block beginning?

◆ is_valid()

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

Check if object is successfully constructed.

◆ read()

virtual ROC_ATTR_NODISCARD status::StatusCode roc::fec::Reader::read ( packet::PacketPtr )
virtual

Read packet.

Remarks
When a packet loss is detected, try to restore it from repair packets.

Implements roc::packet::IReader.


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