Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
RTCP communicator. More...
#include <communicator.h>
Public Member Functions | |
Communicator (const Config &config, IParticipant &participant, packet::IWriter &packet_writer, packet::IComposer &packet_composer, packet::PacketFactory &packet_factory, core::IArena &arena) | |
Initialize. More... | |
bool | is_valid () const |
Check if initialization succeeded. More... | |
size_t | total_destinations () const |
Get number of tracked destination addresses, for testing. More... | |
size_t | total_streams () const |
Get number of tracked streams, for testing. More... | |
ROC_ATTR_NODISCARD status::StatusCode | process_packet (const packet::PacketPtr &packet, core::nanoseconds_t current_time) |
Parse and process incoming packet. Invokes IParticipant 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... | |
ROC_ATTR_NODISCARD status::StatusCode | generate_reports (core::nanoseconds_t current_time) |
Generate and send report packet(s). Should be called according to generation_deadline(). current_time is current time in nanoseconds since Unix epoch. Invokes IParticipant methods during generation. More... | |
ROC_ATTR_NODISCARD status::StatusCode | generate_goodbye (core::nanoseconds_t current_time) |
Generate and send goodbye packet(s). Should be called before termination sender session. current_time is current time in nanoseconds since Unix epoch. Invokes IParticipant methods during generation. More... | |
RTCP communicator.
Implements bidirectional exchange of RTCP packets with other participants of a single RTP session.
Holds a reference to IParticipant interface, which is implemented by sender or receiver pipeline.
Features:
For more details about streams and reports,
This is top-level class of roc_rtcp module, gluing together other components:
Definition at line 56 of file communicator.h.
roc::rtcp::Communicator::Communicator | ( | const Config & | config, |
IParticipant & | participant, | ||
packet::IWriter & | packet_writer, | ||
packet::IComposer & | packet_composer, | ||
packet::PacketFactory & | packet_factory, | ||
core::IArena & | arena | ||
) |
Initialize.
ROC_ATTR_NODISCARD status::StatusCode roc::rtcp::Communicator::generate_goodbye | ( | core::nanoseconds_t | current_time | ) |
Generate and send goodbye packet(s). Should be called before termination sender session. current_time
is current time in nanoseconds since Unix epoch. Invokes IParticipant methods during generation.
ROC_ATTR_NODISCARD status::StatusCode roc::rtcp::Communicator::generate_reports | ( | core::nanoseconds_t | current_time | ) |
Generate and send report packet(s). Should be called according to generation_deadline(). current_time
is current time in nanoseconds since Unix epoch. Invokes IParticipant methods during generation.
core::nanoseconds_t roc::rtcp::Communicator::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.
bool roc::rtcp::Communicator::is_valid | ( | ) | const |
Check if initialization succeeded.
ROC_ATTR_NODISCARD status::StatusCode roc::rtcp::Communicator::process_packet | ( | const packet::PacketPtr & | packet, |
core::nanoseconds_t | current_time | ||
) |
Parse and process incoming packet. Invokes IParticipant methods during processing.
size_t roc::rtcp::Communicator::total_destinations | ( | ) | const |
Get number of tracked destination addresses, for testing.
size_t roc::rtcp::Communicator::total_streams | ( | ) | const |
Get number of tracked streams, for testing.