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
2599 {
2628 };
2629
2634 {
2663 };
2664
2666
2669 struct VideoFormat
2670 {
2673 kMaxWidthInPixels = 3840,
2675 kMaxHeightInPixels = 2160,
2677 kMaxFps = 60,
2678 };
2679
2683 int width; // Number of pixels.
2687 int height; // Number of pixels.
2691 int fps;
2692
2694 uint32_t pixelFormat;
2695
2696 VideoFormat() : width(FRAME_WIDTH_640), height(FRAME_HEIGHT_360), fps(FRAME_RATE_FPS_15), pixelFormat(0) {}
2697 VideoFormat(int w, int h, int f, uint32_t fmt = 0) : width(w), height(h), fps(f), pixelFormat(fmt) {}
2698 };
2700
2702
2705 enum VIDEO_CONTENT_HINT
2706 {
2710 CONTENT_HINT_NONE,
2717 CONTENT_HINT_MOTION,
2723 CONTENT_HINT_DETAILS
2724 };
2726
2731 {
2749
2754 {
2781
2785 {
2803
2808 {
2822
2823 LOCAL_VIDEO_STREAM_ERROR_BACKGROUD = 6,
2825 LOCAL_VIDEO_STREAM_ERROR_MULTIPLE_FOREGROUND_APPS = 7,
2827 LOCAL_VIDEO_STREAM_ERROR_SYSTEM_PRESSURE = 8,
2829 LOCAL_VIDEO_STREAM_ERROR_SCREEN_CAPTURE_WINDOW_MINIMIZED = 11,
2831 LOCAL_VIDEO_STREAM_ERROR_SCREEN_CAPTURE_WINDOW_CLOSED = 12
2833 };
2834
2839 {
2846 REMOTE_AUDIO_STATE_STOPPED = 0, // Default state, audio is started or remote user disabled/muted audio stream
2850 REMOTE_AUDIO_STATE_STARTING = 1, // The first audio frame packet has been received
2857 REMOTE_AUDIO_STATE_DECODING = 2, // The first remote audio frame has been decoded or frozen state ends
2862 REMOTE_AUDIO_STATE_FROZEN = 3, // Remote audio is frozen, probably due to network issue
2867 REMOTE_AUDIO_STATE_FAILED = 4, // Remote audio play failed
2868 };
2869
2874 {
2911 };
2912
2915 {
2941 };
2944 {
2949
2954
2959
2964
2969
2974
2979
2984
2989
2995
2998 REMOTE_VIDEO_STATE_REASON_VIDEO_STREAM_TYPE_CHANGE_TO_LOW = 10,
3002 REMOTE_VIDEO_STATE_REASON_VIDEO_STREAM_TYPE_CHANGE_TO_HIGH = 11,
3004 };
3005
3011 {
3024
3032 const char *channelId;
3052
3055 uint32_t observationPosition;
3057 };
3058
3063 {
3084 };
3086
3089 struct AudioVolumeInfo
3090 {
3094 uid_t uid;
3095
3099 unsigned int volume; // [0,255]
3100
3101 /*
3102 * The activity status of remote users
3103 */
3104 unsigned int vad;
3105
3109 double voicePitch;
3110
3111 AudioVolumeInfo() : uid(0), volume(0), vad(0), voicePitch(0.0) {}
3112 };
3113
3117 class IPacketObserver
3118 {
3119 public:
3120 virtual ~IPacketObserver() {}
3124 struct Packet
3125 {
3129 const unsigned char *buffer;
3133 unsigned int size;
3134
3135 Packet() : buffer(NULL), size(0) {}
3136 };
3144 virtual bool onSendAudioPacket(Packet &packet) = 0;
3152 virtual bool onSendVideoPacket(Packet &packet) = 0;
3160 virtual bool onReceiveAudioPacket(Packet &packet) = 0;
3168 virtual bool onReceiveVideoPacket(Packet &packet) = 0;
3169 };
3171
3175 {
3176 public:
3186 virtual bool OnEncodedVideoImageReceived(const uint8_t *imageBuffer, size_t length,
3187 const EncodedVideoFrameInfo &videoEncodedFrameInfo) = 0;
3188
3190 };
3192
3195 enum AUDIO_SAMPLE_RATE_TYPE
3196 {
3200 AUDIO_SAMPLE_RATE_32000 = 32000,
3204 AUDIO_SAMPLE_RATE_44100 = 44100,
3208 AUDIO_SAMPLE_RATE_48000 = 48000,
3209 };
3213 enum VIDEO_CODEC_PROFILE_TYPE
3214 {
3218 VIDEO_CODEC_PROFILE_BASELINE = 66,
3222 VIDEO_CODEC_PROFILE_MAIN = 77,
3226 VIDEO_CODEC_PROFILE_HIGH = 100,
3227 };
3228
3232 enum AUDIO_CODEC_PROFILE_TYPE
3233 {
3237 AUDIO_CODEC_PROFILE_LC_AAC = 0,
3241 AUDIO_CODEC_PROFILE_HE_AAC = 1,
3242 };
3244
3250 {
3264
3267 int internalCodec;
3269 };
3270
3272
3275 enum RTMP_STREAM_PUBLISH_STATE
3276 {
3283 RTMP_STREAM_PUBLISH_STATE_IDLE = 0,
3289 RTMP_STREAM_PUBLISH_STATE_CONNECTING = 1,
3294 RTMP_STREAM_PUBLISH_STATE_RUNNING = 2,
3304 RTMP_STREAM_PUBLISH_STATE_RECOVERING = 3,
3309 RTMP_STREAM_PUBLISH_STATE_FAILURE = 4,
3310 };
3311
3315 enum RTMP_STREAM_PUBLISH_ERROR
3316 {
3320 RTMP_STREAM_PUBLISH_ERROR_FAILED = -1,
3324 RTMP_STREAM_PUBLISH_ERROR_OK = 0,
3330 RTMP_STREAM_PUBLISH_ERROR_INVALID_ARGUMENT = 1,
3334 RTMP_STREAM_PUBLISH_ERROR_ENCRYPTED_STREAM_NOT_ALLOWED = 2,
3339 RTMP_STREAM_PUBLISH_ERROR_CONNECTION_TIMEOUT = 3,
3344 RTMP_STREAM_PUBLISH_ERROR_INTERNAL_SERVER_ERROR = 4,
3348 RTMP_STREAM_PUBLISH_ERROR_RTMP_SERVER_ERROR = 5,
3352 RTMP_STREAM_PUBLISH_ERROR_TOO_OFTEN = 6,
3356 RTMP_STREAM_PUBLISH_ERROR_REACH_LIMIT = 7,
3360 RTMP_STREAM_PUBLISH_ERROR_NOT_AUTHORIZED = 8,
3364 RTMP_STREAM_PUBLISH_ERROR_STREAM_NOT_FOUND = 9,
3368 RTMP_STREAM_PUBLISH_ERROR_FORMAT_NOT_SUPPORTED = 10,
3373 RTMP_STREAM_PUBLISH_ERROR_CDN_ERROR = 11,
3377 RTMP_STREAM_PUBLISH_ERROR_ALREADY_IN_USE = 12,
3383 RTMP_STREAM_UNPUBLISH_ERROR_OK = 100,
3384 };
3386
3391 {
3414 };
3415
3420 {
3445 };
3446
3451 {
3467
3473 {
3477 unsigned int packetLossRate;
3481 unsigned int jitter;
3486
3488 jitter(0),
3489 availableBandwidth(0) {}
3490 };
3491
3497 {
3513 unsigned int rtt;
3514
3517 rtt(0) {}
3518 };
3519
3524 {
3602 };
3603
3608 {
3637 };
3639
3641 struct BeautyOptions
3642 {
3645 enum LIGHTENING_CONTRAST_LEVEL
3646 {
3648 LIGHTENING_CONTRAST_LOW = 0,
3650 LIGHTENING_CONTRAST_NORMAL,
3652 LIGHTENING_CONTRAST_HIGH
3653 };
3654
3657 LIGHTENING_CONTRAST_LEVEL lighteningContrastLevel;
3658
3661 float lighteningLevel;
3662
3665 float smoothnessLevel;
3666
3669 float rednessLevel;
3670
3673 float sharpnessLevel;
3674
3675 BeautyOptions(LIGHTENING_CONTRAST_LEVEL contrastLevel, float lightening, float smoothness, float redness, float sharpness) : lighteningContrastLevel(contrastLevel), lighteningLevel(lightening), smoothnessLevel(smoothness), rednessLevel(redness), sharpnessLevel(sharpness) {}
3676
3677 BeautyOptions() : lighteningContrastLevel(LIGHTENING_CONTRAST_NORMAL), lighteningLevel(0), smoothnessLevel(0), rednessLevel(0), sharpnessLevel(0) {}
3678 };
3679
3680 struct VirtualBackgroundSource
3681 {
3684 enum BACKGROUND_SOURCE_TYPE
3685 {
3689 BACKGROUND_COLOR = 1,
3693 BACKGROUND_IMG,
3695 BACKGROUND_BLUR,
3696 };
3697
3700 enum BACKGROUND_BLUR_DEGREE
3701 {
3703 BLUR_DEGREE_LOW = 1,
3705 BLUR_DEGREE_MEDIUM,
3707 BLUR_DEGREE_HIGH,
3708 };
3709
3712 BACKGROUND_SOURCE_TYPE background_source_type;
3713
3722 unsigned int color;
3723
3730 const char *source;
3731
3733 BACKGROUND_BLUR_DEGREE blur_degree;
3734
3735 VirtualBackgroundSource() : background_source_type(BACKGROUND_COLOR), color(0xffffff), source(NULL), blur_degree(BLUR_DEGREE_HIGH) {}
3736 };
3737
3738 struct SegmentationProperty
3739 {
3740
3741 enum SEG_MODEL_TYPE
3742 {
3743
3744 SEG_MODEL_AGORA_AI_ONE = 0,
3745 SEG_MODEL_AGORA_GREEN = 2
3746 };
3747
3748 SEG_MODEL_TYPE modelType;
3749
3750 int preferVelocity;
3751
3752 float greenCapacity;
3753
3754 SegmentationProperty() : modelType(SEG_MODEL_AGORA_AI_ONE), preferVelocity(1), greenCapacity(0.5) {}
3755 };
3758
3778 enum VOICE_BEAUTIFIER_PRESET
3779 {
3782 VOICE_BEAUTIFIER_OFF = 0x00000000,
3788 CHAT_BEAUTIFIER_MAGNETIC = 0x01010100,
3794 CHAT_BEAUTIFIER_FRESH = 0x01010200,
3800 CHAT_BEAUTIFIER_VITALITY = 0x01010300,
3814 SINGING_BEAUTIFIER = 0x01020100,
3817 TIMBRE_TRANSFORMATION_VIGOROUS = 0x01030100,
3820 TIMBRE_TRANSFORMATION_DEEP = 0x01030200,
3823 TIMBRE_TRANSFORMATION_MELLOW = 0x01030300,
3826 TIMBRE_TRANSFORMATION_FALSETTO = 0x01030400,
3829 TIMBRE_TRANSFORMATION_FULL = 0x01030500,
3832 TIMBRE_TRANSFORMATION_CLEAR = 0x01030600,
3835 TIMBRE_TRANSFORMATION_RESOUNDING = 0x01030700,
3838 TIMBRE_TRANSFORMATION_RINGING = 0x01030800,
3839
3840 ULTRA_HIGH_QUALITY_VOICE = 0x01040100
3841 };
3842
3845 enum AUDIO_EFFECT_PRESET
3846 {
3849 AUDIO_EFFECT_OFF = 0x00000000,
3857 ROOM_ACOUSTICS_KTV = 0x02010100,
3865 ROOM_ACOUSTICS_VOCAL_CONCERT = 0x02010200,
3873 ROOM_ACOUSTICS_STUDIO = 0x02010300,
3881 ROOM_ACOUSTICS_PHONOGRAPH = 0x02010400,
3888 ROOM_ACOUSTICS_VIRTUAL_STEREO = 0x02010500,
3896 ROOM_ACOUSTICS_SPACIAL = 0x02010600,
3904 ROOM_ACOUSTICS_ETHEREAL = 0x02010700,
3916 ROOM_ACOUSTICS_3D_VOICE = 0x02010800,
3927 VOICE_CHANGER_EFFECT_UNCLE = 0x02020100,
3938 VOICE_CHANGER_EFFECT_OLDMAN = 0x02020200,
3949 VOICE_CHANGER_EFFECT_BOY = 0x02020300,
3960 VOICE_CHANGER_EFFECT_SISTER = 0x02020400,
3971 VOICE_CHANGER_EFFECT_GIRL = 0x02020500,
3980 VOICE_CHANGER_EFFECT_PIGKING = 0x02020600,
3988 VOICE_CHANGER_EFFECT_HULK = 0x02020700,
3996 STYLE_TRANSFORMATION_RNB = 0x02030100,
4004 STYLE_TRANSFORMATION_POPULAR = 0x02030200,
4014 PITCH_CORRECTION = 0x02040100
4015
4019 };
4020
4023 enum VOICE_CONVERSION_PRESET
4024 {
4027 VOICE_CONVERSION_OFF = 0x00000000,
4030 VOICE_CHANGER_NEUTRAL = 0x03010100,
4033 VOICE_CHANGER_SWEET = 0x03010200,
4036 VOICE_CHANGER_SOLID = 0x03010300,
4039 VOICE_CHANGER_BASS = 0x03010400
4040 };
4041
4042 // TODO(ZYH), it will be deleted after the new interfaces have been implemented to replace it.
4043 enum AUDIO_REVERB_PRESET
4044 {
4048 AUDIO_REVERB_OFF = 0, // Turn off audio reverb
4052 AUDIO_REVERB_FX_KTV = 0x02010100,
4056 AUDIO_REVERB_FX_VOCAL_CONCERT = 0x02010200,
4060 AUDIO_REVERB_FX_UNCLE = 0x02020100,
4064 AUDIO_REVERB_FX_SISTER = 0x02020400,
4068 AUDIO_REVERB_FX_STUDIO = 0x02010300,
4072 AUDIO_REVERB_FX_POPULAR = 0x02030200,
4076 AUDIO_REVERB_FX_RNB = 0x02030100,
4080 AUDIO_REVERB_FX_PHONOGRAPH = 0x02010400
4081 };
4082
4086 enum AUDIO_RECORDING_QUALITY_TYPE
4087 {
4091 AUDIO_RECORDING_QUALITY_LOW = 0,
4095 AUDIO_RECORDING_QUALITY_MEDIUM = 1,
4099 AUDIO_RECORDING_QUALITY_HIGH = 2,
4100 };
4101
4105 enum AUDIO_FILE_RECORDING_TYPE
4106 {
4110 AUDIO_FILE_RECORDING_MIC = 1,
4114 AUDIO_FILE_RECORDING_PLAYBACK = 2,
4118 AUDIO_FILE_RECORDING_MIXED = 3,
4119 };
4120
4124 enum AUDIO_ENCODED_FRAME_OBSERVER_POSITION
4125 {
4129 AUDIO_ENCODED_FRAME_OBSERVER_POSITION_RECORD = 1,
4133 AUDIO_ENCODED_FRAME_OBSERVER_POSITION_PLAYBACK = 2,
4137 AUDIO_ENCODED_FRAME_OBSERVER_POSITION_MIXED = 3,
4138 };
4139
4143 struct AudioRecordingConfiguration
4144 {
4149 const char *filePath;
4155 bool encode;
4160 int sampleRate;
4164 AUDIO_FILE_RECORDING_TYPE fileRecordingType;
4168 AUDIO_RECORDING_QUALITY_TYPE quality;
4169
4170 AudioRecordingConfiguration()
4171 : filePath(NULL),
4172 encode(false),
4173 sampleRate(32000),
4174 fileRecordingType(AUDIO_FILE_RECORDING_MIXED),
4175 quality(AUDIO_RECORDING_QUALITY_LOW) {}
4176
4177 AudioRecordingConfiguration(const char *file_path, int sample_rate, AUDIO_RECORDING_QUALITY_TYPE quality_type)
4178 : filePath(file_path),
4179 encode(false),
4180 sampleRate(sample_rate),
4181 fileRecordingType(AUDIO_FILE_RECORDING_MIXED),
4182 quality(quality_type) {}
4183
4184 AudioRecordingConfiguration(const char *file_path, bool enc, int sample_rate, AUDIO_FILE_RECORDING_TYPE type, AUDIO_RECORDING_QUALITY_TYPE quality_type)
4185 : filePath(file_path),
4186 encode(enc),
4187 sampleRate(sample_rate),
4188 fileRecordingType(type),
4189 quality(quality_type) {}
4190
4191 AudioRecordingConfiguration(const AudioRecordingConfiguration &rhs)
4192 : filePath(rhs.filePath),
4193 encode(rhs.encode),
4194 sampleRate(rhs.sampleRate),
4195 fileRecordingType(rhs.fileRecordingType),
4196 quality(rhs.quality) {}
4197 };
4198
4203 struct AudioEncodedFrameObserverConfig
4204 {
4208 AUDIO_ENCODED_FRAME_OBSERVER_POSITION postionType;
4212 AUDIO_ENCODING_TYPE encodingType;
4213
4214 AudioEncodedFrameObserverConfig()
4215 : postionType(AUDIO_ENCODED_FRAME_OBSERVER_POSITION_PLAYBACK),
4216 encodingType(AUDIO_ENCODING_TYPE_OPUS_48000_MEDIUM) {}
4217 };
4218
4219 class IAudioEncodedFrameObserver
4220 {
4221 public:
4229 virtual void OnRecordAudioEncodedFrame(const uint8_t *frameBuffer, int length, const EncodedAudioFrameInfo &audioEncodedFrameInfo) = 0;
4230
4238 virtual void OnPlaybackAudioEncodedFrame(const uint8_t *frameBuffer, int length, const EncodedAudioFrameInfo &audioEncodedFrameInfo) = 0;
4239
4247 virtual void OnMixedAudioEncodedFrame(const uint8_t *frameBuffer, int length, const EncodedAudioFrameInfo &audioEncodedFrameInfo) = 0;
4248
4249 virtual ~IAudioEncodedFrameObserver() {}
4250 };
4253
4256 enum VOICE_CHANGER_PRESET
4257 {
4261 VOICE_CHANGER_OFF = 0, // Turn off the voice changer
4265 VOICE_CHANGER_OLDMAN = 0x02020200,
4269 VOICE_CHANGER_BABYBOY = 0x02020300,
4273 VOICE_CHANGER_BABYGIRL = 0x02020500,
4278 VOICE_CHANGER_ZHUBAJIE = 0x02020600,
4282 VOICE_CHANGER_ETHEREAL = 0x02010700,
4286 VOICE_CHANGER_HULK = 0x02020700,
4290 VOICE_BEAUTY_VIGOROUS = 0x01030100,
4294 VOICE_BEAUTY_DEEP = 0x01030200,
4298 VOICE_BEAUTY_MELLOW = 0x01030300,
4302 VOICE_BEAUTY_FALSETTO = 0x01030400,
4306 VOICE_BEAUTY_FULL = 0x01030500,
4310 VOICE_BEAUTY_CLEAR = 0x01030600,
4314 VOICE_BEAUTY_RESOUNDING = 0x01030700,
4318 VOICE_BEAUTY_RINGING = 0x01030800,
4322 VOICE_BEAUTY_SPACIAL = 0x02010600,
4327 GENERAL_BEAUTY_VOICE_MALE = 0x01010100,
4332 GENERAL_BEAUTY_VOICE_FEMALE_FRESH = 0x01010200,
4337 GENERAL_BEAUTY_VOICE_FEMALE_VITALITY = 0x01010300
4338 };
4340
4344 {
4348 AREA_CODE_CN = 0x00000001,
4352 AREA_CODE_NA = 0x00000002,
4356 AREA_CODE_EU = 0x00000004,
4360 AREA_CODE_AS = 0x00000008,
4364 AREA_CODE_JP = 0x00000010,
4368 AREA_CODE_IN = 0x00000020,
4372 AREA_CODE_GLOB = (0xFFFFFFFF)
4374
4376
4379 enum AREA_CODE_EX
4380 {
4384 AREA_CODE_OC = 0x00000040,
4388 AREA_CODE_SA = 0x00000080,
4392 AREA_CODE_AF = 0x00000100,
4396 AREA_CODE_KR = 0x00000200,
4400 AREA_CODE_OVS = 0xFFFFFFFE
4401 };
4402
4403 enum CHANNEL_MEDIA_RELAY_ERROR
4404 {
4407 RELAY_OK = 0,
4410 RELAY_ERROR_SERVER_ERROR_RESPONSE = 1,
4415 RELAY_ERROR_SERVER_NO_RESPONSE = 2,
4419 RELAY_ERROR_NO_RESOURCE_AVAILABLE = 3,
4422 RELAY_ERROR_FAILED_JOIN_SRC = 4,
4425 RELAY_ERROR_FAILED_JOIN_DEST = 5,
4428 RELAY_ERROR_FAILED_PACKET_RECEIVED_FROM_SRC = 6,
4431 RELAY_ERROR_FAILED_PACKET_SENT_TO_DEST = 7,
4436 RELAY_ERROR_SERVER_CONNECTION_LOST = 8,
4439 RELAY_ERROR_INTERNAL_ERROR = 9,
4442 RELAY_ERROR_SRC_TOKEN_EXPIRED = 10,
4445 RELAY_ERROR_DEST_TOKEN_EXPIRED = 11,
4446 };
4447
4448 // callback event
4449 enum CHANNEL_MEDIA_RELAY_EVENT
4450 {
4454 RELAY_EVENT_NETWORK_DISCONNECTED = 0,
4457 RELAY_EVENT_NETWORK_CONNECTED = 1,
4460 RELAY_EVENT_PACKET_JOINED_SRC_CHANNEL = 2,
4463 RELAY_EVENT_PACKET_JOINED_DEST_CHANNEL = 3,
4466 RELAY_EVENT_PACKET_SENT_TO_DEST_CHANNEL = 4,
4469 RELAY_EVENT_PACKET_RECEIVED_VIDEO_FROM_SRC = 5,
4472 RELAY_EVENT_PACKET_RECEIVED_AUDIO_FROM_SRC = 6,
4475 RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL = 7,
4478 RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL_REFUSED = 8,
4482 RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL_NOT_CHANGE = 9,
4485 RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL_IS_NULL = 10,
4488 RELAY_EVENT_VIDEO_PROFILE_UPDATE = 11,
4491 RELAY_EVENT_PAUSE_SEND_PACKET_TO_DEST_CHANNEL_SUCCESS = 12,
4494 RELAY_EVENT_PAUSE_SEND_PACKET_TO_DEST_CHANNEL_FAILED = 13,
4497 RELAY_EVENT_RESUME_SEND_PACKET_TO_DEST_CHANNEL_SUCCESS = 14,
4500 RELAY_EVENT_RESUME_SEND_PACKET_TO_DEST_CHANNEL_FAILED = 15,
4501 };
4502
4503 enum CHANNEL_MEDIA_RELAY_STATE
4504 {
4507 RELAY_STATE_IDLE = 0,
4510 RELAY_STATE_CONNECTING = 1,
4514 RELAY_STATE_RUNNING = 2,
4517 RELAY_STATE_FAILURE = 3,
4518 };
4519
4522 struct ChannelMediaInfo
4523 {
4527 const char *channelName;
4531 const char *token;
4534 uid_t uid;
4535 };
4536
4539 struct ChannelMediaRelayConfiguration
4540 {
4552 ChannelMediaInfo *srcInfo;
4559 ChannelMediaInfo *destInfos;
4565 int destCount;
4566
4567 ChannelMediaRelayConfiguration()
4568 : srcInfo(NULL),
4569 destInfos(NULL),
4570 destCount(0)
4571 {
4572 }
4573 };
4575
4579 {
4584
4586
4587 bool operator==(const UplinkNetworkInfo &rhs) const
4588 {
4590 }
4591 };
4592
4597 {
4599 {
4603 const char *uid;
4616
4622
4624 {
4625 if (this == &rhs)
4626 return *this;
4631 if (rhs.uid != OPTIONAL_NULLPTR)
4632 {
4633 char *temp = new char[strlen(rhs.uid) + 1];
4634 strcpy(temp, rhs.uid);
4635 uid = temp;
4636 }
4637 return *this;
4638 }
4639
4641 {
4642 if (uid)
4643 {
4644 delete[] uid;
4645 }
4646 }
4647 };
4648
4669
4676
4683 {
4685 return;
4687 for (int i = 0; i < total_received_video_count; ++i)
4689 }
4690
4692 {
4693 if (this == &rhs)
4694 return *this;
4701 {
4703 for (int i = 0; i < total_received_video_count; ++i)
4705 }
4706 return *this;
4707 }
4708
4710 {
4712 delete[] peer_downlink_info;
4713 }
4714 };
4715
4719 {
4721
4723 AES_128_XTS = 1,
4726 AES_128_ECB = 2,
4729 AES_256_XTS = 3,
4731
4737 AES_128_GCM = 5,
4740 AES_256_GCM = 6,
4743 AES_128_GCM2 = 7,
4746 AES_256_GCM2 = 8,
4749 MODE_END,
4751 };
4752
4755 {
4765 const char *encryptionKey;
4767
4769 : encryptionMode(AES_128_GCM2),
4770 encryptionKey(NULL)
4771 {
4772 memset(encryptionKdfSalt, 0, sizeof(encryptionKdfSalt));
4773 }
4774
4776 const char *getEncryptionString() const
4777 {
4778 switch (encryptionMode)
4779 {
4780 case AES_128_XTS:
4781 return "aes-128-xts";
4782 case AES_128_ECB:
4783 return "aes-128-ecb";
4784 case AES_256_XTS:
4785 return "aes-256-xts";
4786 case SM4_128_ECB:
4787 return "sm4-128-ecb";
4788 case AES_128_GCM:
4789 return "aes-128-gcm";
4790 case AES_256_GCM:
4791 return "aes-256-gcm";
4792 case AES_128_GCM2:
4793 return "aes-128-gcm-2";
4794 case AES_256_GCM2:
4795 return "aes-256-gcm-2";
4796 default:
4797 return "aes-128-gcm-2";
4798 }
4799 return "aes-128-gcm-2";
4800 }
4802 };
4803
4807 {
4820 };
4821
4823
4826 enum UPLOAD_ERROR_REASON
4827 {
4828 UPLOAD_SUCCESS = 0,
4829 UPLOAD_NET_ERROR = 1,
4830 UPLOAD_SERVER_ERROR = 2,
4831 };
4832
4835 enum PERMISSION_TYPE
4836 {
4837 RECORD_AUDIO = 0,
4838 CAMERA = 1,
4839 };
4841
4845 {
4850
4855 {
4873
4878 {
4896
4901 {
4911 : uid(0)
4912 {
4913 userAccount[0] = '\0';
4914 }
4915 };
4916
4918
4921 enum EAR_MONITORING_FILTER_TYPE
4922 {
4926 EAR_MONITORING_FILTER_NONE = (1 << 0),
4930 EAR_MONITORING_FILTER_BUILT_IN_AUDIO_FILTERS = (1 << 1),
4934 EAR_MONITORING_FILTER_NOISE_SUPPRESSION = (1 << 2)
4935 };
4937
4939
4942 enum THREAD_PRIORITY_TYPE
4943 {
4947 LOWEST = 0,
4951 LOW = 1,
4955 NORMAL = 2,
4959 HIGH = 3,
4963 HIGHEST = 4,
4967 CRITICAL = 5,
4968 };
4970
4974 {
4983 };
4984 } // namespace rtc
4985
4986 namespace base
4987 {
4988
4990 {
4991 public:
4992 virtual int queryInterface(rtc::INTERFACE_ID_TYPE iid, void **inter) = 0;
4993 virtual ~IEngineBase() {}
4994 };
4995
4996 class AParameter : public agora::util::AutoPtr<IAgoraParameter>
4997 {
4998 public:
4999 AParameter(IEngineBase &engine) { initialize(&engine); }
5000 AParameter(IEngineBase *engine) { initialize(engine); }
5002
5003 private:
5004 bool initialize(IEngineBase *engine)
5005 {
5006 IAgoraParameter *p = NULL;
5007 if (engine && !engine->queryInterface(rtc::AGORA_IID_PARAMETER_ENGINE, (void **)&p))
5008 reset(p);
5009 return p != NULL;
5010 }
5011 };
5012
5014 {
5015 public:
5016 virtual ~LicenseCallback() {}
5017 virtual void onCertificateRequired() = 0;
5018 virtual void onLicenseRequest() = 0;
5019 virtual void onLicenseValidated() = 0;
5020 virtual void onLicenseError(int result) = 0;
5021 };
5022
5023 } // namespace base
5025
5028 struct SpatialAudioParams
5029 {
5033 Optional<double> speaker_azimuth;
5037 Optional<double> speaker_elevation;
5041 Optional<double> speaker_distance;
5045 Optional<int> speaker_orientation;
5049 Optional<bool> enable_blur;
5053 Optional<bool> enable_air_absorb;
5054 };
5056} // namespace agora
5057
5064
5071AGORA_API int AGORA_CALL setAgoraSdkExternalSymbolLoader(void *(*func)(const char *symname));
5072
5081
5095AGORA_API int AGORA_CALL getAgoraCertificateVerifyResult(const char *credential_buf, int credential_len,
5096 const char *certificate_buf, int certificate_len);
5097
5107
#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: AgoraOptional.h:413
Definition: AgoraBase.h:4997
AParameter(IEngineBase &engine)
Definition: AgoraBase.h:4999
AParameter(IEngineBase *engine)
Definition: AgoraBase.h:5000
AParameter(IAgoraParameter *p)
Definition: AgoraBase.h:5001
Definition: IAgoraParameter.h:226
Definition: AgoraBase.h:4990
virtual ~IEngineBase()
Definition: AgoraBase.h:4993
virtual int queryInterface(rtc::INTERFACE_ID_TYPE iid, void **inter)=0
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:5014
virtual void onLicenseRequest()=0
virtual ~LicenseCallback()
Definition: AgoraBase.h:5016
virtual void onLicenseValidated()=0
virtual void onCertificateRequired()=0
virtual void onLicenseError(int result)=0
Definition: AgoraBase.h:3175
virtual bool OnEncodedVideoImageReceived(const uint8_t *imageBuffer, size_t length, const EncodedVideoFrameInfo &videoEncodedFrameInfo)=0
virtual ~IVideoEncodedImageReceiver()
Definition: AgoraBase.h:3189
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
@ POSITION_POST_CAPTURER
Definition: AgoraMediaBase.h:643
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:2731
@ LOCAL_AUDIO_STREAM_STATE_FAILED
Definition: AgoraBase.h:2747
@ LOCAL_AUDIO_STREAM_STATE_RECORDING
Definition: AgoraBase.h:2739
@ LOCAL_AUDIO_STREAM_STATE_STOPPED
Definition: AgoraBase.h:2735
@ LOCAL_AUDIO_STREAM_STATE_ENCODING
Definition: AgoraBase.h:2743
FRAME_HEIGHT
Definition: AgoraBase.h:1410
@ FRAME_HEIGHT_360
Definition: AgoraBase.h:1414
AUDIO_SCENARIO_TYPE
Definition: AgoraBase.h:2634
@ AUDIO_SCENARIO_CHORUS
Definition: AgoraBase.h:2619
@ AUDIO_SCENARIO_GAME_STREAMING
Definition: AgoraBase.h:2608
@ AUDIO_SCENARIO_DEFAULT
Definition: AgoraBase.h:2604
@ AUDIO_SCENARIO_HIGH_DEFINITION
Definition: AgoraBase.h:2654
@ AUDIO_SCENARIO_NUM
Definition: AgoraBase.h:2627
@ AUDIO_SCENARIO_CHATROOM
Definition: AgoraBase.h:2614
FRAME_WIDTH
Definition: AgoraBase.h:1400
@ FRAME_WIDTH_640
Definition: AgoraBase.h:1404
CONNECTION_CHANGED_REASON_TYPE
Definition: AgoraBase.h:3524
@ CONNECTION_CHANGED_INVALID_TOKEN
Definition: AgoraBase.h:3560
@ CONNECTION_CHANGED_BANNED_BY_SERVER
Definition: AgoraBase.h:3540
@ CONNECTION_CHANGED_REJOIN_SUCCESS
Definition: AgoraBase.h:3589
@ CONNECTION_CHANGED_ECHO_TEST
Definition: AgoraBase.h:3597
@ CONNECTION_CHANGED_INVALID_CHANNEL_NAME
Definition: AgoraBase.h:3556
@ CONNECTION_CHANGED_JOIN_SUCCESS
Definition: AgoraBase.h:3532
@ CONNECTION_CHANGED_INTERRUPTED
Definition: AgoraBase.h:3536
@ CONNECTION_CHANGED_LEAVE_CHANNEL
Definition: AgoraBase.h:3548
@ CONNECTION_CHANGED_CONNECTING
Definition: AgoraBase.h:3528
@ CONNECTION_CHANGED_SETTING_PROXY_SERVER
Definition: AgoraBase.h:3572
@ CONNECTION_CHANGED_LOST
Definition: AgoraBase.h:3593
@ CONNECTION_CHANGED_CLIENT_IP_ADDRESS_CHANGED
Definition: AgoraBase.h:3581
@ CONNECTION_CHANGED_JOIN_FAILED
Definition: AgoraBase.h:3544
@ CONNECTION_CHANGED_RENEW_TOKEN
Definition: AgoraBase.h:3576
@ CONNECTION_CHANGED_TOKEN_EXPIRED
Definition: AgoraBase.h:3564
@ CONNECTION_CHANGED_KEEP_ALIVE_TIMEOUT
Definition: AgoraBase.h:3585
@ CONNECTION_CHANGED_REJECTED_BY_SERVER
Definition: AgoraBase.h:3568
@ CONNECTION_CHANGED_INVALID_APP_ID
Definition: AgoraBase.h:3552
@ CONNECTION_CHANGED_CLIENT_IP_ADDRESS_CHANGED_BY_USER
Definition: AgoraBase.h:3601
ENCRYPTION_ERROR_TYPE
Definition: AgoraBase.h:4807
@ ENCRYPTION_ERROR_ENCRYPTION_FAILURE
Definition: AgoraBase.h:4819
@ ENCRYPTION_ERROR_DECRYPTION_FAILURE
Definition: AgoraBase.h:4815
@ ENCRYPTION_ERROR_INTERNAL_FAILURE
Definition: AgoraBase.h:4811
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:2754
@ LOCAL_AUDIO_STREAM_ERROR_FAILURE
Definition: AgoraBase.h:2762
@ LOCAL_AUDIO_STREAM_ERROR_DEVICE_BUSY
Definition: AgoraBase.h:2770
@ LOCAL_AUDIO_STREAM_ERROR_ENCODE_FAILURE
Definition: AgoraBase.h:2779
@ LOCAL_AUDIO_STREAM_ERROR_RECORD_FAILURE
Definition: AgoraBase.h:2775
@ LOCAL_AUDIO_STREAM_ERROR_DEVICE_NO_PERMISSION
Definition: AgoraBase.h:2766
@ LOCAL_AUDIO_STREAM_ERROR_OK
Definition: AgoraBase.h:2758
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:3391
@ CONNECTION_STATE_DISCONNECTED
Definition: AgoraBase.h:3395
@ CONNECTION_STATE_RECONNECTING
Definition: AgoraBase.h:3409
@ CONNECTION_STATE_CONNECTING
Definition: AgoraBase.h:3399
@ CONNECTION_STATE_FAILED
Definition: AgoraBase.h:3413
@ CONNECTION_STATE_CONNECTED
Definition: AgoraBase.h:3404
const int COMPATIBLE_BITRATE
Definition: AgoraBase.h:1535
REMOTE_AUDIO_STATE_REASON
Definition: AgoraBase.h:2874
@ REMOTE_AUDIO_REASON_REMOTE_UNMUTED
Definition: AgoraBase.h:2906
@ REMOTE_AUDIO_REASON_REMOTE_MUTED
Definition: AgoraBase.h:2901
@ REMOTE_AUDIO_REASON_LOCAL_MUTED
Definition: AgoraBase.h:2891
@ REMOTE_AUDIO_REASON_REMOTE_OFFLINE
Definition: AgoraBase.h:2910
@ REMOTE_AUDIO_REASON_NETWORK_CONGESTION
Definition: AgoraBase.h:2882
@ REMOTE_AUDIO_REASON_NETWORK_RECOVERY
Definition: AgoraBase.h:2886
@ REMOTE_AUDIO_REASON_LOCAL_UNMUTED
Definition: AgoraBase.h:2896
@ REMOTE_AUDIO_REASON_INTERNAL
Definition: AgoraBase.h:2878
TCcMode
Definition: AgoraBase.h:4974
@ CC_DISABLED
Definition: AgoraBase.h:4982
@ CC_ENABLED
Definition: AgoraBase.h:4978
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:4878
@ PUB_STATE_IDLE
Definition: AgoraBase.h:4882
@ PUB_STATE_PUBLISHED
Definition: AgoraBase.h:4894
@ PUB_STATE_PUBLISHING
Definition: AgoraBase.h:4890
@ PUB_STATE_NO_PUBLISHED
Definition: AgoraBase.h:4886
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:2599
@ AUDIO_SCENARIO_MEETING
Definition: AgoraBase.h:2623
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:2785
@ LOCAL_VIDEO_STREAM_STATE_ENCODING
Definition: AgoraBase.h:2797
@ LOCAL_VIDEO_STREAM_STATE_FAILED
Definition: AgoraBase.h:2801
@ LOCAL_VIDEO_STREAM_STATE_STOPPED
Definition: AgoraBase.h:2789
@ LOCAL_VIDEO_STREAM_STATE_CAPTURING
Definition: AgoraBase.h:2793
REMOTE_VIDEO_STATE
Definition: AgoraBase.h:2915
@ REMOTE_VIDEO_STATE_FAILED
Definition: AgoraBase.h:2940
@ REMOTE_VIDEO_STATE_DECODING
Definition: AgoraBase.h:2931
@ REMOTE_VIDEO_STATE_FROZEN
Definition: AgoraBase.h:2936
@ REMOTE_VIDEO_STATE_STARTING
Definition: AgoraBase.h:2924
@ REMOTE_VIDEO_STATE_STOPPED
Definition: AgoraBase.h:2921
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:4344
@ AREA_CODE_NA
Definition: AgoraBase.h:4352
@ AREA_CODE_AS
Definition: AgoraBase.h:4360
@ AREA_CODE_EU
Definition: AgoraBase.h:4356
@ AREA_CODE_JP
Definition: AgoraBase.h:4364
@ AREA_CODE_GLOB
Definition: AgoraBase.h:4372
@ AREA_CODE_IN
Definition: AgoraBase.h:4368
@ AREA_CODE_CN
Definition: AgoraBase.h:4348
MAX_USER_ACCOUNT_LENGTH_TYPE
Definition: AgoraBase.h:4845
@ MAX_USER_ACCOUNT_LENGTH
Definition: AgoraBase.h:4848
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:4719
@ SM4_128_ECB
Definition: AgoraBase.h:4733
REMOTE_VIDEO_DOWNSCALE_LEVEL
Definition: AgoraBase.h:3063
@ REMOTE_VIDEO_DOWNSCALE_LEVEL_1
Definition: AgoraBase.h:3071
@ REMOTE_VIDEO_DOWNSCALE_LEVEL_3
Definition: AgoraBase.h:3079
@ REMOTE_VIDEO_DOWNSCALE_LEVEL_4
Definition: AgoraBase.h:3083
@ REMOTE_VIDEO_DOWNSCALE_LEVEL_NONE
Definition: AgoraBase.h:3067
@ REMOTE_VIDEO_DOWNSCALE_LEVEL_2
Definition: AgoraBase.h:3075
const int STANDARD_BITRATE
Definition: AgoraBase.h:1526
LASTMILE_PROBE_RESULT_STATE
Definition: AgoraBase.h:3451
@ LASTMILE_PROBE_RESULT_COMPLETE
Definition: AgoraBase.h:3455
@ LASTMILE_PROBE_RESULT_INCOMPLETE_NO_BWE
Definition: AgoraBase.h:3460
@ LASTMILE_PROBE_RESULT_UNAVAILABLE
Definition: AgoraBase.h:3465
REMOTE_AUDIO_STATE
Definition: AgoraBase.h:2839
@ REMOTE_AUDIO_STATE_FAILED
Definition: AgoraBase.h:2867
@ REMOTE_AUDIO_STATE_STARTING
Definition: AgoraBase.h:2850
@ REMOTE_AUDIO_STATE_STOPPED
Definition: AgoraBase.h:2846
@ REMOTE_AUDIO_STATE_FROZEN
Definition: AgoraBase.h:2862
@ REMOTE_AUDIO_STATE_DECODING
Definition: AgoraBase.h:2857
NETWORK_TYPE
Definition: AgoraBase.h:3608
@ NETWORK_TYPE_DISCONNECTED
Definition: AgoraBase.h:3616
@ NETWORK_TYPE_MOBILE_3G
Definition: AgoraBase.h:3632
@ NETWORK_TYPE_MOBILE_4G
Definition: AgoraBase.h:3636
@ NETWORK_TYPE_UNKNOWN
Definition: AgoraBase.h:3612
@ NETWORK_TYPE_LAN
Definition: AgoraBase.h:3620
@ NETWORK_TYPE_WIFI
Definition: AgoraBase.h:3624
@ NETWORK_TYPE_MOBILE_2G
Definition: AgoraBase.h:3628
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:4855
@ SUB_STATE_IDLE
Definition: AgoraBase.h:4859
@ SUB_STATE_NO_SUBSCRIBED
Definition: AgoraBase.h:4863
@ SUB_STATE_SUBSCRIBING
Definition: AgoraBase.h:4867
@ SUB_STATE_SUBSCRIBED
Definition: AgoraBase.h:4871
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:2808
@ LOCAL_VIDEO_STREAM_ERROR_DEVICE_NO_PERMISSION
Definition: AgoraBase.h:2814
@ LOCAL_VIDEO_STREAM_ERROR_OK
Definition: AgoraBase.h:2810
@ LOCAL_VIDEO_STREAM_ERROR_CAPTURE_FAILURE
Definition: AgoraBase.h:2818
@ LOCAL_VIDEO_STREAM_ERROR_DEVICE_BUSY
Definition: AgoraBase.h:2816
@ LOCAL_VIDEO_STREAM_ERROR_FAILURE
Definition: AgoraBase.h:2812
@ LOCAL_VIDEO_STREAM_ERROR_ENCODE_FAILURE
Definition: AgoraBase.h:2820
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:2944
@ REMOTE_VIDEO_STATE_REASON_NETWORK_CONGESTION
Definition: AgoraBase.h:2953
@ REMOTE_VIDEO_STATE_REASON_REMOTE_UNMUTED
Definition: AgoraBase.h:2978
@ REMOTE_VIDEO_STATE_REASON_REMOTE_MUTED
Definition: AgoraBase.h:2973
@ REMOTE_VIDEO_STATE_REASON_LOCAL_UNMUTED
Definition: AgoraBase.h:2968
@ REMOTE_VIDEO_STATE_REASON_AUDIO_FALLBACK
Definition: AgoraBase.h:2988
@ REMOTE_VIDEO_STATE_REASON_NETWORK_RECOVERY
Definition: AgoraBase.h:2958
@ REMOTE_VIDEO_STATE_REASON_REMOTE_OFFLINE
Definition: AgoraBase.h:2983
@ REMOTE_VIDEO_STATE_REASON_AUDIO_FALLBACK_RECOVERY
Definition: AgoraBase.h:2993
@ REMOTE_VIDEO_STATE_REASON_LOCAL_MUTED
Definition: AgoraBase.h:2963
@ REMOTE_VIDEO_STATE_REASON_INTERNAL
Definition: AgoraBase.h:2948
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
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:4755
const char * encryptionKey
Definition: AgoraBase.h:4765
EncryptionConfig()
Definition: AgoraBase.h:4768
uint8_t encryptionKdfSalt[32]
Definition: AgoraBase.h:4766
ENCRYPTION_MODE encryptionMode
Definition: AgoraBase.h:4759
Definition: AgoraBase.h:3420
bool probeUplink
Definition: AgoraBase.h:3427
bool probeDownlink
Definition: AgoraBase.h:3433
unsigned int expectedUplinkBitrate
Definition: AgoraBase.h:3439
unsigned int expectedDownlinkBitrate
Definition: AgoraBase.h:3444
Definition: AgoraBase.h:3473
LastmileProbeOneWayResult()
Definition: AgoraBase.h:3487
unsigned int packetLossRate
Definition: AgoraBase.h:3477
unsigned int availableBandwidth
Definition: AgoraBase.h:3485
unsigned int jitter
Definition: AgoraBase.h:3481
Definition: AgoraBase.h:3497
LastmileProbeOneWayResult downlinkReport
Definition: AgoraBase.h:3509
unsigned int rtt
Definition: AgoraBase.h:3513
LastmileProbeOneWayResult uplinkReport
Definition: AgoraBase.h:3505
LastmileProbeResult()
Definition: AgoraBase.h:3515
LASTMILE_PROBE_RESULT_STATE state
Definition: AgoraBase.h:3501
Definition: AgoraBase.h:3250
int sentSampleRate
Definition: AgoraBase.h:3258
int numChannels
Definition: AgoraBase.h:3254
int sentBitrate
Definition: AgoraBase.h:3262
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:4901
char userAccount[MAX_USER_ACCOUNT_LENGTH]
Definition: AgoraBase.h:4909
UserInfo()
Definition: AgoraBase.h:4910
uid_t uid
Definition: AgoraBase.h:4905
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:3011
VIDEO_CODEC_TYPE codecType
Definition: AgoraBase.h:3040
uid_t ownerUid
Definition: AgoraBase.h:3023
track_id_t trackId
Definition: AgoraBase.h:3028
VIDEO_SOURCE_TYPE sourceType
Definition: AgoraBase.h:3050
bool isLocal
Definition: AgoraBase.h:3019
bool encodedFrameOnly
Definition: AgoraBase.h:3046
VideoTrackInfo()
Definition: AgoraBase.h:3012
const char * channelId
Definition: AgoraBase.h:3032
VIDEO_STREAM_TYPE streamType
Definition: AgoraBase.h:3036