Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
metrics.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Roc Streaming authors
3 *
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 */
8
9//! @file roc_rtcp/metrics.h
10//! @brief RTCP-derived metrics.
11
12#ifndef ROC_RTCP_METRICS_H_
13#define ROC_RTCP_METRICS_H_
14
15#include "roc_core/stddefs.h"
16#include "roc_core/time.h"
17#include "roc_packet/units.h"
18
19namespace roc {
20namespace rtcp {
21
22//! Metrics sent from sender to receiver.
24 //! NTP time when these metrics were generated.
26
27 //! RTP timestamp correspnding to NTP timestamp.
29
31 : origin_ntp(0)
32 , origin_rtp(0) {
33 }
34};
35
36//! Metrics sent from receiver to sender per source.
38 //! To which source there metrics apply.
40
41 //! Fraction of lost packets.
43
45 : ssrc(0)
46 , fract_loss(0) {
47 }
48};
49
50//! Metrics for network link.
51//! Calculated independently on both sender and receiver.
53 //! Estimated round-trip time.
55
57 : rtt(0) {
58 }
59};
60
61} // namespace rtcp
62} // namespace roc
63
64#endif // ROC_RTCP_METRICS_H_
int64_t nanoseconds_t
Nanoseconds.
Definition time.h:58
uint32_t source_t
Packet source ID identifying packet stream.
Definition units.h:22
uint32_t timestamp_t
Audio packet timestamp.
Definition units.h:25
uint64_t ntp_timestamp_t
NTP timestamp.
Definition units.h:91
Root namespace.
Commonly used types and functions.
Metrics for network link. Calculated independently on both sender and receiver.
Definition metrics.h:52
core::nanoseconds_t rtt
Estimated round-trip time.
Definition metrics.h:54
Metrics sent from receiver to sender per source.
Definition metrics.h:37
float fract_loss
Fraction of lost packets.
Definition metrics.h:42
packet::source_t ssrc
To which source there metrics apply.
Definition metrics.h:39
Metrics sent from sender to receiver.
Definition metrics.h:23
packet::timestamp_t origin_rtp
RTP timestamp correspnding to NTP timestamp.
Definition metrics.h:28
packet::ntp_timestamp_t origin_ntp
NTP time when these metrics were generated.
Definition metrics.h:25
Time definitions.
Various units used in packets.