Agora Server Gateway SDK C++ API Reference
AgoraBase.h
Go to the documentation of this file.
1//
2// Agora Engine SDK
3//
4// Created by Sting Feng in 2017-11.
5// Copyright (c) 2017 Agora.io. All rights reserved.
6//
7
8// This header file is included by both high level and low level APIs,
9#pragma once // NOLINT(build/header_guard)
10
11#include <stdarg.h>
12#include <stddef.h>
13#include <stdio.h>
14#include <string.h>
15#include <cassert>
16
17#include "IAgoraParameter.h"
18#include "AgoraMediaBase.h"
19#include "AgoraRefPtr.h"
20#include "AgoraOptional.h"
21
22#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
23#define AGORA_DEPRECATED __attribute__((deprecated))
24#elif defined(_MSC_VER)
25#define AGORA_DEPRECATED __declspec(deprecated)
26#else
27#define AGORA_DEPRECATED
28#endif
29
30#define MAX_PATH_260 (260)
31
32#if defined(_WIN32)
33
34#ifndef WIN32_LEAN_AND_MEAN
35#define WIN32_LEAN_AND_MEAN
36#endif // !WIN32_LEAN_AND_MEAN
37#if defined(__aarch64__)
38#include <arm64intr.h>
39#endif
40#include <Windows.h>
41
42#if defined(AGORARTC_EXPORT)
43#define AGORA_API extern "C" __declspec(dllexport)
44#else
45#define AGORA_API extern "C" __declspec(dllimport)
46#endif // AGORARTC_EXPORT
47
48#define AGORA_CALL __cdecl
49
50#elif defined(__APPLE__)
51
52#include <TargetConditionals.h>
53
54#define AGORA_API extern "C" __attribute__((visibility("default")))
55#define AGORA_CALL
56
57#elif defined(__ANDROID__) || defined(__linux__)
58
59#define AGORA_API extern "C" __attribute__((visibility("default")))
60#define AGORA_CALL
61
62#else // !_WIN32 && !__APPLE__ && !(__ANDROID__ || __linux__)
63
64#define AGORA_API extern "C"
65#define AGORA_CALL
66
67#endif // _WIN32
68
69#ifndef OPTIONAL_ENUM_SIZE_T
70#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
71#define OPTIONAL_ENUM_SIZE_T enum : size_t
72#else
73#define OPTIONAL_ENUM_SIZE_T enum
74#endif
75#endif
76
77#ifndef OPTIONAL_NULLPTR
78#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
79#define OPTIONAL_NULLPTR nullptr
80#else
81#define OPTIONAL_NULLPTR NULL
82#endif
83#endif
84
85namespace agora
86{
87 namespace commons
88 {
89 namespace cjson
90 {
91 class JsonWrapper;
92 } // namespace cjson
93 } // namespace commons
94
95 typedef commons::cjson::JsonWrapper any_document_t;
96
97 namespace base
98 {
99 class IEngineBase;
100
102 {
103 public:
104 virtual int setParameters(const char *parameters) = 0;
105 virtual int getParameters(const char *key, any_document_t &result) = 0;
106 virtual ~IParameterEngine() {}
107 };
108 } // namespace base
109
110 namespace util
111 {
112
113 template <class T>
115 {
116 protected:
117 typedef T value_type;
118 typedef T *pointer_type;
119
120 public:
121 explicit AutoPtr(pointer_type p = NULL) : ptr_(p) {}
122
124 {
125 if (ptr_)
126 {
127 ptr_->release();
128 ptr_ = NULL;
129 }
130 }
131
132 operator bool() const { return (ptr_ != NULL); }
133
134 value_type &operator*() const { return *get(); }
135
136 pointer_type operator->() const { return get(); }
137
138 pointer_type get() const { return ptr_; }
139
141 {
142 pointer_type ret = ptr_;
143 ptr_ = 0;
144 return ret;
145 }
146
147 void reset(pointer_type ptr = NULL)
148 {
149 if (ptr != ptr_ && ptr_)
150 {
151 ptr_->release();
152 }
153
154 ptr_ = ptr;
155 }
156
157 template <class C1, class C2>
158 bool queryInterface(C1 *c, C2 iid)
159 {
160 pointer_type p = NULL;
161 if (c && !c->queryInterface(iid, reinterpret_cast<void **>(&p)))
162 {
163 reset(p);
164 }
165
166 return (p != NULL);
167 }
168
169 private:
170 AutoPtr(const AutoPtr &);
171 AutoPtr &operator=(const AutoPtr &);
172
173 private:
174 pointer_type ptr_;
175 };
176
177 template <class T>
178 class CopyableAutoPtr : public AutoPtr<T>
179 {
180 typedef typename AutoPtr<T>::pointer_type pointer_type;
181
182 public:
183 explicit CopyableAutoPtr(pointer_type p = 0) : AutoPtr<T>(p) {}
184 explicit CopyableAutoPtr(const CopyableAutoPtr &rhs) { this->reset(rhs.clone()); }
186 {
187 if (this != &rhs)
188 this->reset(rhs.clone());
189 return *this;
190 }
192 {
193 if (!this->get())
194 return NULL;
195 return this->get()->clone();
196 }
197 };
198
200 {
201 public:
202 virtual bool empty() const = 0;
203 virtual const char *c_str() = 0;
204 virtual const char *data() = 0;
205 virtual size_t length() = 0;
206 virtual IString *clone() = 0;
207 virtual void release() = 0;
208 virtual ~IString() {}
209 };
211
213 {
214 public:
215 virtual void *current() = 0;
216 virtual const void *const_current() const = 0;
217 virtual bool next() = 0;
218 virtual void release() = 0;
219 virtual ~IIterator() {}
220 };
221
223 {
224 public:
225 virtual IIterator *begin() = 0;
226 virtual size_t size() const = 0;
227 virtual void release() = 0;
228 virtual ~IContainer() {}
229 };
230
231 template <class T>
233 {
234 IIterator *p;
235
236 public:
237 typedef T value_type;
241 typedef const value_type *const_pointer;
242 explicit AOutputIterator(IIterator *it = NULL) : p(it) {}
244 {
245 if (p)
246 p->release();
247 }
248 AOutputIterator(const AOutputIterator &rhs) : p(rhs.p) {}
250 {
251 p->next();
252 return *this;
253 }
254 bool operator==(const AOutputIterator &rhs) const
255 {
256 if (p && rhs.p)
257 return p->current() == rhs.p->current();
258 else
259 return valid() == rhs.valid();
260 }
261 bool operator!=(const AOutputIterator &rhs) const { return !this->operator==(rhs); }
262 reference operator*() { return *reinterpret_cast<pointer>(p->current()); }
263 const_reference operator*() const { return *reinterpret_cast<const_pointer>(p->const_current()); }
264 bool valid() const { return p && p->current() != NULL; }
265 };
266
267 template <class T>
268 class AList
269 {
270 IContainer *container;
271 bool owner;
272
273 public:
274 typedef T value_type;
278 typedef const value_type *const_pointer;
279 typedef size_t size_type;
282
283 public:
284 AList() : container(NULL), owner(false) {}
285 AList(IContainer *c, bool take_ownership) : container(c), owner(take_ownership) {}
286 ~AList() { reset(); }
287 void reset(IContainer *c = NULL, bool take_ownership = false)
288 {
289 if (owner && container)
290 container->release();
291 container = c;
292 owner = take_ownership;
293 }
294 iterator begin() { return container ? iterator(container->begin()) : iterator(NULL); }
295 iterator end() { return iterator(NULL); }
296 size_type size() const { return container ? container->size() : 0; }
297 bool empty() const { return size() == 0; }
298 };
299
300 } // namespace util
301
306 {
331 CHANNEL_PROFILE_CLOUD_GAMING __deprecated = 3,
332
334
339 CHANNEL_PROFILE_COMMUNICATION_1v1 = 4,
340
346 CHANNEL_PROFILE_LIVE_BROADCASTING_2 = 5,
348 };
349
351
355 enum WARN_CODE_TYPE
356 {
361 WARN_INVALID_VIEW = 8,
366 WARN_INIT_VIDEO = 16,
371 WARN_PENDING = 20,
376 WARN_NO_AVAILABLE_CHANNEL = 103,
382 WARN_LOOKUP_CHANNEL_TIMEOUT = 104,
387 WARN_LOOKUP_CHANNEL_REJECTED = 105,
393 WARN_OPEN_CHANNEL_TIMEOUT = 106,
398 WARN_OPEN_CHANNEL_REJECTED = 107,
399
400 // sdk: 100~1000
404 WARN_SWITCH_LIVE_VIDEO_TIMEOUT = 111,
408 WARN_SET_CLIENT_ROLE_TIMEOUT = 118,
412 WARN_OPEN_CHANNEL_INVALID_TICKET = 121,
416 WARN_OPEN_CHANNEL_TRY_NEXT_VOS = 122,
420 WARN_CHANNEL_CONNECTION_UNRECOVERABLE = 131,
424 WARN_CHANNEL_CONNECTION_IP_CHANGED = 132,
428 WARN_CHANNEL_CONNECTION_PORT_CHANGED = 133,
431 WARN_CHANNEL_SOCKET_ERROR = 134,
435 WARN_AUDIO_MIXING_OPEN_ERROR = 701,
439 WARN_ADM_RUNTIME_PLAYOUT_WARNING = 1014,
443 WARN_ADM_RUNTIME_RECORDING_WARNING = 1016,
447 WARN_ADM_RECORD_AUDIO_SILENCE = 1019,
451 WARN_ADM_PLAYOUT_MALFUNCTION = 1020,
455 WARN_ADM_RECORD_MALFUNCTION = 1021,
462 WARN_ADM_IOS_CATEGORY_NOT_PLAYANDRECORD = 1029,
466 WARN_ADM_IOS_SAMPLERATE_CHANGE = 1030,
470 WARN_ADM_RECORD_AUDIO_LOWLEVEL = 1031,
474 WARN_ADM_PLAYOUT_AUDIO_LOWLEVEL = 1032,
482 WARN_ADM_WINDOWS_NO_DATA_READY_EVENT = 1040,
486 WARN_APM_HOWLING = 1051,
490 WARN_ADM_GLITCH_STATE = 1052,
494 WARN_ADM_IMPROPER_SETTINGS = 1053,
498 WARN_ADM_WIN_CORE_NO_RECORDING_DEVICE = 1322,
503 WARN_ADM_WIN_CORE_NO_PLAYOUT_DEVICE = 1323,
511 WARN_ADM_WIN_CORE_IMPROPER_CAPTURE_RELEASE = 1324,
512 };
513
517 enum ERROR_CODE_TYPE
518 {
522 ERR_OK = 0,
523 // 1~1000
527 ERR_FAILED = 1,
532 ERR_INVALID_ARGUMENT = 2,
539 ERR_NOT_READY = 3,
543 ERR_NOT_SUPPORTED = 4,
547 ERR_REFUSED = 5,
551 ERR_BUFFER_TOO_SMALL = 6,
555 ERR_NOT_INITIALIZED = 7,
559 ERR_INVALID_STATE = 8,
564 ERR_NO_PERMISSION = 9,
570 ERR_TIMEDOUT = 10,
575 ERR_CANCELED = 11,
581 ERR_TOO_OFTEN = 12,
587 ERR_BIND_SOCKET = 13,
592 ERR_NET_DOWN = 14,
598 ERR_NET_NOBUFS = 15,
604 ERR_JOIN_CHANNEL_REJECTED = 17,
611 ERR_LEAVE_CHANNEL_REJECTED = 18,
615 ERR_ALREADY_IN_USE = 19,
620 ERR_ABORTED = 20,
625 ERR_INIT_NET_ENGINE = 21,
630 ERR_RESOURCE_LIMITED = 22,
636 ERR_INVALID_APP_ID = 101,
641 ERR_INVALID_CHANNEL_NAME = 102,
647 ERR_NO_SERVER_RESOURCES = 103,
660 ERR_TOKEN_EXPIRED = 109,
677 ERR_INVALID_TOKEN = 110,
682 ERR_CONNECTION_INTERRUPTED = 111, // only used in web sdk
687 ERR_CONNECTION_LOST = 112, // only used in web sdk
692 ERR_NOT_IN_CHANNEL = 113,
697 ERR_SIZE_TOO_LARGE = 114,
702 ERR_BITRATE_LIMIT = 115,
707 ERR_TOO_MANY_DATA_STREAMS = 116,
711 ERR_STREAM_MESSAGE_TIMEOUT = 117,
715 ERR_SET_CLIENT_ROLE_NOT_AUTHORIZED = 119,
720 ERR_DECRYPTION_FAILED = 120,
724 ERR_INVALID_USER_ID = 121,
728 ERR_CLIENT_IS_BANNED_BY_SERVER = 123,
732 ERR_WATERMARK_PARAM = 124,
736 ERR_WATERMARK_PATH = 125,
740 ERR_WATERMARK_PNG = 126,
744 ERR_WATERMARKR_INFO = 127,
748 ERR_WATERMARK_ARGB = 128,
752 ERR_WATERMARK_READ = 129,
758 ERR_ENCRYPTED_STREAM_NOT_ALLOWED_PUBLISH = 130,
759
763 ERR_LICENSE_CREDENTIAL_INVALID = 131,
764
765 // Licensing, keep the license error code same as the main version
766 ERR_CERT_RAW = 157,
767 ERR_CERT_JSON_PART = 158,
768 ERR_CERT_JSON_INVAL = 159,
769 ERR_CERT_JSON_NOMEM = 160,
770 ERR_CERT_CUSTOM = 161,
771 ERR_CERT_CREDENTIAL = 162,
772 ERR_CERT_SIGN = 163,
773 ERR_CERT_FAIL = 164,
774 ERR_CERT_BUF = 165,
775 ERR_CERT_NULL = 166,
776 ERR_CERT_DUEDATE = 167,
777 ERR_CERT_REQUEST = 168,
778
779 // PcmSend Error num
780 ERR_PCMSEND_FORMAT = 200, // unsupport pcm format
781 ERR_PCMSEND_BUFFEROVERFLOW = 201, // buffer overflow, the pcm send rate too quickly
782
783 // signaling: 400~600
784 ERR_LOGOUT_OTHER = 400, //
785 ERR_LOGOUT_USER = 401, // logout by user
786 ERR_LOGOUT_NET = 402, // network failure
787 ERR_LOGOUT_KICKED = 403, // login in other device
788 ERR_LOGOUT_PACKET = 404, //
789 ERR_LOGOUT_TOKEN_EXPIRED = 405, // token expired
790 ERR_LOGOUT_OLDVERSION = 406, //
791 ERR_LOGOUT_TOKEN_WRONG = 407,
792 ERR_LOGOUT_ALREADY_LOGOUT = 408,
793 ERR_LOGIN_OTHER = 420,
794 ERR_LOGIN_NET = 421,
795 ERR_LOGIN_FAILED = 422,
796 ERR_LOGIN_CANCELED = 423,
797 ERR_LOGIN_TOKEN_EXPIRED = 424,
798 ERR_LOGIN_OLD_VERSION = 425,
799 ERR_LOGIN_TOKEN_WRONG = 426,
800 ERR_LOGIN_TOKEN_KICKED = 427,
801 ERR_LOGIN_ALREADY_LOGIN = 428,
802 ERR_JOIN_CHANNEL_OTHER = 440,
803 ERR_SEND_MESSAGE_OTHER = 440,
804 ERR_SEND_MESSAGE_TIMEOUT = 441,
805 ERR_QUERY_USERNUM_OTHER = 450,
806 ERR_QUERY_USERNUM_TIMEOUT = 451,
807 ERR_QUERY_USERNUM_BYUSER = 452,
808 ERR_LEAVE_CHANNEL_OTHER = 460,
809 ERR_LEAVE_CHANNEL_KICKED = 461,
810 ERR_LEAVE_CHANNEL_BYUSER = 462,
811 ERR_LEAVE_CHANNEL_LOGOUT = 463,
812 ERR_LEAVE_CHANNEL_DISCONNECTED = 464,
813 ERR_INVITE_OTHER = 470,
814 ERR_INVITE_REINVITE = 471,
815 ERR_INVITE_NET = 472,
816 ERR_INVITE_PEER_OFFLINE = 473,
817 ERR_INVITE_TIMEOUT = 474,
818 ERR_INVITE_CANT_RECV = 475,
819
820 // 1001~2000
824 ERR_LOAD_MEDIA_ENGINE = 1001,
828 ERR_START_CALL = 1002,
832 ERR_START_CAMERA = 1003,
836 ERR_START_VIDEO_RENDER = 1004,
842 ERR_ADM_GENERAL_ERROR = 1005,
846 ERR_ADM_JAVA_RESOURCE = 1006,
850 ERR_ADM_SAMPLE_RATE = 1007,
855 ERR_ADM_INIT_PLAYOUT = 1008,
859 ERR_ADM_START_PLAYOUT = 1009,
863 ERR_ADM_STOP_PLAYOUT = 1010,
868 ERR_ADM_INIT_RECORDING = 1011,
872 ERR_ADM_START_RECORDING = 1012,
876 ERR_ADM_STOP_RECORDING = 1013,
881 ERR_ADM_RUNTIME_PLAYOUT_ERROR = 1015,
885 ERR_ADM_RUNTIME_RECORDING_ERROR = 1017,
889 ERR_ADM_RECORD_AUDIO_FAILED = 1018,
894 ERR_ADM_INIT_LOOPBACK = 1022,
899 ERR_ADM_START_LOOPBACK = 1023,
904 ERR_ADM_NO_PERMISSION = 1027,
908 ERR_ADM_RECORD_AUDIO_IS_ACTIVE = 1033,
912 ERR_ADM_ANDROID_JNI_JAVA_RESOURCE = 1101,
918 ERR_ADM_ANDROID_JNI_NO_RECORD_FREQUENCY = 1108,
924 ERR_ADM_ANDROID_JNI_NO_PLAYBACK_FREQUENCY = 1109,
932 ERR_ADM_ANDROID_JNI_JAVA_START_RECORD = 1111,
940 ERR_ADM_ANDROID_JNI_JAVA_START_PLAYBACK = 1112,
945 ERR_ADM_ANDROID_JNI_JAVA_RECORD_ERROR = 1115,
947 ERR_ADM_ANDROID_OPENSL_CREATE_ENGINE = 1151,
949 ERR_ADM_ANDROID_OPENSL_CREATE_AUDIO_RECORDER = 1153,
951 ERR_ADM_ANDROID_OPENSL_START_RECORDER_THREAD = 1156,
953 ERR_ADM_ANDROID_OPENSL_CREATE_AUDIO_PLAYER = 1157,
955 ERR_ADM_ANDROID_OPENSL_START_PLAYER_THREAD = 1160,
962 ERR_ADM_IOS_INPUT_NOT_AVAILABLE = 1201,
966 ERR_ADM_IOS_ACTIVATE_SESSION_FAIL = 1206,
971 ERR_ADM_IOS_VPIO_INIT_FAIL = 1210,
976 ERR_ADM_IOS_VPIO_REINIT_FAIL = 1213,
981 ERR_ADM_IOS_VPIO_RESTART_FAIL = 1214,
982 ERR_ADM_IOS_SET_RENDER_CALLBACK_FAIL = 1219,
984 ERR_ADM_IOS_SESSION_SAMPLERATR_ZERO = 1221,
992 ERR_ADM_WIN_CORE_INIT = 1301,
999 ERR_ADM_WIN_CORE_INIT_RECORDING = 1303,
1006 ERR_ADM_WIN_CORE_INIT_PLAYOUT = 1306,
1012 ERR_ADM_WIN_CORE_INIT_PLAYOUT_NULL = 1307,
1019 ERR_ADM_WIN_CORE_START_RECORDING = 1309,
1026 ERR_ADM_WIN_CORE_CREATE_REC_THREAD = 1311,
1035 ERR_ADM_WIN_CORE_CAPTURE_NOT_STARTUP = 1314,
1042 ERR_ADM_WIN_CORE_CREATE_RENDER_THREAD = 1319,
1051 ERR_ADM_WIN_CORE_RENDER_NOT_STARTUP = 1320,
1057 ERR_ADM_WIN_CORE_NO_RECORDING_DEVICE = 1322,
1063 ERR_ADM_WIN_CORE_NO_PLAYOUT_DEVICE = 1323,
1073 ERR_ADM_WIN_WAVE_INIT = 1351,
1082 ERR_ADM_WIN_WAVE_INIT_RECORDING = 1353,
1091 ERR_ADM_WIN_WAVE_INIT_MICROPHONE = 1354,
1100 ERR_ADM_WIN_WAVE_INIT_PLAYOUT = 1355,
1109 ERR_ADM_WIN_WAVE_INIT_SPEAKER = 1356,
1118 ERR_ADM_WIN_WAVE_START_RECORDING = 1357,
1127 ERR_ADM_WIN_WAVE_START_PLAYOUT = 1358,
1131 ERR_ADM_NO_RECORDING_DEVICE = 1359,
1135 ERR_ADM_NO_PLAYOUT_DEVICE = 1360,
1136
1137 // VDM error code starts from 1500
1141 ERR_VDM_CAMERA_NOT_AUTHORIZED = 1501,
1142
1143 // VDM error code starts from 1500
1147 ERR_VDM_WIN_DEVICE_IN_USE = 1502,
1148
1149 // VCM error code starts from 1600
1153 ERR_VCM_UNKNOWN_ERROR = 1600,
1158 ERR_VCM_ENCODER_INIT_ERROR = 1601,
1162 ERR_VCM_ENCODER_ENCODE_ERROR = 1602,
1166 ERR_VCM_ENCODER_SET_ERROR = 1603,
1167 };
1168
1172 enum AUDIO_SESSION_OPERATION_RESTRICTION
1173 {
1177 AUDIO_SESSION_OPERATION_RESTRICTION_NONE = 0,
1181 AUDIO_SESSION_OPERATION_RESTRICTION_SET_CATEGORY = 1,
1185 AUDIO_SESSION_OPERATION_RESTRICTION_CONFIGURE_SESSION = 1 << 1,
1190 AUDIO_SESSION_OPERATION_RESTRICTION_DEACTIVATE_SESSION = 1 << 2,
1195 AUDIO_SESSION_OPERATION_RESTRICTION_ALL = 1 << 7,
1196 };
1198 typedef const char *user_id_t;
1199 typedef void *view_t;
1200
1205 {
1222
1223 UserInfo() : hasAudio(false), hasVideo(false) {}
1224 };
1225
1227
1228 // Shared between Agora Service and Rtc Engine
1229 namespace rtc
1230 {
1231
1236 {
1251 };
1252
1254 enum INTERFACE_ID_TYPE
1255 {
1256 AGORA_IID_AUDIO_DEVICE_MANAGER = 1,
1257 AGORA_IID_VIDEO_DEVICE_MANAGER = 2,
1258 AGORA_IID_PARAMETER_ENGINE = 3,
1259 AGORA_IID_MEDIA_ENGINE = 4,
1260 AGORA_IID_AUDIO_ENGINE = 5,
1261 AGORA_IID_VIDEO_ENGINE = 6,
1262 AGORA_IID_RTC_CONNECTION = 7,
1263 AGORA_IID_SIGNALING_ENGINE = 8,
1264 AGORA_IID_MEDIA_ENGINE_REGULATOR = 9,
1265 AGORA_IID_CLOUD_SPATIAL_AUDIO = 10,
1266 AGORA_IID_LOCAL_SPATIAL_AUDIO = 11,
1267 };
1269
1274 {
1306
1310 QUALITY_UNSUPPORTED = 7,
1314 QUALITY_DETECTING
1316 };
1317
1319
1322 enum FIT_MODE_TYPE
1323 {
1328 MODE_COVER = 1,
1329
1335 MODE_CONTAIN = 2,
1336 };
1338
1343 {
1361
1366 {
1395 };
1400 {
1405 };
1410 {
1415 };
1416
1421 {
1435
1440 {
1465 };
1466
1471 {
1489
1492 DISABLED = 100,
1494 };
1495
1500 {
1509 VideoDimensions() : width(640), height(480) {}
1510 VideoDimensions(int w, int h) : width(w), height(h) {}
1511 bool operator==(const VideoDimensions &rhs) const
1512 {
1513 return width == rhs.width && height == rhs.height;
1514 }
1515 };
1516
1526 const int STANDARD_BITRATE = 0;
1527
1535 const int COMPATIBLE_BITRATE = -1;
1537
1540 const int DEFAULT_MIN_BITRATE = -1;
1541
1545 const int DEFAULT_MIN_BITRATE_EQUAL_TO_TARGET_BITRATE = -2;
1547
1552 {
1589 };
1590
1595 {
1600 // kIsac = 2,
1613 // kIlbc = 6,
1615 // AUDIO_CODEC_AAC = 7,
1625
1628 AUDIO_CODEC_JC1 = 10,
1630
1635
1638 AUDIO_CODEC_LPCNET = 12,
1640 };
1641
1643
1646 enum AUDIO_ENCODING_TYPE
1647 {
1651 AUDIO_ENCODING_TYPE_AAC_16000_LOW = 0x010101,
1655 AUDIO_ENCODING_TYPE_AAC_16000_MEDIUM = 0x010102,
1659 AUDIO_ENCODING_TYPE_AAC_32000_LOW = 0x010201,
1663 AUDIO_ENCODING_TYPE_AAC_32000_MEDIUM = 0x010202,
1667 AUDIO_ENCODING_TYPE_AAC_32000_HIGH = 0x010203,
1671 AUDIO_ENCODING_TYPE_AAC_48000_MEDIUM = 0x010302,
1675 AUDIO_ENCODING_TYPE_AAC_48000_HIGH = 0x010303,
1676
1680 AUDIO_ENCODING_TYPE_OPUS_16000_LOW = 0x020101,
1684 AUDIO_ENCODING_TYPE_OPUS_16000_MEDIUM = 0x020102,
1688 AUDIO_ENCODING_TYPE_OPUS_48000_MEDIUM = 0x020302,
1692 AUDIO_ENCODING_TYPE_OPUS_48000_HIGH = 0x020303,
1693 };
1694
1698 enum WATERMARK_FIT_MODE
1699 {
1704 FIT_MODE_COVER_POSITION,
1709 FIT_MODE_USE_IMAGE_RATIO
1710 };
1712
1717 {
1719 : speech(true),
1720 sendEvenIfEmpty(true) {}
1721
1734 };
1735
1740 {
1743 sampleRateHz(0),
1746 captureTimeMs(0) {}
1747
1749 : codec(rhs.codec),
1781 };
1783
1786 struct AudioPcmDataInfo
1787 {
1788 AudioPcmDataInfo() : samplesPerChannel(0), channelNum(0), samplesOut(0), elapsedTimeMs(0), ntpTimeMs(0) {}
1789
1790 AudioPcmDataInfo(const AudioPcmDataInfo &rhs)
1791 : samplesPerChannel(rhs.samplesPerChannel),
1792 channelNum(rhs.channelNum),
1793 samplesOut(rhs.samplesOut),
1794 elapsedTimeMs(rhs.elapsedTimeMs),
1795 ntpTimeMs(rhs.ntpTimeMs) {}
1796
1800 size_t samplesPerChannel;
1801
1802 int16_t channelNum;
1803
1804 // Output
1808 size_t samplesOut;
1812 int64_t elapsedTimeMs;
1816 int64_t ntpTimeMs;
1817 };
1821 enum H264PacketizeMode
1822 {
1826 NonInterleaved = 0, // Mode 1 - STAP-A, FU-A is allowed
1830 SingleNalUnit, // Mode 0 - only single NALU allowed
1831 };
1833
1837 {
1846 };
1851 {
1865
1867 encodedFrameOnly(false) {}
1868
1869 explicit VideoSubscriptionOptions(VIDEO_STREAM_TYPE streamtype) : type(streamtype),
1870 encodedFrameOnly(false) {}
1871
1872 VideoSubscriptionOptions(VIDEO_STREAM_TYPE streamtype, bool encoded_only) : type(streamtype),
1873 encodedFrameOnly(encoded_only) {}
1874 };
1875
1880 {
1883 width(0),
1884 height(0),
1885 framesPerSecond(0),
1888 trackId(0),
1889 captureTimeMs(0),
1890 decodeTimeMs(0),
1891 uid(0),
1893
1895 : codecType(rhs.codecType),
1896 width(rhs.width),
1897 height(rhs.height),
1899 frameType(rhs.frameType),
1900 rotation(rhs.rotation),
1901 trackId(rhs.trackId),
1904 uid(rhs.uid),
1905 streamType(rhs.streamType) {}
1906
1908 {
1909 if (this == &rhs)
1910 return *this;
1911 codecType = rhs.codecType;
1912 width = rhs.width;
1913 height = rhs.height;
1915 frameType = rhs.frameType;
1916 rotation = rhs.rotation;
1917 trackId = rhs.trackId;
1920 uid = rhs.uid;
1921 streamType = rhs.streamType;
1922 return *this;
1923 }
1954 int trackId; // This can be reserved for multiple video tracks, we need to create different ssrc
1955 // and additional payload for later implementation.
1956
1973 };
1974
1979 {
1992 };
1993
1998 {
2028
2054
2059
2062 dimensions(d),
2063 frameRate(f),
2064 bitrate(b),
2065 minBitrate(DEFAULT_MIN_BITRATE),
2066 orientationMode(m),
2068 mirrorMode(mirror) {}
2071 dimensions(width, height),
2072 frameRate(f),
2073 bitrate(b),
2074 minBitrate(DEFAULT_MIN_BITRATE),
2075 orientationMode(m),
2077 mirrorMode(mirror) {}
2079 : codecType(config.codecType),
2080 dimensions(config.dimensions),
2081 frameRate(config.frameRate),
2082 bitrate(config.bitrate),
2083 minBitrate(config.minBitrate),
2086 mirrorMode(config.mirrorMode) {}
2092 minBitrate(DEFAULT_MIN_BITRATE),
2096
2098 {
2099 if (this == &rhs)
2100 return *this;
2101 codecType = rhs.codecType;
2102 dimensions = rhs.dimensions;
2103 frameRate = rhs.frameRate;
2104 bitrate = rhs.bitrate;
2105 minBitrate = rhs.minBitrate;
2108 mirrorMode = rhs.mirrorMode;
2109 return *this;
2110 }
2111 };
2113
2115 struct DataStreamConfig
2116 {
2119 bool syncWithAudio;
2122 bool ordered;
2123 };
2125
2130 {
2143 };
2144
2149 {
2163 bool operator==(const SimulcastStreamConfig &rhs) const
2164 {
2165 return dimensions == rhs.dimensions && bitrate == rhs.bitrate && framerate == rhs.framerate;
2166 }
2167 };
2168
2173 {
2177 unsigned int duration;
2181 unsigned int txBytes;
2185 unsigned int rxBytes;
2189 unsigned int txAudioBytes;
2193 unsigned int txVideoBytes;
2197 unsigned int rxAudioBytes;
2201 unsigned int rxVideoBytes;
2205 unsigned short txKBitRate;
2209 unsigned short rxKBitRate;
2213 unsigned short rxAudioKBitRate;
2217 unsigned short txAudioKBitRate;
2221 unsigned short rxVideoKBitRate;
2225 unsigned short txVideoKBitRate;
2229 unsigned short lastmileDelay;
2233 unsigned int userCount;
2317 : duration(0),
2318 txBytes(0),
2319 rxBytes(0),
2320 txAudioBytes(0),
2321 txVideoBytes(0),
2322 rxAudioBytes(0),
2323 rxVideoBytes(0),
2324 txKBitRate(0),
2325 rxKBitRate(0),
2326 rxAudioKBitRate(0),
2327 txAudioKBitRate(0),
2328 rxVideoKBitRate(0),
2329 txVideoKBitRate(0),
2330 lastmileDelay(0),
2331 userCount(0),
2332 cpuAppUsage(0.0),
2333 cpuTotalUsage(0.0),
2334 gatewayRtt(0),
2338 connectTimeMs(0),
2349 rxPacketLossRate(0) {}
2350 };
2351
2356 {
2360
2409
2414 {
2423 };
2424
2428 {
2435 };
2436
2441 {
2450 };
2451
2456 {
2473 };
2474
2476
2477 enum AUDIENCE_LATENCY_LEVEL_TYPE
2478 {
2480 AUDIENCE_LATENCY_LEVEL_LOW_LATENCY = 1,
2482 AUDIENCE_LATENCY_LEVEL_ULTRA_LOW_LATENCY = 2,
2486 AUDIENCE_LATENCY_LEVEL_HIGH_LATENCY = 3,
2487 };
2488
2491 struct ClientRoleOptions
2492 {
2496 AUDIENCE_LATENCY_LEVEL_TYPE audienceLatencyLevel;
2497 ClientRoleOptions()
2498 : audienceLatencyLevel(AUDIENCE_LATENCY_LEVEL_ULTRA_LOW_LATENCY) {}
2499 };
2500
2505 struct RemoteAudioStats
2506 {
2510 uid_t uid;
2514 int quality;
2518 int networkTransportDelay;
2522 int jitterBufferDelay;
2526 int audioLossRate;
2530 int numChannels;
2534 int receivedSampleRate;
2539 int receivedBitrate;
2546 int totalFrozenTime;
2551 int frozenRate;
2568 int mosValue;
2573 int totalActiveTime;
2577 int publishDuration;
2578
2579 RemoteAudioStats() : uid(0),
2580 quality(0),
2581 networkTransportDelay(0),
2582 jitterBufferDelay(0),
2583 audioLossRate(0),
2584 numChannels(0),
2585 receivedSampleRate(0),
2586 receivedBitrate(0),
2587 totalFrozenTime(0),
2588 frozenRate(0),
2589 mosValue(0),
2590 totalActiveTime(0),
2591 publishDuration(0) {}
2592 };
2594
2633
2638 {
2667 };
2668
2670
2673 struct VideoFormat
2674 {
2677 kMaxWidthInPixels = 3840,
2679 kMaxHeightInPixels = 2160,
2681 kMaxFps = 60,
2682 };
2683
2687 int width; // Number of pixels.
2691 int height; // Number of pixels.
2695 int fps;
2696
2698 uint32_t pixelFormat;
2699
2700 VideoFormat() : width(FRAME_WIDTH_640), height(FRAME_HEIGHT_360), fps(FRAME_RATE_FPS_15), pixelFormat(0) {}
2701 VideoFormat(int w, int h, int f, uint32_t fmt = 0) : width(w), height(h), fps(f), pixelFormat(fmt) {}
2702 };
2704
2706
2709 enum VIDEO_CONTENT_HINT
2710 {
2714 CONTENT_HINT_NONE,
2721 CONTENT_HINT_MOTION,
2727 CONTENT_HINT_DETAILS
2728 };
2730
2735 {
2753
2758 {
2785
2789 {
2807
2812 {
2826
2827 LOCAL_VIDEO_STREAM_ERROR_BACKGROUD = 6,
2829 LOCAL_VIDEO_STREAM_ERROR_MULTIPLE_FOREGROUND_APPS = 7,
2831 LOCAL_VIDEO_STREAM_ERROR_SYSTEM_PRESSURE = 8,
2833 LOCAL_VIDEO_STREAM_ERROR_SCREEN_CAPTURE_WINDOW_MINIMIZED = 11,
2835 LOCAL_VIDEO_STREAM_ERROR_SCREEN_CAPTURE_WINDOW_CLOSED = 12
2837 };
2838
2843 {
2850 REMOTE_AUDIO_STATE_STOPPED = 0, // Default state, audio is started or remote user disabled/muted audio stream
2854 REMOTE_AUDIO_STATE_STARTING = 1, // The first audio frame packet has been received
2861 REMOTE_AUDIO_STATE_DECODING = 2, // The first remote audio frame has been decoded or frozen state ends
2866 REMOTE_AUDIO_STATE_FROZEN = 3, // Remote audio is frozen, probably due to network issue
2871 REMOTE_AUDIO_STATE_FAILED = 4, // Remote audio play failed
2872 };
2873
2878 {
2915 };
2916
2919 {
2945 };
2948 {
2953
2958
2963
2968
2973
2978
2983
2988
2993
2999
3002 REMOTE_VIDEO_STATE_REASON_VIDEO_STREAM_TYPE_CHANGE_TO_LOW = 10,
3006 REMOTE_VIDEO_STATE_REASON_VIDEO_STREAM_TYPE_CHANGE_TO_HIGH = 11,
3008 };
3009
3015 {
3028
3036 const char *channelId;
3056
3059 uint32_t observationPosition;
3061 };
3062
3067 {
3088 };
3090
3093 struct AudioVolumeInfo
3094 {
3098 uid_t uid;
3099
3103 unsigned int volume; // [0,255]
3104
3105 /*
3106 * The activity status of remote users
3107 */
3108 unsigned int vad;
3109
3113 double voicePitch;
3114
3115 AudioVolumeInfo() : uid(0), volume(0), vad(0), voicePitch(0.0) {}
3116 };
3117
3121 class IPacketObserver
3122 {
3123 public:
3124 virtual ~IPacketObserver() {}
3128 struct Packet
3129 {
3133 const unsigned char *buffer;
3137 unsigned int size;
3138
3139 Packet() : buffer(NULL), size(0) {}
3140 };
3148 virtual bool onSendAudioPacket(Packet &packet) = 0;
3156 virtual bool onSendVideoPacket(Packet &packet) = 0;
3164 virtual bool onReceiveAudioPacket(Packet &packet) = 0;
3172 virtual bool onReceiveVideoPacket(Packet &packet) = 0;
3173 };
3175
3179 {
3180 public:
3190 virtual bool OnEncodedVideoImageReceived(const uint8_t *imageBuffer, size_t length,
3191 const EncodedVideoFrameInfo &videoEncodedFrameInfo) = 0;
3192
3194 };
3196
3199 enum AUDIO_SAMPLE_RATE_TYPE
3200 {
3204 AUDIO_SAMPLE_RATE_32000 = 32000,
3208 AUDIO_SAMPLE_RATE_44100 = 44100,
3212 AUDIO_SAMPLE_RATE_48000 = 48000,
3213 };
3217 enum VIDEO_CODEC_PROFILE_TYPE
3218 {
3222 VIDEO_CODEC_PROFILE_BASELINE = 66,
3226 VIDEO_CODEC_PROFILE_MAIN = 77,
3230 VIDEO_CODEC_PROFILE_HIGH = 100,
3231 };
3232
3236 enum AUDIO_CODEC_PROFILE_TYPE
3237 {
3241 AUDIO_CODEC_PROFILE_LC_AAC = 0,
3245 AUDIO_CODEC_PROFILE_HE_AAC = 1,
3246 };
3248
3254 {
3268
3271 int internalCodec;
3273 };
3274
3276
3279 enum RTMP_STREAM_PUBLISH_STATE
3280 {
3287 RTMP_STREAM_PUBLISH_STATE_IDLE = 0,
3293 RTMP_STREAM_PUBLISH_STATE_CONNECTING = 1,
3298 RTMP_STREAM_PUBLISH_STATE_RUNNING = 2,
3308 RTMP_STREAM_PUBLISH_STATE_RECOVERING = 3,
3313 RTMP_STREAM_PUBLISH_STATE_FAILURE = 4,
3314 };
3315
3319 enum RTMP_STREAM_PUBLISH_ERROR
3320 {
3324 RTMP_STREAM_PUBLISH_ERROR_FAILED = -1,
3328 RTMP_STREAM_PUBLISH_ERROR_OK = 0,
3334 RTMP_STREAM_PUBLISH_ERROR_INVALID_ARGUMENT = 1,
3338 RTMP_STREAM_PUBLISH_ERROR_ENCRYPTED_STREAM_NOT_ALLOWED = 2,
3343 RTMP_STREAM_PUBLISH_ERROR_CONNECTION_TIMEOUT = 3,
3348 RTMP_STREAM_PUBLISH_ERROR_INTERNAL_SERVER_ERROR = 4,
3352 RTMP_STREAM_PUBLISH_ERROR_RTMP_SERVER_ERROR = 5,
3356 RTMP_STREAM_PUBLISH_ERROR_TOO_OFTEN = 6,
3360 RTMP_STREAM_PUBLISH_ERROR_REACH_LIMIT = 7,
3364 RTMP_STREAM_PUBLISH_ERROR_NOT_AUTHORIZED = 8,
3368 RTMP_STREAM_PUBLISH_ERROR_STREAM_NOT_FOUND = 9,
3372 RTMP_STREAM_PUBLISH_ERROR_FORMAT_NOT_SUPPORTED = 10,
3377 RTMP_STREAM_PUBLISH_ERROR_CDN_ERROR = 11,
3381 RTMP_STREAM_PUBLISH_ERROR_ALREADY_IN_USE = 12,
3387 RTMP_STREAM_UNPUBLISH_ERROR_OK = 100,
3388 };
3390
3395 {
3418 };
3419
3424 {
3449 };
3450
3455 {
3471
3477 {
3481 unsigned int packetLossRate;
3485 unsigned int jitter;
3490
3492 jitter(0),
3493 availableBandwidth(0) {}
3494 };
3495
3501 {
3517 unsigned int rtt;
3518
3521 rtt(0) {}
3522 };
3523
3528 {
3606 };
3607
3612 {
3641 };
3643
3645 struct BeautyOptions
3646 {
3649 enum LIGHTENING_CONTRAST_LEVEL
3650 {
3652 LIGHTENING_CONTRAST_LOW = 0,
3654 LIGHTENING_CONTRAST_NORMAL,
3656 LIGHTENING_CONTRAST_HIGH
3657 };
3658
3661 LIGHTENING_CONTRAST_LEVEL lighteningContrastLevel;
3662
3665 float lighteningLevel;
3666
3669 float smoothnessLevel;
3670
3673 float rednessLevel;
3674
3677 float sharpnessLevel;
3678
3679 BeautyOptions(LIGHTENING_CONTRAST_LEVEL contrastLevel, float lightening, float smoothness, float redness, float sharpness) : lighteningContrastLevel(contrastLevel), lighteningLevel(lightening), smoothnessLevel(smoothness), rednessLevel(redness), sharpnessLevel(sharpness) {}
3680
3681 BeautyOptions() : lighteningContrastLevel(LIGHTENING_CONTRAST_NORMAL), lighteningLevel(0), smoothnessLevel(0), rednessLevel(0), sharpnessLevel(0) {}
3682 };
3683
3684 struct VirtualBackgroundSource
3685 {
3688 enum BACKGROUND_SOURCE_TYPE
3689 {
3693 BACKGROUND_COLOR = 1,
3697 BACKGROUND_IMG,
3699 BACKGROUND_BLUR,
3700 };
3701
3704 enum BACKGROUND_BLUR_DEGREE
3705 {
3707 BLUR_DEGREE_LOW = 1,
3709 BLUR_DEGREE_MEDIUM,
3711 BLUR_DEGREE_HIGH,
3712 };
3713
3716 BACKGROUND_SOURCE_TYPE background_source_type;
3717
3726 unsigned int color;
3727
3734 const char *source;
3735
3737 BACKGROUND_BLUR_DEGREE blur_degree;
3738
3739 VirtualBackgroundSource() : background_source_type(BACKGROUND_COLOR), color(0xffffff), source(NULL), blur_degree(BLUR_DEGREE_HIGH) {}
3740 };
3741
3742 struct SegmentationProperty
3743 {
3744
3745 enum SEG_MODEL_TYPE
3746 {
3747
3748 SEG_MODEL_AGORA_AI_ONE = 0,
3749 SEG_MODEL_AGORA_GREEN = 2
3750 };
3751
3752 SEG_MODEL_TYPE modelType;
3753
3754 int preferVelocity;
3755
3756 float greenCapacity;
3757
3758 SegmentationProperty() : modelType(SEG_MODEL_AGORA_AI_ONE), preferVelocity(1), greenCapacity(0.5) {}
3759 };
3762
3782 enum VOICE_BEAUTIFIER_PRESET
3783 {
3786 VOICE_BEAUTIFIER_OFF = 0x00000000,
3792 CHAT_BEAUTIFIER_MAGNETIC = 0x01010100,
3798 CHAT_BEAUTIFIER_FRESH = 0x01010200,
3804 CHAT_BEAUTIFIER_VITALITY = 0x01010300,
3818 SINGING_BEAUTIFIER = 0x01020100,
3821 TIMBRE_TRANSFORMATION_VIGOROUS = 0x01030100,
3824 TIMBRE_TRANSFORMATION_DEEP = 0x01030200,
3827 TIMBRE_TRANSFORMATION_MELLOW = 0x01030300,
3830 TIMBRE_TRANSFORMATION_FALSETTO = 0x01030400,
3833 TIMBRE_TRANSFORMATION_FULL = 0x01030500,
3836 TIMBRE_TRANSFORMATION_CLEAR = 0x01030600,
3839 TIMBRE_TRANSFORMATION_RESOUNDING = 0x01030700,
3842 TIMBRE_TRANSFORMATION_RINGING = 0x01030800,
3843
3844 ULTRA_HIGH_QUALITY_VOICE = 0x01040100
3845 };
3846
3849 enum AUDIO_EFFECT_PRESET
3850 {
3853 AUDIO_EFFECT_OFF = 0x00000000,
3861 ROOM_ACOUSTICS_KTV = 0x02010100,
3869 ROOM_ACOUSTICS_VOCAL_CONCERT = 0x02010200,
3877 ROOM_ACOUSTICS_STUDIO = 0x02010300,
3885 ROOM_ACOUSTICS_PHONOGRAPH = 0x02010400,
3892 ROOM_ACOUSTICS_VIRTUAL_STEREO = 0x02010500,
3900 ROOM_ACOUSTICS_SPACIAL = 0x02010600,
3908 ROOM_ACOUSTICS_ETHEREAL = 0x02010700,
3920 ROOM_ACOUSTICS_3D_VOICE = 0x02010800,
3931 VOICE_CHANGER_EFFECT_UNCLE = 0x02020100,
3942 VOICE_CHANGER_EFFECT_OLDMAN = 0x02020200,
3953 VOICE_CHANGER_EFFECT_BOY = 0x02020300,
3964 VOICE_CHANGER_EFFECT_SISTER = 0x02020400,
3975 VOICE_CHANGER_EFFECT_GIRL = 0x02020500,
3984 VOICE_CHANGER_EFFECT_PIGKING = 0x02020600,
3992 VOICE_CHANGER_EFFECT_HULK = 0x02020700,
4000 STYLE_TRANSFORMATION_RNB = 0x02030100,
4008 STYLE_TRANSFORMATION_POPULAR = 0x02030200,
4018 PITCH_CORRECTION = 0x02040100
4019
4023 };
4024
4027 enum VOICE_CONVERSION_PRESET
4028 {
4031 VOICE_CONVERSION_OFF = 0x00000000,
4034 VOICE_CHANGER_NEUTRAL = 0x03010100,
4037 VOICE_CHANGER_SWEET = 0x03010200,
4040 VOICE_CHANGER_SOLID = 0x03010300,
4043 VOICE_CHANGER_BASS = 0x03010400
4044 };
4045
4046 // TODO(ZYH), it will be deleted after the new interfaces have been implemented to replace it.
4047 enum AUDIO_REVERB_PRESET
4048 {
4052 AUDIO_REVERB_OFF = 0, // Turn off audio reverb
4056 AUDIO_REVERB_FX_KTV = 0x02010100,
4060 AUDIO_REVERB_FX_VOCAL_CONCERT = 0x02010200,
4064 AUDIO_REVERB_FX_UNCLE = 0x02020100,
4068 AUDIO_REVERB_FX_SISTER = 0x02020400,
4072 AUDIO_REVERB_FX_STUDIO = 0x02010300,
4076 AUDIO_REVERB_FX_POPULAR = 0x02030200,
4080 AUDIO_REVERB_FX_RNB = 0x02030100,
4084 AUDIO_REVERB_FX_PHONOGRAPH = 0x02010400
4085 };
4086
4090 enum AUDIO_RECORDING_QUALITY_TYPE
4091 {
4095 AUDIO_RECORDING_QUALITY_LOW = 0,
4099 AUDIO_RECORDING_QUALITY_MEDIUM = 1,
4103 AUDIO_RECORDING_QUALITY_HIGH = 2,
4104 };
4105
4109 enum AUDIO_FILE_RECORDING_TYPE
4110 {
4114 AUDIO_FILE_RECORDING_MIC = 1,
4118 AUDIO_FILE_RECORDING_PLAYBACK = 2,
4122 AUDIO_FILE_RECORDING_MIXED = 3,
4123 };
4124
4128 enum AUDIO_ENCODED_FRAME_OBSERVER_POSITION
4129 {
4133 AUDIO_ENCODED_FRAME_OBSERVER_POSITION_RECORD = 1,
4137 AUDIO_ENCODED_FRAME_OBSERVER_POSITION_PLAYBACK = 2,
4141 AUDIO_ENCODED_FRAME_OBSERVER_POSITION_MIXED = 3,
4142 };
4143
4147 struct AudioRecordingConfiguration
4148 {
4153 const char *filePath;
4159 bool encode;
4164 int sampleRate;
4168 AUDIO_FILE_RECORDING_TYPE fileRecordingType;
4172 AUDIO_RECORDING_QUALITY_TYPE quality;
4173
4174 AudioRecordingConfiguration()
4175 : filePath(NULL),
4176 encode(false),
4177 sampleRate(32000),
4178 fileRecordingType(AUDIO_FILE_RECORDING_MIXED),
4179 quality(AUDIO_RECORDING_QUALITY_LOW) {}
4180
4181 AudioRecordingConfiguration(const char *file_path, int sample_rate, AUDIO_RECORDING_QUALITY_TYPE quality_type)
4182 : filePath(file_path),
4183 encode(false),
4184 sampleRate(sample_rate),
4185 fileRecordingType(AUDIO_FILE_RECORDING_MIXED),
4186 quality(quality_type) {}
4187
4188 AudioRecordingConfiguration(const char *file_path, bool enc, int sample_rate, AUDIO_FILE_RECORDING_TYPE type, AUDIO_RECORDING_QUALITY_TYPE quality_type)
4189 : filePath(file_path),
4190 encode(enc),
4191 sampleRate(sample_rate),
4192 fileRecordingType(type),
4193 quality(quality_type) {}
4194
4195 AudioRecordingConfiguration(const AudioRecordingConfiguration &rhs)
4196 : filePath(rhs.filePath),
4197 encode(rhs.encode),
4198 sampleRate(rhs.sampleRate),
4199 fileRecordingType(rhs.fileRecordingType),
4200 quality(rhs.quality) {}
4201 };
4202
4207 struct AudioEncodedFrameObserverConfig
4208 {
4212 AUDIO_ENCODED_FRAME_OBSERVER_POSITION postionType;
4216 AUDIO_ENCODING_TYPE encodingType;
4217
4218 AudioEncodedFrameObserverConfig()
4219 : postionType(AUDIO_ENCODED_FRAME_OBSERVER_POSITION_PLAYBACK),
4220 encodingType(AUDIO_ENCODING_TYPE_OPUS_48000_MEDIUM) {}
4221 };
4222
4223 class IAudioEncodedFrameObserver
4224 {
4225 public:
4233 virtual void OnRecordAudioEncodedFrame(const uint8_t *frameBuffer, int length, const EncodedAudioFrameInfo &audioEncodedFrameInfo) = 0;
4234
4242 virtual void OnPlaybackAudioEncodedFrame(const uint8_t *frameBuffer, int length, const EncodedAudioFrameInfo &audioEncodedFrameInfo) = 0;
4243
4251 virtual void OnMixedAudioEncodedFrame(const uint8_t *frameBuffer, int length, const EncodedAudioFrameInfo &audioEncodedFrameInfo) = 0;
4252
4253 virtual ~IAudioEncodedFrameObserver() {}
4254 };
4257
4260 enum VOICE_CHANGER_PRESET
4261 {
4265 VOICE_CHANGER_OFF = 0, // Turn off the voice changer
4269 VOICE_CHANGER_OLDMAN = 0x02020200,
4273 VOICE_CHANGER_BABYBOY = 0x02020300,
4277 VOICE_CHANGER_BABYGIRL = 0x02020500,
4282 VOICE_CHANGER_ZHUBAJIE = 0x02020600,
4286 VOICE_CHANGER_ETHEREAL = 0x02010700,
4290 VOICE_CHANGER_HULK = 0x02020700,
4294 VOICE_BEAUTY_VIGOROUS = 0x01030100,
4298 VOICE_BEAUTY_DEEP = 0x01030200,
4302 VOICE_BEAUTY_MELLOW = 0x01030300,
4306 VOICE_BEAUTY_FALSETTO = 0x01030400,
4310 VOICE_BEAUTY_FULL = 0x01030500,
4314 VOICE_BEAUTY_CLEAR = 0x01030600,
4318 VOICE_BEAUTY_RESOUNDING = 0x01030700,
4322 VOICE_BEAUTY_RINGING = 0x01030800,
4326 VOICE_BEAUTY_SPACIAL = 0x02010600,
4331 GENERAL_BEAUTY_VOICE_MALE = 0x01010100,
4336 GENERAL_BEAUTY_VOICE_FEMALE_FRESH = 0x01010200,
4341 GENERAL_BEAUTY_VOICE_FEMALE_VITALITY = 0x01010300
4342 };
4344
4348 {
4352 AREA_CODE_CN = 0x00000001,
4356 AREA_CODE_NA = 0x00000002,
4360 AREA_CODE_EU = 0x00000004,
4364 AREA_CODE_AS = 0x00000008,
4368 AREA_CODE_JP = 0x00000010,
4372 AREA_CODE_IN = 0x00000020,
4376 AREA_CODE_GLOB = (0xFFFFFFFF)
4378
4380
4383 enum AREA_CODE_EX
4384 {
4388 AREA_CODE_OC = 0x00000040,
4392 AREA_CODE_SA = 0x00000080,
4396 AREA_CODE_AF = 0x00000100,
4400 AREA_CODE_KR = 0x00000200,
4404 AREA_CODE_OVS = 0xFFFFFFFE
4405 };
4406
4407 enum CHANNEL_MEDIA_RELAY_ERROR
4408 {
4411 RELAY_OK = 0,
4414 RELAY_ERROR_SERVER_ERROR_RESPONSE = 1,
4419 RELAY_ERROR_SERVER_NO_RESPONSE = 2,
4423 RELAY_ERROR_NO_RESOURCE_AVAILABLE = 3,
4426 RELAY_ERROR_FAILED_JOIN_SRC = 4,
4429 RELAY_ERROR_FAILED_JOIN_DEST = 5,
4432 RELAY_ERROR_FAILED_PACKET_RECEIVED_FROM_SRC = 6,
4435 RELAY_ERROR_FAILED_PACKET_SENT_TO_DEST = 7,
4440 RELAY_ERROR_SERVER_CONNECTION_LOST = 8,
4443 RELAY_ERROR_INTERNAL_ERROR = 9,
4446 RELAY_ERROR_SRC_TOKEN_EXPIRED = 10,
4449 RELAY_ERROR_DEST_TOKEN_EXPIRED = 11,
4450 };
4451
4452 // callback event
4453 enum CHANNEL_MEDIA_RELAY_EVENT
4454 {
4458 RELAY_EVENT_NETWORK_DISCONNECTED = 0,
4461 RELAY_EVENT_NETWORK_CONNECTED = 1,
4464 RELAY_EVENT_PACKET_JOINED_SRC_CHANNEL = 2,
4467 RELAY_EVENT_PACKET_JOINED_DEST_CHANNEL = 3,
4470 RELAY_EVENT_PACKET_SENT_TO_DEST_CHANNEL = 4,
4473 RELAY_EVENT_PACKET_RECEIVED_VIDEO_FROM_SRC = 5,
4476 RELAY_EVENT_PACKET_RECEIVED_AUDIO_FROM_SRC = 6,
4479 RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL = 7,
4482 RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL_REFUSED = 8,
4486 RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL_NOT_CHANGE = 9,
4489 RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL_IS_NULL = 10,
4492 RELAY_EVENT_VIDEO_PROFILE_UPDATE = 11,
4495 RELAY_EVENT_PAUSE_SEND_PACKET_TO_DEST_CHANNEL_SUCCESS = 12,
4498 RELAY_EVENT_PAUSE_SEND_PACKET_TO_DEST_CHANNEL_FAILED = 13,
4501 RELAY_EVENT_RESUME_SEND_PACKET_TO_DEST_CHANNEL_SUCCESS = 14,
4504 RELAY_EVENT_RESUME_SEND_PACKET_TO_DEST_CHANNEL_FAILED = 15,
4505 };
4506
4507 enum CHANNEL_MEDIA_RELAY_STATE
4508 {
4511 RELAY_STATE_IDLE = 0,
4514 RELAY_STATE_CONNECTING = 1,
4518 RELAY_STATE_RUNNING = 2,
4521 RELAY_STATE_FAILURE = 3,
4522 };
4523
4526 struct ChannelMediaInfo
4527 {
4531 const char *channelName;
4535 const char *token;
4538 uid_t uid;
4539 };
4540
4543 struct ChannelMediaRelayConfiguration
4544 {
4556 ChannelMediaInfo *srcInfo;
4563 ChannelMediaInfo *destInfos;
4569 int destCount;
4570
4571 ChannelMediaRelayConfiguration()
4572 : srcInfo(NULL),
4573 destInfos(NULL),
4574 destCount(0)
4575 {
4576 }
4577 };
4579
4583 {
4588
4590
4591 bool operator==(const UplinkNetworkInfo &rhs) const
4592 {
4594 }
4595 };
4596
4601 {
4603 {
4607 const char *uid;
4620
4626
4628 {
4629 if (this == &rhs)
4630 return *this;
4635 if (rhs.uid != OPTIONAL_NULLPTR)
4636 {
4637 char *temp = new char[strlen(rhs.uid) + 1];
4638 strcpy(temp, rhs.uid);
4639 uid = temp;
4640 }
4641 return *this;
4642 }
4643
4645 {
4646 if (uid)
4647 {
4648 delete[] uid;
4649 }
4650 }
4651 };
4652
4673
4680
4687 {
4689 return;
4691 for (int i = 0; i < total_received_video_count; ++i)
4693 }
4694
4696 {
4697 if (this == &rhs)
4698 return *this;
4705 {
4707 for (int i = 0; i < total_received_video_count; ++i)
4709 }
4710 return *this;
4711 }
4712
4714 {
4716 delete[] peer_downlink_info;
4717 }
4718 };
4719
4723 {
4725
4727 AES_128_XTS = 1,
4730 AES_128_ECB = 2,
4733 AES_256_XTS = 3,
4735
4741 AES_128_GCM = 5,
4744 AES_256_GCM = 6,
4747 AES_128_GCM2 = 7,
4750 AES_256_GCM2 = 8,
4753 MODE_END,
4755 };
4756
4759 {
4769 const char *encryptionKey;
4771
4773 : encryptionMode(AES_128_GCM2),
4774 encryptionKey(NULL)
4775 {
4776 memset(encryptionKdfSalt, 0, sizeof(encryptionKdfSalt));
4777 }
4778
4780 const char *getEncryptionString() const
4781 {
4782 switch (encryptionMode)
4783 {
4784 case AES_128_XTS:
4785 return "aes-128-xts";
4786 case AES_128_ECB:
4787 return "aes-128-ecb";
4788 case AES_256_XTS:
4789 return "aes-256-xts";
4790 case SM4_128_ECB:
4791 return "sm4-128-ecb";
4792 case AES_128_GCM:
4793 return "aes-128-gcm";
4794 case AES_256_GCM:
4795 return "aes-256-gcm";
4796 case AES_128_GCM2:
4797 return "aes-128-gcm-2";
4798 case AES_256_GCM2:
4799 return "aes-256-gcm-2";
4800 default:
4801 return "aes-128-gcm-2";
4802 }
4803 return "aes-128-gcm-2";
4804 }
4806 };
4807
4811 {
4824 };
4825
4827
4830 enum UPLOAD_ERROR_REASON
4831 {
4832 UPLOAD_SUCCESS = 0,
4833 UPLOAD_NET_ERROR = 1,
4834 UPLOAD_SERVER_ERROR = 2,
4835 };
4836
4839 enum PERMISSION_TYPE
4840 {
4841 RECORD_AUDIO = 0,
4842 CAMERA = 1,
4843 };
4845
4849 {
4854
4859 {
4877
4882 {
4900
4905 {
4915 : uid(0)
4916 {
4917 userAccount[0] = '\0';
4918 }
4919 };
4920
4922
4925 enum EAR_MONITORING_FILTER_TYPE
4926 {
4930 EAR_MONITORING_FILTER_NONE = (1 << 0),
4934 EAR_MONITORING_FILTER_BUILT_IN_AUDIO_FILTERS = (1 << 1),
4938 EAR_MONITORING_FILTER_NOISE_SUPPRESSION = (1 << 2)
4939 };
4941
4943
4946 enum THREAD_PRIORITY_TYPE
4947 {
4951 LOWEST = 0,
4955 LOW = 1,
4959 NORMAL = 2,
4963 HIGH = 3,
4967 HIGHEST = 4,
4971 CRITICAL = 5,
4972 };
4974
4978 {
4987 };
4988 } // namespace rtc
4989
4990 namespace base
4991 {
4992
4994 class IEngineBase
4995 {
4996 public:
4997 virtual int queryInterface(rtc::INTERFACE_ID_TYPE iid, void **inter) = 0;
4998 virtual ~IEngineBase() {}
4999 };
5000
5001 class AParameter : public agora::util::AutoPtr<IAgoraParameter>
5002 {
5003 public:
5004 AParameter(IEngineBase &engine) { initialize(&engine); }
5005 AParameter(IEngineBase *engine) { initialize(engine); }
5006 AParameter(IAgoraParameter *p) : agora::util::AutoPtr<IAgoraParameter>(p) {}
5007
5008 private:
5009 bool initialize(IEngineBase *engine)
5010 {
5011 IAgoraParameter *p = NULL;
5012 if (engine && !engine->queryInterface(rtc::AGORA_IID_PARAMETER_ENGINE, (void **)&p))
5013 reset(p);
5014 return p != NULL;
5015 }
5016 };
5017
5018 class LicenseCallback
5019 {
5020 public:
5021 virtual ~LicenseCallback() {}
5022 virtual void onCertificateRequired() = 0;
5023 virtual void onLicenseRequest() = 0;
5024 virtual void onLicenseValidated() = 0;
5025 virtual void onLicenseError(int result) = 0;
5026 };
5028
5029 } // namespace base
5030
5032
5035 struct SpatialAudioParams
5036 {
5040 Optional<double> speaker_azimuth;
5044 Optional<double> speaker_elevation;
5048 Optional<double> speaker_distance;
5052 Optional<int> speaker_orientation;
5056 Optional<bool> enable_blur;
5060 Optional<bool> enable_air_absorb;
5061 };
5063} // namespace agora
5064
5071
5078AGORA_API int AGORA_CALL setAgoraSdkExternalSymbolLoader(void *(*func)(const char *symname));
5079
5088
5102AGORA_API int AGORA_CALL getAgoraCertificateVerifyResult(const char *credential_buf, int credential_len,
5103 const char *certificate_buf, int certificate_len);
5104
5113AGORA_API void setAgoraLicenseCallback(agora::base::LicenseCallback *callback);
5114
5123AGORA_API agora::base::LicenseCallback *getAgoraLicenseCallback();
#define AGORA_CALL
Definition: AgoraBase.h:65
AGORA_API const char *AGORA_CALL getAgoraSdkVersion(int *build)
AGORA_API int AGORA_CALL createAgoraCredential(agora::util::AString &credential)
#define AGORA_API
Definition: AgoraBase.h:64
AGORA_API int AGORA_CALL getAgoraCertificateVerifyResult(const char *credential_buf, int credential_len, const char *certificate_buf, int certificate_len)
AGORA_API void setAgoraLicenseCallback(agora::base::LicenseCallback *callback)
Implement the agora::base::LicenseCallback, create a LicenseCallback object to receive callbacks of l...
AGORA_API int AGORA_CALL setAgoraSdkExternalSymbolLoader(void *(*func)(const char *symname))
AGORA_API agora::base::LicenseCallback * getAgoraLicenseCallback()
Get the LicenseCallback pointer if already setup, otherwise, return null.
AGORA_API const char *AGORA_CALL getAgoraSdkErrorDescription(int err)
#define OPTIONAL_NULLPTR
Definition: AgoraBase.h:81
#define OPTIONAL_ENUM_SIZE_T
Definition: AgoraMediaBase.h:18
Definition: AgoraBase.h:102
virtual int setParameters(const char *parameters)=0
virtual int getParameters(const char *key, any_document_t &result)=0
virtual ~IParameterEngine()
Definition: AgoraBase.h:106
Definition: AgoraBase.h:3179
virtual bool OnEncodedVideoImageReceived(const uint8_t *imageBuffer, size_t length, const EncodedVideoFrameInfo &videoEncodedFrameInfo)=0
virtual ~IVideoEncodedImageReceiver()
Definition: AgoraBase.h:3193
Definition: AgoraBase.h:269
iterator begin()
Definition: AgoraBase.h:294
AList(IContainer *c, bool take_ownership)
Definition: AgoraBase.h:285
~AList()
Definition: AgoraBase.h:286
const AOutputIterator< value_type > const_iterator
Definition: AgoraBase.h:281
value_type * pointer
Definition: AgoraBase.h:277
void reset(IContainer *c=NULL, bool take_ownership=false)
Definition: AgoraBase.h:287
AOutputIterator< value_type > iterator
Definition: AgoraBase.h:280
iterator end()
Definition: AgoraBase.h:295
value_type & reference
Definition: AgoraBase.h:275
AList()
Definition: AgoraBase.h:284
T value_type
Definition: AgoraBase.h:274
bool empty() const
Definition: AgoraBase.h:297
const value_type * const_pointer
Definition: AgoraBase.h:278
size_t size_type
Definition: AgoraBase.h:279
size_type size() const
Definition: AgoraBase.h:296
const value_type & const_reference
Definition: AgoraBase.h:276
Definition: AgoraBase.h:233
AOutputIterator & operator++()
Definition: AgoraBase.h:249
value_type & reference
Definition: AgoraBase.h:238
bool operator!=(const AOutputIterator &rhs) const
Definition: AgoraBase.h:261
reference operator*()
Definition: AgoraBase.h:262
AOutputIterator(const AOutputIterator &rhs)
Definition: AgoraBase.h:248
~AOutputIterator()
Definition: AgoraBase.h:243
bool operator==(const AOutputIterator &rhs) const
Definition: AgoraBase.h:254
T value_type
Definition: AgoraBase.h:237
value_type * pointer
Definition: AgoraBase.h:240
const value_type & const_reference
Definition: AgoraBase.h:239
const value_type * const_pointer
Definition: AgoraBase.h:241
const_reference operator*() const
Definition: AgoraBase.h:263
AOutputIterator(IIterator *it=NULL)
Definition: AgoraBase.h:242
bool valid() const
Definition: AgoraBase.h:264
Definition: AgoraBase.h:115
void reset(pointer_type ptr=NULL)
Definition: AgoraBase.h:147
value_type & operator*() const
Definition: AgoraBase.h:134
bool queryInterface(C1 *c, C2 iid)
Definition: AgoraBase.h:158
pointer_type get() const
Definition: AgoraBase.h:138
~AutoPtr()
Definition: AgoraBase.h:123
T value_type
Definition: AgoraBase.h:117
pointer_type release()
Definition: AgoraBase.h:140
pointer_type operator->() const
Definition: AgoraBase.h:136
AutoPtr(pointer_type p=NULL)
Definition: AgoraBase.h:121
T * pointer_type
Definition: AgoraBase.h:118
Definition: AgoraBase.h:179
CopyableAutoPtr(const CopyableAutoPtr &rhs)
Definition: AgoraBase.h:184
pointer_type clone() const
Definition: AgoraBase.h:191
CopyableAutoPtr & operator=(const CopyableAutoPtr &rhs)
Definition: AgoraBase.h:185
CopyableAutoPtr(pointer_type p=0)
Definition: AgoraBase.h:183
Definition: AgoraBase.h:223
virtual size_t size() const =0
virtual ~IContainer()
Definition: AgoraBase.h:228
virtual void release()=0
virtual IIterator * begin()=0
Definition: AgoraBase.h:213
virtual void release()=0
virtual const void * const_current() const =0
virtual void * current()=0
virtual bool next()=0
virtual ~IIterator()
Definition: AgoraBase.h:219
Definition: AgoraBase.h:200
virtual const char * c_str()=0
virtual bool empty() const =0
virtual IString * clone()=0
virtual size_t length()=0
virtual const char * data()=0
virtual void release()=0
virtual ~IString()
Definition: AgoraBase.h:208
SIMULCAST_STREAM_MODE
Definition: AgoraBase.h:2130
@ ENABLE_SIMULCAST_STREAM
Definition: AgoraBase.h:2142
@ DISABLE_SIMULCAST_STREAM
Definition: AgoraBase.h:2138
@ AUTO_SIMULCAST_STREAM
Definition: AgoraBase.h:2134
LOCAL_AUDIO_STREAM_STATE
Definition: AgoraBase.h:2735
@ LOCAL_AUDIO_STREAM_STATE_FAILED
Definition: AgoraBase.h:2751
@ LOCAL_AUDIO_STREAM_STATE_RECORDING
Definition: AgoraBase.h:2743
@ LOCAL_AUDIO_STREAM_STATE_STOPPED
Definition: AgoraBase.h:2739
@ LOCAL_AUDIO_STREAM_STATE_ENCODING
Definition: AgoraBase.h:2747
FRAME_HEIGHT
Definition: AgoraBase.h:1410
@ FRAME_HEIGHT_360
Definition: AgoraBase.h:1414
AUDIO_SCENARIO_TYPE
Definition: AgoraBase.h:2638
@ AUDIO_SCENARIO_NUM
Definition: AgoraBase.h:2666
@ AUDIO_SCENARIO_GAME_STREAMING
Definition: AgoraBase.h:2648
@ AUDIO_SCENARIO_CHORUS
Definition: AgoraBase.h:2662
@ AUDIO_SCENARIO_HIGH_DEFINITION
Definition: AgoraBase.h:2658
@ AUDIO_SCENARIO_CHATROOM
Definition: AgoraBase.h:2654
@ AUDIO_SCENARIO_DEFAULT
Definition: AgoraBase.h:2642
FRAME_WIDTH
Definition: AgoraBase.h:1400
@ FRAME_WIDTH_640
Definition: AgoraBase.h:1404
CONNECTION_CHANGED_REASON_TYPE
Definition: AgoraBase.h:3528
@ CONNECTION_CHANGED_INVALID_TOKEN
Definition: AgoraBase.h:3564
@ CONNECTION_CHANGED_BANNED_BY_SERVER
Definition: AgoraBase.h:3544
@ CONNECTION_CHANGED_REJOIN_SUCCESS
Definition: AgoraBase.h:3593
@ CONNECTION_CHANGED_ECHO_TEST
Definition: AgoraBase.h:3601
@ CONNECTION_CHANGED_INVALID_CHANNEL_NAME
Definition: AgoraBase.h:3560
@ CONNECTION_CHANGED_JOIN_SUCCESS
Definition: AgoraBase.h:3536
@ CONNECTION_CHANGED_INTERRUPTED
Definition: AgoraBase.h:3540
@ CONNECTION_CHANGED_LEAVE_CHANNEL
Definition: AgoraBase.h:3552
@ CONNECTION_CHANGED_CONNECTING
Definition: AgoraBase.h:3532
@ CONNECTION_CHANGED_SETTING_PROXY_SERVER
Definition: AgoraBase.h:3576
@ CONNECTION_CHANGED_LOST
Definition: AgoraBase.h:3597
@ CONNECTION_CHANGED_CLIENT_IP_ADDRESS_CHANGED
Definition: AgoraBase.h:3585
@ CONNECTION_CHANGED_JOIN_FAILED
Definition: AgoraBase.h:3548
@ CONNECTION_CHANGED_RENEW_TOKEN
Definition: AgoraBase.h:3580
@ CONNECTION_CHANGED_TOKEN_EXPIRED
Definition: AgoraBase.h:3568
@ CONNECTION_CHANGED_KEEP_ALIVE_TIMEOUT
Definition: AgoraBase.h:3589
@ CONNECTION_CHANGED_REJECTED_BY_SERVER
Definition: AgoraBase.h:3572
@ CONNECTION_CHANGED_INVALID_APP_ID
Definition: AgoraBase.h:3556
@ CONNECTION_CHANGED_CLIENT_IP_ADDRESS_CHANGED_BY_USER
Definition: AgoraBase.h:3605
ENCRYPTION_ERROR_TYPE
Definition: AgoraBase.h:4811
@ ENCRYPTION_ERROR_ENCRYPTION_FAILURE
Definition: AgoraBase.h:4823
@ ENCRYPTION_ERROR_DECRYPTION_FAILURE
Definition: AgoraBase.h:4819
@ ENCRYPTION_ERROR_INTERNAL_FAILURE
Definition: AgoraBase.h:4815
FRAME_RATE
Definition: AgoraBase.h:1366
@ FRAME_RATE_FPS_24
Definition: AgoraBase.h:1386
@ FRAME_RATE_FPS_15
Definition: AgoraBase.h:1382
@ FRAME_RATE_FPS_1
Definition: AgoraBase.h:1370
@ FRAME_RATE_FPS_10
Definition: AgoraBase.h:1378
@ FRAME_RATE_FPS_30
Definition: AgoraBase.h:1390
@ FRAME_RATE_FPS_7
Definition: AgoraBase.h:1374
@ FRAME_RATE_FPS_60
Definition: AgoraBase.h:1394
LOCAL_AUDIO_STREAM_ERROR
Definition: AgoraBase.h:2758
@ LOCAL_AUDIO_STREAM_ERROR_FAILURE
Definition: AgoraBase.h:2766
@ LOCAL_AUDIO_STREAM_ERROR_DEVICE_BUSY
Definition: AgoraBase.h:2774
@ LOCAL_AUDIO_STREAM_ERROR_ENCODE_FAILURE
Definition: AgoraBase.h:2783
@ LOCAL_AUDIO_STREAM_ERROR_RECORD_FAILURE
Definition: AgoraBase.h:2779
@ LOCAL_AUDIO_STREAM_ERROR_DEVICE_NO_PERMISSION
Definition: AgoraBase.h:2770
@ LOCAL_AUDIO_STREAM_ERROR_OK
Definition: AgoraBase.h:2762
CLIENT_ROLE_TYPE
Definition: AgoraBase.h:2414
@ CLIENT_ROLE_AUDIENCE
Definition: AgoraBase.h:2422
@ CLIENT_ROLE_BROADCASTER
Definition: AgoraBase.h:2418
CONNECTION_STATE_TYPE
Definition: AgoraBase.h:3395
@ CONNECTION_STATE_DISCONNECTED
Definition: AgoraBase.h:3399
@ CONNECTION_STATE_RECONNECTING
Definition: AgoraBase.h:3413
@ CONNECTION_STATE_CONNECTING
Definition: AgoraBase.h:3403
@ CONNECTION_STATE_FAILED
Definition: AgoraBase.h:3417
@ CONNECTION_STATE_CONNECTED
Definition: AgoraBase.h:3408
const int COMPATIBLE_BITRATE
Definition: AgoraBase.h:1535
REMOTE_AUDIO_STATE_REASON
Definition: AgoraBase.h:2878
@ REMOTE_AUDIO_REASON_REMOTE_UNMUTED
Definition: AgoraBase.h:2910
@ REMOTE_AUDIO_REASON_REMOTE_MUTED
Definition: AgoraBase.h:2905
@ REMOTE_AUDIO_REASON_LOCAL_MUTED
Definition: AgoraBase.h:2895
@ REMOTE_AUDIO_REASON_REMOTE_OFFLINE
Definition: AgoraBase.h:2914
@ REMOTE_AUDIO_REASON_NETWORK_CONGESTION
Definition: AgoraBase.h:2886
@ REMOTE_AUDIO_REASON_NETWORK_RECOVERY
Definition: AgoraBase.h:2890
@ REMOTE_AUDIO_REASON_LOCAL_UNMUTED
Definition: AgoraBase.h:2900
@ REMOTE_AUDIO_REASON_INTERNAL
Definition: AgoraBase.h:2882
TCcMode
Definition: AgoraBase.h:4978
@ CC_DISABLED
Definition: AgoraBase.h:4986
@ CC_ENABLED
Definition: AgoraBase.h:4982
USER_OFFLINE_REASON_TYPE
Definition: AgoraBase.h:1236
@ USER_OFFLINE_BECOME_AUDIENCE
Definition: AgoraBase.h:1250
@ USER_OFFLINE_QUIT
Definition: AgoraBase.h:1240
@ USER_OFFLINE_DROPPED
Definition: AgoraBase.h:1246
STREAM_PUBLISH_STATE
Definition: AgoraBase.h:4882
@ PUB_STATE_IDLE
Definition: AgoraBase.h:4886
@ PUB_STATE_PUBLISHED
Definition: AgoraBase.h:4898
@ PUB_STATE_PUBLISHING
Definition: AgoraBase.h:4894
@ PUB_STATE_NO_PUBLISHED
Definition: AgoraBase.h:4890
VIDEO_STREAM_TYPE
Definition: AgoraBase.h:1837
@ VIDEO_STREAM_HIGH
Definition: AgoraBase.h:1841
@ VIDEO_STREAM_LOW
Definition: AgoraBase.h:1845
unsigned int track_id_t
Definition: AgoraMediaBase.h:26
AUDIO_PROFILE_TYPE
Definition: AgoraBase.h:2598
@ AUDIO_PROFILE_MUSIC_STANDARD_STEREO
Definition: AgoraBase.h:2616
@ AUDIO_PROFILE_IOT
Definition: AgoraBase.h:2628
@ AUDIO_PROFILE_MUSIC_HIGH_QUALITY
Definition: AgoraBase.h:2620
@ AUDIO_PROFILE_NUM
Definition: AgoraBase.h:2631
@ AUDIO_PROFILE_DEFAULT
Definition: AgoraBase.h:2604
@ AUDIO_PROFILE_MUSIC_STANDARD
Definition: AgoraBase.h:2612
@ AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO
Definition: AgoraBase.h:2624
@ AUDIO_PROFILE_SPEECH_STANDARD
Definition: AgoraBase.h:2608
VIDEO_CODEC_TYPE
Definition: AgoraBase.h:1552
@ VIDEO_CODEC_GENERIC_H264
Definition: AgoraBase.h:1580
@ VIDEO_CODEC_H265
Definition: AgoraBase.h:1568
@ VIDEO_CODEC_GENERIC_JPEG
Definition: AgoraBase.h:1588
@ VIDEO_CODEC_VP9
Definition: AgoraBase.h:1572
@ VIDEO_CODEC_AV1
Definition: AgoraBase.h:1584
@ VIDEO_CODEC_H264
Definition: AgoraBase.h:1564
@ VIDEO_CODEC_GENERIC
Definition: AgoraBase.h:1576
@ VIDEO_CODEC_NONE
Definition: AgoraBase.h:1556
@ VIDEO_CODEC_VP8
Definition: AgoraBase.h:1560
LOCAL_VIDEO_STREAM_STATE
Definition: AgoraBase.h:2789
@ LOCAL_VIDEO_STREAM_STATE_ENCODING
Definition: AgoraBase.h:2801
@ LOCAL_VIDEO_STREAM_STATE_FAILED
Definition: AgoraBase.h:2805
@ LOCAL_VIDEO_STREAM_STATE_STOPPED
Definition: AgoraBase.h:2793
@ LOCAL_VIDEO_STREAM_STATE_CAPTURING
Definition: AgoraBase.h:2797
REMOTE_VIDEO_STATE
Definition: AgoraBase.h:2919
@ REMOTE_VIDEO_STATE_FAILED
Definition: AgoraBase.h:2944
@ REMOTE_VIDEO_STATE_DECODING
Definition: AgoraBase.h:2935
@ REMOTE_VIDEO_STATE_FROZEN
Definition: AgoraBase.h:2940
@ REMOTE_VIDEO_STATE_STARTING
Definition: AgoraBase.h:2928
@ REMOTE_VIDEO_STATE_STOPPED
Definition: AgoraBase.h:2925
EXPERIENCE_POOR_REASON
Definition: AgoraBase.h:2456
@ LOCAL_NETWORK_QUALITY_POOR
Definition: AgoraBase.h:2465
@ EXPERIENCE_REASON_NONE
Definition: AgoraBase.h:2459
@ WIRELESS_SIGNAL_POOR
Definition: AgoraBase.h:2468
@ WIFI_BLUETOOTH_COEXIST
Definition: AgoraBase.h:2472
@ REMOTE_NETWORK_QUALITY_POOR
Definition: AgoraBase.h:2462
AREA_CODE
Definition: AgoraBase.h:4348
@ AREA_CODE_NA
Definition: AgoraBase.h:4356
@ AREA_CODE_AS
Definition: AgoraBase.h:4364
@ AREA_CODE_EU
Definition: AgoraBase.h:4360
@ AREA_CODE_JP
Definition: AgoraBase.h:4368
@ AREA_CODE_GLOB
Definition: AgoraBase.h:4376
@ AREA_CODE_IN
Definition: AgoraBase.h:4372
@ AREA_CODE_CN
Definition: AgoraBase.h:4352
MAX_USER_ACCOUNT_LENGTH_TYPE
Definition: AgoraBase.h:4849
@ MAX_USER_ACCOUNT_LENGTH
Definition: AgoraBase.h:4852
EXPERIENCE_QUALITY_TYPE
Definition: AgoraBase.h:2441
@ EXPERIENCE_QUALITY_GOOD
Definition: AgoraBase.h:2445
@ EXPERIENCE_QUALITY_BAD
Definition: AgoraBase.h:2449
VIDEO_MIRROR_MODE_TYPE
Definition: AgoraBase.h:1979
@ VIDEO_MIRROR_MODE_AUTO
Definition: AgoraBase.h:1983
@ VIDEO_MIRROR_MODE_ENABLED
Definition: AgoraBase.h:1987
@ VIDEO_MIRROR_MODE_DISABLED
Definition: AgoraBase.h:1991
ENCRYPTION_MODE
Definition: AgoraBase.h:4723
@ SM4_128_ECB
Definition: AgoraBase.h:4737
REMOTE_VIDEO_DOWNSCALE_LEVEL
Definition: AgoraBase.h:3067
@ REMOTE_VIDEO_DOWNSCALE_LEVEL_1
Definition: AgoraBase.h:3075
@ REMOTE_VIDEO_DOWNSCALE_LEVEL_3
Definition: AgoraBase.h:3083
@ REMOTE_VIDEO_DOWNSCALE_LEVEL_4
Definition: AgoraBase.h:3087
@ REMOTE_VIDEO_DOWNSCALE_LEVEL_NONE
Definition: AgoraBase.h:3071
@ REMOTE_VIDEO_DOWNSCALE_LEVEL_2
Definition: AgoraBase.h:3079
const int STANDARD_BITRATE
Definition: AgoraBase.h:1526
LASTMILE_PROBE_RESULT_STATE
Definition: AgoraBase.h:3455
@ LASTMILE_PROBE_RESULT_COMPLETE
Definition: AgoraBase.h:3459
@ LASTMILE_PROBE_RESULT_INCOMPLETE_NO_BWE
Definition: AgoraBase.h:3464
@ LASTMILE_PROBE_RESULT_UNAVAILABLE
Definition: AgoraBase.h:3469
REMOTE_AUDIO_STATE
Definition: AgoraBase.h:2843
@ REMOTE_AUDIO_STATE_FAILED
Definition: AgoraBase.h:2871
@ REMOTE_AUDIO_STATE_STARTING
Definition: AgoraBase.h:2854
@ REMOTE_AUDIO_STATE_STOPPED
Definition: AgoraBase.h:2850
@ REMOTE_AUDIO_STATE_FROZEN
Definition: AgoraBase.h:2866
@ REMOTE_AUDIO_STATE_DECODING
Definition: AgoraBase.h:2861
NETWORK_TYPE
Definition: AgoraBase.h:3612
@ NETWORK_TYPE_DISCONNECTED
Definition: AgoraBase.h:3620
@ NETWORK_TYPE_MOBILE_3G
Definition: AgoraBase.h:3636
@ NETWORK_TYPE_MOBILE_4G
Definition: AgoraBase.h:3640
@ NETWORK_TYPE_UNKNOWN
Definition: AgoraBase.h:3616
@ NETWORK_TYPE_LAN
Definition: AgoraBase.h:3624
@ NETWORK_TYPE_WIFI
Definition: AgoraBase.h:3628
@ NETWORK_TYPE_MOBILE_2G
Definition: AgoraBase.h:3632
unsigned int uid_t
Definition: AgoraMediaBase.h:25
QUALITY_ADAPT_INDICATION
Definition: AgoraBase.h:2428
@ ADAPT_NONE
Definition: AgoraBase.h:2430
@ ADAPT_UP_BANDWIDTH
Definition: AgoraBase.h:2432
@ ADAPT_DOWN_BANDWIDTH
Definition: AgoraBase.h:2434
AUDIO_CODEC_TYPE
Definition: AgoraBase.h:1595
@ AUDIO_CODEC_G722
Definition: AgoraBase.h:1612
@ AUDIO_CODEC_HEAAC
Definition: AgoraBase.h:1623
@ AUDIO_CODEC_PCMU
Definition: AgoraBase.h:1608
@ AUDIO_CODEC_OPUS
Definition: AgoraBase.h:1599
@ AUDIO_CODEC_HEAAC2
Definition: AgoraBase.h:1633
@ AUDIO_CODEC_AACLC
Definition: AgoraBase.h:1619
@ AUDIO_CODEC_PCMA
Definition: AgoraBase.h:1604
STREAM_SUBSCRIBE_STATE
Definition: AgoraBase.h:4859
@ SUB_STATE_IDLE
Definition: AgoraBase.h:4863
@ SUB_STATE_NO_SUBSCRIBED
Definition: AgoraBase.h:4867
@ SUB_STATE_SUBSCRIBING
Definition: AgoraBase.h:4871
@ SUB_STATE_SUBSCRIBED
Definition: AgoraBase.h:4875
VIDEO_SOURCE_TYPE
Definition: AgoraBase.h:2356
@ VIDEO_SOURCE_CAMERA_PRIMARY
Definition: AgoraBase.h:2359
@ VIDEO_SOURCE_RTC_IMAGE_JPEG
Definition: AgoraBase.h:2395
@ VIDEO_SOURCE_CUSTOM
Definition: AgoraBase.h:2384
@ VIDEO_SOURCE_RTC_IMAGE_GIF
Definition: AgoraBase.h:2398
@ VIDEO_SOURCE_CAMERA
Definition: AgoraBase.h:2365
@ VIDEO_SOURCE_SCREEN_PRIMARY
Definition: AgoraBase.h:2372
@ VIDEO_SOURCE_REMOTE
Definition: AgoraBase.h:2401
@ VIDEO_SOURCE_CAMERA_SECONDARY
Definition: AgoraBase.h:2368
@ VIDEO_SOURCE_SCREEN_SECONDARY
Definition: AgoraBase.h:2380
@ VIDEO_SOURCE_UNKNOWN
Definition: AgoraBase.h:2407
@ VIDEO_SOURCE_MEDIA_PLAYER
Definition: AgoraBase.h:2388
@ VIDEO_SOURCE_SCREEN
Definition: AgoraBase.h:2376
@ VIDEO_SOURCE_TRANSCODED
Definition: AgoraBase.h:2404
@ VIDEO_SOURCE_RTC_IMAGE_PNG
Definition: AgoraBase.h:2392
LOCAL_VIDEO_STREAM_ERROR
Definition: AgoraBase.h:2812
@ LOCAL_VIDEO_STREAM_ERROR_DEVICE_NO_PERMISSION
Definition: AgoraBase.h:2818
@ LOCAL_VIDEO_STREAM_ERROR_OK
Definition: AgoraBase.h:2814
@ LOCAL_VIDEO_STREAM_ERROR_CAPTURE_FAILURE
Definition: AgoraBase.h:2822
@ LOCAL_VIDEO_STREAM_ERROR_DEVICE_BUSY
Definition: AgoraBase.h:2820
@ LOCAL_VIDEO_STREAM_ERROR_FAILURE
Definition: AgoraBase.h:2816
@ LOCAL_VIDEO_STREAM_ERROR_ENCODE_FAILURE
Definition: AgoraBase.h:2824
DEGRADATION_PREFERENCE
Definition: AgoraBase.h:1471
@ MAINTAIN_FRAMERATE
Definition: AgoraBase.h:1479
@ MAINTAIN_BALANCED
Definition: AgoraBase.h:1483
@ MAINTAIN_QUALITY
Definition: AgoraBase.h:1475
@ MAINTAIN_RESOLUTION
Definition: AgoraBase.h:1487
REMOTE_VIDEO_STATE_REASON
Definition: AgoraBase.h:2948
@ REMOTE_VIDEO_STATE_REASON_NETWORK_CONGESTION
Definition: AgoraBase.h:2957
@ REMOTE_VIDEO_STATE_REASON_REMOTE_UNMUTED
Definition: AgoraBase.h:2982
@ REMOTE_VIDEO_STATE_REASON_REMOTE_MUTED
Definition: AgoraBase.h:2977
@ REMOTE_VIDEO_STATE_REASON_LOCAL_UNMUTED
Definition: AgoraBase.h:2972
@ REMOTE_VIDEO_STATE_REASON_AUDIO_FALLBACK
Definition: AgoraBase.h:2992
@ REMOTE_VIDEO_STATE_REASON_NETWORK_RECOVERY
Definition: AgoraBase.h:2962
@ REMOTE_VIDEO_STATE_REASON_REMOTE_OFFLINE
Definition: AgoraBase.h:2987
@ REMOTE_VIDEO_STATE_REASON_AUDIO_FALLBACK_RECOVERY
Definition: AgoraBase.h:2997
@ REMOTE_VIDEO_STATE_REASON_LOCAL_MUTED
Definition: AgoraBase.h:2967
@ REMOTE_VIDEO_STATE_REASON_INTERNAL
Definition: AgoraBase.h:2952
QUALITY_TYPE
Definition: AgoraBase.h:1274
@ QUALITY_BAD
Definition: AgoraBase.h:1296
@ QUALITY_POOR
Definition: AgoraBase.h:1292
@ QUALITY_GOOD
Definition: AgoraBase.h:1288
@ QUALITY_UNKNOWN
Definition: AgoraBase.h:1279
@ QUALITY_VBAD
Definition: AgoraBase.h:1300
@ QUALITY_EXCELLENT
Definition: AgoraBase.h:1283
@ QUALITY_DOWN
Definition: AgoraBase.h:1304
VIDEO_FRAME_TYPE
Definition: AgoraBase.h:1421
@ VIDEO_FRAME_TYPE_B_FRAME
Definition: AgoraBase.h:1429
@ VIDEO_FRAME_TYPE_DROPPABLE_FRAME
Definition: AgoraBase.h:1431
@ VIDEO_FRAME_TYPE_UNKNOW
Definition: AgoraBase.h:1433
@ VIDEO_FRAME_TYPE_KEY_FRAME
Definition: AgoraBase.h:1425
@ VIDEO_FRAME_TYPE_BLANK_FRAME
Definition: AgoraBase.h:1423
@ VIDEO_FRAME_TYPE_DELTA_FRAME
Definition: AgoraBase.h:1427
VIDEO_ORIENTATION
Definition: AgoraBase.h:1343
@ VIDEO_ORIENTATION_270
Definition: AgoraBase.h:1359
@ VIDEO_ORIENTATION_0
Definition: AgoraBase.h:1347
@ VIDEO_ORIENTATION_90
Definition: AgoraBase.h:1351
@ VIDEO_ORIENTATION_180
Definition: AgoraBase.h:1355
ORIENTATION_MODE
Definition: AgoraBase.h:1440
@ ORIENTATION_MODE_FIXED_PORTRAIT
Definition: AgoraBase.h:1464
@ ORIENTATION_MODE_ADAPTIVE
Definition: AgoraBase.h:1448
@ ORIENTATION_MODE_FIXED_LANDSCAPE
Definition: AgoraBase.h:1456
CopyableAutoPtr< IString > AString
Definition: AgoraBase.h:210
Definition: AgoraBase.h:86
void * view_t
Definition: AgoraBase.h:1199
util::AList< UserInfo > UserList
Definition: AgoraBase.h:1226
commons::cjson::JsonWrapper any_document_t
Definition: AgoraBase.h:95
const char * user_id_t
Definition: AgoraBase.h:1198
@ POSITION_POST_CAPTURER
Definition: AgoraMediaBase.h:645
CHANNEL_PROFILE_TYPE
Definition: AgoraBase.h:306
@ __deprecated
Definition: AgoraBase.h:331
@ CHANNEL_PROFILE_COMMUNICATION
Definition: AgoraBase.h:312
@ CHANNEL_PROFILE_LIVE_BROADCASTING
Definition: AgoraBase.h:318
@ CHANNEL_PROFILE_GAME
Definition: AgoraBase.h:323
Definition: AgoraBase.h:1205
UserInfo()
Definition: AgoraBase.h:1223
bool hasAudio
Definition: AgoraBase.h:1215
bool hasVideo
Definition: AgoraBase.h:1221
util::AString userId
Definition: AgoraBase.h:1209
bool sendEvenIfEmpty
Definition: AgoraBase.h:1733
bool speech
Definition: AgoraBase.h:1727
EncodedAudioFrameAdvancedSettings()
Definition: AgoraBase.h:1718
Definition: AgoraBase.h:1740
int sampleRateHz
Definition: AgoraBase.h:1762
EncodedAudioFrameInfo(const EncodedAudioFrameInfo &rhs)
Definition: AgoraBase.h:1748
EncodedAudioFrameAdvancedSettings advancedSettings
Definition: AgoraBase.h:1776
EncodedAudioFrameInfo()
Definition: AgoraBase.h:1741
int samplesPerChannel
Definition: AgoraBase.h:1768
AUDIO_CODEC_TYPE codec
Definition: AgoraBase.h:1758
int numberOfChannels
Definition: AgoraBase.h:1772
int64_t captureTimeMs
Definition: AgoraBase.h:1780
Definition: AgoraBase.h:1880
VIDEO_STREAM_TYPE streamType
Definition: AgoraBase.h:1972
int height
Definition: AgoraBase.h:1935
int64_t captureTimeMs
Definition: AgoraBase.h:1960
VIDEO_CODEC_TYPE codecType
Definition: AgoraBase.h:1927
int trackId
Definition: AgoraBase.h:1954
int framesPerSecond
Definition: AgoraBase.h:1942
uid_t uid
Definition: AgoraBase.h:1968
EncodedVideoFrameInfo & operator=(const EncodedVideoFrameInfo &rhs)
Definition: AgoraBase.h:1907
int64_t decodeTimeMs
Definition: AgoraBase.h:1964
EncodedVideoFrameInfo(const EncodedVideoFrameInfo &rhs)
Definition: AgoraBase.h:1894
VIDEO_FRAME_TYPE frameType
Definition: AgoraBase.h:1946
int width
Definition: AgoraBase.h:1931
EncodedVideoFrameInfo()
Definition: AgoraBase.h:1881
VIDEO_ORIENTATION rotation
Definition: AgoraBase.h:1950
Definition: AgoraBase.h:4759
const char * encryptionKey
Definition: AgoraBase.h:4769
EncryptionConfig()
Definition: AgoraBase.h:4772
uint8_t encryptionKdfSalt[32]
Definition: AgoraBase.h:4770
ENCRYPTION_MODE encryptionMode
Definition: AgoraBase.h:4763
Definition: AgoraBase.h:3424
bool probeUplink
Definition: AgoraBase.h:3431
bool probeDownlink
Definition: AgoraBase.h:3437
unsigned int expectedUplinkBitrate
Definition: AgoraBase.h:3443
unsigned int expectedDownlinkBitrate
Definition: AgoraBase.h:3448
Definition: AgoraBase.h:3477
LastmileProbeOneWayResult()
Definition: AgoraBase.h:3491
unsigned int packetLossRate
Definition: AgoraBase.h:3481
unsigned int availableBandwidth
Definition: AgoraBase.h:3489
unsigned int jitter
Definition: AgoraBase.h:3485
Definition: AgoraBase.h:3501
LastmileProbeOneWayResult downlinkReport
Definition: AgoraBase.h:3513
unsigned int rtt
Definition: AgoraBase.h:3517
LastmileProbeOneWayResult uplinkReport
Definition: AgoraBase.h:3509
LastmileProbeResult()
Definition: AgoraBase.h:3519
LASTMILE_PROBE_RESULT_STATE state
Definition: AgoraBase.h:3505
Definition: AgoraBase.h:3254
int sentSampleRate
Definition: AgoraBase.h:3262
int numChannels
Definition: AgoraBase.h:3258
int sentBitrate
Definition: AgoraBase.h:3266
Definition: AgoraBase.h:2173
unsigned short rxVideoKBitRate
Definition: AgoraBase.h:2221
int firstVideoPacketDurationAfterUnmute
Definition: AgoraBase.h:2292
int firstVideoKeyFrameDecodedDurationAfterUnmute
Definition: AgoraBase.h:2302
unsigned short rxAudioKBitRate
Definition: AgoraBase.h:2213
int memoryAppUsageInKbytes
Definition: AgoraBase.h:2257
unsigned int rxBytes
Definition: AgoraBase.h:2185
unsigned short txAudioKBitRate
Definition: AgoraBase.h:2217
unsigned short lastmileDelay
Definition: AgoraBase.h:2229
unsigned int userCount
Definition: AgoraBase.h:2233
unsigned int txVideoBytes
Definition: AgoraBase.h:2193
unsigned short rxKBitRate
Definition: AgoraBase.h:2209
int gatewayRtt
Definition: AgoraBase.h:2245
unsigned int duration
Definition: AgoraBase.h:2177
int firstVideoPacketDuration
Definition: AgoraBase.h:2272
unsigned int rxAudioBytes
Definition: AgoraBase.h:2197
unsigned short txKBitRate
Definition: AgoraBase.h:2205
int packetsBeforeFirstKeyFramePacket
Definition: AgoraBase.h:2282
int rxPacketLossRate
Definition: AgoraBase.h:2315
int firstAudioPacketDuration
Definition: AgoraBase.h:2267
int firstAudioPacketDurationAfterUnmute
Definition: AgoraBase.h:2287
int firstVideoKeyFramePacketDurationAfterUnmute
Definition: AgoraBase.h:2297
int txPacketLossRate
Definition: AgoraBase.h:2311
RtcStats()
Definition: AgoraBase.h:2316
double cpuTotalUsage
Definition: AgoraBase.h:2241
int firstVideoKeyFrameRenderedDurationAfterUnmute
Definition: AgoraBase.h:2307
double memoryAppUsageRatio
Definition: AgoraBase.h:2249
int connectTimeMs
Definition: AgoraBase.h:2262
double memoryTotalUsageRatio
Definition: AgoraBase.h:2253
unsigned short txVideoKBitRate
Definition: AgoraBase.h:2225
unsigned int txAudioBytes
Definition: AgoraBase.h:2189
unsigned int txBytes
Definition: AgoraBase.h:2181
unsigned int rxVideoBytes
Definition: AgoraBase.h:2201
int firstVideoKeyFramePacketDuration
Definition: AgoraBase.h:2277
double cpuAppUsage
Definition: AgoraBase.h:2237
Definition: AgoraBase.h:2149
bool operator==(const SimulcastStreamConfig &rhs) const
Definition: AgoraBase.h:2163
SimulcastStreamConfig()
Definition: AgoraBase.h:2162
int framerate
Definition: AgoraBase.h:2161
int bitrate
Definition: AgoraBase.h:2157
VideoDimensions dimensions
Definition: AgoraBase.h:2153
Definition: AgoraBase.h:4905
char userAccount[MAX_USER_ACCOUNT_LENGTH]
Definition: AgoraBase.h:4913
UserInfo()
Definition: AgoraBase.h:4914
uid_t uid
Definition: AgoraBase.h:4909
Definition: AgoraBase.h:1500
VideoDimensions()
Definition: AgoraBase.h:1509
bool operator==(const VideoDimensions &rhs) const
Definition: AgoraBase.h:1511
int height
Definition: AgoraBase.h:1508
int width
Definition: AgoraBase.h:1504
VideoDimensions(int w, int h)
Definition: AgoraBase.h:1510
Definition: AgoraBase.h:1998
VIDEO_MIRROR_MODE_TYPE mirrorMode
Definition: AgoraBase.h:2058
DEGRADATION_PREFERENCE degradationPreference
Definition: AgoraBase.h:2053
VideoEncoderConfiguration & operator=(const VideoEncoderConfiguration &rhs)
Definition: AgoraBase.h:2097
VIDEO_CODEC_TYPE codecType
Definition: AgoraBase.h:2002
VideoEncoderConfiguration()
Definition: AgoraBase.h:2087
int minBitrate
Definition: AgoraBase.h:2044
VideoEncoderConfiguration(int width, int height, int f, int b, ORIENTATION_MODE m, VIDEO_MIRROR_MODE_TYPE mirror=VIDEO_MIRROR_MODE_DISABLED)
Definition: AgoraBase.h:2069
VideoEncoderConfiguration(const VideoDimensions &d, int f, int b, ORIENTATION_MODE m, VIDEO_MIRROR_MODE_TYPE mirror=VIDEO_MIRROR_MODE_DISABLED)
Definition: AgoraBase.h:2060
ORIENTATION_MODE orientationMode
Definition: AgoraBase.h:2048
int frameRate
Definition: AgoraBase.h:2010
VideoEncoderConfiguration(const VideoEncoderConfiguration &config)
Definition: AgoraBase.h:2078
int bitrate
Definition: AgoraBase.h:2027
VideoDimensions dimensions
Definition: AgoraBase.h:2006
Definition: AgoraBase.h:1851
VIDEO_STREAM_TYPE type
Definition: AgoraBase.h:1858
VideoSubscriptionOptions(VIDEO_STREAM_TYPE streamtype)
Definition: AgoraBase.h:1869
bool encodedFrameOnly
Definition: AgoraBase.h:1864
VideoSubscriptionOptions()
Definition: AgoraBase.h:1866
VideoSubscriptionOptions(VIDEO_STREAM_TYPE streamtype, bool encoded_only)
Definition: AgoraBase.h:1872
Definition: AgoraBase.h:3015
VIDEO_CODEC_TYPE codecType
Definition: AgoraBase.h:3044
uid_t ownerUid
Definition: AgoraBase.h:3027
track_id_t trackId
Definition: AgoraBase.h:3032
VIDEO_SOURCE_TYPE sourceType
Definition: AgoraBase.h:3054
bool isLocal
Definition: AgoraBase.h:3023
bool encodedFrameOnly
Definition: AgoraBase.h:3050
VideoTrackInfo()
Definition: AgoraBase.h:3016
const char * channelId
Definition: AgoraBase.h:3036
VIDEO_STREAM_TYPE streamType
Definition: AgoraBase.h:3040