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

Receiver node. More...

#include <receiver.h>

Inheritance diagram for roc::node::Receiver:
Collaboration diagram for roc::node::Receiver:

Public Types

typedef uint64_t slot_index_t
 Slot index. More...
 
typedef void(* sess_metrics_func_t) (const pipeline::ReceiverSessionMetrics &sess_metrics, size_t sess_index, void *sess_arg)
 Callback for getting session metrics. More...
 

Public Member Functions

 Receiver (Context &context, const pipeline::ReceiverConfig &pipeline_config)
 Initialize. More...
 
 ~Receiver ()
 Deinitialize. More...
 
bool is_valid ()
 Check if successfully constructed. More...
 
bool configure (slot_index_t slot_index, address::Interface iface, const netio::UdpReceiverConfig &config)
 Set interface config. More...
 
bool bind (slot_index_t slot_index, address::Interface iface, address::EndpointUri &uri)
 Bind to local endpoint. More...
 
bool unlink (slot_index_t slot_index)
 Remove slot. More...
 
bool get_metrics (slot_index_t slot_index, pipeline::ReceiverSlotMetrics &slot_metrics, sess_metrics_func_t sess_metrics_func, size_t *sess_metrics_size, void *sess_metrics_arg)
 Get slot metrics. More...
 
bool has_broken ()
 Check if there are broken slots. More...
 
sndio::ISourcesource ()
 Get receiver source. More...
 
- Public Member Functions inherited from roc::node::Node
 Node (Context &context)
 Initialize. More...
 
virtual ~Node ()
 Deinitialize. More...
 
Contextcontext ()
 All nodes hold reference to context. More...
 

Detailed Description

Receiver node.

Definition at line 33 of file receiver.h.

Member Typedef Documentation

◆ sess_metrics_func_t

typedef void(* roc::node::Receiver::sess_metrics_func_t) (const pipeline::ReceiverSessionMetrics &sess_metrics, size_t sess_index, void *sess_arg)

Callback for getting session metrics.

Definition at line 60 of file receiver.h.

◆ slot_index_t

Slot index.

Definition at line 36 of file receiver.h.

Constructor & Destructor Documentation

◆ Receiver()

roc::node::Receiver::Receiver ( Context context,
const pipeline::ReceiverConfig pipeline_config 
)

Initialize.

◆ ~Receiver()

roc::node::Receiver::~Receiver ( )

Deinitialize.

Member Function Documentation

◆ bind()

bool roc::node::Receiver::bind ( slot_index_t  slot_index,
address::Interface  iface,
address::EndpointUri uri 
)

Bind to local endpoint.

◆ configure()

bool roc::node::Receiver::configure ( slot_index_t  slot_index,
address::Interface  iface,
const netio::UdpReceiverConfig config 
)

Set interface config.

◆ get_metrics()

bool roc::node::Receiver::get_metrics ( slot_index_t  slot_index,
pipeline::ReceiverSlotMetrics slot_metrics,
sess_metrics_func_t  sess_metrics_func,
size_t *  sess_metrics_size,
void *  sess_metrics_arg 
)

Get slot metrics.

Remarks
Metrics for slot are written into slot_metrics. Metrics for each session are passed to sess_metrics_func.

◆ has_broken()

bool roc::node::Receiver::has_broken ( )

Check if there are broken slots.

◆ is_valid()

bool roc::node::Receiver::is_valid ( )

Check if successfully constructed.

◆ source()

sndio::ISource& roc::node::Receiver::source ( )

Get receiver source.

◆ unlink()

bool roc::node::Receiver::unlink ( slot_index_t  slot_index)

Remove slot.


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