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

Sender encoder node. More...

#include <sender_encoder.h>

Inheritance diagram for roc::node::SenderEncoder:
Collaboration diagram for roc::node::SenderEncoder:

Public Types

typedef void(* slot_metrics_func_t) (const pipeline::SenderSlotMetrics &slot_metrics, void *slot_arg)
 Callback for slot metrics. More...
 
typedef void(* party_metrics_func_t) (const pipeline::SenderParticipantMetrics &party_metrics, size_t party_index, void *party_arg)
 Callback for participant metrics. More...
 

Public Member Functions

 SenderEncoder (Context &context, const pipeline::SenderSinkConfig &pipeline_config)
 Initialize. More...
 
 ~SenderEncoder ()
 Deinitialize. More...
 
bool is_valid () const
 Check if successfully constructed. More...
 
packet::PacketFactorypacket_factory ()
 Get packet factory. More...
 
ROC_ATTR_NODISCARD bool activate (address::Interface iface, address::Protocol proto)
 Activate interface. More...
 
ROC_ATTR_NODISCARD bool get_metrics (slot_metrics_func_t slot_metrics_func, void *slot_metrics_arg, party_metrics_func_t party_metrics_func, void *party_metrics_arg)
 Get metrics. More...
 
bool is_complete ()
 Check if everything is connected. More...
 
ROC_ATTR_NODISCARD status::StatusCode read_packet (address::Interface iface, packet::PacketPtr &packet)
 Read encoded packet. More...
 
ROC_ATTR_NODISCARD status::StatusCode write_packet (address::Interface iface, const packet::PacketPtr &packet)
 Write packet for decoding. More...
 
sndio::ISinksink ()
 Sink for writing frames for encoding. 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

Sender encoder node.

Definition at line 34 of file sender_encoder.h.

Member Typedef Documentation

◆ party_metrics_func_t

typedef void(* roc::node::SenderEncoder::party_metrics_func_t) (const pipeline::SenderParticipantMetrics &party_metrics, size_t party_index, void *party_arg)

Callback for participant metrics.

Definition at line 56 of file sender_encoder.h.

◆ slot_metrics_func_t

typedef void(* roc::node::SenderEncoder::slot_metrics_func_t) (const pipeline::SenderSlotMetrics &slot_metrics, void *slot_arg)

Callback for slot metrics.

Definition at line 52 of file sender_encoder.h.

Constructor & Destructor Documentation

◆ SenderEncoder()

roc::node::SenderEncoder::SenderEncoder ( Context context,
const pipeline::SenderSinkConfig pipeline_config 
)

Initialize.

◆ ~SenderEncoder()

roc::node::SenderEncoder::~SenderEncoder ( )

Deinitialize.

Member Function Documentation

◆ activate()

ROC_ATTR_NODISCARD bool roc::node::SenderEncoder::activate ( address::Interface  iface,
address::Protocol  proto 
)

Activate interface.

◆ get_metrics()

ROC_ATTR_NODISCARD bool roc::node::SenderEncoder::get_metrics ( slot_metrics_func_t  slot_metrics_func,
void *  slot_metrics_arg,
party_metrics_func_t  party_metrics_func,
void *  party_metrics_arg 
)

Get metrics.

◆ is_complete()

bool roc::node::SenderEncoder::is_complete ( )

Check if everything is connected.

◆ is_valid()

bool roc::node::SenderEncoder::is_valid ( ) const

Check if successfully constructed.

◆ packet_factory()

packet::PacketFactory& roc::node::SenderEncoder::packet_factory ( )

Get packet factory.

◆ read_packet()

ROC_ATTR_NODISCARD status::StatusCode roc::node::SenderEncoder::read_packet ( address::Interface  iface,
packet::PacketPtr packet 
)

Read encoded packet.

◆ sink()

sndio::ISink& roc::node::SenderEncoder::sink ( )

Sink for writing frames for encoding.

◆ write_packet()

ROC_ATTR_NODISCARD status::StatusCode roc::node::SenderEncoder::write_packet ( address::Interface  iface,
const packet::PacketPtr packet 
)

Write packet for decoding.

Note
Typically used to deliver control packets with receiver feedback.

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