Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Toggle main menu visibility
Loading...
Searching...
No Matches
participant_info.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2024 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/participant_info.h
10
//! @brief Participant info.
11
12
#ifndef ROC_RTCP_PARTICIPANT_INFO_H_
13
#define ROC_RTCP_PARTICIPANT_INFO_H_
14
15
#include "
roc_address/socket_addr.h
"
16
#include "
roc_packet/units.h
"
17
18
namespace
roc
{
19
namespace
rtcp
{
20
21
//! Participant report generation mode.
22
enum
ParticipantReportMode
{
23
//! Reports are sent to a single static destination address,
24
//! set via report_address field of ParticipantInfo struct.
25
//! This mode is typically used on sender side.
26
Report_ToAddress
,
27
28
//! Reports are sent back to dynamically discovered participant.
29
//! In this mode, for every stream we send or receive via RTP, we remember
30
//! address from which RTCP reports for that stream come. Then we send
31
//! reports back to all such addresses.
32
//! This mode is typically used on receiver side.
33
Report_Back
,
34
};
35
36
//! Participant info.
37
//! @remarks
38
//! Provides information about RTCP participant (sender/receiver).
39
struct
ParticipantInfo {
40
//! Participant CNAME.
41
//! This string uniquely identifies each participant across all RTP sessions.
42
//! It's used to associated related RTP sessions together.
43
//! It's also used to distinguish SSRC collisions from network loops.
44
const
char
*
cname
;
45
46
//! Participant SSRC.
47
//! This number uniquely identifies each participant within RTP session.
48
//! If there is sending stream, its sender_source_id should be equal to it.
49
//! If there are receivings streams, theirs receiver_source_id should be equal to it.
50
packet::stream_source_t
source_id
;
51
52
//! Participant report mode.
53
//! Deterimeds where to send generated reports.
54
ParticipantReportMode
report_mode
;
55
56
//! Participant destination report address.
57
//! Used if report_mode is set to Report_ToAddress.
58
address::SocketAddr
report_address
;
59
60
ParticipantInfo()
61
:
cname
(NULL)
62
,
source_id
(0)
63
,
report_mode
(
Report_ToAddress
)
64
,
report_address
() {
65
}
66
};
67
68
}
// namespace rtcp
69
}
// namespace roc
70
71
#endif
// ROC_RTCP_PARTICIPANT_INFO_H_
roc::address::SocketAddr
Socket address.
Definition
socket_addr.h:26
roc::packet::stream_source_t
uint32_t stream_source_t
Packet stream identifier.
Definition
units.h:27
roc::rtcp
RTCP protocol support.
roc::rtcp::ParticipantReportMode
ParticipantReportMode
Participant report generation mode.
Definition
participant_info.h:22
roc::rtcp::Report_ToAddress
@ Report_ToAddress
Reports are sent to a single static destination address, set via report_address field of ParticipantI...
Definition
participant_info.h:26
roc::rtcp::Report_Back
@ Report_Back
Reports are sent back to dynamically discovered participant. In this mode, for every stream we send o...
Definition
participant_info.h:33
roc
Root namespace.
socket_addr.h
Socket address.
roc::rtcp::ParticipantInfo::report_address
address::SocketAddr report_address
Participant destination report address. Used if report_mode is set to Report_ToAddress.
Definition
participant_info.h:58
roc::rtcp::ParticipantInfo::source_id
packet::stream_source_t source_id
Participant SSRC. This number uniquely identifies each participant within RTP session....
Definition
participant_info.h:50
roc::rtcp::ParticipantInfo::cname
const char * cname
Participant CNAME. This string uniquely identifies each participant across all RTP sessions....
Definition
participant_info.h:44
roc::rtcp::ParticipantInfo::report_mode
ParticipantReportMode report_mode
Participant report mode. Deterimeds where to send generated reports.
Definition
participant_info.h:54
units.h
Various units used in packets.
roc_rtcp
participant_info.h
Generated by
1.17.0