Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
isender_hooks.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/isender_hooks.h
10//! @brief Sender hooks interface.
11
12#ifndef ROC_RTCP_ISENDER_HOOKS_H_
13#define ROC_RTCP_ISENDER_HOOKS_H_
14
15#include "roc_core/stddefs.h"
16#include "roc_rtcp/metrics.h"
17
18namespace roc {
19namespace rtcp {
20
21//! Sender hooks interface.
23public:
24 virtual ~ISenderHooks();
25
26 //! Get number of sources produced by sender.
27 virtual size_t on_get_num_sources() = 0;
28
29 //! Get identifier of the source with given index.
30 //! @p source_index is a number from 0 ro num_receipted_sources().
31 virtual packet::source_t on_get_sending_source(size_t source_index) = 0;
32
33 //! Generate sending metrics.
34 //! The obtained metrics will be sent to receiver(s).
35 //! @p report_time defines time point relative to which metrics should be calculated.
36 virtual SendingMetrics
38
39 //! Handle reception feedback metrics obtained from receiver.
40 //! Called for each source.
41 virtual void on_add_reception_metrics(const ReceptionMetrics& metrics) = 0;
42
43 //! Handle estimated link metrics.
44 virtual void on_add_link_metrics(const LinkMetrics& metrics) = 0;
45};
46
47} // namespace rtcp
48} // namespace roc
49
50#endif // ROC_RTCP_ISENDER_HOOKS_H_
Sender hooks interface.
Definition: isender_hooks.h:22
virtual size_t on_get_num_sources()=0
Get number of sources produced by sender.
virtual void on_add_reception_metrics(const ReceptionMetrics &metrics)=0
Handle reception feedback metrics obtained from receiver. Called for each source.
virtual SendingMetrics on_get_sending_metrics(packet::ntp_timestamp_t report_time)=0
Generate sending metrics. The obtained metrics will be sent to receiver(s). report_time defines time ...
virtual void on_add_link_metrics(const LinkMetrics &metrics)=0
Handle estimated link metrics.
virtual packet::source_t on_get_sending_source(size_t source_index)=0
Get identifier of the source with given index. source_index is a number from 0 ro num_receipted_sourc...
RTCP-derived metrics.
uint32_t source_t
Packet source ID identifying packet stream.
Definition: units.h:22
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
Metrics sent from receiver to sender per source.
Definition: metrics.h:37
Metrics sent from sender to receiver.
Definition: metrics.h:23