Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
roc::pipeline::ReceiverSession Class Reference

Receiver session sub-pipeline. More...

#include <receiver_session.h>

Inheritance diagram for roc::pipeline::ReceiverSession:
roc::core::RefCounted< ReceiverSession, core::StandardAllocation > roc::core::ListNode roc::core::NonCopyable< T > roc::core::StandardAllocation roc::core::NonCopyable< ListNode >

Public Member Functions

 ReceiverSession (const ReceiverSessionConfig &session_config, const ReceiverCommonConfig &common_config, const address::SocketAddr &src_address, 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 session pipeline was succefully constructed.
 
bool handle (const packet::PacketPtr &packet)
 Try to route a packet to this session.
 
bool advance (packet::timestamp_t timestamp)
 Advance session timestamp.
 
bool reclock (packet::ntp_timestamp_t timestamp)
 Adjust session clock to match consumer clock.
 
audio::IFrameReaderreader ()
 Get audio reader.
 
void add_sending_metrics (const rtcp::SendingMetrics &metrics)
 Handle metrics obtained from sender.
 
void add_link_metrics (const rtcp::LinkMetrics &metrics)
 Handle estimated link metrics.
 
- Public Member Functions inherited from roc::core::RefCounted< ReceiverSession, core::StandardAllocation >
 RefCounted ()
 Initialization with default allocation policy.
 
 RefCounted (const core::StandardAllocation &policy)
 Initialization with arbitrary allocation policy.
 
long getref () const
 Get reference counter.
 
void incref () const
 Increment reference counter.
 
void decref () const
 Decrement reference counter.
 
- Public Member Functions inherited from roc::core::ListNode
ListNodeDatalist_node_data () const
 Get list node data.
 

Additional Inherited Members

- Protected Member Functions inherited from roc::core::StandardAllocation
IAllocatorallocator () const
 Get allocator.
 
 StandardAllocation ()
 Initialize in invalid state. Such instance wont be usable.
 
 StandardAllocation (IAllocator &allocator)
 Initialize with given allocator. Such instance will use allocator to destroy objects.
 
template<class T >
void destroy (T &object)
 Destroy object and deallocate its memory.
 

Detailed Description

Receiver session sub-pipeline.

Contains:

  • a pipeline for processing packets from single sender and converting them into audio frames

Definition at line 55 of file receiver_session.h.

Constructor & Destructor Documentation

◆ ReceiverSession()

roc::pipeline::ReceiverSession::ReceiverSession ( const ReceiverSessionConfig session_config,
const ReceiverCommonConfig common_config,
const address::SocketAddr src_address,
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.

Member Function Documentation

◆ add_link_metrics()

void roc::pipeline::ReceiverSession::add_link_metrics ( const rtcp::LinkMetrics metrics)

Handle estimated link metrics.

◆ add_sending_metrics()

void roc::pipeline::ReceiverSession::add_sending_metrics ( const rtcp::SendingMetrics metrics)

Handle metrics obtained from sender.

◆ advance()

bool roc::pipeline::ReceiverSession::advance ( packet::timestamp_t  timestamp)

Advance session timestamp.

Returns
false if the session is ended

◆ handle()

bool roc::pipeline::ReceiverSession::handle ( const packet::PacketPtr packet)

Try to route a packet to this session.

Returns
true if the packet is dedicated for this session

◆ reader()

audio::IFrameReader & roc::pipeline::ReceiverSession::reader ( )

Get audio reader.

◆ reclock()

bool roc::pipeline::ReceiverSession::reclock ( packet::ntp_timestamp_t  timestamp)

Adjust session clock to match consumer clock.

Returns
false if the session is ended

◆ valid()

bool roc::pipeline::ReceiverSession::valid ( ) const

Check if the session pipeline was succefully constructed.


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