![]() |
Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
#include <receiver.h>
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 | |
![]() | |
enum | State { Active , Inactive } |
Source state. More... | |
Receiver pipeline.
Definition at line 39 of file receiver.h.
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 | ||
) |
Initialize.
bool roc::pipeline::Receiver::add_port | ( | const PortConfig & | config | ) |
Add receiving port.
|
virtual |
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 |
Read frame.
Implements roc::sndio::ISource.
|
virtual |
Get source sample rate.
Implements roc::sndio::ISource.
|
virtual |
Get current receiver state.
Implements roc::sndio::ISource.
bool roc::pipeline::Receiver::valid | ( | ) |
Check if the pipeline was successfully constructed.
|
virtual |
Wait until the receiver status becomes active.
Implements roc::sndio::ISource.
|
virtual |
Write packet.
Implements roc::packet::IWriter.