Agora C++ API Reference for All Platforms

Loading...
Searching...
No Matches
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 setUserRoleStatus(CLIENT_ROLE_TYPE role, AUDIENCE_LATENCY_LEVEL_TYPE level) = 0;
194 virtual CLIENT_ROLE_TYPE getUserRole() = 0;
195 virtual AUDIENCE_LATENCY_LEVEL_TYPE getAudienceLatencyLevel() = 0;
196 virtual bool isEncryptionEnabled() const = 0;
197 virtual int sendAudioFrame(SAudioFrame& frame, int delay_ms = 0) = 0;
198
199 virtual int sendControlBroadcastPacket(std::string&& data) = 0;
200 virtual int sendPeerMessage(peer_message_t& message) = 0;
201 virtual int sendMediaControlMessageLLApiInternal(user_id_t userId, const char* data, size_t length) = 0;
202 virtual void subscribeReceivePacketHandler(ReceivePacketHandler&& handler) = 0;
203 virtual void unsubscribeReceivePacketHandler() = 0;
204 virtual void setChannelId(const char* channel) = 0;
205 virtual void setConnectionState(CONNECTION_STATE_TYPE state) = 0;
206 virtual void setLocalUserId(user_id_t userId) = 0;
207 virtual void setSid(const char* sid) = 0;
208 // FIXME: remove this after we rework internal logic. Only modules of the call
209 // engine relies on CallContext
210 virtual CallContext* getCallContext() = 0;
211 virtual bool getUid(user_id_t userId, rtc::uid_t& uid) = 0;
212 virtual bool getUserId(rtc::uid_t uid, std::string& userId) = 0;
213 virtual rtc::uid_t getLocalUid() = 0;
214 virtual std::string getLocalUserId() = 0;
215 virtual bool isLocalUid(uid_t uid) = 0;
216 virtual bool isLocalUserId(const std::string& userId) = 0;
217 virtual void muteLocalAudio(bool mute) = 0;
218 virtual void muteRemoteAudio(user_id_t userId, bool mute) = 0;
219 virtual void muteAllRemoteAudio(bool mute) = 0;
220 virtual void setDefaultMuteAllRemoteAudioStreams(bool mute) = 0;
221#if defined(FEATURE_VIDEO)
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 virtual int sendVideoCustomCtrlBroadcastPacket(video_custom_ctrl_broadcast_packet_t& packet) = 0;
229 virtual int sendVideoPacketInternal(video_packet_t& packet) = 0;
230 virtual int sendVideoPacket(video_packet_t& packet) = 0;
231#endif
232 virtual void setRtcStats(const RtcStats& stats) = 0;
233 virtual void setBannedTime(const uint64_t banned_time) = 0;
234 virtual RtcConnStats GetStats() = 0;
235 virtual bool isConnected() = 0;
236 virtual uint32_t getCid() = 0;
237 virtual uint32_t getVid() = 0;
238 virtual const char* getSid() = 0;
239 virtual void setVos(const char* name, int port) = 0;
240 virtual int reportArgusCounters(int* counterId, int* value, int count, user_id_t userId) = 0;
241 virtual void setChannelProfile(CHANNEL_PROFILE_TYPE channel_profile) = 0;
242 virtual void setRtmFlag(bool rtmFlag) = 0;
243
244 // The following functions should only be used in UT.
245 virtual AudioPacketFilter* getAudioPacketFilter() = 0;
246 virtual VideoPacketFilter* getVideoPacketFilter() = 0;
247 virtual bool hasAudioRemoteTrack(user_id_t id) = 0;
248 virtual bool hasVideoRemoteTrack(user_id_t id, uint32_t ssrc) = 0;
249 // The upper functions should only be used by UT.
250
251 virtual CongestionControlType ccType() = 0;
252
253 // TODO(hanpengfei): maybe need to implement at other place.
254 virtual void onClientRoleChanged(CLIENT_ROLE_TYPE oldRole, CLIENT_ROLE_TYPE newRole, const ClientRoleOptions& newRoleOptions) = 0;
255 virtual void networkChanged(commons::network::network_info_t&& networkInfo) = 0;
256 virtual int sendReport(const void* data, size_t length, int level, int type, int retry,
257 const base::ExtraReportData* extra) = 0;
258 virtual int setParameters(const std::string& parameters, int priority = 50) = 0;
259 virtual int getParameters(const std::string& parameters, commons::cjson::JsonWrapper& results) = 0;
260 virtual void stopAsyncHandler(bool waitForExit) = 0;
261 virtual void setPacketObserver(IPacketObserver* observer) = 0;
262 virtual int sendWebAgentVideoStats(const std::string& uidstr,
263 const WebAgentVideoStats& stats) = 0;
264 virtual void sendRecordingArgusEvents(const protocol::CmdRecordingEventReportArgus& events) = 0;
265
266 virtual int sendCallRating(const std::string& callId, int rating,
267 const std::string& description) = 0;
268 virtual bool isWebrtcPacerEnabled() = 0;
269 virtual void didStreamMessageSync(uid_t userId, int streamId, const char* data, size_t length,
270 uint64_t sentTs) = 0;
271 virtual void sendAudioVolumeIndication(const AudioVolumeInfo* speakers, unsigned int speaker_number,
272 int total_volume) = 0;
273 virtual int32_t setEncryptionSecret(const char* secret) = 0;
274 virtual int32_t setEncryptionMode(const char* mode) = 0;
275 virtual int32_t enableVosUserInfoHidden(bool enabled) = 0;
276 virtual int32_t enableBuiltInMediaEncryption(bool enabled) = 0;
277 virtual int32_t setAudioScenarioType(AUDIO_SCENARIO_TYPE type) = 0;
278 virtual std::string getAppIdFromToken(const std::string& token) = 0;
279 virtual uint64_t statsSpace() = 0;
280 virtual int setMediaRenderingTracingTick(uint64_t tick) = 0;
281 virtual void SetLocalApInfo(const LocalAccessPointInfo& config) = 0;
282 virtual agora::base::IAgoraParameter* getAgoraParameter() = 0;
283 virtual int connectLLApiInternal(const TConnectSettings& settings) = 0;
284 virtual int connectLLApiInternal(const char* token, const char* channelId, const char* info,
285 user_id_t userId) = 0;
286 virtual int disconnectLLApiInternal() = 0;
287 virtual TConnectionInfo getConnectionInfoLLApiInternal() = 0;
288 virtual int renewTokenLLApiInternal(const char* token) = 0;
289 virtual ILocalUserEx* getLocalUserLLApiInternal() = 0;
290 virtual int getRemoteUsersLLApiInternal(UserList& users) = 0;
291 virtual int startLastmileProbeTestLLApiInternal(const LastmileProbeConfig& config) = 0;
292 virtual int stopLastmileProbeTestLLApiInternal() = 0;
293 virtual int registerObserverLLApiInternal(IRtcConnectionObserver* observer, void (*safeDeleter)(IRtcConnectionObserver*) = NULL) = 0;
294 virtual int unregisterObserverLLApiInternal(IRtcConnectionObserver* observer) = 0;
295 virtual base::IAgoraParameter* getAgoraParameterLLApiInternal() = 0;
296 virtual int createDataStreamLLApiInternal(int* streamId, bool reliable, bool ordered, bool sync) = 0;
297 virtual int sendStreamMessageLLApiInternal(int streamId, const char* data, size_t length) = 0;
298 virtual int sendRdtMessageLLApiInternal(user_id_t userId, RdtStreamType type, const char* data, size_t length) = 0;
299 virtual int registerNetworkObserverLLApiInternal(INetworkObserver* observer, void (*safeDeleter)(INetworkObserver*) = NULL) = 0;
300 virtual int unregisterNetworkObserverLLApiInternal(INetworkObserver* observer) = 0;
301 virtual int sendCustomReportMessageLLApiInternal(const char* id, const char* category, const char* event, const char* label, int value) = 0;
302 virtual int enableEncryptionLLApiInternal(bool enabled, const EncryptionConfig& config) = 0;
303 virtual void enableMediaRelay(bool enabled) = 0;
304};
305
306} // namespace rtc
307} // namespace agora
agora::Optional
Definition AgoraOptional.h:413
agora::base::IAgoraParameter
The interface class of Agora RTC SDK, which provides JSON configuration information of the SDK.
Definition IAgoraParameter.h:151
agora::rtc::ILocalUserEx
Definition local_user_i.h:130
agora::rtc::INetworkObserver
Definition NGIAgoraRtcConnection.h:917
agora::rtc::IPacketObserver
Definition AgoraBase.h:4032
agora::rtc::IRtcConnectionEx
Definition rtc_connection_i.h:184
agora::rtc::IRtcConnectionEx::connectLLApiInternal
virtual int connectLLApiInternal(const TConnectSettings &settings)=0
agora::rtc::IRtcConnectionEx::enableEncryptionLLApiInternal
virtual int enableEncryptionLLApiInternal(bool enabled, const EncryptionConfig &config)=0
agora::rtc::IRtcConnectionEx::onClientRoleChanged
virtual void onClientRoleChanged(CLIENT_ROLE_TYPE oldRole, CLIENT_ROLE_TYPE newRole, const ClientRoleOptions &newRoleOptions)=0
agora::rtc::IRtcConnectionEx::getLocalUid
virtual rtc::uid_t getLocalUid()=0
agora::rtc::IRtcConnectionEx::getCallContext
virtual CallContext * getCallContext()=0
agora::rtc::IRtcConnectionEx::getUid
virtual bool getUid(user_id_t userId, rtc::uid_t &uid)=0
agora::rtc::IRtcConnectionEx::setChannelProfile
virtual void setChannelProfile(CHANNEL_PROFILE_TYPE channel_profile)=0
agora::rtc::IRtcConnectionEx::getAudioPacketFilter
virtual AudioPacketFilter * getAudioPacketFilter()=0
agora::rtc::IRtcConnectionEx::enableMediaRelay
virtual void enableMediaRelay(bool enabled)=0
agora::rtc::IRtcConnectionEx::setEncryptionMode
virtual int32_t setEncryptionMode(const char *mode)=0
agora::rtc::IRtcConnectionEx::sendVideoCustomCtrlBroadcastPacket
virtual int sendVideoCustomCtrlBroadcastPacket(video_custom_ctrl_broadcast_packet_t &packet)=0
agora::rtc::IRtcConnectionEx::setDefaultMuteAllRemoteVideoStreams
virtual void setDefaultMuteAllRemoteVideoStreams(bool mute)=0
agora::rtc::IRtcConnectionEx::unregisterNetworkObserverLLApiInternal
virtual int unregisterNetworkObserverLLApiInternal(INetworkObserver *observer)=0
agora::rtc::IRtcConnectionEx::getAgoraParameterLLApiInternal
virtual base::IAgoraParameter * getAgoraParameterLLApiInternal()=0
agora::rtc::IRtcConnectionEx::setLocalUserId
virtual void setLocalUserId(user_id_t userId)=0
agora::rtc::IRtcConnectionEx::disconnectLLApiInternal
virtual int disconnectLLApiInternal()=0
agora::rtc::IRtcConnectionEx::initializeEx
virtual int initializeEx(const base::AgoraServiceConfiguration &serviceCfg, const RtcConnectionConfigurationEx &cfg)=0
agora::rtc::IRtcConnectionEx::stopLastmileProbeTestLLApiInternal
virtual int stopLastmileProbeTestLLApiInternal()=0
agora::rtc::IRtcConnectionEx::isEncryptionEnabled
virtual bool isEncryptionEnabled() const =0
agora::rtc::IRtcConnectionEx::getSid
virtual const char * getSid()=0
agora::rtc::IRtcConnectionEx::sendVideoPacket
virtual int sendVideoPacket(video_packet_t &packet)=0
agora::rtc::IRtcConnectionEx::setConnectionState
virtual void setConnectionState(CONNECTION_STATE_TYPE state)=0
agora::rtc::IRtcConnectionEx::getLocalUserLLApiInternal
virtual ILocalUserEx * getLocalUserLLApiInternal()=0
agora::rtc::IRtcConnectionEx::initialize
virtual int initialize(const base::AgoraServiceConfiguration &serviceCfg, const RtcConnectionConfiguration &cfg)=0
agora::rtc::IRtcConnectionEx::getLocalUserId
virtual std::string getLocalUserId()=0
agora::rtc::IRtcConnectionEx::sendWebAgentVideoStats
virtual int sendWebAgentVideoStats(const std::string &uidstr, const WebAgentVideoStats &stats)=0
agora::rtc::IRtcConnectionEx::sendControlBroadcastPacket
virtual int sendControlBroadcastPacket(std::string &&data)=0
agora::rtc::IRtcConnectionEx::getCid
virtual uint32_t getCid()=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::setAudioScenarioType
virtual int32_t setAudioScenarioType(AUDIO_SCENARIO_TYPE type)=0
agora::rtc::IRtcConnectionEx::getUserRole
virtual CLIENT_ROLE_TYPE getUserRole()=0
agora::rtc::IRtcConnectionEx::setMediaRenderingTracingTick
virtual int setMediaRenderingTracingTick(uint64_t tick)=0
agora::rtc::IRtcConnectionEx::GetStats
virtual RtcConnStats GetStats()=0
agora::rtc::IRtcConnectionEx::muteAllRemoteAudio
virtual void muteAllRemoteAudio(bool mute)=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::IRtcConnectionEx::sendStreamMessageLLApiInternal
virtual int sendStreamMessageLLApiInternal(int streamId, const char *data, size_t length)=0
agora::rtc::IRtcConnectionEx::sendAudioFrame
virtual int sendAudioFrame(SAudioFrame &frame, int delay_ms=0)=0
agora::rtc::IRtcConnectionEx::setParameters
virtual int setParameters(const std::string &parameters, int priority=50)=0
agora::rtc::IRtcConnectionEx::setRtcStats
virtual void setRtcStats(const RtcStats &stats)=0
agora::rtc::IRtcConnectionEx::isWebrtcPacerEnabled
virtual bool isWebrtcPacerEnabled()=0
agora::rtc::IRtcConnectionEx::sendMediaControlMessageLLApiInternal
virtual int sendMediaControlMessageLLApiInternal(user_id_t userId, const char *data, size_t length)=0
agora::rtc::IRtcConnectionEx::sendRecordingArgusEvents
virtual void sendRecordingArgusEvents(const protocol::CmdRecordingEventReportArgus &events)=0
agora::rtc::IRtcConnectionEx::unregisterObserverLLApiInternal
virtual int unregisterObserverLLApiInternal(IRtcConnectionObserver *observer)=0
agora::rtc::IRtcConnectionEx::sendCustomReportMessageLLApiInternal
virtual int sendCustomReportMessageLLApiInternal(const char *id, const char *category, const char *event, const char *label, int value)=0
agora::rtc::IRtcConnectionEx::setEncryptionSecret
virtual int32_t setEncryptionSecret(const char *secret)=0
agora::rtc::IRtcConnectionEx::sendPeerMessage
virtual int sendPeerMessage(peer_message_t &message)=0
agora::rtc::IRtcConnectionEx::enableVosUserInfoHidden
virtual int32_t enableVosUserInfoHidden(bool enabled)=0
agora::rtc::IRtcConnectionEx::getParameters
virtual int getParameters(const std::string &parameters, commons::cjson::JsonWrapper &results)=0
agora::rtc::IRtcConnectionEx::isConnected
virtual bool isConnected()=0
agora::rtc::IRtcConnectionEx::sendAudioVolumeIndication
virtual void sendAudioVolumeIndication(const AudioVolumeInfo *speakers, unsigned int speaker_number, int total_volume)=0
agora::rtc::IRtcConnectionEx::setPacketObserver
virtual void setPacketObserver(IPacketObserver *observer)=0
agora::rtc::IRtcConnectionEx::setRtmFlag
virtual void setRtmFlag(bool rtmFlag)=0
agora::rtc::IRtcConnectionEx::setChannelId
virtual void setChannelId(const char *channel)=0
agora::rtc::IRtcConnectionEx::registerObserverLLApiInternal
virtual int registerObserverLLApiInternal(IRtcConnectionObserver *observer, void(*safeDeleter)(IRtcConnectionObserver *)=NULL)=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::setRemoteDefaultVideoStreamType
virtual void setRemoteDefaultVideoStreamType(VIDEO_STREAM_TYPE type)=0
agora::rtc::IRtcConnectionEx::deinitialize
virtual int deinitialize()=0
agora::rtc::IRtcConnectionEx::getAppIdFromToken
virtual std::string getAppIdFromToken(const std::string &token)=0
agora::rtc::IRtcConnectionEx::getVid
virtual uint32_t getVid()=0
agora::rtc::IRtcConnectionEx::getAgoraParameter
virtual agora::base::IAgoraParameter * getAgoraParameter()=0
agora::rtc::IRtcConnectionEx::stopAsyncHandler
virtual void stopAsyncHandler(bool waitForExit)=0
agora::rtc::IRtcConnectionEx::getUserId
virtual bool getUserId(rtc::uid_t uid, std::string &userId)=0
agora::rtc::IRtcConnectionEx::reportArgusCounters
virtual int reportArgusCounters(int *counterId, int *value, int count, user_id_t userId)=0
agora::rtc::IRtcConnectionEx::muteRemoteAudio
virtual void muteRemoteAudio(user_id_t userId, bool mute)=0
agora::rtc::IRtcConnectionEx::setVos
virtual void setVos(const char *name, int port)=0
agora::rtc::IRtcConnectionEx::isLocalUserId
virtual bool isLocalUserId(const std::string &userId)=0
agora::rtc::IRtcConnectionEx::registerNetworkObserverLLApiInternal
virtual int registerNetworkObserverLLApiInternal(INetworkObserver *observer, void(*safeDeleter)(INetworkObserver *)=NULL)=0
agora::rtc::IRtcConnectionEx::networkChanged
virtual void networkChanged(commons::network::network_info_t &&networkInfo)=0
agora::rtc::IRtcConnectionEx::setRemoteVideoStreamType
virtual void setRemoteVideoStreamType(user_id_t userId, VIDEO_STREAM_TYPE type)=0
agora::rtc::IRtcConnectionEx::sendRdtMessageLLApiInternal
virtual int sendRdtMessageLLApiInternal(user_id_t userId, RdtStreamType type, const char *data, size_t length)=0
agora::rtc::IRtcConnectionEx::hasAudioRemoteTrack
virtual bool hasAudioRemoteTrack(user_id_t id)=0
agora::rtc::IRtcConnectionEx::getConnectionInfoLLApiInternal
virtual TConnectionInfo getConnectionInfoLLApiInternal()=0
agora::rtc::IRtcConnectionEx::enableBuiltInMediaEncryption
virtual int32_t enableBuiltInMediaEncryption(bool enabled)=0
agora::rtc::IRtcConnectionEx::getVideoPacketFilter
virtual VideoPacketFilter * getVideoPacketFilter()=0
agora::rtc::IRtcConnectionEx::setUserRoleStatus
virtual void setUserRoleStatus(CLIENT_ROLE_TYPE role, AUDIENCE_LATENCY_LEVEL_TYPE level)=0
agora::rtc::IRtcConnectionEx::muteLocalAudio
virtual void muteLocalAudio(bool mute)=0
agora::rtc::IRtcConnectionEx::initializeLLApiInternal
virtual int initializeLLApiInternal(const base::AgoraServiceConfiguration &serviceCfg, const RtcConnectionConfiguration &connCfg)=0
agora::rtc::IRtcConnectionEx::statsSpace
virtual uint64_t statsSpace()=0
agora::rtc::IRtcConnectionEx::setSid
virtual void setSid(const char *sid)=0
agora::rtc::IRtcConnectionEx::unsubscribeReceivePacketHandler
virtual void unsubscribeReceivePacketHandler()=0
agora::rtc::IRtcConnectionEx::getAudienceLatencyLevel
virtual AUDIENCE_LATENCY_LEVEL_TYPE getAudienceLatencyLevel()=0
agora::rtc::IRtcConnectionEx::ccType
virtual CongestionControlType ccType()=0
agora::rtc::IRtcConnectionEx::setDefaultMuteAllRemoteAudioStreams
virtual void setDefaultMuteAllRemoteAudioStreams(bool mute)=0
agora::rtc::IRtcConnectionEx::muteLocalVideo
virtual void muteLocalVideo(bool mute)=0
agora::rtc::IRtcConnectionEx::createDataStreamLLApiInternal
virtual int createDataStreamLLApiInternal(int *streamId, bool reliable, bool ordered, bool sync)=0
agora::rtc::IRtcConnectionEx::renewTokenLLApiInternal
virtual int renewTokenLLApiInternal(const char *token)=0
agora::rtc::IRtcConnectionEx::hasVideoRemoteTrack
virtual bool hasVideoRemoteTrack(user_id_t id, uint32_t ssrc)=0
agora::rtc::IRtcConnectionEx::muteRemoteVideo
virtual void muteRemoteVideo(user_id_t userId, bool mute)=0
agora::rtc::IRtcConnectionEx::sendVideoPacketInternal
virtual int sendVideoPacketInternal(video_packet_t &packet)=0
agora::rtc::IRtcConnectionEx::muteAllRemoteVideo
virtual void muteAllRemoteVideo(bool mute)=0
agora::rtc::IRtcConnectionEx::sendCallRating
virtual int sendCallRating(const std::string &callId, int rating, const std::string &description)=0
agora::rtc::IRtcConnectionEx::getRemoteUsersLLApiInternal
virtual int getRemoteUsersLLApiInternal(UserList &users)=0
agora::rtc::IRtcConnectionEx::setBannedTime
virtual void setBannedTime(const uint64_t banned_time)=0
agora::rtc::IRtcConnectionEx::isLocalUid
virtual bool isLocalUid(uid_t uid)=0
agora::rtc::IRtcConnectionEx::SetLocalApInfo
virtual void SetLocalApInfo(const LocalAccessPointInfo &config)=0
agora::rtc::IRtcConnectionEx::startLastmileProbeTestLLApiInternal
virtual int startLastmileProbeTestLLApiInternal(const LastmileProbeConfig &config)=0
agora::rtc::IRtcConnectionEx::subscribeReceivePacketHandler
virtual void subscribeReceivePacketHandler(ReceivePacketHandler &&handler)=0
agora::rtc::IRtcConnection
Definition NGIAgoraRtcConnection.h:184
agora::rtc::IRtcConnectionObserver
Definition NGIAgoraRtcConnection.h:594
agora::rtc::IRtcEngineEventHandler
Definition IAgoraRtcEngine.h:1791
agora::base
Definition IAgoraService.h:73
agora::commons::cjson
Definition rtc_connection_i.h:28
agora::commons::network
Definition rtc_connection_i.h:32
agora::commons
Definition agora_log_i.h:14
agora::media
Definition content_inspect_i.h:15
agora::rtc::protocol
Definition rtc_connection_i.h:41
agora::rtc::CongestionControlType
CongestionControlType
Definition rtc_connection_i.h:85
agora::rtc::CONGESTION_CONTROLLER_TYPE_AGORA_CC
@ CONGESTION_CONTROLLER_TYPE_AGORA_CC
Definition rtc_connection_i.h:86
agora::rtc::CONGESTION_CONTROLLER_TYPE_REMB
@ CONGESTION_CONTROLLER_TYPE_REMB
Definition rtc_connection_i.h:88
agora::rtc::CONGESTION_CONTROLLER_TYPE_TRANSPORT_CC
@ CONGESTION_CONTROLLER_TYPE_TRANSPORT_CC
Definition rtc_connection_i.h:90
agora::rtc::CONGESTION_CONTROLLER_TYPE_AUT_CC
@ CONGESTION_CONTROLLER_TYPE_AUT_CC
Definition rtc_connection_i.h:92
agora::rtc::AUDIENCE_LATENCY_LEVEL_TYPE
AUDIENCE_LATENCY_LEVEL_TYPE
The latency level of an audience member in interactive live streaming. This enum takes effect only wh...
Definition AgoraBase.h:2985
agora::rtc::AUDIO_SCENARIO_TYPE
AUDIO_SCENARIO_TYPE
The audio scenarios.
Definition AgoraBase.h:3124
agora::rtc::CLIENT_ROLE_TYPE
CLIENT_ROLE_TYPE
The user role in the interactive live streaming.
Definition AgoraBase.h:2951
agora::rtc::CONNECTION_STATE_TYPE
CONNECTION_STATE_TYPE
Connection states.
Definition AgoraBase.h:4433
agora::rtc::VIDEO_STREAM_TYPE
VIDEO_STREAM_TYPE
The type of video streams.
Definition AgoraBase.h:1660
agora::rtc::ConnectionMode
ConnectionMode
Definition rtc_connection_i.h:95
agora::rtc::CONNECTION_MODE_ACTIVE
@ CONNECTION_MODE_ACTIVE
Definition rtc_connection_i.h:98
agora::rtc::CONNECTION_MODE_PASSIVE
@ CONNECTION_MODE_PASSIVE
Definition rtc_connection_i.h:102
agora::rtc::RdtStreamType
RdtStreamType
Reliable Data Transmission Tunnel message stream type.
Definition AgoraBase.h:7967
agora::rtc::AUDIO_MEDIA_PACKET_PAYLOAD_TYPE
static const uint8_t AUDIO_MEDIA_PACKET_PAYLOAD_TYPE
Definition rtc_connection_i.h:59
agora::rtc::uid_t
unsigned int uid_t
Definition AgoraMediaBase.h:28
agora
Definition AgoraAtomicOps.h:21
agora::UserList
util::AList< UserInfo > UserList
Definition AgoraBase.h:876
agora::user_id_t
const char * user_id_t
Definition AgoraBase.h:849
agora::CHANNEL_PROFILE_TYPE
CHANNEL_PROFILE_TYPE
The channel profile.
Definition AgoraBase.h:267
rtc
Definition video_node_i.h:28
std
Definition AgoraOptional.h:881
agora::base::AgoraServiceConfiguration
Definition IAgoraService.h:83
agora::media::base::PacketOptions
Definition AgoraMediaBase.h:358
agora::rtc::AudioFrameHandleInfo
Definition audio_node_stat_i.h:32
agora::rtc::AudioVolumeInfo
The volume information of users.
Definition AgoraBase.h:3974
agora::rtc::ClientRoleOptions
Setting of user role properties.
Definition AgoraBase.h:2999
agora::rtc::EncryptionConfig
Built-in encryption configurations.
Definition AgoraBase.h:7286
agora::rtc::LastmileProbeConfig
Configurations of the last-mile network test.
Definition AgoraBase.h:4948
agora::rtc::PacketOptions::encrypted
bool encrypted
Definition rtc_connection_i.h:73
agora::rtc::PacketOptions::payload_type
uint8_t payload_type
Definition rtc_connection_i.h:63
agora::rtc::PacketOptions::PacketOptions
PacketOptions()
Definition rtc_connection_i.h:76
agora::rtc::PacketOptions::ssrc
uint32_t ssrc
Definition rtc_connection_i.h:68
agora::rtc::PacketOptions::handle_info
AudioFrameHandleInfo handle_info
Definition rtc_connection_i.h:66
agora::rtc::PacketOptions::with_agora_header
bool with_agora_header
Definition rtc_connection_i.h:75
agora::rtc::PacketOptions::rsfec
bool rsfec
Definition rtc_connection_i.h:65
agora::rtc::ReceivePacketHandler
Definition rtc_connection_i.h:143
agora::rtc::ReceivePacketHandler::onVideoCustomCtrlPacketType
std::function< int(video_custom_ctrl_broadcast_packet_t &)> onVideoCustomCtrlPacketType
Definition rtc_connection_i.h:148
agora::rtc::ReceivePacketHandler::onAudioFrame_
onAudioFrameType onAudioFrame_
Definition rtc_connection_i.h:156
agora::rtc::ReceivePacketHandler::onPeerMessageType
std::function< int(const peer_message_t &)> onPeerMessageType
Definition rtc_connection_i.h:147
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::ReceivePacketHandler::onVideoPacket_
onVideoPacketType onVideoPacket_
Definition rtc_connection_i.h:152
agora::rtc::ReceivePacketHandler::onVideoPacketType
std::function< int(video_packet_t &)> onVideoPacketType
Definition rtc_connection_i.h:145
agora::rtc::ReceivePacketHandler::ReceivePacketHandler
ReceivePacketHandler(ReceivePacketHandler &&rhs)
Definition rtc_connection_i.h:169
agora::rtc::ReceivePacketHandler::onAudioPacket_
onAudioPacketType onAudioPacket_
Definition rtc_connection_i.h:151
agora::rtc::ReceivePacketHandler::onControlBroadcastPacketType
std::function< int(control_broadcast_packet_t &)> onControlBroadcastPacketType
Definition rtc_connection_i.h:146
agora::rtc::ReceivePacketHandler::onAudioFrameType
std::function< int(SAudioFrame &)> onAudioFrameType
Definition rtc_connection_i.h:149
agora::rtc::ReceivePacketHandler::onAudioPacketType
std::function< int(audio_packet_t &)> onAudioPacketType
Definition rtc_connection_i.h:144
agora::rtc::ReceivePacketHandler::onVideoCustomCtrlPacket_
onVideoCustomCtrlPacketType onVideoCustomCtrlPacket_
Definition rtc_connection_i.h:155
agora::rtc::ReceivePacketHandler::onPeerMessagePacket_
onPeerMessageType onPeerMessagePacket_
Definition rtc_connection_i.h:154
agora::rtc::ReceivePacketHandler::onControlBroadcastPacket_
onControlBroadcastPacketType onControlBroadcastPacket_
Definition rtc_connection_i.h:153
agora::rtc::RtcConnStats
Definition rtc_connection_i.h:178
agora::rtc::RtcConnStats::space_id
uint64_t space_id
Definition rtc_connection_i.h:181
agora::rtc::RtcConnStats::stats
RtcStats stats
Definition rtc_connection_i.h:179
agora::rtc::RtcConnStats::banned_elapse
uint64_t banned_elapse
Definition rtc_connection_i.h:180
agora::rtc::RtcConnectionConfigurationEx
Definition rtc_connection_i.h:105
agora::rtc::RtcConnectionConfigurationEx::vosList
std::list< std::string > vosList
Definition rtc_connection_i.h:140
agora::rtc::RtcConnectionConfigurationEx::connId
Optional< conn_id_t > connId
Definition rtc_connection_i.h:138
agora::rtc::RtcConnectionConfigurationEx::is_p2p_switch_enabled
bool is_p2p_switch_enabled
Definition rtc_connection_i.h:139
agora::rtc::RtcConnectionConfigurationEx::RtcConnectionConfigurationEx
RtcConnectionConfigurationEx()
Definition rtc_connection_i.h:106
agora::rtc::RtcConnectionConfigurationEx::clientType
int clientType
Definition rtc_connection_i.h:137
agora::rtc::RtcConnectionConfiguration
Definition NGIAgoraRtcConnection.h:90
agora::rtc::RtcConnectionConfiguration::autoSubscribeAudio
bool autoSubscribeAudio
Definition NGIAgoraRtcConnection.h:96
agora::rtc::RtcConnectionConfiguration::audioRecvMediaPacket
bool audioRecvMediaPacket
Definition NGIAgoraRtcConnection.h:137
agora::rtc::RtcConnectionConfiguration::RtcConnectionConfiguration
RtcConnectionConfiguration()
Definition NGIAgoraRtcConnection.h:158
agora::rtc::RtcConnectionConfiguration::isDataChannelOnly
bool isDataChannelOnly
Definition NGIAgoraRtcConnection.h:156
agora::rtc::RtcConnectionConfiguration::maxSendBitrate
int maxSendBitrate
Definition NGIAgoraRtcConnection.h:112
agora::rtc::RtcConnectionConfiguration::maxPort
int maxPort
Definition NGIAgoraRtcConnection.h:120
agora::rtc::RtcConnectionConfiguration::channelProfile
CHANNEL_PROFILE_TYPE channelProfile
Definition NGIAgoraRtcConnection.h:127
agora::rtc::RtcConnectionConfiguration::minPort
int minPort
Definition NGIAgoraRtcConnection.h:116
agora::rtc::RtcConnectionConfiguration::videoRecvMediaPacket
bool videoRecvMediaPacket
Definition NGIAgoraRtcConnection.h:142
agora::rtc::RtcConnectionConfiguration::isInteractiveAudience
bool isInteractiveAudience
Definition NGIAgoraRtcConnection.h:151
agora::rtc::RtcConnectionConfiguration::enableAudioRecordingOrPlayout
bool enableAudioRecordingOrPlayout
Definition NGIAgoraRtcConnection.h:108
agora::rtc::RtcConnectionConfiguration::audioRecvEncodedFrame
bool audioRecvEncodedFrame
Definition NGIAgoraRtcConnection.h:132
agora::rtc::RtcConnectionConfiguration::autoSubscribeVideo
bool autoSubscribeVideo
Definition NGIAgoraRtcConnection.h:102
agora::rtc::RtcStats
Statistics of a call session.
Definition AgoraBase.h:2742
agora::rtc::SAudioFrame
Definition packet_i.h:64
agora::rtc::TConnectSettings
Definition NGIAgoraRtcConnection.h:55
agora::rtc::TConnectionInfo
Definition NGIAgoraRtcConnection.h:26
agora::rtc::WebAgentVideoStats
Definition rtc_engine_i.h:362
agora::rtc::audio_packet_t
Definition packet_i.h:151
agora::rtc::control_broadcast_packet_t
Definition packet_i.h:282
agora::rtc::peer_message_t
Definition packet_i.h:293
agora::rtc::video_custom_ctrl_broadcast_packet_t
Definition packet_i.h:288
agora::rtc::video_packet_t
Definition packet_i.h:163