Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
RTP link meter. More...
#include <link_meter.h>
Public Member Functions | |
LinkMeter (const EncodingMap &encoding_map) | |
Initialize. More... | |
virtual bool | has_metrics () const |
Check if metrics are already gathered and can be reported. More... | |
virtual const packet::LinkMetrics & | metrics () const |
Get metrics. More... | |
bool | has_encoding () const |
Check if packet encoding already detected. More... | |
const Encoding & | encoding () const |
Get detected encoding. More... | |
void | process_report (const rtcp::SendReport &report) |
Process RTCP report from sender. More... | |
virtual ROC_ATTR_NODISCARD status::StatusCode | write (const packet::PacketPtr &packet) |
Write packet and update metrics. More... | |
virtual ROC_ATTR_NODISCARD status::StatusCode | read (packet::PacketPtr &packet) |
Read packet and update metrics. More... | |
void | set_writer (packet::IWriter &writer) |
Set nested packet writer. More... | |
void | set_reader (packet::IReader &reader) |
Set nested packet reader. More... | |
RTP link meter.
Computes various link metrics based on sequence of RTP packets. Inserted into pipeline in two points:
In both cases, LinkMeter passes through packets to/from nested writer/reader, and updates metrics.
Definition at line 43 of file link_meter.h.
|
explicit |
Initialize.
const Encoding& roc::rtp::LinkMeter::encoding | ( | ) | const |
Get detected encoding.
bool roc::rtp::LinkMeter::has_encoding | ( | ) | const |
Check if packet encoding already detected.
|
virtual |
Check if metrics are already gathered and can be reported.
Implements roc::packet::ILinkMeter.
|
virtual |
Get metrics.
Implements roc::packet::ILinkMeter.
void roc::rtp::LinkMeter::process_report | ( | const rtcp::SendReport & | report | ) |
Process RTCP report from sender.
|
virtual |
Read packet and update metrics.
Implements roc::packet::IReader.
void roc::rtp::LinkMeter::set_reader | ( | packet::IReader & | reader | ) |
Set nested packet reader.
void roc::rtp::LinkMeter::set_writer | ( | packet::IWriter & | writer | ) |
Set nested packet writer.
|
virtual |
Write packet and update metrics.
Implements roc::packet::IWriter.