Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
ireceiver_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/ireceiver_hooks.h
10//! @brief Receiver hooks interface.
11
12#ifndef ROC_RTCP_IRECEIVER_HOOKS_H_
13#define ROC_RTCP_IRECEIVER_HOOKS_H_
14
15#include "roc_packet/units.h"
16#include "roc_rtcp/metrics.h"
17
18namespace roc {
19namespace rtcp {
20
21//! Receiver hooks interface.
23public:
24 virtual ~IReceiverHooks();
25
26 //! Invoked when retrieved source description.
27 virtual void on_update_source(packet::source_t source_id, const char* cname) = 0;
28
29 //! Invoked when retrieved source termination message.
30 virtual void on_remove_source(packet::source_t source_id) = 0;
31
32 //! Get number of sources for which we send reception metrics.
33 virtual size_t on_get_num_sources() = 0;
34
35 //! Generate reception metrics for the source with given index.
36 //! @p source_index is a number from 0 ro num_receipted_sources().
37 virtual ReceptionMetrics on_get_reception_metrics(size_t source_index) = 0;
38
39 //! Handle metrics obtained from sender.
40 virtual void on_add_sending_metrics(const SendingMetrics& metrics) = 0;
41
42 //! Handle estimated link metrics.
43 virtual void on_add_link_metrics(const LinkMetrics& metrics) = 0;
44};
45
46} // namespace rtcp
47} // namespace roc
48
49#endif // ROC_RTCP_IRECEIVER_HOOKS_H_
Receiver hooks interface.
virtual void on_update_source(packet::source_t source_id, const char *cname)=0
Invoked when retrieved source description.
virtual void on_add_sending_metrics(const SendingMetrics &metrics)=0
Handle metrics obtained from sender.
virtual size_t on_get_num_sources()=0
Get number of sources for which we send reception metrics.
virtual ReceptionMetrics on_get_reception_metrics(size_t source_index)=0
Generate reception metrics for the source with given index. source_index is a number from 0 ro num_re...
virtual void on_add_link_metrics(const LinkMetrics &metrics)=0
Handle estimated link metrics.
virtual void on_remove_source(packet::source_t source_id)=0
Invoked when retrieved source termination message.
RTCP-derived metrics.
uint32_t source_t
Packet source ID identifying packet stream.
Definition units.h:22
Root namespace.
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
Various units used in packets.