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::ArenaAllocation > roc::core::ListNode roc::core::NonCopyable< T > roc::core::ArenaAllocation 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::IArena &arena)
 Initialize.
 
bool is_valid () const
 Check if the session pipeline was succefully constructed.
 
ROC_ATTR_NODISCARD status::StatusCode route (const packet::PacketPtr &packet)
 Try to route a packet to this session.
 
bool refresh (core::nanoseconds_t current_time, core::nanoseconds_t *next_refresh)
 Refresh pipeline according to current time.
 
bool reclock (core::nanoseconds_t playback_time)
 Adjust session clock to match consumer clock.
 
ReceiverSessionMetrics get_metrics () const
 Get session metrics.
 
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::ArenaAllocation >
 RefCounted ()
 Initialize.
 
 RefCounted (const core::ArenaAllocation &policy)
 Initialize.
 
int 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::ArenaAllocation
IArenaarena () const
 Get arena.
 
 ArenaAllocation (IArena &arena)
 Initialize.
 
template<class T >
void destroy (T &object)
 Destroy object and return memory to arena.
 

Detailed Description

Receiver session sub-pipeline.

Contains:

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

Definition at line 58 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::IArena & arena )

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.

◆ get_metrics()

ReceiverSessionMetrics roc::pipeline::ReceiverSession::get_metrics ( ) const

Get session metrics.

◆ is_valid()

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

Check if the session pipeline was succefully constructed.

◆ reader()

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

Get audio reader.

◆ reclock()

bool roc::pipeline::ReceiverSession::reclock ( core::nanoseconds_t playback_time)

Adjust session 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
Returns
false if the session is ended

◆ refresh()

bool roc::pipeline::ReceiverSession::refresh ( core::nanoseconds_t current_time,
core::nanoseconds_t * next_refresh )

Refresh pipeline according to current time.

Remarks
writes to next_refresh deadline (absolute time) when refresh should be invoked again if there are no frames
Returns
false if the session is ended

◆ route()

ROC_ATTR_NODISCARD status::StatusCode roc::pipeline::ReceiverSession::route ( const packet::PacketPtr & packet)

Try to route a packet to this session.


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