Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Receiver session group. More...
#include <receiver_session_group.h>
Public Member Functions | |
ReceiverSessionGroup (const ReceiverSourceConfig &source_config, const ReceiverSlotConfig &slot_config, StateTracker &state_tracker, audio::Mixer &mixer, const rtp::EncodingMap &encoding_map, packet::PacketFactory &packet_factory, audio::FrameFactory &frame_factory, core::IArena &arena) | |
Initialize. More... | |
bool | is_valid () const |
Check if pipeline was succefully constructed. More... | |
bool | create_control_pipeline (ReceiverEndpoint *control_endpoint) |
Create control sub-pipeline. More... | |
ROC_ATTR_NODISCARD status::StatusCode | route_packet (const packet::PacketPtr &packet, core::nanoseconds_t current_time) |
Route packet to session. More... | |
core::nanoseconds_t | refresh_sessions (core::nanoseconds_t current_time) |
Refresh pipeline according to current time. More... | |
void | reclock_sessions (core::nanoseconds_t playback_time) |
Adjust session clock to match consumer clock. More... | |
size_t | num_sessions () const |
Get number of sessions in group. More... | |
void | get_slot_metrics (ReceiverSlotMetrics &slot_metrics) const |
Get slot metrics. More... | |
void | get_participant_metrics (ReceiverParticipantMetrics *party_metrics, size_t *party_count) const |
Get metrics for remote participants. More... | |
Receiver session group.
Contains:
Session group corresponds to all sessions handled by one receiver slot - a set of related complementary endpoints, e.g. one endpoint for audio, one for repair, and one for control packets.
Session group creates and removes sessions and routes packets from endpoints to sessions with the help of ReceiverSessionRouter.
It also exchanges control information with remote senders using rtcp::Communicator and updates routing based on that control information.
Definition at line 48 of file receiver_session_group.h.
roc::pipeline::ReceiverSessionGroup::ReceiverSessionGroup | ( | const ReceiverSourceConfig & | source_config, |
const ReceiverSlotConfig & | slot_config, | ||
StateTracker & | state_tracker, | ||
audio::Mixer & | mixer, | ||
const rtp::EncodingMap & | encoding_map, | ||
packet::PacketFactory & | packet_factory, | ||
audio::FrameFactory & | frame_factory, | ||
core::IArena & | arena | ||
) |
Initialize.
bool roc::pipeline::ReceiverSessionGroup::create_control_pipeline | ( | ReceiverEndpoint * | control_endpoint | ) |
Create control sub-pipeline.
void roc::pipeline::ReceiverSessionGroup::get_participant_metrics | ( | ReceiverParticipantMetrics * | party_metrics, |
size_t * | party_count | ||
) | const |
Get metrics for remote participants.
party_metrics
points to array of metrics structs, and party_count
defines number of array elements. Metrics are written to given array, and party_count
is updated of actual number of elements written. If there is not enough space for all metrics, result is truncated. void roc::pipeline::ReceiverSessionGroup::get_slot_metrics | ( | ReceiverSlotMetrics & | slot_metrics | ) | const |
Get slot metrics.
bool roc::pipeline::ReceiverSessionGroup::is_valid | ( | ) | const |
Check if pipeline was succefully constructed.
size_t roc::pipeline::ReceiverSessionGroup::num_sessions | ( | ) | const |
Get number of sessions in group.
void roc::pipeline::ReceiverSessionGroup::reclock_sessions | ( | core::nanoseconds_t | playback_time | ) |
Adjust session clock to match consumer clock.
playback_time
specified absolute time when first sample of last frame retrieved from pipeline will be actually played on sink core::nanoseconds_t roc::pipeline::ReceiverSessionGroup::refresh_sessions | ( | core::nanoseconds_t | current_time | ) |
Refresh pipeline according to current time.
ROC_ATTR_NODISCARD status::StatusCode roc::pipeline::ReceiverSessionGroup::route_packet | ( | const packet::PacketPtr & | packet, |
core::nanoseconds_t | current_time | ||
) |
Route packet to session.