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

Receiver decoder node. More...

#include <receiver_decoder.h>

Inheritance diagram for roc::node::ReceiverDecoder:
Collaboration diagram for roc::node::ReceiverDecoder:

Public Types

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

Public Member Functions

 ReceiverDecoder (Context &context, const pipeline::ReceiverSourceConfig &pipeline_config)
 Initialize. More...
 
 ~ReceiverDecoder ()
 Deinitialize. More...
 
bool is_valid ()
 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...
 
ROC_ATTR_NODISCARD status::StatusCode write_packet (address::Interface iface, const packet::PacketPtr &packet)
 Write packet for decoding. More...
 
ROC_ATTR_NODISCARD status::StatusCode read_packet (address::Interface iface, packet::PacketPtr &packet)
 Read encoded packet. More...
 
sndio::ISourcesource ()
 Source for reading decoded frames. 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 decoder node.

Definition at line 31 of file receiver_decoder.h.

Member Typedef Documentation

◆ party_metrics_func_t

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

Callback for participant metrics.

Definition at line 54 of file receiver_decoder.h.

◆ slot_metrics_func_t

typedef void(* roc::node::ReceiverDecoder::slot_metrics_func_t) (const pipeline::ReceiverSlotMetrics &slot_metrics, void *slot_arg)

Callback for slot metrics.

Definition at line 50 of file receiver_decoder.h.

Constructor & Destructor Documentation

◆ ReceiverDecoder()

roc::node::ReceiverDecoder::ReceiverDecoder ( Context context,
const pipeline::ReceiverSourceConfig pipeline_config 
)

Initialize.

◆ ~ReceiverDecoder()

roc::node::ReceiverDecoder::~ReceiverDecoder ( )

Deinitialize.

Member Function Documentation

◆ activate()

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

Activate interface.

◆ get_metrics()

ROC_ATTR_NODISCARD bool roc::node::ReceiverDecoder::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_valid()

bool roc::node::ReceiverDecoder::is_valid ( )

Check if successfully constructed.

◆ packet_factory()

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

Get packet factory.

◆ read_packet()

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

Read encoded packet.

Note
Typically used to generate control packets with feedback for sender.

◆ source()

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

Source for reading decoded frames.

◆ write_packet()

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

Write packet for decoding.


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