Agora C++ API Reference for All Platforms

rtc_connection_i.h
1 //
2 // Agora Media SDK
3 //
4 // Created by Sting Feng in 2015-05.
5 // Copyright (c) 2015 Agora IO. All rights reserved.
6 //
7 #pragma once
8
9 #include <functional>
10 #include <list>
11 #include <memory>
12 #include <string>
13 #include <utility>
14 #include <vector>
15
16 #include "IAgoraService.h"
17 #include "NGIAgoraRtcConnection.h"
18 #include "audio_node_stat_i.h"
19 #include "local_user_i.h"
20
21 namespace agora {
22 namespace base {
23 class BaseWorker;
24 struct ExtraReportData;
25 } // namespace base
26
27 namespace commons {
28 namespace cjson {
29 class JsonWrapper;
30 } // namespace cjson
31
32 namespace network {
33 struct network_info_t;
34 } // namespace network
35 } // namespace commons
36
37 namespace rtc {
38
39 struct LocalAccessPointInfo;
40
41 namespace protocol {
42 struct CmdRecordingEventReportArgus;
43 } // namespace protocol
44
45 class CallContext;
46 class IRtcEngineEventHandler;
47 class IAudioEngineWrapper;
48 class IVideoEngine;
49 class AudioPacketFilter;
50 class VideoPacketFilter;
51 struct audio_packet_t;
52 struct SAudioFrame;
53 struct video_packet_t;
54 struct peer_message_t;
55 struct control_broadcast_packet_t;
56 struct video_custom_ctrl_broadcast_packet_t;
57 struct WebAgentVideoStats;
58
59 static const uint8_t AUDIO_MEDIA_PACKET_PAYLOAD_TYPE = 127;
60
61 struct PacketOptions : media::base::PacketOptions {
62 // Agora will ignore unknown payload type
63 uint8_t payload_type;
64 // if enabled audio rs-fec
65 bool rsfec;
66 AudioFrameHandleInfo handle_info;
67 // RTP ssrc
68 uint32_t ssrc;
69 // bool is_key_frame;
70 // uint8_t frame_packet_count;
71 // uint8_t frame_packet_sequence;
72 // if packet is encrypted
73 bool encrypted;
74 // payload with agora header
75 bool with_agora_header;
76 PacketOptions()
77 : media::base::PacketOptions(),
78 payload_type(0),
79 rsfec(false),
80 ssrc(0),
81 encrypted(false),
82 with_agora_header(false) {}
83 };
84
85 enum CongestionControlType {
86 CONGESTION_CONTROLLER_TYPE_AGORA_CC = 0,
87
88 CONGESTION_CONTROLLER_TYPE_REMB,
89
90 CONGESTION_CONTROLLER_TYPE_TRANSPORT_CC,
91
92 CONGESTION_CONTROLLER_TYPE_AUT_CC
93 };
94
95 enum ConnectionMode {
96 // In active mode, broadcast messages will be sent through the connection.
97 // This is used as a publisher is bound with the connection.
98 CONNECTION_MODE_ACTIVE,
99 // In passive mode, broadcast messages will not be sent through the
100 // connection.
101 // This is used as default mode and no publisher is bound with the connection,
102 CONNECTION_MODE_PASSIVE
103 };
104
105 struct RtcConnectionConfigurationEx : RtcConnectionConfiguration {
106 RtcConnectionConfigurationEx()
107 : RtcConnectionConfiguration::RtcConnectionConfiguration(),
108 clientType(0),
109 #ifdef P2P_SWITCH_DEFAULT_VALUE
110 is_p2p_switch_enabled(P2P_SWITCH_DEFAULT_VALUE)
111 #else
112 is_p2p_switch_enabled(false)
113 #endif
114 {
115 }
116
117 RtcConnectionConfigurationEx(const RtcConnectionConfiguration& rhs) {
118 autoSubscribeAudio = rhs.autoSubscribeAudio;
119 autoSubscribeVideo = rhs.autoSubscribeVideo;
120 enableAudioRecordingOrPlayout = rhs.enableAudioRecordingOrPlayout;
121 maxSendBitrate = rhs.maxSendBitrate;
122 minPort = rhs.minPort;
123 maxPort = rhs.maxPort;
124 channelProfile = rhs.channelProfile;
125 audioRecvEncodedFrame = rhs.audioRecvEncodedFrame;
126 audioRecvMediaPacket = rhs.audioRecvMediaPacket;
127 videoRecvMediaPacket = rhs.videoRecvMediaPacket;
128 isDataChannelOnly = rhs.isDataChannelOnly;
129 isInteractiveAudience = rhs.isInteractiveAudience;
130 clientType = 0;
131 #ifdef P2P_SWITCH_DEFAULT_VALUE
132 is_p2p_switch_enabled = P2P_SWITCH_DEFAULT_VALUE;
133 #else
134 is_p2p_switch_enabled = false;
135 #endif
136 }
137 int clientType;
138 Optional<conn_id_t> connId;
139 bool is_p2p_switch_enabled;
140 std::list<std::string> vosList;
141 };
142
143 struct ReceivePacketHandler {
144 using onAudioPacketType = std::function<int(audio_packet_t&)>;
145 using onVideoPacketType = std::function<int(video_packet_t&)>;
146 using onControlBroadcastPacketType = std::function<int(control_broadcast_packet_t&)>;
147 using onPeerMessageType = std::function<int(const peer_message_t&)>;
148 using onVideoCustomCtrlPacketType = std::function<int(video_custom_ctrl_broadcast_packet_t&)>;
149 using onAudioFrameType = std::function<int(SAudioFrame&)>;
150
151 onAudioPacketType onAudioPacket_;
152 onVideoPacketType onVideoPacket_;
153 onControlBroadcastPacketType onControlBroadcastPacket_;
154 onPeerMessageType onPeerMessagePacket_;
155 onVideoCustomCtrlPacketType onVideoCustomCtrlPacket_;
156 onAudioFrameType onAudioFrame_;
157 ReceivePacketHandler(onAudioPacketType&& onAudioPacket = nullptr,
158 onVideoPacketType&& onVideoPacket = nullptr,
159 onControlBroadcastPacketType&& onControlBroadcastPacket = nullptr,
160 onPeerMessageType&& onPeerMessagePacket = nullptr,
161 onVideoCustomCtrlPacketType&& onVideoCustomCtrlPacket = nullptr,
162 onAudioFrameType&& onAudioFrame = nullptr)
163 : onAudioPacket_(std::move(onAudioPacket)),
164 onVideoPacket_(std::move(onVideoPacket)),
165 onControlBroadcastPacket_(std::move(onControlBroadcastPacket)),
166 onPeerMessagePacket_(std::move(onPeerMessagePacket)),
167 onVideoCustomCtrlPacket_(std::move(onVideoCustomCtrlPacket)),
168 onAudioFrame_(std::move(onAudioFrame)) {}
169 ReceivePacketHandler(ReceivePacketHandler&& rhs)
170 : onAudioPacket_(std::move(rhs.onAudioPacket_)),
171 onVideoPacket_(std::move(rhs.onVideoPacket_)),
172 onControlBroadcastPacket_(std::move(rhs.onControlBroadcastPacket_)),
173 onPeerMessagePacket_(std::move(rhs.onPeerMessagePacket_)),
174 onVideoCustomCtrlPacket_(std::move(rhs.onVideoCustomCtrlPacket_)),
175 onAudioFrame_(std::move(rhs.onAudioFrame_)) {}
176 };
177
178 struct RtcConnStats {
179 RtcStats stats;
180 uint64_t banned_elapse = 0;
181 uint64_t space_id = UINT64_MAX;
182 };
183
184 class IRtcConnectionEx : public IRtcConnection, public INetworkObserver {
185 public:
186 virtual int initialize(const base::AgoraServiceConfiguration& serviceCfg,
187 const RtcConnectionConfiguration& cfg) = 0;
188 virtual int initializeLLApiInternal(const base::AgoraServiceConfiguration& serviceCfg,
189 const RtcConnectionConfiguration& connCfg) = 0;
190 virtual int initializeEx(const base::AgoraServiceConfiguration& serviceCfg,
191 const RtcConnectionConfigurationEx& cfg) = 0;
192 virtual int deinitialize() = 0;
193 virtual void setUserRole(CLIENT_ROLE_TYPE role) = 0;
194 virtual CLIENT_ROLE_TYPE getUserRole() = 0;
195 virtual bool isEncryptionEnabled() const = 0;
196 virtual int sendAudioFrame(SAudioFrame& frame, int delay_ms = 0) = 0;
197 virtual int sendVideoPacket(video_packet_t& packet) = 0;
198 virtual int sendVideoPacketInternal(video_packet_t& packet) = 0;
199
200 virtual int sendControlBroadcastPacket(std::string&& data) = 0;
201 virtual int sendPeerMessage(peer_message_t& message) = 0;
202 virtual int sendVideoCustomCtrlBroadcastPacket(video_custom_ctrl_broadcast_packet_t& packet) = 0;
203 virtual void subscribeReceivePacketHandler(ReceivePacketHandler&& handler) = 0;
204 virtual void unsubscribeReceivePacketHandler() = 0;
205 virtual void setChannelId(const char* channel) = 0;
206 virtual void setConnectionState(CONNECTION_STATE_TYPE state) = 0;
207 virtual void setLocalUserId(user_id_t userId) = 0;
208 virtual void setSid(const char* sid) = 0;
209 // FIXME: remove this after we rework internal logic. Only modules of the call
210 // engine relies on CallContext
211 virtual CallContext* getCallContext() = 0;
212 virtual bool getUid(user_id_t userId, rtc::uid_t& uid) = 0;
213 virtual bool getUserId(rtc::uid_t uid, std::string& userId) = 0;
214 virtual rtc::uid_t getLocalUid() = 0;
215 virtual std::string getLocalUserId() = 0;
216 virtual bool isLocalUid(uid_t uid) = 0;
217 virtual bool isLocalUserId(const std::string& userId) = 0;
218 virtual void muteLocalAudio(bool mute) = 0;
219 virtual void muteRemoteAudio(user_id_t userId, bool mute) = 0;
220 virtual void muteAllRemoteAudio(bool mute) = 0;
221 virtual void setDefaultMuteAllRemoteAudioStreams(bool mute) = 0;
222 virtual void muteLocalVideo(bool mute) = 0;
223 virtual void muteRemoteVideo(user_id_t userId, bool mute) = 0;
224 virtual void muteAllRemoteVideo(bool mute) = 0;
225 virtual void setDefaultMuteAllRemoteVideoStreams(bool mute) = 0;
226 virtual void setRemoteVideoStreamType(user_id_t userId, VIDEO_STREAM_TYPE type) = 0;
227 virtual void setRemoteDefaultVideoStreamType(VIDEO_STREAM_TYPE type) = 0;
228
229 virtual void setRtcStats(const RtcStats& stats) = 0;
230 virtual void setBannedTime(const uint64_t banned_time) = 0;
231 virtual RtcConnStats GetStats() = 0;
232 virtual bool isConnected() = 0;
233 virtual uint32_t getCid() = 0;
234 virtual uint32_t getVid() = 0;
235 virtual const char* getSid() = 0;
236 virtual void setVos(const char* name, int port) = 0;
237 virtual int reportArgusCounters(int* counterId, int* value, int count, user_id_t userId) = 0;
238 virtual void setChannelProfile(CHANNEL_PROFILE_TYPE channel_profile) = 0;
239 virtual void setRtmFlag(bool rtmFlag) = 0;
240
241 // The following functions should only be used in UT.
242 virtual AudioPacketFilter* getAudioPacketFilter() = 0;
243 virtual VideoPacketFilter* getVideoPacketFilter() = 0;
244 virtual bool hasAudioRemoteTrack(user_id_t id) = 0;
245 virtual bool hasVideoRemoteTrack(user_id_t id, uint32_t ssrc) = 0;
246 // The upper functions should only be used by UT.
247
248 virtual CongestionControlType ccType() = 0;
249
250 // TODO(hanpengfei): maybe need to implement at other place.
251 virtual void onClientRoleChanged(CLIENT_ROLE_TYPE oldRole, CLIENT_ROLE_TYPE newRole, const ClientRoleOptions& newRoleOptions) = 0;
252 virtual void networkChanged(commons::network::network_info_t&& networkInfo) = 0;
253 virtual int sendReport(const void* data, size_t length, int level, int type, int retry,
254 const base::ExtraReportData* extra) = 0;
255 virtual int setParameters(const std::string& parameters, int priority = 50) = 0;
256 virtual int getParameters(const std::string& parameters, commons::cjson::JsonWrapper& results) = 0;
257 virtual void stopAsyncHandler(bool waitForExit) = 0;
258 virtual void setPacketObserver(IPacketObserver* observer) = 0;
259 virtual int sendWebAgentVideoStats(const std::string& uidstr,
260 const WebAgentVideoStats& stats) = 0;
261 virtual void sendRecordingArgusEvents(const protocol::CmdRecordingEventReportArgus& events) = 0;
262
263 virtual int sendCallRating(const std::string& callId, int rating,
264 const std::string& description) = 0;
265 virtual bool isWebrtcPacerEnabled() = 0;
266 virtual void didStreamMessageSync(uid_t userId, int streamId, const char* data, size_t length,
267 uint64_t sentTs) = 0;
268 virtual void sendAudioVolumeIndication(const AudioVolumeInfo* speakers, unsigned int speaker_number,
269 int total_volume) = 0;
270 virtual int32_t setEncryptionSecret(const char* secret) = 0;
271 virtual int32_t setEncryptionMode(const char* mode) = 0;
272 virtual int32_t enableVosUserInfoHidden(bool enabled) = 0;
273 virtual int32_t enableBuiltInMediaEncryption(bool enabled) = 0;
274 virtual int32_t setAudioScenarioType(AUDIO_SCENARIO_TYPE type) = 0;
275 virtual std::string getAppIdFromToken(const std::string& token) = 0;
276 virtual uint64_t statsSpace() = 0;
277 virtual int setMediaRenderingTracingTick(uint64_t tick) = 0;
278 virtual void SetLocalApInfo(const LocalAccessPointInfo& config) = 0;
279 virtual agora::base::IAgoraParameter* getAgoraParameter() = 0;
280 virtual int connectLLApiInternal(const TConnectSettings& settings) = 0;
281 virtual int connectLLApiInternal(const char* token, const char* channelId, const char* info,
282 user_id_t userId) = 0;
283 virtual int disconnectLLApiInternal() = 0;
284 virtual TConnectionInfo getConnectionInfoLLApiInternal() = 0;
285 virtual int renewTokenLLApiInternal(const char* token) = 0;
286 virtual ILocalUserEx* getLocalUserLLApiInternal() = 0;
287 virtual int getRemoteUsersLLApiInternal(UserList& users) = 0;
288 virtual int startLastmileProbeTestLLApiInternal(const LastmileProbeConfig& config) = 0;
289 virtual int stopLastmileProbeTestLLApiInternal() = 0;
290 virtual int registerObserverLLApiInternal(IRtcConnectionObserver* observer, void (*safeDeleter)(IRtcConnectionObserver*) = NULL) = 0;
291 virtual int unregisterObserverLLApiInternal(IRtcConnectionObserver* observer) = 0;
292 virtual base::IAgoraParameter* getAgoraParameterLLApiInternal() = 0;
293 virtual int createDataStreamLLApiInternal(int* streamId, bool reliable, bool ordered, bool sync) = 0;
294 virtual int sendStreamMessageLLApiInternal(int streamId, const char* data, size_t length) = 0;
295 virtual int registerNetworkObserverLLApiInternal(INetworkObserver* observer, void (*safeDeleter)(INetworkObserver*) = NULL) = 0;
296 virtual int unregisterNetworkObserverLLApiInternal(INetworkObserver* observer) = 0;
297 virtual int sendCustomReportMessageLLApiInternal(const char* id, const char* category, const char* event, const char* label, int value) = 0;
298 virtual int enableEncryptionLLApiInternal(bool enabled, const EncryptionConfig& config) = 0;
299 };
300
301 } // namespace rtc
302 } // namespace agora
agora::rtc::IRtcConnectionEx::setChannelId
virtual void setChannelId(const char *channel)=0
agora::rtc::RtcConnectionConfiguration::audioRecvEncodedFrame
bool audioRecvEncodedFrame
Definition: NGIAgoraRtcConnection.h:132
agora::rtc::IRtcConnectionEx::sendVideoPacketInternal
virtual int sendVideoPacketInternal(video_packet_t &packet)=0
agora::rtc::IRtcConnectionEx::hasVideoRemoteTrack
virtual bool hasVideoRemoteTrack(user_id_t id, uint32_t ssrc)=0
agora::rtc::IRtcConnectionEx::subscribeReceivePacketHandler
virtual void subscribeReceivePacketHandler(ReceivePacketHandler &&handler)=0
agora::rtc::IRtcConnectionEx::getLocalUid
virtual rtc::uid_t getLocalUid()=0
agora::rtc::PacketOptions::rsfec
bool rsfec
Definition: rtc_connection_i.h:65
agora::rtc::RtcConnectionConfiguration::channelProfile
CHANNEL_PROFILE_TYPE channelProfile
Definition: NGIAgoraRtcConnection.h:127
agora::rtc::PacketOptions::encrypted
bool encrypted
Definition: rtc_connection_i.h:73
agora::rtc::ReceivePacketHandler::onPeerMessageType
std::function< int(const peer_message_t &)> onPeerMessageType
Definition: rtc_connection_i.h:147
agora::rtc::AudioVolumeInfo
Definition: AgoraBase.h:3404
agora::rtc::IRtcConnectionEx::setDefaultMuteAllRemoteAudioStreams
virtual void setDefaultMuteAllRemoteAudioStreams(bool mute)=0
agora::rtc::IRtcConnectionEx::networkChanged
virtual void networkChanged(commons::network::network_info_t &&networkInfo)=0
agora::rtc::IRtcConnectionEx::stopLastmileProbeTestLLApiInternal
virtual int stopLastmileProbeTestLLApiInternal()=0
agora::base::IAgoraParameter
Definition: IAgoraParameter.h:147
agora::rtc::RtcConnectionConfiguration::minPort
int minPort
Definition: NGIAgoraRtcConnection.h:116
agora::rtc::LastmileProbeConfig
Definition: AgoraBase.h:4320
agora::rtc::WebAgentVideoStats
Definition: rtc_engine_i.h:354
agora::rtc::IRtcConnectionEx::initializeLLApiInternal
virtual int initializeLLApiInternal(const base::AgoraServiceConfiguration &serviceCfg, const RtcConnectionConfiguration &connCfg)=0
agora::rtc::INetworkObserver
Definition: NGIAgoraRtcConnection.h:829
agora::rtc::CONGESTION_CONTROLLER_TYPE_TRANSPORT_CC
@ CONGESTION_CONTROLLER_TYPE_TRANSPORT_CC
Definition: rtc_connection_i.h:90
agora::rtc::PacketOptions
Definition: rtc_connection_i.h:61
agora::rtc::ReceivePacketHandler::ReceivePacketHandler
ReceivePacketHandler(onAudioPacketType &&onAudioPacket=nullptr, onVideoPacketType &&onVideoPacket=nullptr, onControlBroadcastPacketType &&onControlBroadcastPacket=nullptr, onPeerMessageType &&onPeerMessagePacket=nullptr, onVideoCustomCtrlPacketType &&onVideoCustomCtrlPacket=nullptr, onAudioFrameType &&onAudioFrame=nullptr)
Definition: rtc_connection_i.h:157
agora::rtc::CONGESTION_CONTROLLER_TYPE_AGORA_CC
@ CONGESTION_CONTROLLER_TYPE_AGORA_CC
Definition: rtc_connection_i.h:86
agora::base::AgoraServiceConfiguration
Definition: IAgoraService.h:82
agora::rtc::IRtcConnectionEx::setConnectionState
virtual void setConnectionState(CONNECTION_STATE_TYPE state)=0
agora::rtc::PacketOptions::payload_type
uint8_t payload_type
Definition: rtc_connection_i.h:63
agora::rtc::IRtcConnectionEx::setEncryptionSecret
virtual int32_t setEncryptionSecret(const char *secret)=0
agora::rtc::IRtcConnectionObserver
Definition: NGIAgoraRtcConnection.h:506
agora::rtc::IRtcConnectionEx::reportArgusCounters
virtual int reportArgusCounters(int *counterId, int *value, int count, user_id_t userId)=0
agora::rtc::IRtcConnectionEx::muteLocalVideo
virtual void muteLocalVideo(bool mute)=0
agora::rtc::ReceivePacketHandler::onVideoCustomCtrlPacket_
onVideoCustomCtrlPacketType onVideoCustomCtrlPacket_
Definition: rtc_connection_i.h:155
agora::rtc::IRtcConnectionEx::sendCustomReportMessageLLApiInternal
virtual int sendCustomReportMessageLLApiInternal(const char *id, const char *category, const char *event, const char *label, int value)=0
agora::rtc::ConnectionMode
ConnectionMode
Definition: rtc_connection_i.h:95
agora::rtc::IRtcConnectionEx::getConnectionInfoLLApiInternal
virtual TConnectionInfo getConnectionInfoLLApiInternal()=0
agora::rtc::IRtcConnectionEx::SetLocalApInfo
virtual void SetLocalApInfo(const LocalAccessPointInfo &config)=0
agora::rtc::AUDIO_SCENARIO_TYPE
AUDIO_SCENARIO_TYPE
Definition: AgoraBase.h:2679
agora::user_id_t
const char * user_id_t
Definition: AgoraBase.h:813
agora::rtc::IRtcConnectionEx::startLastmileProbeTestLLApiInternal
virtual int startLastmileProbeTestLLApiInternal(const LastmileProbeConfig &config)=0
agora::rtc::IRtcEngineEventHandler
Definition: IAgoraRtcEngine.h:1508
agora::util::AList
Definition: AgoraBase.h:233
agora::rtc::IRtcConnectionEx::getSid
virtual const char * getSid()=0
agora::rtc::IRtcConnectionEx::setBannedTime
virtual void setBannedTime(const uint64_t banned_time)=0
agora::rtc::ReceivePacketHandler::onControlBroadcastPacket_
onControlBroadcastPacketType onControlBroadcastPacket_
Definition: rtc_connection_i.h:153
agora::rtc::ReceivePacketHandler::onAudioFrame_
onAudioFrameType onAudioFrame_
Definition: rtc_connection_i.h:156
agora::rtc::ReceivePacketHandler::onAudioFrameType
std::function< int(SAudioFrame &)> onAudioFrameType
Definition: rtc_connection_i.h:149
agora::rtc::IRtcConnectionEx::setDefaultMuteAllRemoteVideoStreams
virtual void setDefaultMuteAllRemoteVideoStreams(bool mute)=0
agora::rtc::ReceivePacketHandler::onVideoPacket_
onVideoPacketType onVideoPacket_
Definition: rtc_connection_i.h:152
agora::rtc::ReceivePacketHandler::onAudioPacketType
std::function< int(audio_packet_t &)> onAudioPacketType
Definition: rtc_connection_i.h:144
agora::rtc::IRtcConnectionEx::getAudioPacketFilter
virtual AudioPacketFilter * getAudioPacketFilter()=0
agora::rtc::IRtcConnectionEx::didStreamMessageSync
virtual void didStreamMessageSync(uid_t userId, int streamId, const char *data, size_t length, uint64_t sentTs)=0
agora::rtc::IRtcConnectionEx::setRemoteVideoStreamType
virtual void setRemoteVideoStreamType(user_id_t userId, VIDEO_STREAM_TYPE type)=0
agora::rtc::ReceivePacketHandler::ReceivePacketHandler
ReceivePacketHandler(ReceivePacketHandler &&rhs)
Definition: rtc_connection_i.h:169
agora::rtc::IRtcConnectionEx::GetStats
virtual RtcConnStats GetStats()=0
agora::rtc::RtcConnectionConfiguration::autoSubscribeAudio
bool autoSubscribeAudio
Definition: NGIAgoraRtcConnection.h:96
agora::rtc::TConnectSettings
Definition: NGIAgoraRtcConnection.h:55
agora::rtc::RtcConnectionConfiguration::audioRecvMediaPacket
bool audioRecvMediaPacket
Definition: NGIAgoraRtcConnection.h:137
agora::rtc::RtcConnectionConfigurationEx::clientType
int clientType
Definition: rtc_connection_i.h:137
agora::rtc::ReceivePacketHandler::onPeerMessagePacket_
onPeerMessageType onPeerMessagePacket_
Definition: rtc_connection_i.h:154
agora::rtc::IRtcConnectionEx::setChannelProfile
virtual void setChannelProfile(CHANNEL_PROFILE_TYPE channel_profile)=0
agora::rtc::RtcConnectionConfigurationEx::vosList
std::list< std::string > vosList
Definition: rtc_connection_i.h:140
agora
Definition: AgoraAtomicOps.h:21
agora::rtc::IRtcConnectionEx::initializeEx
virtual int initializeEx(const base::AgoraServiceConfiguration &serviceCfg, const RtcConnectionConfigurationEx &cfg)=0
agora::rtc::IRtcConnectionEx::setMediaRenderingTracingTick
virtual int setMediaRenderingTracingTick(uint64_t tick)=0
agora::rtc::IRtcConnectionEx::sendReport
virtual int sendReport(const void *data, size_t length, int level, int type, int retry, const base::ExtraReportData *extra)=0
agora::rtc::RtcConnStats
Definition: rtc_connection_i.h:178
agora::rtc::CONGESTION_CONTROLLER_TYPE_AUT_CC
@ CONGESTION_CONTROLLER_TYPE_AUT_CC
Definition: rtc_connection_i.h:92
agora::rtc::IRtcConnectionEx::getAgoraParameterLLApiInternal
virtual base::IAgoraParameter * getAgoraParameterLLApiInternal()=0
agora::rtc::RtcConnectionConfigurationEx::RtcConnectionConfigurationEx
RtcConnectionConfigurationEx()
Definition: rtc_connection_i.h:106
agora::rtc::IRtcConnectionEx::renewTokenLLApiInternal
virtual int renewTokenLLApiInternal(const char *token)=0
agora::rtc::IPacketObserver
Definition: AgoraBase.h:3456
agora::rtc::RtcConnectionConfigurationEx
Definition: rtc_connection_i.h:105
agora::rtc::TConnectionInfo
Definition: NGIAgoraRtcConnection.h:26
agora::rtc::IRtcConnectionEx::isLocalUserId
virtual bool isLocalUserId(const std::string &userId)=0
agora::CHANNEL_PROFILE_TYPE
CHANNEL_PROFILE_TYPE
Definition: AgoraBase.h:267
agora::rtc::ReceivePacketHandler
Definition: rtc_connection_i.h:143
agora::rtc::IRtcConnectionEx::deinitialize
virtual int deinitialize()=0
agora::rtc::RtcConnectionConfiguration::isInteractiveAudience
bool isInteractiveAudience
Definition: NGIAgoraRtcConnection.h:151
agora::rtc::IRtcConnectionEx::muteRemoteAudio
virtual void muteRemoteAudio(user_id_t userId, bool mute)=0
agora::rtc::CONNECTION_MODE_ACTIVE
@ CONNECTION_MODE_ACTIVE
Definition: rtc_connection_i.h:98
agora::rtc::AudioFrameHandleInfo
Definition: audio_node_stat_i.h:32
agora::rtc::IRtcConnectionEx::getAgoraParameter
virtual agora::base::IAgoraParameter * getAgoraParameter()=0
agora::rtc::IRtcConnectionEx::muteRemoteVideo
virtual void muteRemoteVideo(user_id_t userId, bool mute)=0
agora::rtc::IRtcConnectionEx::ccType
virtual CongestionControlType ccType()=0
agora::rtc::IRtcConnectionEx::getVid
virtual uint32_t getVid()=0
agora::rtc::IRtcConnectionEx::getUid
virtual bool getUid(user_id_t userId, rtc::uid_t &uid)=0
agora::rtc::IRtcConnectionEx::setParameters
virtual int setParameters(const std::string &parameters, int priority=50)=0
agora::rtc::ReceivePacketHandler::onAudioPacket_
onAudioPacketType onAudioPacket_
Definition: rtc_connection_i.h:151
agora::rtc::IRtcConnectionEx::enableVosUserInfoHidden
virtual int32_t enableVosUserInfoHidden(bool enabled)=0
agora::media::base::PacketOptions
Definition: AgoraMediaBase.h:322
agora::rtc::video_packet_t
Definition: packet_i.h:166
agora::rtc::ReceivePacketHandler::onControlBroadcastPacketType
std::function< int(control_broadcast_packet_t &)> onControlBroadcastPacketType
Definition: rtc_connection_i.h:146
agora::rtc::IRtcConnectionEx::getCid
virtual uint32_t getCid()=0
agora::rtc::IRtcConnectionEx::registerObserverLLApiInternal
virtual int registerObserverLLApiInternal(IRtcConnectionObserver *observer, void(*safeDeleter)(IRtcConnectionObserver *)=NULL)=0
agora::rtc::IRtcConnectionEx::getLocalUserLLApiInternal
virtual ILocalUserEx * getLocalUserLLApiInternal()=0
agora::rtc::CONGESTION_CONTROLLER_TYPE_REMB
@ CONGESTION_CONTROLLER_TYPE_REMB
Definition: rtc_connection_i.h:88
agora::rtc::SAudioFrame
Definition: packet_i.h:64
agora::rtc::ReceivePacketHandler::onVideoCustomCtrlPacketType
std::function< int(video_custom_ctrl_broadcast_packet_t &)> onVideoCustomCtrlPacketType
Definition: rtc_connection_i.h:148
agora::rtc::IRtcConnectionEx::registerNetworkObserverLLApiInternal
virtual int registerNetworkObserverLLApiInternal(INetworkObserver *observer, void(*safeDeleter)(INetworkObserver *)=NULL)=0
agora::rtc::IRtcConnectionEx::muteLocalAudio
virtual void muteLocalAudio(bool mute)=0
agora::rtc::IRtcConnectionEx::isEncryptionEnabled
virtual bool isEncryptionEnabled() const =0
agora::rtc::RtcConnectionConfiguration::enableAudioRecordingOrPlayout
bool enableAudioRecordingOrPlayout
Definition: NGIAgoraRtcConnection.h:108
agora::rtc::ILocalUserEx
Definition: local_user_i.h:130
agora::rtc::PacketOptions::handle_info
AudioFrameHandleInfo handle_info
Definition: rtc_connection_i.h:66
agora::rtc::IRtcConnectionEx::statsSpace
virtual uint64_t statsSpace()=0
agora::rtc::IRtcConnectionEx::sendVideoPacket
virtual int sendVideoPacket(video_packet_t &packet)=0
agora::rtc::IRtcConnectionEx::sendWebAgentVideoStats
virtual int sendWebAgentVideoStats(const std::string &uidstr, const WebAgentVideoStats &stats)=0
agora::rtc::IRtcConnectionEx::getLocalUserId
virtual std::string getLocalUserId()=0
agora::rtc::IRtcConnectionEx::sendVideoCustomCtrlBroadcastPacket
virtual int sendVideoCustomCtrlBroadcastPacket(video_custom_ctrl_broadcast_packet_t &packet)=0
agora::rtc::audio_packet_t
Definition: packet_i.h:153
agora::rtc::RtcConnectionConfiguration::videoRecvMediaPacket
bool videoRecvMediaPacket
Definition: NGIAgoraRtcConnection.h:142
agora::rtc::RtcConnectionConfiguration::autoSubscribeVideo
bool autoSubscribeVideo
Definition: NGIAgoraRtcConnection.h:102
agora::rtc::IRtcConnectionEx::createDataStreamLLApiInternal
virtual int createDataStreamLLApiInternal(int *streamId, bool reliable, bool ordered, bool sync)=0
agora::rtc::IRtcConnectionEx::getParameters
virtual int getParameters(const std::string &parameters, commons::cjson::JsonWrapper &results)=0
agora::rtc::AUDIO_MEDIA_PACKET_PAYLOAD_TYPE
static const uint8_t AUDIO_MEDIA_PACKET_PAYLOAD_TYPE
Definition: rtc_connection_i.h:59
agora::rtc::IRtcConnectionEx::connectLLApiInternal
virtual int connectLLApiInternal(const TConnectSettings &settings)=0
agora::rtc::EncryptionConfig
Definition: AgoraBase.h:6508
agora::rtc::IRtcConnectionEx::sendCallRating
virtual int sendCallRating(const std::string &callId, int rating, const std::string &description)=0
agora::rtc::control_broadcast_packet_t
Definition: packet_i.h:285
agora::rtc::IRtcConnectionEx::setRtcStats
virtual void setRtcStats(const RtcStats &stats)=0
agora::rtc::PacketOptions::ssrc
uint32_t ssrc
Definition: rtc_connection_i.h:68
agora::rtc::RtcConnectionConfigurationEx::is_p2p_switch_enabled
bool is_p2p_switch_enabled
Definition: rtc_connection_i.h:139
agora::rtc::IRtcConnectionEx::muteAllRemoteAudio
virtual void muteAllRemoteAudio(bool mute)=0
agora::rtc::IRtcConnectionEx::setPacketObserver
virtual void setPacketObserver(IPacketObserver *observer)=0
agora::rtc::IRtcConnectionEx::hasAudioRemoteTrack
virtual bool hasAudioRemoteTrack(user_id_t id)=0
agora::rtc::RtcConnectionConfigurationEx::connId
Optional< conn_id_t > connId
Definition: rtc_connection_i.h:138
agora::rtc::IRtcConnectionEx::getRemoteUsersLLApiInternal
virtual int getRemoteUsersLLApiInternal(UserList &users)=0
agora::rtc::IRtcConnectionEx::setRemoteDefaultVideoStreamType
virtual void setRemoteDefaultVideoStreamType(VIDEO_STREAM_TYPE type)=0
agora::rtc::IRtcConnectionEx::getUserRole
virtual CLIENT_ROLE_TYPE getUserRole()=0
agora::rtc::IRtcConnectionEx::connectLLApiInternal
virtual int connectLLApiInternal(const char *token, const char *channelId, const char *info, user_id_t userId)=0
agora::rtc::IRtcConnectionEx::stopAsyncHandler
virtual void stopAsyncHandler(bool waitForExit)=0
agora::rtc::RtcConnStats::space_id
uint64_t space_id
Definition: rtc_connection_i.h:181
agora::rtc::RtcStats
Definition: AgoraBase.h:2317
agora::rtc::IRtcConnectionEx::setSid
virtual void setSid(const char *sid)=0
agora::rtc::IRtcConnectionEx::unregisterNetworkObserverLLApiInternal
virtual int unregisterNetworkObserverLLApiInternal(INetworkObserver *observer)=0
agora::rtc::RtcConnectionConfiguration
Definition: NGIAgoraRtcConnection.h:90
agora::rtc::CongestionControlType
CongestionControlType
Definition: rtc_connection_i.h:85
agora::rtc::IRtcConnectionEx::setAudioScenarioType
virtual int32_t setAudioScenarioType(AUDIO_SCENARIO_TYPE type)=0
std
Definition: AgoraOptional.h:881
agora::rtc::IRtcConnectionEx::sendStreamMessageLLApiInternal
virtual int sendStreamMessageLLApiInternal(int streamId, const char *data, size_t length)=0
agora::rtc::RtcConnStats::banned_elapse
uint64_t banned_elapse
Definition: rtc_connection_i.h:180
agora::rtc::RtcConnStats::stats
RtcStats stats
Definition: rtc_connection_i.h:179
agora::rtc::IRtcConnectionEx::sendRecordingArgusEvents
virtual void sendRecordingArgusEvents(const protocol::CmdRecordingEventReportArgus &events)=0
agora::rtc::VIDEO_STREAM_TYPE
VIDEO_STREAM_TYPE
Definition: AgoraBase.h:1573
agora::rtc::IRtcConnectionEx::sendControlBroadcastPacket
virtual int sendControlBroadcastPacket(std::string &&data)=0
agora::rtc::RtcConnectionConfiguration::maxPort
int maxPort
Definition: NGIAgoraRtcConnection.h:120
agora::rtc::IRtcConnectionEx::sendAudioVolumeIndication
virtual void sendAudioVolumeIndication(const AudioVolumeInfo *speakers, unsigned int speaker_number, int total_volume)=0
agora::rtc::video_custom_ctrl_broadcast_packet_t
Definition: packet_i.h:291
agora::rtc::IRtcConnectionEx::unregisterObserverLLApiInternal
virtual int unregisterObserverLLApiInternal(IRtcConnectionObserver *observer)=0
agora::rtc::IRtcConnectionEx::sendAudioFrame
virtual int sendAudioFrame(SAudioFrame &frame, int delay_ms=0)=0
agora::rtc::IRtcConnection
Definition: NGIAgoraRtcConnection.h:184
agora::rtc::IRtcConnectionEx::setEncryptionMode
virtual int32_t setEncryptionMode(const char *mode)=0
agora::rtc::IRtcConnectionEx::initialize
virtual int initialize(const base::AgoraServiceConfiguration &serviceCfg, const RtcConnectionConfiguration &cfg)=0
agora::rtc::IRtcConnectionEx::enableBuiltInMediaEncryption
virtual int32_t enableBuiltInMediaEncryption(bool enabled)=0
agora::rtc::IRtcConnectionEx::getVideoPacketFilter
virtual VideoPacketFilter * getVideoPacketFilter()=0
agora::rtc::PacketOptions::with_agora_header
bool with_agora_header
Definition: rtc_connection_i.h:75
agora::rtc::IRtcConnectionEx::muteAllRemoteVideo
virtual void muteAllRemoteVideo(bool mute)=0
agora::rtc::peer_message_t
Definition: packet_i.h:296
agora::rtc::IRtcConnectionEx::setUserRole
virtual void setUserRole(CLIENT_ROLE_TYPE role)=0
agora::rtc::CONNECTION_MODE_PASSIVE
@ CONNECTION_MODE_PASSIVE
Definition: rtc_connection_i.h:102
agora::rtc::PacketOptions::PacketOptions
PacketOptions()
Definition: rtc_connection_i.h:76
agora::rtc::uid_t
unsigned int uid_t
Definition: AgoraMediaBase.h:28
agora::rtc::RtcConnectionConfiguration::isDataChannelOnly
bool isDataChannelOnly
Definition: NGIAgoraRtcConnection.h:156
agora::rtc::CLIENT_ROLE_TYPE
CLIENT_ROLE_TYPE
Definition: AgoraBase.h:2516
agora::rtc::IRtcConnectionEx::enableEncryptionLLApiInternal
virtual int enableEncryptionLLApiInternal(bool enabled, const EncryptionConfig &config)=0
agora::rtc::IRtcConnectionEx::isLocalUid
virtual bool isLocalUid(uid_t uid)=0
agora::rtc::IRtcConnectionEx::unsubscribeReceivePacketHandler
virtual void unsubscribeReceivePacketHandler()=0
agora::rtc::CONNECTION_STATE_TYPE
CONNECTION_STATE_TYPE
Definition: AgoraBase.h:3847
agora::rtc::IRtcConnectionEx::getAppIdFromToken
virtual std::string getAppIdFromToken(const std::string &token)=0
agora::rtc::IRtcConnectionEx::getCallContext
virtual CallContext * getCallContext()=0
agora::rtc::IRtcConnectionEx::disconnectLLApiInternal
virtual int disconnectLLApiInternal()=0
agora::rtc::IRtcConnectionEx::setLocalUserId
virtual void setLocalUserId(user_id_t userId)=0
agora::rtc::IRtcConnectionEx::setRtmFlag
virtual void setRtmFlag(bool rtmFlag)=0
agora::rtc::IRtcConnectionEx::onClientRoleChanged
virtual void onClientRoleChanged(CLIENT_ROLE_TYPE oldRole, CLIENT_ROLE_TYPE newRole, const ClientRoleOptions &newRoleOptions)=0
agora::rtc::RtcConnectionConfiguration::maxSendBitrate
int maxSendBitrate
Definition: NGIAgoraRtcConnection.h:112
agora::rtc::IRtcConnectionEx::setVos
virtual void setVos(const char *name, int port)=0
agora::rtc::ReceivePacketHandler::onVideoPacketType
std::function< int(video_packet_t &)> onVideoPacketType
Definition: rtc_connection_i.h:145
rtc
Definition: video_node_i.h:28
agora::rtc::IRtcConnectionEx::isWebrtcPacerEnabled
virtual bool isWebrtcPacerEnabled()=0
agora::rtc::IRtcConnectionEx::isConnected
virtual bool isConnected()=0
agora::Optional< conn_id_t >
agora::rtc::ClientRoleOptions
Definition: AgoraBase.h:2564
agora::rtc::IRtcConnectionEx
Definition: rtc_connection_i.h:184
agora::rtc::IRtcConnectionEx::sendPeerMessage
virtual int sendPeerMessage(peer_message_t &message)=0
agora::rtc::IRtcConnectionEx::getUserId
virtual bool getUserId(rtc::uid_t uid, std::string &userId)=0