Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
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 
16 #include "roc_packet/units.h"
17 
18 namespace roc {
19 namespace rtcp {
20 
21 //! Participant report generation mode.
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.
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.
34 };
35 
36 //! Participant info.
37 //! @remarks
38 //! Provides information about RTCP participant (sender/receiver).
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.
51 
52  //! Participant report mode.
53  //! Deterimeds where to send generated reports.
55 
56  //! Participant destination report address.
57  //! Used if report_mode is set to Report_ToAddress.
59 
61  : cname(NULL)
62  , source_id(0)
64  , report_address() {
65  }
66 };
67 
68 } // namespace rtcp
69 } // namespace roc
70 
71 #endif // ROC_RTCP_PARTICIPANT_INFO_H_
Socket address.
Definition: socket_addr.h:26
uint32_t stream_source_t
Packet stream identifier.
Definition: units.h:27
ParticipantReportMode
Participant report generation mode.
@ Report_ToAddress
Reports are sent to a single static destination address, set via report_address field of ParticipantI...
@ Report_Back
Reports are sent back to dynamically discovered participant. In this mode, for every stream we send o...
Root namespace.
Socket address.
address::SocketAddr report_address
Participant destination report address. Used if report_mode is set to Report_ToAddress.
packet::stream_source_t source_id
Participant SSRC. This number uniquely identifies each participant within RTP session....
const char * cname
Participant CNAME. This string uniquely identifies each participant across all RTP sessions....
ParticipantReportMode report_mode
Participant report mode. Deterimeds where to send generated reports.
Various units used in packets.