Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::pipeline::ReceiverSlot Class Reference

Receiver slot. More...

#include <receiver_slot.h>

Inheritance diagram for roc::pipeline::ReceiverSlot:
Collaboration diagram for roc::pipeline::ReceiverSlot:

Public Member Functions

 ReceiverSlot (const ReceiverConfig &receiver_config, ReceiverState &receiver_state, audio::Mixer &mixer, 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::IArena &arena)
 Initialize. More...
 
ReceiverEndpointadd_endpoint (address::Interface iface, address::Protocol proto)
 Add endpoint. More...
 
core::nanoseconds_t refresh (core::nanoseconds_t current_time)
 Pull packets and refresh sessions according to current time. More...
 
void reclock (core::nanoseconds_t playback_time)
 Adjust sessions clock to match consumer clock. More...
 
size_t num_sessions () const
 Get number of alive sessions. More...
 
void get_metrics (ReceiverSlotMetrics &slot_metrics, ReceiverSessionMetrics *sess_metrics, size_t *sess_metrics_size) const
 Get metrics for slot and its sessions. More...
 
- Public Member Functions inherited from roc::core::RefCounted< ReceiverSlot, core::ArenaAllocation >
 RefCounted ()
 Initialize. More...
 
 RefCounted (const core::ArenaAllocation &policy)
 Initialize. More...
 
int getref () const
 Get reference counter. More...
 
void incref () const
 Increment reference counter. More...
 
void decref () const
 Decrement reference counter. More...
 
- Public Member Functions inherited from roc::core::ListNode
ListNodeDatalist_node_data () const
 Get list node data. More...
 

Additional Inherited Members

- Protected Member Functions inherited from roc::core::ArenaAllocation
IArenaarena () const
 Get arena. More...
 
 ArenaAllocation (IArena &arena)
 Initialize. More...
 
template<class T >
void destroy (T &object)
 Destroy object and return memory to arena. More...
 

Detailed Description

Receiver slot.

Contains:

  • one or more related receiver endpoints, one per each type
  • one session group associated with those endpoints

Definition at line 37 of file receiver_slot.h.

Constructor & Destructor Documentation

◆ ReceiverSlot()

roc::pipeline::ReceiverSlot::ReceiverSlot ( const ReceiverConfig receiver_config,
ReceiverState receiver_state,
audio::Mixer mixer,
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::IArena arena 
)

Initialize.

Member Function Documentation

◆ add_endpoint()

ReceiverEndpoint* roc::pipeline::ReceiverSlot::add_endpoint ( address::Interface  iface,
address::Protocol  proto 
)

Add endpoint.

◆ get_metrics()

void roc::pipeline::ReceiverSlot::get_metrics ( ReceiverSlotMetrics slot_metrics,
ReceiverSessionMetrics sess_metrics,
size_t *  sess_metrics_size 
) const

Get metrics for slot and its sessions.

◆ num_sessions()

size_t roc::pipeline::ReceiverSlot::num_sessions ( ) const

Get number of alive sessions.

◆ reclock()

void roc::pipeline::ReceiverSlot::reclock ( core::nanoseconds_t  playback_time)

Adjust sessions clock to match consumer clock.

Remarks
playback_time specified absolute time when first sample of last frame retrieved from pipeline will be actually played on sink

◆ refresh()

core::nanoseconds_t roc::pipeline::ReceiverSlot::refresh ( core::nanoseconds_t  current_time)

Pull packets and refresh sessions according to current time.

Returns
deadline (absolute time) when refresh should be invoked again if there are no frames

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