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::PacketPool &packet_pool, core::IAllocator &allocator)
 Initialize. More...
bool valid () const
 Check if object is successfully constructed. More...
bool started () const
 Did decoder catch block beginning? More...
bool alive () const
 Is decoder alive? More...
virtual packet::PacketPtr read ()
 Read packet. More...

Detailed Description

FEC reader.

Definition at line 40 of file reader.h.

Constructor & Destructor Documentation

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::PacketPool packet_pool,
core::IAllocator allocator 



  • 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.
  • allocator is used to initialize a packet array

Member Function Documentation

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

Is decoder alive?

virtual packet::PacketPtr roc::fec::Reader::read ( )

Read packet.

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

Implements roc::packet::IReader.

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

Did decoder catch block beginning?

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

Check if object is successfully constructed.

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