Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::rtcp::Session Class Reference

RTCP session. Processes incoming RTCP packets and generates outgoing RTCP packets. More...

#include <session.h>

Public Member Functions

 Session (IReceiverHooks *recv_hooks, ISenderHooks *send_hooks, packet::IWriter *packet_writer, packet::IComposer &packet_composer, packet::PacketFactory &packet_factory, core::BufferFactory< uint8_t > &buffer_factory)
 Initialize. More...
 
bool is_valid () const
 Check if initialization succeeded. More...
 
ROC_ATTR_NODISCARD status::StatusCode process_packet (const packet::PacketPtr &packet)
 Parse and process incoming packet. Invokes session hooks methods during processing. More...
 
core::nanoseconds_t generation_deadline (core::nanoseconds_t current_time)
 When we should generate packets next time. Returns absolute time. current_time is current time in nanoseconds since Unix epoch. More...
 
status::StatusCode ROC_ATTR_NODISCARD generate_packets (core::nanoseconds_t current_time)
 Generate and send packet(s). Should be called accroding to generation_deadline(). current_time is current time in nanoseconds since Unix epoch. More...
 

Detailed Description

RTCP session. Processes incoming RTCP packets and generates outgoing RTCP packets.

Definition at line 32 of file session.h.

Constructor & Destructor Documentation

◆ Session()

roc::rtcp::Session::Session ( IReceiverHooks recv_hooks,
ISenderHooks send_hooks,
packet::IWriter packet_writer,
packet::IComposer packet_composer,
packet::PacketFactory packet_factory,
core::BufferFactory< uint8_t > &  buffer_factory 
)

Initialize.

Member Function Documentation

◆ generate_packets()

status::StatusCode ROC_ATTR_NODISCARD roc::rtcp::Session::generate_packets ( core::nanoseconds_t  current_time)

Generate and send packet(s). Should be called accroding to generation_deadline(). current_time is current time in nanoseconds since Unix epoch.

◆ generation_deadline()

core::nanoseconds_t roc::rtcp::Session::generation_deadline ( core::nanoseconds_t  current_time)

When we should generate packets next time. Returns absolute time. current_time is current time in nanoseconds since Unix epoch.

◆ is_valid()

bool roc::rtcp::Session::is_valid ( ) const

Check if initialization succeeded.

◆ process_packet()

ROC_ATTR_NODISCARD status::StatusCode roc::rtcp::Session::process_packet ( const packet::PacketPtr packet)

Parse and process incoming packet. Invokes session hooks methods during processing.


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