![]() |
Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Receiver source pipeline. More...
#include <receiver_source.h>
Public Member Functions | |
ReceiverSource (const ReceiverConfig &config, const rtp::FormatMap &format_map, packet::PacketFactory &packet_factory, core::BufferFactory< uint8_t > &byte_buffer_factory, core::BufferFactory< audio::sample_t > &sample_buffer_factory, core::IAllocator &allocator) | |
Initialize. | |
bool | valid () const |
Check if the pipeline was successfully constructed. | |
ReceiverSlot * | create_slot () |
Create slot. | |
size_t | num_sessions () const |
Get number of connected sessions. | |
virtual audio::SampleSpec | sample_spec () const |
Get sample specification of the source. | |
virtual core::nanoseconds_t | latency () const |
Get latency of the source. | |
virtual bool | has_clock () const |
Check if the source has own clock. | |
virtual State | state () const |
Get current receiver state. | |
virtual void | pause () |
Pause reading. | |
virtual bool | resume () |
Resume paused reading. | |
virtual bool | restart () |
Restart reading from the beginning. | |
virtual void | reclock (packet::ntp_timestamp_t timestamp) |
Adjust source clock to match consumer clock. | |
virtual bool | read (audio::Frame &) |
Read audio frame. | |
virtual State | state () const =0 |
Get current source state. | |
virtual void | pause ()=0 |
Pause reading. | |
virtual bool | resume ()=0 |
Resume paused reading. | |
virtual bool | restart ()=0 |
Restart reading from the beginning. | |
virtual void | reclock (packet::ntp_timestamp_t timestamp)=0 |
Adjust source clock to match consumer clock. | |
virtual audio::SampleSpec | sample_spec () const =0 |
Get sample specification of the terminal. | |
virtual core::nanoseconds_t | latency () const =0 |
Get latency of the terminal. | |
virtual bool | has_clock () const =0 |
Check if the terminal has own clock. | |
virtual bool | read (Frame &frame)=0 |
Read audio frame. | |
![]() | |
ListNodeData * | list_node_data () const |
Get list node data. | |
Additional Inherited Members | |
![]() | |
enum | State { Playing , Idle , Paused } |
Source state. More... | |
Receiver source pipeline.
Contains:
Pipeline:
Definition at line 46 of file receiver_source.h.
roc::pipeline::ReceiverSource::ReceiverSource | ( | const ReceiverConfig & | config, |
const rtp::FormatMap & | format_map, | ||
packet::PacketFactory & | packet_factory, | ||
core::BufferFactory< uint8_t > & | byte_buffer_factory, | ||
core::BufferFactory< audio::sample_t > & | sample_buffer_factory, | ||
core::IAllocator & | allocator | ||
) |
Initialize.
ReceiverSlot * roc::pipeline::ReceiverSource::create_slot | ( | ) |
Create slot.
|
virtual |
Check if the source has own clock.
Implements roc::sndio::ITerminal.
|
virtual |
Get latency of the source.
Implements roc::sndio::ITerminal.
size_t roc::pipeline::ReceiverSource::num_sessions | ( | ) | const |
Get number of connected sessions.
|
virtual |
Pause reading.
Implements roc::sndio::ISource.
|
virtual |
Read audio frame.
Implements roc::audio::IFrameReader.
|
virtual |
Adjust source clock to match consumer clock.
Implements roc::sndio::ISource.
|
virtual |
Restart reading from the beginning.
Implements roc::sndio::ISource.
|
virtual |
Resume paused reading.
Implements roc::sndio::ISource.
|
virtual |
Get sample specification of the source.
Implements roc::sndio::ITerminal.
|
virtual |
Get current receiver state.
Implements roc::sndio::ISource.
bool roc::pipeline::ReceiverSource::valid | ( | ) | const |
Check if the pipeline was successfully constructed.