Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::pipeline::Receiver Class Reference

Receiver pipeline. More...

#include <receiver.h>

Inheritance diagram for roc::pipeline::Receiver:
Collaboration diagram for roc::pipeline::Receiver:

Public Member Functions

 Receiver (const ReceiverConfig &config, const fec::CodecMap &codec_map, const rtp::FormatMap &format_map, packet::PacketPool &packet_pool, core::BufferPool< uint8_t > &byte_buffer_pool, core::BufferPool< audio::sample_t > &sample_buffer_pool, core::IAllocator &allocator)
 Initialize. More...
bool valid ()
 Check if the pipeline was successfully constructed. More...
bool add_port (const PortConfig &config)
 Add receiving port. More...
void iterate_ports (void(*fn)(void *, const PortConfig &), void *arg) const
 Iterate added ports. More...
size_t num_sessions () const
 Get number of alive sessions. More...
virtual State state () const
 Get current receiver state. More...
virtual void wait_active () const
 Wait until the receiver status becomes active. More...
virtual size_t sample_rate () const
 Get source sample rate. More...
virtual bool has_clock () const
 Check if the source has own clock. More...
virtual void write (const packet::PacketPtr &)
 Write packet. More...
virtual bool read (audio::Frame &)
 Read frame. More...

Additional Inherited Members

- Public Types inherited from roc::sndio::ISource
enum  State { Active, Inactive }
 Source state. More...

Detailed Description

Receiver pipeline.

Definition at line 39 of file receiver.h.

Constructor & Destructor Documentation

roc::pipeline::Receiver::Receiver ( const ReceiverConfig config,
const fec::CodecMap codec_map,
const rtp::FormatMap format_map,
packet::PacketPool packet_pool,
core::BufferPool< uint8_t > &  byte_buffer_pool,
core::BufferPool< audio::sample_t > &  sample_buffer_pool,
core::IAllocator allocator 


Member Function Documentation

bool roc::pipeline::Receiver::add_port ( const PortConfig config)

Add receiving port.

virtual bool roc::pipeline::Receiver::has_clock ( ) const

Check if the source has own clock.

Implements roc::sndio::ISource.

void roc::pipeline::Receiver::iterate_ports ( void(*)(void *, const PortConfig &)  fn,
void *  arg 
) const

Iterate added ports.

size_t roc::pipeline::Receiver::num_sessions ( ) const

Get number of alive sessions.

virtual bool roc::pipeline::Receiver::read ( audio::Frame )

Read frame.

Implements roc::sndio::ISource.

virtual size_t roc::pipeline::Receiver::sample_rate ( ) const

Get source sample rate.

Implements roc::sndio::ISource.

virtual State roc::pipeline::Receiver::state ( ) const

Get current receiver state.

Implements roc::sndio::ISource.

bool roc::pipeline::Receiver::valid ( )

Check if the pipeline was successfully constructed.

virtual void roc::pipeline::Receiver::wait_active ( ) const

Wait until the receiver status becomes active.

Implements roc::sndio::ISource.

virtual void roc::pipeline::Receiver::write ( const packet::PacketPtr )

Write packet.

Implements roc::packet::IWriter.

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