Agora Java API Reference for Android

AgoraBase.h
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 #define MAX_PATH_260 (260)
23
24 #if defined(_WIN32)
25
26 #ifndef WIN32_LEAN_AND_MEAN
27 #define WIN32_LEAN_AND_MEAN
28 #endif // !WIN32_LEAN_AND_MEAN
29 #if defined(__aarch64__)
30 #include <arm64intr.h>
31 #endif
32 #include <Windows.h>
33
34 #if defined(AGORARTC_EXPORT)
35 #define AGORA_API extern "C" __declspec(dllexport)
36 #define AGORA_CPP_API __declspec(dllexport)
37 #else
38 #define AGORA_API extern "C" __declspec(dllimport)
39 #define AGORA_CPP_API __declspec(dllimport)
40 #endif // AGORARTC_EXPORT
41
42 #define AGORA_CALL __cdecl
43
44 #define __deprecated
45
46 #define AGORA_CPP_INTERNAL_API extern
47
48 #elif defined(__APPLE__)
49
50 #include <TargetConditionals.h>
51
52 #define AGORA_API extern "C" __attribute__((visibility("default")))
53 #define AGORA_CPP_API __attribute__((visibility("default")))
54 #define AGORA_CALL
55
56 #define AGORA_CPP_INTERNAL_API __attribute__((visibility("hidden")))
57
58 #elif defined(__ANDROID__) || defined(__linux__)
59
60 #define AGORA_API extern "C" __attribute__((visibility("default")))
61 #define AGORA_CPP_API __attribute__((visibility("default")))
62 #define AGORA_CALL
63
64 #define __deprecated
65
66 #define AGORA_CPP_INTERNAL_API __attribute__((visibility("hidden")))
67
68 #else // !_WIN32 && !__APPLE__ && !(__ANDROID__ || __linux__)
69
70 #define AGORA_API extern "C"
71 #define AGORA_CPP_API
72 #define AGORA_CALL
73
74 #define __deprecated
75
76 #endif // _WIN32
77
78 #ifndef OPTIONAL_ENUM_SIZE_T
79 #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
80 #define OPTIONAL_ENUM_SIZE_T enum : size_t
81 #else
82 #define OPTIONAL_ENUM_SIZE_T enum
83 #endif
84 #endif
85
86 #ifndef OPTIONAL_NULLPTR
87 #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
88 #define OPTIONAL_NULLPTR nullptr
89 #else
90 #define OPTIONAL_NULLPTR NULL
91 #endif
92 #endif
93
94 #define INVALID_DISPLAY_ID (-2)
95
96 namespace agora {
97 namespace util {
98
99 template <class T>
100 class AutoPtr {
101 protected:
102 typedef T value_type;
103 typedef T* pointer_type;
104
105 public:
106 explicit AutoPtr(pointer_type p = OPTIONAL_NULLPTR) : ptr_(p) {}
107
108 ~AutoPtr() {
109 if (ptr_) {
110 ptr_->release();
111 ptr_ = OPTIONAL_NULLPTR;
112 }
113 }
114
115 operator bool() const { return (ptr_ != OPTIONAL_NULLPTR); }
116
117 value_type& operator*() const { return *get(); }
118
119 pointer_type operator->() const { return get(); }
120
121 pointer_type get() const { return ptr_; }
122
123 pointer_type release() {
124 pointer_type ret = ptr_;
125 ptr_ = 0;
126 return ret;
127 }
128
129 void reset(pointer_type ptr = OPTIONAL_NULLPTR) {
130 if (ptr != ptr_ && ptr_) {
131 ptr_->release();
132 }
133
134 ptr_ = ptr;
135 }
136
137 template <class C1, class C2>
138 bool queryInterface(C1* c, C2 iid) {
139 pointer_type p = OPTIONAL_NULLPTR;
140 if (c && !c->queryInterface(iid, reinterpret_cast<void**>(&p))) {
141 reset(p);
142 }
143
144 return (p != OPTIONAL_NULLPTR);
145 }
146
147 private:
148 AutoPtr(const AutoPtr&);
149 AutoPtr& operator=(const AutoPtr&);
150
151 private:
152 pointer_type ptr_;
153 };
154
155 template <class T>
156 class CopyableAutoPtr : public AutoPtr<T> {
157 typedef typename AutoPtr<T>::pointer_type pointer_type;
158
159 public:
160 explicit CopyableAutoPtr(pointer_type p = 0) : AutoPtr<T>(p) {}
161 CopyableAutoPtr(const CopyableAutoPtr& rhs) { this->reset(rhs.clone()); }
162 CopyableAutoPtr& operator=(const CopyableAutoPtr& rhs) {
163 if (this != &rhs) this->reset(rhs.clone());
164 return *this;
165 }
166 pointer_type clone() const {
167 if (!this->get()) return OPTIONAL_NULLPTR;
168 return this->get()->clone();
169 }
170 };
171
172 class IString {
173 public:
174 virtual bool empty() const = 0;
175 virtual const char* c_str() = 0;
176 virtual const char* data() = 0;
177 virtual size_t length() = 0;
178 virtual IString* clone() = 0;
179 virtual void release() = 0;
180 virtual ~IString() {}
181 };
182 typedef CopyableAutoPtr<IString> AString;
183
184 class IIterator {
185 public:
186 virtual void* current() = 0;
187 virtual const void* const_current() const = 0;
188 virtual bool next() = 0;
189 virtual void release() = 0;
190 virtual ~IIterator() {}
191 };
192
193 class IContainer {
194 public:
195 virtual IIterator* begin() = 0;
196 virtual size_t size() const = 0;
197 virtual void release() = 0;
198 virtual ~IContainer() {}
199 };
200
201 template <class T>
202 class AOutputIterator {
203 IIterator* p;
204
205 public:
206 typedef T value_type;
207 typedef value_type& reference;
208 typedef const value_type& const_reference;
209 typedef value_type* pointer;
210 typedef const value_type* const_pointer;
211 explicit AOutputIterator(IIterator* it = OPTIONAL_NULLPTR) : p(it) {}
212 ~AOutputIterator() {
213 if (p) p->release();
214 }
215 AOutputIterator(const AOutputIterator& rhs) : p(rhs.p) {}
216 AOutputIterator& operator++() {
217 p->next();
218 return *this;
219 }
220 bool operator==(const AOutputIterator& rhs) const {
221 if (p && rhs.p)
222 return p->current() == rhs.p->current();
223 else
224 return valid() == rhs.valid();
225 }
226 bool operator!=(const AOutputIterator& rhs) const { return !this->operator==(rhs); }
227 reference operator*() { return *reinterpret_cast<pointer>(p->current()); }
228 const_reference operator*() const { return *reinterpret_cast<const_pointer>(p->const_current()); }
229 bool valid() const { return p && p->current() != OPTIONAL_NULLPTR; }
230 };
231
232 template <class T>
233 class AList {
234 IContainer* container;
235 bool owner;
236
237 public:
238 typedef T value_type;
239 typedef value_type& reference;
240 typedef const value_type& const_reference;
241 typedef value_type* pointer;
242 typedef const value_type* const_pointer;
243 typedef size_t size_type;
244 typedef AOutputIterator<value_type> iterator;
245 typedef const AOutputIterator<value_type> const_iterator;
246
247 public:
248 AList() : container(OPTIONAL_NULLPTR), owner(false) {}
249 AList(IContainer* c, bool take_ownership) : container(c), owner(take_ownership) {}
250 ~AList() { reset(); }
251 void reset(IContainer* c = OPTIONAL_NULLPTR, bool take_ownership = false) {
252 if (owner && container) container->release();
253 container = c;
254 owner = take_ownership;
255 }
256 iterator begin() { return container ? iterator(container->begin()) : iterator(OPTIONAL_NULLPTR); }
257 iterator end() { return iterator(OPTIONAL_NULLPTR); }
258 size_type size() const { return container ? container->size() : 0; }
259 bool empty() const { return size() == 0; }
260 };
261
262 } // namespace util
263
267 enum CHANNEL_PROFILE_TYPE {
273 CHANNEL_PROFILE_COMMUNICATION = 0,
279 CHANNEL_PROFILE_LIVE_BROADCASTING = 1,
284 CHANNEL_PROFILE_GAME __deprecated = 2,
290 CHANNEL_PROFILE_CLOUD_GAMING __deprecated = 3,
291
296 CHANNEL_PROFILE_COMMUNICATION_1v1 __deprecated = 4,
297 };
298
302 enum WARN_CODE_TYPE {
307 WARN_INVALID_VIEW = 8,
312 WARN_INIT_VIDEO = 16,
317 WARN_PENDING = 20,
322 WARN_NO_AVAILABLE_CHANNEL = 103,
328 WARN_LOOKUP_CHANNEL_TIMEOUT = 104,
333 WARN_LOOKUP_CHANNEL_REJECTED = 105,
339 WARN_OPEN_CHANNEL_TIMEOUT = 106,
344 WARN_OPEN_CHANNEL_REJECTED = 107,
345
346 // sdk: 100~1000
350 WARN_SWITCH_LIVE_VIDEO_TIMEOUT = 111,
354 WARN_SET_CLIENT_ROLE_TIMEOUT = 118,
358 WARN_OPEN_CHANNEL_INVALID_TICKET = 121,
362 WARN_OPEN_CHANNEL_TRY_NEXT_VOS = 122,
366 WARN_CHANNEL_CONNECTION_UNRECOVERABLE = 131,
370 WARN_CHANNEL_CONNECTION_IP_CHANGED = 132,
374 WARN_CHANNEL_CONNECTION_PORT_CHANGED = 133,
377 WARN_CHANNEL_SOCKET_ERROR = 134,
381 WARN_AUDIO_MIXING_OPEN_ERROR = 701,
385 WARN_ADM_RUNTIME_PLAYOUT_WARNING = 1014,
389 WARN_ADM_RUNTIME_RECORDING_WARNING = 1016,
393 WARN_ADM_RECORD_AUDIO_SILENCE = 1019,
397 WARN_ADM_PLAYOUT_MALFUNCTION = 1020,
401 WARN_ADM_RECORD_MALFUNCTION = 1021,
405 WARN_ADM_RECORD_AUDIO_LOWLEVEL = 1031,
409 WARN_ADM_PLAYOUT_AUDIO_LOWLEVEL = 1032,
417 WARN_ADM_WINDOWS_NO_DATA_READY_EVENT = 1040,
421 WARN_APM_HOWLING = 1051,
425 WARN_ADM_GLITCH_STATE = 1052,
429 WARN_ADM_IMPROPER_SETTINGS = 1053,
433 WARN_ADM_POP_STATE = 1055,
437 WARN_ADM_WIN_CORE_NO_RECORDING_DEVICE = 1322,
442 WARN_ADM_WIN_CORE_NO_PLAYOUT_DEVICE = 1323,
450 WARN_ADM_WIN_CORE_IMPROPER_CAPTURE_RELEASE = 1324,
451 };
452
456 enum ERROR_CODE_TYPE {
460 ERR_OK = 0,
461 // 1~1000
465 ERR_FAILED = 1,
470 ERR_INVALID_ARGUMENT = 2,
477 ERR_NOT_READY = 3,
481 ERR_NOT_SUPPORTED = 4,
485 ERR_REFUSED = 5,
489 ERR_BUFFER_TOO_SMALL = 6,
493 ERR_NOT_INITIALIZED = 7,
497 ERR_INVALID_STATE = 8,
502 ERR_NO_PERMISSION = 9,
508 ERR_TIMEDOUT = 10,
513 ERR_CANCELED = 11,
519 ERR_TOO_OFTEN = 12,
525 ERR_BIND_SOCKET = 13,
530 ERR_NET_DOWN = 14,
536 ERR_JOIN_CHANNEL_REJECTED = 17,
543 ERR_LEAVE_CHANNEL_REJECTED = 18,
547 ERR_ALREADY_IN_USE = 19,
552 ERR_ABORTED = 20,
557 ERR_INIT_NET_ENGINE = 21,
562 ERR_RESOURCE_LIMITED = 22,
569 ERR_INVALID_APP_ID = 101,
574 ERR_INVALID_CHANNEL_NAME = 102,
580 ERR_NO_SERVER_RESOURCES = 103,
593 ERR_TOKEN_EXPIRED = 109,
610 ERR_INVALID_TOKEN = 110,
615 ERR_CONNECTION_INTERRUPTED = 111, // only used in web sdk
620 ERR_CONNECTION_LOST = 112, // only used in web sdk
625 ERR_NOT_IN_CHANNEL = 113,
630 ERR_SIZE_TOO_LARGE = 114,
635 ERR_BITRATE_LIMIT = 115,
640 ERR_TOO_MANY_DATA_STREAMS = 116,
644 ERR_STREAM_MESSAGE_TIMEOUT = 117,
648 ERR_SET_CLIENT_ROLE_NOT_AUTHORIZED = 119,
653 ERR_DECRYPTION_FAILED = 120,
657 ERR_INVALID_USER_ID = 121,
662 ERR_DATASTREAM_DECRYPTION_FAILED = 122,
666 ERR_CLIENT_IS_BANNED_BY_SERVER = 123,
672 ERR_ENCRYPTED_STREAM_NOT_ALLOWED_PUBLISH = 130,
673
677 ERR_LICENSE_CREDENTIAL_INVALID = 131,
678
683 ERR_INVALID_USER_ACCOUNT = 134,
684
691 ERR_MODULE_NOT_FOUND = 157,
692
693 // Licensing, keep the license error code same as the main version
694 ERR_CERT_RAW = 157,
695 ERR_CERT_JSON_PART = 158,
696 ERR_CERT_JSON_INVAL = 159,
697 ERR_CERT_JSON_NOMEM = 160,
698 ERR_CERT_CUSTOM = 161,
699 ERR_CERT_CREDENTIAL = 162,
700 ERR_CERT_SIGN = 163,
701 ERR_CERT_FAIL = 164,
702 ERR_CERT_BUF = 165,
703 ERR_CERT_NULL = 166,
704 ERR_CERT_DUEDATE = 167,
705 ERR_CERT_REQUEST = 168,
706
707 // PcmSend Error num
708 ERR_PCMSEND_FORMAT = 200, // unsupport pcm format
709 ERR_PCMSEND_BUFFEROVERFLOW = 201, // buffer overflow, the pcm send rate too quickly
710
712 // signaling: 400~600
713 ERR_LOGIN_ALREADY_LOGIN = 428,
714
716 // 1001~2000
720 ERR_LOAD_MEDIA_ENGINE = 1001,
726 ERR_ADM_GENERAL_ERROR = 1005,
731 ERR_ADM_INIT_PLAYOUT = 1008,
735 ERR_ADM_START_PLAYOUT = 1009,
739 ERR_ADM_STOP_PLAYOUT = 1010,
744 ERR_ADM_INIT_RECORDING = 1011,
748 ERR_ADM_START_RECORDING = 1012,
752 ERR_ADM_STOP_RECORDING = 1013,
756 ERR_VDM_CAMERA_NOT_AUTHORIZED = 1501,
757 };
758
759 enum LICENSE_ERROR_TYPE {
763 LICENSE_ERR_INVALID = 1,
767 LICENSE_ERR_EXPIRE = 2,
771 LICENSE_ERR_MINUTES_EXCEED = 3,
775 LICENSE_ERR_LIMITED_PERIOD = 4,
779 LICENSE_ERR_DIFF_DEVICES = 5,
783 LICENSE_ERR_INTERNAL = 99,
784 };
785
789 enum AUDIO_SESSION_OPERATION_RESTRICTION {
793 AUDIO_SESSION_OPERATION_RESTRICTION_NONE = 0,
797 AUDIO_SESSION_OPERATION_RESTRICTION_SET_CATEGORY = 1,
801 AUDIO_SESSION_OPERATION_RESTRICTION_CONFIGURE_SESSION = 1 << 1,
806 AUDIO_SESSION_OPERATION_RESTRICTION_DEACTIVATE_SESSION = 1 << 2,
811 AUDIO_SESSION_OPERATION_RESTRICTION_ALL = 1 << 7,
812 };
813
814 typedef const char* user_id_t;
815 typedef void* view_t;
816
820 struct UserInfo {
824 util::AString userId;
830 bool hasAudio;
836 bool hasVideo;
837
838 UserInfo() : hasAudio(false), hasVideo(false) {}
839 };
840
841 typedef util::AList<UserInfo> UserList;
842
843 // Shared between Agora Service and Rtc Engine
844 namespace rtc {
845
849 enum USER_OFFLINE_REASON_TYPE {
853 USER_OFFLINE_QUIT = 0,
859 USER_OFFLINE_DROPPED = 1,
863 USER_OFFLINE_BECOME_AUDIENCE = 2,
864 };
865
866 enum INTERFACE_ID_TYPE {
867 AGORA_IID_AUDIO_DEVICE_MANAGER = 1,
868 AGORA_IID_VIDEO_DEVICE_MANAGER = 2,
869 AGORA_IID_PARAMETER_ENGINE = 3,
870 AGORA_IID_MEDIA_ENGINE = 4,
871 AGORA_IID_AUDIO_ENGINE = 5,
872 AGORA_IID_VIDEO_ENGINE = 6,
873 AGORA_IID_RTC_CONNECTION = 7,
874 AGORA_IID_SIGNALING_ENGINE = 8,
875 AGORA_IID_MEDIA_ENGINE_REGULATOR = 9,
876 AGORA_IID_LOCAL_SPATIAL_AUDIO = 11,
877 AGORA_IID_STATE_SYNC = 13,
878 AGORA_IID_META_SERVICE = 14,
879 AGORA_IID_MUSIC_CONTENT_CENTER = 15,
880 AGORA_IID_H265_TRANSCODER = 16,
881 };
882
886 enum QUALITY_TYPE {
891 QUALITY_UNKNOWN __deprecated = 0,
895 QUALITY_EXCELLENT = 1,
900 QUALITY_GOOD = 2,
904 QUALITY_POOR = 3,
908 QUALITY_BAD = 4,
912 QUALITY_VBAD = 5,
916 QUALITY_DOWN = 6,
920 QUALITY_UNSUPPORTED = 7,
924 QUALITY_DETECTING = 8,
925 };
926
930 enum FIT_MODE_TYPE {
935 MODE_COVER = 1,
936
942 MODE_CONTAIN = 2,
943 };
944
948 enum VIDEO_ORIENTATION {
952 VIDEO_ORIENTATION_0 = 0,
956 VIDEO_ORIENTATION_90 = 90,
960 VIDEO_ORIENTATION_180 = 180,
964 VIDEO_ORIENTATION_270 = 270
965 };
966
970 enum FRAME_RATE {
974 FRAME_RATE_FPS_1 = 1,
978 FRAME_RATE_FPS_7 = 7,
982 FRAME_RATE_FPS_10 = 10,
986 FRAME_RATE_FPS_15 = 15,
990 FRAME_RATE_FPS_24 = 24,
994 FRAME_RATE_FPS_30 = 30,
998 FRAME_RATE_FPS_60 = 60,
999 };
1000
1001 enum FRAME_WIDTH {
1002 FRAME_WIDTH_960 = 960,
1003 };
1004
1005 enum FRAME_HEIGHT {
1006 FRAME_HEIGHT_540 = 540,
1007 };
1008
1012 enum VIDEO_FRAME_TYPE {
1014 VIDEO_FRAME_TYPE_BLANK_FRAME = 0,
1016 VIDEO_FRAME_TYPE_KEY_FRAME = 3,
1018 VIDEO_FRAME_TYPE_DELTA_FRAME = 4,
1020 VIDEO_FRAME_TYPE_B_FRAME = 5,
1022 VIDEO_FRAME_TYPE_DROPPABLE_FRAME = 6,
1024 VIDEO_FRAME_TYPE_UNKNOW
1025 };
1026
1030 enum ORIENTATION_MODE {
1038 ORIENTATION_MODE_ADAPTIVE = 0,
1045 ORIENTATION_MODE_FIXED_LANDSCAPE = 1,
1052 ORIENTATION_MODE_FIXED_PORTRAIT = 2,
1053 };
1054
1058 enum DEGRADATION_PREFERENCE {
1065 MAINTAIN_AUTO = -1,
1073 MAINTAIN_QUALITY = 0,
1079 MAINTAIN_FRAMERATE = 1,
1086 MAINTAIN_BALANCED = 2,
1090 MAINTAIN_RESOLUTION = 3,
1094 DISABLED = 100,
1095 };
1096
1100 struct VideoDimensions {
1104 int width;
1108 int height;
1109 VideoDimensions() : width(640), height(480) {}
1110 VideoDimensions(int w, int h) : width(w), height(h) {}
1111 bool operator==(const VideoDimensions& rhs) const {
1112 return width == rhs.width && height == rhs.height;
1113 }
1114 };
1115
1121 const int STANDARD_BITRATE = 0;
1122
1130 const int COMPATIBLE_BITRATE = -1;
1131
1135 const int DEFAULT_MIN_BITRATE = -1;
1136
1140 const int DEFAULT_MIN_BITRATE_EQUAL_TO_TARGET_BITRATE = -2;
1141
1145 enum SCREEN_CAPTURE_FRAMERATE_CAPABILITY {
1146 SCREEN_CAPTURE_FRAMERATE_CAPABILITY_15_FPS = 0,
1147 SCREEN_CAPTURE_FRAMERATE_CAPABILITY_30_FPS = 1,
1148 SCREEN_CAPTURE_FRAMERATE_CAPABILITY_60_FPS = 2,
1149 };
1150
1154 enum VIDEO_CODEC_CAPABILITY_LEVEL {
1156 CODEC_CAPABILITY_LEVEL_UNSPECIFIED = -1,
1158 CODEC_CAPABILITY_LEVEL_BASIC_SUPPORT = 5,
1160 CODEC_CAPABILITY_LEVEL_1080P30FPS = 10,
1162 CODEC_CAPABILITY_LEVEL_1080P60FPS = 20,
1164 CODEC_CAPABILITY_LEVEL_4K60FPS = 30,
1165 };
1166
1170 enum VIDEO_CODEC_TYPE {
1176 VIDEO_CODEC_NONE = 0,
1180 VIDEO_CODEC_VP8 = 1,
1184 VIDEO_CODEC_H264 = 2,
1188 VIDEO_CODEC_H265 = 3,
1194 VIDEO_CODEC_GENERIC = 6,
1199 VIDEO_CODEC_GENERIC_H264 = 7,
1204 VIDEO_CODEC_AV1 = 12,
1208 VIDEO_CODEC_VP9 = 13,
1212 VIDEO_CODEC_GENERIC_JPEG = 20,
1213 };
1214
1218 enum CAMERA_FOCAL_LENGTH_TYPE {
1222 CAMERA_FOCAL_LENGTH_DEFAULT = 0,
1226 CAMERA_FOCAL_LENGTH_WIDE_ANGLE = 1,
1230 CAMERA_FOCAL_LENGTH_ULTRA_WIDE = 2,
1234 CAMERA_FOCAL_LENGTH_TELEPHOTO = 3,
1235 };
1236
1240 enum TCcMode {
1244 CC_ENABLED,
1248 CC_DISABLED,
1249 };
1250
1254 struct SenderOptions {
1258 TCcMode ccMode;
1263 VIDEO_CODEC_TYPE codecType;
1264
1324 int targetBitrate;
1325
1326 SenderOptions() : ccMode(CC_ENABLED), codecType(VIDEO_CODEC_H265), targetBitrate(6500) {}
1327 };
1328
1332 enum AUDIO_CODEC_TYPE {
1336 AUDIO_CODEC_OPUS = 1,
1337 // kIsac = 2,
1341 AUDIO_CODEC_PCMA = 3,
1345 AUDIO_CODEC_PCMU = 4,
1349 AUDIO_CODEC_G722 = 5,
1350 // kIlbc = 6,
1352 // AUDIO_CODEC_AAC = 7,
1356 AUDIO_CODEC_AACLC = 8,
1360 AUDIO_CODEC_HEAAC = 9,
1364 AUDIO_CODEC_JC1 = 10,
1368 AUDIO_CODEC_HEAAC2 = 11,
1372 AUDIO_CODEC_LPCNET = 12,
1376 AUDIO_CODEC_OPUSMC = 13,
1377 };
1378
1382 enum AUDIO_ENCODING_TYPE {
1387 AUDIO_ENCODING_TYPE_AAC_16000_LOW = 0x010101,
1392 AUDIO_ENCODING_TYPE_AAC_16000_MEDIUM = 0x010102,
1397 AUDIO_ENCODING_TYPE_AAC_32000_LOW = 0x010201,
1402 AUDIO_ENCODING_TYPE_AAC_32000_MEDIUM = 0x010202,
1407 AUDIO_ENCODING_TYPE_AAC_32000_HIGH = 0x010203,
1412 AUDIO_ENCODING_TYPE_AAC_48000_MEDIUM = 0x010302,
1417 AUDIO_ENCODING_TYPE_AAC_48000_HIGH = 0x010303,
1422 AUDIO_ENCODING_TYPE_OPUS_16000_LOW = 0x020101,
1427 AUDIO_ENCODING_TYPE_OPUS_16000_MEDIUM = 0x020102,
1432 AUDIO_ENCODING_TYPE_OPUS_48000_MEDIUM = 0x020302,
1437 AUDIO_ENCODING_TYPE_OPUS_48000_HIGH = 0x020303,
1438 };
1439
1443 enum WATERMARK_FIT_MODE {
1448 FIT_MODE_COVER_POSITION,
1453 FIT_MODE_USE_IMAGE_RATIO
1454 };
1455
1459 struct EncodedAudioFrameAdvancedSettings {
1460 EncodedAudioFrameAdvancedSettings() : speech(true), sendEvenIfEmpty(true) {}
1461
1467 bool speech;
1473 bool sendEvenIfEmpty;
1474 };
1475
1479 struct EncodedAudioFrameInfo {
1480 EncodedAudioFrameInfo()
1481 : codec(AUDIO_CODEC_AACLC),
1482 sampleRateHz(0),
1483 samplesPerChannel(0),
1484 numberOfChannels(0),
1485 captureTimeMs(0) {}
1486
1487 EncodedAudioFrameInfo(const EncodedAudioFrameInfo& rhs)
1488 : codec(rhs.codec),
1489 sampleRateHz(rhs.sampleRateHz),
1490 samplesPerChannel(rhs.samplesPerChannel),
1491 numberOfChannels(rhs.numberOfChannels),
1492 advancedSettings(rhs.advancedSettings),
1493 captureTimeMs(rhs.captureTimeMs) {}
1497 AUDIO_CODEC_TYPE codec;
1501 int sampleRateHz;
1507 int samplesPerChannel;
1511 int numberOfChannels;
1515 EncodedAudioFrameAdvancedSettings advancedSettings;
1516
1520 int64_t captureTimeMs;
1521 };
1525 struct AudioPcmDataInfo {
1526 AudioPcmDataInfo()
1527 : samplesPerChannel(0), channelNum(0), samplesOut(0), elapsedTimeMs(0), ntpTimeMs(0) {}
1528
1529 AudioPcmDataInfo(const AudioPcmDataInfo& rhs)
1530 : samplesPerChannel(rhs.samplesPerChannel),
1531 channelNum(rhs.channelNum),
1532 samplesOut(rhs.samplesOut),
1533 elapsedTimeMs(rhs.elapsedTimeMs),
1534 ntpTimeMs(rhs.ntpTimeMs) {}
1535
1539 size_t samplesPerChannel;
1540
1541 int16_t channelNum;
1542
1543 // Output
1547 size_t samplesOut;
1551 int64_t elapsedTimeMs;
1555 int64_t ntpTimeMs;
1556 };
1560 enum H264PacketizeMode {
1564 NonInterleaved = 0, // Mode 1 - STAP-A, FU-A is allowed
1568 SingleNalUnit, // Mode 0 - only single NALU allowed
1569 };
1570
1574 enum VIDEO_STREAM_TYPE {
1578 VIDEO_STREAM_HIGH = 0,
1582 VIDEO_STREAM_LOW = 1,
1586 VIDEO_STREAM_LAYER_1 = 4,
1590 VIDEO_STREAM_LAYER_2 = 5,
1594 VIDEO_STREAM_LAYER_3 = 6,
1598 VIDEO_STREAM_LAYER_4 = 7,
1602 VIDEO_STREAM_LAYER_5 = 8,
1606 VIDEO_STREAM_LAYER_6 = 9,
1607
1608 };
1609
1610 struct VideoSubscriptionOptions {
1617 Optional<VIDEO_STREAM_TYPE> type;
1623 Optional<bool> encodedFrameOnly;
1624
1625 VideoSubscriptionOptions() {}
1626 };
1627
1630 enum MAX_USER_ACCOUNT_LENGTH_TYPE {
1633 MAX_USER_ACCOUNT_LENGTH = 256
1634 };
1635
1640 struct EncodedVideoFrameInfo {
1641 EncodedVideoFrameInfo()
1642 : uid(0),
1643 codecType(VIDEO_CODEC_H264),
1644 width(0),
1645 height(0),
1646 framesPerSecond(0),
1647 frameType(VIDEO_FRAME_TYPE_BLANK_FRAME),
1648 rotation(VIDEO_ORIENTATION_0),
1649 trackId(0),
1650 captureTimeMs(0),
1651 decodeTimeMs(0),
1652 streamType(VIDEO_STREAM_HIGH),
1653 presentationMs(-1) {}
1654
1655 EncodedVideoFrameInfo(const EncodedVideoFrameInfo& rhs)
1656 : uid(rhs.uid),
1657 codecType(rhs.codecType),
1658 width(rhs.width),
1659 height(rhs.height),
1660 framesPerSecond(rhs.framesPerSecond),
1661 frameType(rhs.frameType),
1662 rotation(rhs.rotation),
1663 trackId(rhs.trackId),
1664 captureTimeMs(rhs.captureTimeMs),
1665 decodeTimeMs(rhs.decodeTimeMs),
1666 streamType(rhs.streamType),
1667 presentationMs(rhs.presentationMs) {}
1668
1669 EncodedVideoFrameInfo& operator=(const EncodedVideoFrameInfo& rhs) {
1670 if (this == &rhs) return *this;
1671 uid = rhs.uid;
1672 codecType = rhs.codecType;
1673 width = rhs.width;
1674 height = rhs.height;
1675 framesPerSecond = rhs.framesPerSecond;
1676 frameType = rhs.frameType;
1677 rotation = rhs.rotation;
1678 trackId = rhs.trackId;
1679 captureTimeMs = rhs.captureTimeMs;
1680 decodeTimeMs = rhs.decodeTimeMs;
1681 streamType = rhs.streamType;
1682 presentationMs = rhs.presentationMs;
1683 return *this;
1684 }
1685
1689 uid_t uid;
1694 VIDEO_CODEC_TYPE codecType;
1698 int width;
1702 int height;
1708 int framesPerSecond;
1712 VIDEO_FRAME_TYPE frameType;
1716 VIDEO_ORIENTATION rotation;
1720 int trackId; // This can be reserved for multiple video tracks, we need to create different ssrc
1721 // and additional payload for later implementation.
1725 int64_t captureTimeMs;
1729 int64_t decodeTimeMs;
1733 VIDEO_STREAM_TYPE streamType;
1734
1735 // @technical preview
1736 int64_t presentationMs;
1737 };
1738
1742 enum COMPRESSION_PREFERENCE {
1749 PREFER_COMPRESSION_AUTO = -1,
1753 PREFER_LOW_LATENCY = 0,
1757 PREFER_QUALITY = 1,
1758 };
1759
1763 enum ENCODING_PREFERENCE {
1767 PREFER_AUTO = -1,
1771 PREFER_SOFTWARE = 0,
1775 PREFER_HARDWARE = 1,
1776 };
1777
1781 struct AdvanceOptions {
1785 ENCODING_PREFERENCE encodingPreference;
1786
1790 COMPRESSION_PREFERENCE compressionPreference;
1791
1796 bool encodeAlpha;
1797
1798 AdvanceOptions() : encodingPreference(PREFER_AUTO),
1799 compressionPreference(PREFER_COMPRESSION_AUTO),
1800 encodeAlpha(false) {}
1801
1802 AdvanceOptions(ENCODING_PREFERENCE encoding_preference,
1803 COMPRESSION_PREFERENCE compression_preference,
1804 bool encode_alpha) :
1805 encodingPreference(encoding_preference),
1806 compressionPreference(compression_preference),
1807 encodeAlpha(encode_alpha) {}
1808
1809 bool operator==(const AdvanceOptions& rhs) const {
1810 return encodingPreference == rhs.encodingPreference &&
1811 compressionPreference == rhs.compressionPreference &&
1812 encodeAlpha == rhs.encodeAlpha;
1813 }
1814 };
1815
1819 enum VIDEO_MIRROR_MODE_TYPE {
1823 VIDEO_MIRROR_MODE_AUTO = 0,
1827 VIDEO_MIRROR_MODE_ENABLED = 1,
1831 VIDEO_MIRROR_MODE_DISABLED = 2,
1832 };
1833
1834 #if defined(__APPLE__) && TARGET_OS_IOS
1835
1838 enum CAMERA_FORMAT_TYPE {
1840 CAMERA_FORMAT_NV12,
1842 CAMERA_FORMAT_BGRA,
1843 };
1844 #endif
1845
1846 enum VIDEO_MODULE_TYPE {
1848 VIDEO_MODULE_CAPTURER = 0,
1850 VIDEO_MODULE_SOFTWARE_ENCODER = 1,
1852 VIDEO_MODULE_HARDWARE_ENCODER = 2,
1854 VIDEO_MODULE_SOFTWARE_DECODER = 3,
1856 VIDEO_MODULE_HARDWARE_DECODER = 4,
1858 VIDEO_MODULE_RENDERER = 5,
1859 };
1860
1861 enum HDR_CAPABILITY {
1863 HDR_CAPABILITY_UNKNOWN = -1,
1865 HDR_CAPABILITY_UNSUPPORTED = 0,
1867 HDR_CAPABILITY_SUPPORTED = 1,
1868 };
1869
1871 enum CODEC_CAP_MASK {
1873 CODEC_CAP_MASK_NONE = 0,
1874
1876 CODEC_CAP_MASK_HW_DEC = 1 << 0,
1877
1879 CODEC_CAP_MASK_HW_ENC = 1 << 1,
1880
1882 CODEC_CAP_MASK_SW_DEC = 1 << 2,
1883
1885 CODEC_CAP_MASK_SW_ENC = 1 << 3,
1886 };
1887
1888 struct CodecCapLevels {
1889 VIDEO_CODEC_CAPABILITY_LEVEL hwDecodingLevel;
1890 VIDEO_CODEC_CAPABILITY_LEVEL swDecodingLevel;
1891
1892 CodecCapLevels()
1893 : hwDecodingLevel(CODEC_CAPABILITY_LEVEL_UNSPECIFIED),
1894 swDecodingLevel(CODEC_CAPABILITY_LEVEL_UNSPECIFIED) {}
1895 };
1896
1898 struct CodecCapInfo {
1900 VIDEO_CODEC_TYPE codecType;
1902 int codecCapMask;
1904 CodecCapLevels codecLevels;
1905
1906 CodecCapInfo() : codecType(VIDEO_CODEC_NONE), codecCapMask(0) {}
1907 };
1908
1911 struct FocalLengthInfo {
1913 int cameraDirection;
1915 CAMERA_FOCAL_LENGTH_TYPE focalLengthType;
1916 };
1917
1921 struct VideoEncoderConfiguration {
1925 VIDEO_CODEC_TYPE codecType;
1929 VideoDimensions dimensions;
1933 int frameRate;
1991 int bitrate;
1992
2008 int minBitrate;
2012 ORIENTATION_MODE orientationMode;
2016 DEGRADATION_PREFERENCE degradationPreference;
2017
2023 VIDEO_MIRROR_MODE_TYPE mirrorMode;
2024
2028 AdvanceOptions advanceOptions;
2029
2030 VideoEncoderConfiguration(const VideoDimensions& d, int f, int b, ORIENTATION_MODE m, VIDEO_MIRROR_MODE_TYPE mirror = VIDEO_MIRROR_MODE_DISABLED)
2031 : codecType(VIDEO_CODEC_NONE),
2032 dimensions(d),
2033 frameRate(f),
2034 bitrate(b),
2035 minBitrate(DEFAULT_MIN_BITRATE),
2036 orientationMode(m),
2037 degradationPreference(MAINTAIN_AUTO),
2038 mirrorMode(mirror),
2039 advanceOptions(PREFER_AUTO, PREFER_COMPRESSION_AUTO, false) {}
2040 VideoEncoderConfiguration(int width, int height, int f, int b, ORIENTATION_MODE m, VIDEO_MIRROR_MODE_TYPE mirror = VIDEO_MIRROR_MODE_DISABLED)
2041 : codecType(VIDEO_CODEC_NONE),
2042 dimensions(width, height),
2043 frameRate(f),
2044 bitrate(b),
2045 minBitrate(DEFAULT_MIN_BITRATE),
2046 orientationMode(m),
2047 degradationPreference(MAINTAIN_AUTO),
2048 mirrorMode(mirror),
2049 advanceOptions(PREFER_AUTO, PREFER_COMPRESSION_AUTO, false) {}
2050 VideoEncoderConfiguration(const VideoEncoderConfiguration& config)
2051 : codecType(config.codecType),
2052 dimensions(config.dimensions),
2053 frameRate(config.frameRate),
2054 bitrate(config.bitrate),
2055 minBitrate(config.minBitrate),
2056 orientationMode(config.orientationMode),
2057 degradationPreference(config.degradationPreference),
2058 mirrorMode(config.mirrorMode),
2059 advanceOptions(config.advanceOptions) {}
2060 VideoEncoderConfiguration()
2061 : codecType(VIDEO_CODEC_NONE),
2062 dimensions(FRAME_WIDTH_960, FRAME_HEIGHT_540),
2063 frameRate(FRAME_RATE_FPS_15),
2064 bitrate(STANDARD_BITRATE),
2065 minBitrate(DEFAULT_MIN_BITRATE),
2066 orientationMode(ORIENTATION_MODE_ADAPTIVE),
2067 degradationPreference(MAINTAIN_AUTO),
2068 mirrorMode(VIDEO_MIRROR_MODE_DISABLED),
2069 advanceOptions(PREFER_AUTO, PREFER_COMPRESSION_AUTO, false) {}
2070
2071 VideoEncoderConfiguration& operator=(const VideoEncoderConfiguration& rhs) {
2072 if (this == &rhs) return *this;
2073 codecType = rhs.codecType;
2074 dimensions = rhs.dimensions;
2075 frameRate = rhs.frameRate;
2076 bitrate = rhs.bitrate;
2077 minBitrate = rhs.minBitrate;
2078 orientationMode = rhs.orientationMode;
2079 degradationPreference = rhs.degradationPreference;
2080 mirrorMode = rhs.mirrorMode;
2081 advanceOptions = rhs.advanceOptions;
2082 return *this;
2083 }
2084 };
2085
2089 struct DataStreamConfig {
2101 bool syncWithAudio;
2110 bool ordered;
2111 };
2112
2116 enum SIMULCAST_STREAM_MODE {
2117 /*
2118 * disable simulcast stream until receive request for enable simulcast stream by other broadcaster
2119 */
2120 AUTO_SIMULCAST_STREAM = -1,
2121 /*
2122 * disable simulcast stream
2123 */
2124 DISABLE_SIMULCAST_STREAM = 0,
2125 /*
2126 * always enable simulcast stream
2127 */
2128 ENABLE_SIMULCAST_STREAM = 1,
2129 };
2130
2134 struct SimulcastStreamConfig {
2138 VideoDimensions dimensions;
2143 int kBitrate;
2147 int framerate;
2148 SimulcastStreamConfig() : dimensions(160, 120), kBitrate(65), framerate(5) {}
2149 SimulcastStreamConfig(const SimulcastStreamConfig& other) : dimensions(other.dimensions), kBitrate(other.kBitrate), framerate(other.framerate) {}
2150 bool operator==(const SimulcastStreamConfig& rhs) const {
2151 return dimensions == rhs.dimensions && kBitrate == rhs.kBitrate && framerate == rhs.framerate;
2152 }
2153 };
2154
2158 struct SimulcastConfig {
2162 enum StreamLayerIndex {
2166 STREAM_LAYER_1 = 0,
2170 STREAM_LAYER_2 = 1,
2174 STREAM_LAYER_3 = 2,
2178 STREAM_LAYER_4 = 3,
2182 STREAM_LAYER_5 = 4,
2186 STREAM_LAYER_6 = 5,
2190 STREAM_LOW = 6,
2194 STREAM_LAYER_COUNT_MAX = 7
2195 };
2196 struct StreamLayerConfig {
2200 VideoDimensions dimensions;
2204 int framerate;
2208 bool enable;
2209 StreamLayerConfig() : dimensions(0, 0), framerate(0), enable(false) {}
2210 };
2211
2215 StreamLayerConfig configs[STREAM_LAYER_COUNT_MAX];
2216 };
2221 struct Rectangle {
2225 int x;
2229 int y;
2233 int width;
2237 int height;
2238
2239 Rectangle() : x(0), y(0), width(0), height(0) {}
2240 Rectangle(int xx, int yy, int ww, int hh) : x(xx), y(yy), width(ww), height(hh) {}
2241 };
2242
2252 struct WatermarkRatio {
2259 float xRatio;
2265 float yRatio;
2272 float widthRatio;
2273
2274 WatermarkRatio() : xRatio(0.0), yRatio(0.0), widthRatio(0.0) {}
2275 WatermarkRatio(float x, float y, float width) : xRatio(x), yRatio(y), widthRatio(width) {}
2276 };
2277
2281 struct WatermarkOptions {
2287 bool visibleInPreview;
2292 Rectangle positionInLandscapeMode;
2297 Rectangle positionInPortraitMode;
2302 WatermarkRatio watermarkRatio;
2306 WATERMARK_FIT_MODE mode;
2307
2308 WatermarkOptions()
2309 : visibleInPreview(true),
2310 positionInLandscapeMode(0, 0, 0, 0),
2311 positionInPortraitMode(0, 0, 0, 0),
2312 mode(FIT_MODE_COVER_POSITION) {}
2313 };
2314
2318 struct RtcStats {
2322 unsigned int duration;
2326 unsigned int txBytes;
2330 unsigned int rxBytes;
2334 unsigned int txAudioBytes;
2338 unsigned int txVideoBytes;
2342 unsigned int rxAudioBytes;
2346 unsigned int rxVideoBytes;
2350 unsigned short txKBitRate;
2354 unsigned short rxKBitRate;
2358 unsigned short rxAudioKBitRate;
2362 unsigned short txAudioKBitRate;
2366 unsigned short rxVideoKBitRate;
2370 unsigned short txVideoKBitRate;
2374 unsigned short lastmileDelay;
2378 unsigned int userCount;
2386 double cpuAppUsage;
2397 double cpuTotalUsage;
2404 int gatewayRtt;
2409 double memoryAppUsageRatio;
2414 double memoryTotalUsageRatio;
2419 int memoryAppUsageInKbytes;
2424 int connectTimeMs;
2429 int firstAudioPacketDuration;
2434 int firstVideoPacketDuration;
2439 int firstVideoKeyFramePacketDuration;
2444 int packetsBeforeFirstKeyFramePacket;
2449 int firstAudioPacketDurationAfterUnmute;
2454 int firstVideoPacketDurationAfterUnmute;
2459 int firstVideoKeyFramePacketDurationAfterUnmute;
2464 int firstVideoKeyFrameDecodedDurationAfterUnmute;
2469 int firstVideoKeyFrameRenderedDurationAfterUnmute;
2473 int txPacketLossRate;
2477 int rxPacketLossRate;
2478 RtcStats()
2479 : duration(0),
2480 txBytes(0),
2481 rxBytes(0),
2482 txAudioBytes(0),
2483 txVideoBytes(0),
2484 rxAudioBytes(0),
2485 rxVideoBytes(0),
2486 txKBitRate(0),
2487 rxKBitRate(0),
2488 rxAudioKBitRate(0),
2489 txAudioKBitRate(0),
2490 rxVideoKBitRate(0),
2491 txVideoKBitRate(0),
2492 lastmileDelay(0),
2493 userCount(0),
2494 cpuAppUsage(0.0),
2495 cpuTotalUsage(0.0),
2496 gatewayRtt(0),
2497 memoryAppUsageRatio(0.0),
2498 memoryTotalUsageRatio(0.0),
2499 memoryAppUsageInKbytes(0),
2500 connectTimeMs(0),
2501 firstAudioPacketDuration(0),
2502 firstVideoPacketDuration(0),
2503 firstVideoKeyFramePacketDuration(0),
2504 packetsBeforeFirstKeyFramePacket(0),
2505 firstAudioPacketDurationAfterUnmute(0),
2506 firstVideoPacketDurationAfterUnmute(0),
2507 firstVideoKeyFramePacketDurationAfterUnmute(0),
2508 firstVideoKeyFrameDecodedDurationAfterUnmute(0),
2509 firstVideoKeyFrameRenderedDurationAfterUnmute(0),
2510 txPacketLossRate(0),
2511 rxPacketLossRate(0) {}
2512 };
2513
2517 enum CLIENT_ROLE_TYPE {
2521 CLIENT_ROLE_BROADCASTER = 1,
2525 CLIENT_ROLE_AUDIENCE = 2,
2526 };
2527
2532 enum QUALITY_ADAPT_INDICATION {
2536 ADAPT_NONE = 0,
2540 ADAPT_UP_BANDWIDTH = 1,
2544 ADAPT_DOWN_BANDWIDTH = 2,
2545 };
2546
2551 enum AUDIENCE_LATENCY_LEVEL_TYPE {
2555 AUDIENCE_LATENCY_LEVEL_LOW_LATENCY = 1,
2559 AUDIENCE_LATENCY_LEVEL_ULTRA_LOW_LATENCY = 2,
2560 };
2561
2565 struct ClientRoleOptions {
2570 AUDIENCE_LATENCY_LEVEL_TYPE audienceLatencyLevel;
2571
2572 ClientRoleOptions() : audienceLatencyLevel(AUDIENCE_LATENCY_LEVEL_ULTRA_LOW_LATENCY) {}
2573 };
2574
2578 enum EXPERIENCE_QUALITY_TYPE {
2580 EXPERIENCE_QUALITY_GOOD = 0,
2582 EXPERIENCE_QUALITY_BAD = 1,
2583 };
2584
2588 enum EXPERIENCE_POOR_REASON {
2592 EXPERIENCE_REASON_NONE = 0,
2596 REMOTE_NETWORK_QUALITY_POOR = 1,
2600 LOCAL_NETWORK_QUALITY_POOR = 2,
2604 WIRELESS_SIGNAL_POOR = 4,
2609 WIFI_BLUETOOTH_COEXIST = 8,
2610 };
2611
2615 enum AUDIO_AINS_MODE {
2619 AINS_MODE_BALANCED = 0,
2623 AINS_MODE_AGGRESSIVE = 1,
2627 AINS_MODE_ULTRALOWLATENCY = 2
2628 };
2629
2633 enum AUDIO_PROFILE_TYPE {
2643 AUDIO_PROFILE_DEFAULT = 0,
2647 AUDIO_PROFILE_SPEECH_STANDARD = 1,
2651 AUDIO_PROFILE_MUSIC_STANDARD = 2,
2658 AUDIO_PROFILE_MUSIC_STANDARD_STEREO = 3,
2662 AUDIO_PROFILE_MUSIC_HIGH_QUALITY = 4,
2669 AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO = 5,
2673 AUDIO_PROFILE_IOT = 6,
2674 AUDIO_PROFILE_NUM = 7
2675 };
2676
2680 enum AUDIO_SCENARIO_TYPE {
2685 AUDIO_SCENARIO_DEFAULT = 0,
2691 AUDIO_SCENARIO_GAME_STREAMING = 3,
2697 AUDIO_SCENARIO_CHATROOM = 5,
2702 AUDIO_SCENARIO_CHORUS = 7,
2706 AUDIO_SCENARIO_MEETING = 8,
2711 AUDIO_SCENARIO_AI_SERVER = 9,
2715 AUDIO_SCENARIO_AI_CLIENT = 10,
2719 AUDIO_SCENARIO_NUM = 11,
2720 };
2721
2725 struct VideoFormat {
2726 OPTIONAL_ENUM_SIZE_T{
2728 kMaxWidthInPixels = 3840,
2730 kMaxHeightInPixels = 2160,
2732 kMaxFps = 60,
2733 };
2734
2738 int width; // Number of pixels.
2742 int height; // Number of pixels.
2746 int fps;
2747 VideoFormat() : width(FRAME_WIDTH_960), height(FRAME_HEIGHT_540), fps(FRAME_RATE_FPS_15) {}
2748 VideoFormat(int w, int h, int f) : width(w), height(h), fps(f) {}
2749
2750 bool operator<(const VideoFormat& fmt) const {
2751 if (height != fmt.height) {
2752 return height < fmt.height;
2753 } else if (width != fmt.width) {
2754 return width < fmt.width;
2755 } else {
2756 return fps < fmt.fps;
2757 }
2758 }
2759 bool operator==(const VideoFormat& fmt) const {
2760 return width == fmt.width && height == fmt.height && fps == fmt.fps;
2761 }
2762 bool operator!=(const VideoFormat& fmt) const { return !operator==(fmt); }
2763 };
2764
2768 enum VIDEO_CONTENT_HINT {
2772 CONTENT_HINT_NONE,
2779 CONTENT_HINT_MOTION,
2785 CONTENT_HINT_DETAILS
2786 };
2790 enum SCREEN_SCENARIO_TYPE {
2796 SCREEN_SCENARIO_DOCUMENT = 1,
2801 SCREEN_SCENARIO_GAMING = 2,
2806 SCREEN_SCENARIO_VIDEO = 3,
2812 SCREEN_SCENARIO_RDC = 4,
2813 };
2814
2818 enum VIDEO_APPLICATION_SCENARIO_TYPE {
2822 APPLICATION_SCENARIO_GENERAL = 0,
2826 APPLICATION_SCENARIO_MEETING = 1,
2830 APPLICATION_SCENARIO_1V1 = 2,
2834 APPLICATION_SCENARIO_LIVESHOW = 3,
2835 };
2836
2840 enum VIDEO_QOE_PREFERENCE_TYPE {
2844 VIDEO_QOE_PREFERENCE_BALANCE = 1,
2848 VIDEO_QOE_PREFERENCE_DELAY_FIRST = 2,
2852 VIDEO_QOE_PREFERENCE_PICTURE_QUALITY_FIRST = 3,
2856 VIDEO_QOE_PREFERENCE_FLUENCY_FIRST = 4,
2857
2858 };
2859
2863 enum CAPTURE_BRIGHTNESS_LEVEL_TYPE {
2868 CAPTURE_BRIGHTNESS_LEVEL_INVALID = -1,
2871 CAPTURE_BRIGHTNESS_LEVEL_NORMAL = 0,
2874 CAPTURE_BRIGHTNESS_LEVEL_BRIGHT = 1,
2877 CAPTURE_BRIGHTNESS_LEVEL_DARK = 2,
2878 };
2879
2880 enum CAMERA_STABILIZATION_MODE {
2883 CAMERA_STABILIZATION_MODE_OFF = -1,
2886 CAMERA_STABILIZATION_MODE_AUTO = 0,
2889 CAMERA_STABILIZATION_MODE_LEVEL_1 = 1,
2892 CAMERA_STABILIZATION_MODE_LEVEL_2 = 2,
2895 CAMERA_STABILIZATION_MODE_LEVEL_3 = 3,
2898 CAMERA_STABILIZATION_MODE_MAX_LEVEL = CAMERA_STABILIZATION_MODE_LEVEL_3,
2899 };
2900
2904 enum LOCAL_AUDIO_STREAM_STATE {
2908 LOCAL_AUDIO_STREAM_STATE_STOPPED = 0,
2912 LOCAL_AUDIO_STREAM_STATE_RECORDING = 1,
2916 LOCAL_AUDIO_STREAM_STATE_ENCODING = 2,
2920 LOCAL_AUDIO_STREAM_STATE_FAILED = 3
2921 };
2922
2926 enum LOCAL_AUDIO_STREAM_REASON {
2930 LOCAL_AUDIO_STREAM_REASON_OK = 0,
2935 LOCAL_AUDIO_STREAM_REASON_FAILURE = 1,
2939 LOCAL_AUDIO_STREAM_REASON_DEVICE_NO_PERMISSION = 2,
2946 LOCAL_AUDIO_STREAM_REASON_DEVICE_BUSY = 3,
2950 LOCAL_AUDIO_STREAM_REASON_RECORD_FAILURE = 4,
2954 LOCAL_AUDIO_STREAM_REASON_ENCODE_FAILURE = 5,
2957 LOCAL_AUDIO_STREAM_REASON_NO_RECORDING_DEVICE = 6,
2960 LOCAL_AUDIO_STREAM_REASON_NO_PLAYOUT_DEVICE = 7,
2964 LOCAL_AUDIO_STREAM_REASON_INTERRUPTED = 8,
2967 LOCAL_AUDIO_STREAM_REASON_RECORD_INVALID_ID = 9,
2970 LOCAL_AUDIO_STREAM_REASON_PLAYOUT_INVALID_ID = 10,
2971 };
2972
2975 enum LOCAL_VIDEO_STREAM_STATE {
2979 LOCAL_VIDEO_STREAM_STATE_STOPPED = 0,
2984 LOCAL_VIDEO_STREAM_STATE_CAPTURING = 1,
2988 LOCAL_VIDEO_STREAM_STATE_ENCODING = 2,
2992 LOCAL_VIDEO_STREAM_STATE_FAILED = 3
2993 };
2994
2998 enum LOCAL_VIDEO_STREAM_REASON {
3002 LOCAL_VIDEO_STREAM_REASON_OK = 0,
3006 LOCAL_VIDEO_STREAM_REASON_FAILURE = 1,
3011 LOCAL_VIDEO_STREAM_REASON_DEVICE_NO_PERMISSION = 2,
3016 LOCAL_VIDEO_STREAM_REASON_DEVICE_BUSY = 3,
3022 LOCAL_VIDEO_STREAM_REASON_CAPTURE_FAILURE = 4,
3026 LOCAL_VIDEO_STREAM_REASON_CODEC_NOT_SUPPORT = 5,
3031 LOCAL_VIDEO_STREAM_REASON_CAPTURE_INBACKGROUND = 6,
3038 LOCAL_VIDEO_STREAM_REASON_CAPTURE_MULTIPLE_FOREGROUND_APPS = 7,
3044 LOCAL_VIDEO_STREAM_REASON_DEVICE_NOT_FOUND = 8,
3049 LOCAL_VIDEO_STREAM_REASON_DEVICE_DISCONNECTED = 9,
3054 LOCAL_VIDEO_STREAM_REASON_DEVICE_INVALID_ID = 10,
3059 LOCAL_VIDEO_STREAM_REASON_DEVICE_INTERRUPT = 14,
3064 LOCAL_VIDEO_STREAM_REASON_DEVICE_FATAL_ERROR = 15,
3068 LOCAL_VIDEO_STREAM_REASON_DEVICE_SYSTEM_PRESSURE = 101,
3074 LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_MINIMIZED = 11,
3089 LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_CLOSED = 12,
3091 LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_OCCLUDED = 13,
3093 LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_NOT_SUPPORTED = 20,
3095 LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_FAILURE = 21,
3097 LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_NO_PERMISSION = 22,
3103 LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_AUTO_FALLBACK = 24,
3106 LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_HIDDEN = 25,
3108 LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_RECOVER_FROM_HIDDEN = 26,
3110 LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_RECOVER_FROM_MINIMIZED = 27,
3118 LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_PAUSED = 28,
3120 LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_RESUMED = 29,
3122 LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_DISPLAY_DISCONNECTED = 30,
3123
3124 };
3125
3129 enum REMOTE_AUDIO_STATE {
3135 REMOTE_AUDIO_STATE_STOPPED =
3136 0, // Default state, audio is started or remote user disabled/muted audio stream
3140 REMOTE_AUDIO_STATE_STARTING = 1, // The first audio frame packet has been received
3146 REMOTE_AUDIO_STATE_DECODING =
3147 2, // The first remote audio frame has been decoded or fronzen state ends
3152 REMOTE_AUDIO_STATE_FROZEN = 3, // Remote audio is frozen, probably due to network issue
3157 REMOTE_AUDIO_STATE_FAILED = 4, // Remote audio play failed
3158 };
3159
3163 enum REMOTE_AUDIO_STATE_REASON {
3167 REMOTE_AUDIO_REASON_INTERNAL = 0,
3171 REMOTE_AUDIO_REASON_NETWORK_CONGESTION = 1,
3175 REMOTE_AUDIO_REASON_NETWORK_RECOVERY = 2,
3180 REMOTE_AUDIO_REASON_LOCAL_MUTED = 3,
3185 REMOTE_AUDIO_REASON_LOCAL_UNMUTED = 4,
3190 REMOTE_AUDIO_REASON_REMOTE_MUTED = 5,
3195 REMOTE_AUDIO_REASON_REMOTE_UNMUTED = 6,
3199 REMOTE_AUDIO_REASON_REMOTE_OFFLINE = 7,
3203 REMOTE_AUDIO_REASON_NO_PACKET_RECEIVE = 8,
3207 REMOTE_AUDIO_REASON_LOCAL_PLAY_FAILED = 9,
3208 };
3209
3213 enum REMOTE_VIDEO_STATE {
3220 REMOTE_VIDEO_STATE_STOPPED = 0,
3224 REMOTE_VIDEO_STATE_STARTING = 1,
3231 REMOTE_VIDEO_STATE_DECODING = 2,
3235 REMOTE_VIDEO_STATE_FROZEN = 3,
3239 REMOTE_VIDEO_STATE_FAILED = 4,
3240 };
3244 enum REMOTE_VIDEO_STATE_REASON {
3248 REMOTE_VIDEO_STATE_REASON_INTERNAL = 0,
3252 REMOTE_VIDEO_STATE_REASON_NETWORK_CONGESTION = 1,
3256 REMOTE_VIDEO_STATE_REASON_NETWORK_RECOVERY = 2,
3260 REMOTE_VIDEO_STATE_REASON_LOCAL_MUTED = 3,
3264 REMOTE_VIDEO_STATE_REASON_LOCAL_UNMUTED = 4,
3268 REMOTE_VIDEO_STATE_REASON_REMOTE_MUTED = 5,
3272 REMOTE_VIDEO_STATE_REASON_REMOTE_UNMUTED = 6,
3276 REMOTE_VIDEO_STATE_REASON_REMOTE_OFFLINE = 7,
3280 REMOTE_VIDEO_STATE_REASON_AUDIO_FALLBACK = 8,
3284 REMOTE_VIDEO_STATE_REASON_AUDIO_FALLBACK_RECOVERY = 9,
3287 REMOTE_VIDEO_STATE_REASON_VIDEO_STREAM_TYPE_CHANGE_TO_LOW = 10,
3290 REMOTE_VIDEO_STATE_REASON_VIDEO_STREAM_TYPE_CHANGE_TO_HIGH = 11,
3293 REMOTE_VIDEO_STATE_REASON_SDK_IN_BACKGROUND = 12,
3294
3297 REMOTE_VIDEO_STATE_REASON_CODEC_NOT_SUPPORT = 13,
3298
3299 };
3300
3304 enum REMOTE_USER_STATE {
3308 USER_STATE_MUTE_AUDIO = (1 << 0),
3312 USER_STATE_MUTE_VIDEO = (1 << 1),
3316 USER_STATE_ENABLE_VIDEO = (1 << 4),
3320 USER_STATE_ENABLE_LOCAL_VIDEO = (1 << 8),
3321 };
3322
3327 struct VideoTrackInfo {
3328 VideoTrackInfo()
3329 : isLocal(false),
3330 ownerUid(0),
3331 trackId(0),
3332 channelId(OPTIONAL_NULLPTR),
3333 codecType(VIDEO_CODEC_H265),
3334 encodedFrameOnly(false),
3335 sourceType(VIDEO_SOURCE_CAMERA_PRIMARY),
3336 observationPosition(agora::media::base::POSITION_POST_CAPTURER) {}
3342 bool isLocal;
3346 uid_t ownerUid;
3350 track_id_t trackId;
3354 const char* channelId;
3358 VIDEO_CODEC_TYPE codecType;
3364 bool encodedFrameOnly;
3368 VIDEO_SOURCE_TYPE sourceType;
3372 uint32_t observationPosition;
3373 };
3374
3379 enum REMOTE_VIDEO_DOWNSCALE_LEVEL {
3383 REMOTE_VIDEO_DOWNSCALE_LEVEL_NONE,
3387 REMOTE_VIDEO_DOWNSCALE_LEVEL_1,
3391 REMOTE_VIDEO_DOWNSCALE_LEVEL_2,
3395 REMOTE_VIDEO_DOWNSCALE_LEVEL_3,
3399 REMOTE_VIDEO_DOWNSCALE_LEVEL_4,
3400 };
3401
3405 struct AudioVolumeInfo {
3412 uid_t uid;
3418 unsigned int volume; // [0,255]
3429 unsigned int vad;
3435 double voicePitch;
3436
3437 AudioVolumeInfo() : uid(0), volume(0), vad(0), voicePitch(0.0) {}
3438 };
3439
3443 struct DeviceInfo {
3444 /*
3445 * Whether the audio device supports ultra-low-latency capture and playback:
3446 * - `true`: The device supports ultra-low-latency capture and playback.
3447 * - `false`: The device does not support ultra-low-latency capture and playback.
3448 */
3449 bool isLowLatencyAudioSupported;
3450
3451 DeviceInfo() : isLowLatencyAudioSupported(false) {}
3452 };
3453
3457 class IPacketObserver {
3458 public:
3459 virtual ~IPacketObserver() {}
3463 struct Packet {
3469 const unsigned char* buffer;
3473 unsigned int size;
3474
3475 Packet() : buffer(OPTIONAL_NULLPTR), size(0) {}
3476 };
3484 virtual bool onSendAudioPacket(Packet& packet) = 0;
3492 virtual bool onSendVideoPacket(Packet& packet) = 0;
3500 virtual bool onReceiveAudioPacket(Packet& packet) = 0;
3508 virtual bool onReceiveVideoPacket(Packet& packet) = 0;
3509 };
3510
3514 enum AUDIO_SAMPLE_RATE_TYPE {
3518 AUDIO_SAMPLE_RATE_32000 = 32000,
3522 AUDIO_SAMPLE_RATE_44100 = 44100,
3526 AUDIO_SAMPLE_RATE_48000 = 48000,
3527 };
3531 enum VIDEO_CODEC_TYPE_FOR_STREAM {
3535 VIDEO_CODEC_H264_FOR_STREAM = 1,
3539 VIDEO_CODEC_H265_FOR_STREAM = 2,
3540 };
3541
3545 enum VIDEO_CODEC_PROFILE_TYPE {
3549 VIDEO_CODEC_PROFILE_BASELINE = 66,
3554 VIDEO_CODEC_PROFILE_MAIN = 77,
3558 VIDEO_CODEC_PROFILE_HIGH = 100,
3559 };
3560
3564 enum AUDIO_CODEC_PROFILE_TYPE {
3568 AUDIO_CODEC_PROFILE_LC_AAC = 0,
3572 AUDIO_CODEC_PROFILE_HE_AAC = 1,
3576 AUDIO_CODEC_PROFILE_HE_AAC_V2 = 2,
3577 };
3578
3582 struct LocalAudioStats {
3586 int numChannels;
3590 int sentSampleRate;
3594 int sentBitrate;
3598 int internalCodec;
3603 unsigned short txPacketLossRate;
3607 int audioDeviceDelay;
3611 int audioPlayoutDelay;
3615 int earMonitorDelay;
3619 int aecEstimatedDelay;
3620 };
3621
3625 enum RTMP_STREAM_PUBLISH_STATE {
3630 RTMP_STREAM_PUBLISH_STATE_IDLE = 0,
3635 RTMP_STREAM_PUBLISH_STATE_CONNECTING = 1,
3640 RTMP_STREAM_PUBLISH_STATE_RUNNING = 2,
3651 RTMP_STREAM_PUBLISH_STATE_RECOVERING = 3,
3657 RTMP_STREAM_PUBLISH_STATE_FAILURE = 4,
3662 RTMP_STREAM_PUBLISH_STATE_DISCONNECTING = 5,
3663 };
3664
3668 enum RTMP_STREAM_PUBLISH_REASON {
3672 RTMP_STREAM_PUBLISH_REASON_OK = 0,
3679 RTMP_STREAM_PUBLISH_REASON_INVALID_ARGUMENT = 1,
3683 RTMP_STREAM_PUBLISH_REASON_ENCRYPTED_STREAM_NOT_ALLOWED = 2,
3688 RTMP_STREAM_PUBLISH_REASON_CONNECTION_TIMEOUT = 3,
3693 RTMP_STREAM_PUBLISH_REASON_INTERNAL_SERVER_ERROR = 4,
3697 RTMP_STREAM_PUBLISH_REASON_RTMP_SERVER_ERROR = 5,
3701 RTMP_STREAM_PUBLISH_REASON_TOO_OFTEN = 6,
3705 RTMP_STREAM_PUBLISH_REASON_REACH_LIMIT = 7,
3709 RTMP_STREAM_PUBLISH_REASON_NOT_AUTHORIZED = 8,
3713 RTMP_STREAM_PUBLISH_REASON_STREAM_NOT_FOUND = 9,
3718 RTMP_STREAM_PUBLISH_REASON_FORMAT_NOT_SUPPORTED = 10,
3723 RTMP_STREAM_PUBLISH_REASON_NOT_BROADCASTER =
3724 11, // Note: match to ERR_PUBLISH_STREAM_NOT_BROADCASTER in AgoraBase.h
3730 RTMP_STREAM_PUBLISH_REASON_TRANSCODING_NO_MIX_STREAM =
3731 13, // Note: match to ERR_PUBLISH_STREAM_TRANSCODING_NO_MIX_STREAM in AgoraBase.h
3735 RTMP_STREAM_PUBLISH_REASON_NET_DOWN = 14, // Note: match to ERR_NET_DOWN in AgoraBase.h
3739 RTMP_STREAM_PUBLISH_REASON_INVALID_APPID =
3740 15, // Note: match to ERR_PUBLISH_STREAM_APPID_INVALID in AgoraBase.h
3742 RTMP_STREAM_PUBLISH_REASON_INVALID_PRIVILEGE = 16,
3747 RTMP_STREAM_UNPUBLISH_REASON_OK = 100,
3748 };
3749
3751 enum RTMP_STREAMING_EVENT {
3756 RTMP_STREAMING_EVENT_FAILED_LOAD_IMAGE = 1,
3761 RTMP_STREAMING_EVENT_URL_ALREADY_IN_USE = 2,
3765 RTMP_STREAMING_EVENT_ADVANCED_FEATURE_NOT_SUPPORT = 3,
3769 RTMP_STREAMING_EVENT_REQUEST_TOO_OFTEN = 4,
3770 };
3771
3775 typedef struct RtcImage {
3780 const char* url;
3785 int x;
3790 int y;
3794 int width;
3798 int height;
3806 int zOrder;
3812 double alpha;
3813
3814 RtcImage() : url(OPTIONAL_NULLPTR), x(0), y(0), width(0), height(0), zOrder(0), alpha(1.0) {}
3815 } RtcImage;
3822 struct LiveStreamAdvancedFeature {
3823 LiveStreamAdvancedFeature() : featureName(OPTIONAL_NULLPTR), opened(false) {}
3824 LiveStreamAdvancedFeature(const char* feat_name, bool open)
3825 : featureName(feat_name), opened(open) {}
3827 // static const char* LBHQ = "lbhq";
3829 // static const char* VEO = "veo";
3830
3835 const char* featureName;
3836
3842 bool opened;
3843 };
3844
3848 enum CONNECTION_STATE_TYPE {
3855 CONNECTION_STATE_DISCONNECTED = 1,
3864 CONNECTION_STATE_CONNECTING = 2,
3872 CONNECTION_STATE_CONNECTED = 3,
3882 CONNECTION_STATE_RECONNECTING = 4,
3891 CONNECTION_STATE_FAILED = 5,
3892 };
3893
3897 struct TranscodingUser {
3901 uid_t uid;
3907 int x;
3913 int y;
3917 int width;
3921 int height;
3929 int zOrder;
3935 double alpha;
3956 int audioChannel;
3957
3958 TranscodingUser()
3959 : uid(0), x(0), y(0), width(0), height(0), zOrder(0), alpha(1.0), audioChannel(0) {}
3960 };
3961
3965 struct LiveTranscoding {
3972 int width;
3979 int height;
3985 int videoBitrate;
3991 int videoFramerate;
3992
3998 bool lowLatency;
3999
4002 int videoGop;
4007 VIDEO_CODEC_PROFILE_TYPE videoCodecProfile;
4011 unsigned int backgroundColor;
4013 VIDEO_CODEC_TYPE_FOR_STREAM videoCodecType;
4017 unsigned int userCount;
4021 TranscodingUser* transcodingUsers;
4027 const char* transcodingExtraInfo;
4028
4031 const char* metadata;
4037 RtcImage* watermark;
4042 unsigned int watermarkCount;
4043
4050 RtcImage* backgroundImage;
4055 unsigned int backgroundImageCount;
4056
4059 AUDIO_SAMPLE_RATE_TYPE audioSampleRate;
4063 int audioBitrate;
4072 int audioChannels;
4075 AUDIO_CODEC_PROFILE_TYPE audioCodecProfile;
4079 LiveStreamAdvancedFeature* advancedFeatures;
4080
4082 unsigned int advancedFeatureCount;
4083
4084 LiveTranscoding()
4085 : width(360),
4086 height(640),
4087 videoBitrate(400),
4088 videoFramerate(15),
4089 lowLatency(false),
4090 videoGop(30),
4091 videoCodecProfile(VIDEO_CODEC_PROFILE_HIGH),
4092 backgroundColor(0x000000),
4093 videoCodecType(VIDEO_CODEC_H264_FOR_STREAM),
4094 userCount(0),
4095 transcodingUsers(OPTIONAL_NULLPTR),
4096 transcodingExtraInfo(OPTIONAL_NULLPTR),
4097 metadata(OPTIONAL_NULLPTR),
4098 watermark(OPTIONAL_NULLPTR),
4099 watermarkCount(0),
4100 backgroundImage(OPTIONAL_NULLPTR),
4101 backgroundImageCount(0),
4102 audioSampleRate(AUDIO_SAMPLE_RATE_48000),
4103 audioBitrate(48),
4104 audioChannels(1),
4105 audioCodecProfile(AUDIO_CODEC_PROFILE_LC_AAC),
4106 advancedFeatures(OPTIONAL_NULLPTR),
4107 advancedFeatureCount(0) {}
4108 };
4109
4113 struct TranscodingVideoStream {
4117 VIDEO_SOURCE_TYPE sourceType;
4123 uid_t remoteUserUid;
4129 const char* imageUrl;
4133 int mediaPlayerId;
4138 int x;
4143 int y;
4147 int width;
4151 int height;
4158 int zOrder;
4164 double alpha;
4171 bool mirror;
4172
4173 TranscodingVideoStream()
4174 : sourceType(VIDEO_SOURCE_CAMERA_PRIMARY),
4175 remoteUserUid(0),
4176 imageUrl(OPTIONAL_NULLPTR),
4177 x(0),
4178 y(0),
4179 width(0),
4180 height(0),
4181 zOrder(0),
4182 alpha(1.0),
4183 mirror(false) {}
4184 };
4185
4189 struct LocalTranscoderConfiguration {
4193 unsigned int streamCount;
4197 TranscodingVideoStream* videoInputStreams;
4202 VideoEncoderConfiguration videoOutputConfiguration;
4211 bool syncWithPrimaryCamera;
4212
4213 LocalTranscoderConfiguration()
4214 : streamCount(0),
4215 videoInputStreams(OPTIONAL_NULLPTR),
4216 videoOutputConfiguration(),
4217 syncWithPrimaryCamera(true) {}
4218 };
4219
4220 enum VIDEO_TRANSCODER_ERROR {
4224 VT_ERR_VIDEO_SOURCE_NOT_READY = 1,
4228 VT_ERR_INVALID_VIDEO_SOURCE_TYPE = 2,
4232 VT_ERR_INVALID_IMAGE_PATH = 3,
4236 VT_ERR_UNSUPPORT_IMAGE_FORMAT = 4,
4240 VT_ERR_INVALID_LAYOUT = 5,
4244 VT_ERR_INTERNAL = 20
4245 };
4246
4247
4251 struct MixedAudioStream {
4255 AUDIO_SOURCE_TYPE sourceType;
4260 uid_t remoteUserUid;
4265 const char* channelId;
4270 track_id_t trackId;
4271
4272 MixedAudioStream(AUDIO_SOURCE_TYPE source)
4273 : sourceType(source),
4274 remoteUserUid(0),
4275 channelId(NULL),
4276 trackId(-1) {}
4277
4278 MixedAudioStream(AUDIO_SOURCE_TYPE source, track_id_t track)
4279 : sourceType(source),
4280 trackId(track) {}
4281
4282 MixedAudioStream(AUDIO_SOURCE_TYPE source, uid_t uid, const char* channel)
4283 : sourceType(source),
4284 remoteUserUid(uid),
4285 channelId(channel) {}
4286
4287 MixedAudioStream(AUDIO_SOURCE_TYPE source, uid_t uid, const char* channel, track_id_t track)
4288 : sourceType(source),
4289 remoteUserUid(uid),
4290 channelId(channel),
4291 trackId(track) {}
4292
4293 };
4294
4298 struct LocalAudioMixerConfiguration {
4302 unsigned int streamCount;
4306 MixedAudioStream* audioInputStreams;
4307
4313 bool syncWithLocalMic;
4314
4315 LocalAudioMixerConfiguration() : streamCount(0), syncWithLocalMic(true) {}
4316 };
4317
4321 struct LastmileProbeConfig {
4328 bool probeUplink;
4334 bool probeDownlink;
4340 unsigned int expectedUplinkBitrate;
4345 unsigned int expectedDownlinkBitrate;
4346 };
4347
4351 enum LASTMILE_PROBE_RESULT_STATE {
4355 LASTMILE_PROBE_RESULT_COMPLETE = 1,
4360 LASTMILE_PROBE_RESULT_INCOMPLETE_NO_BWE = 2,
4365 LASTMILE_PROBE_RESULT_UNAVAILABLE = 3
4366 };
4367
4371 struct LastmileProbeOneWayResult {
4375 unsigned int packetLossRate;
4379 unsigned int jitter;
4383 unsigned int availableBandwidth;
4384
4385 LastmileProbeOneWayResult() : packetLossRate(0), jitter(0), availableBandwidth(0) {}
4386 };
4387
4391 struct LastmileProbeResult {
4395 LASTMILE_PROBE_RESULT_STATE state;
4399 LastmileProbeOneWayResult uplinkReport;
4403 LastmileProbeOneWayResult downlinkReport;
4407 unsigned int rtt;
4408
4409 LastmileProbeResult() : state(LASTMILE_PROBE_RESULT_UNAVAILABLE), rtt(0) {}
4410 };
4411
4415 enum CONNECTION_CHANGED_REASON_TYPE {
4419 CONNECTION_CHANGED_CONNECTING = 0,
4423 CONNECTION_CHANGED_JOIN_SUCCESS = 1,
4427 CONNECTION_CHANGED_INTERRUPTED = 2,
4432 CONNECTION_CHANGED_BANNED_BY_SERVER = 3,
4437 CONNECTION_CHANGED_JOIN_FAILED = 4,
4441 CONNECTION_CHANGED_LEAVE_CHANNEL = 5,
4445 CONNECTION_CHANGED_INVALID_APP_ID = 6,
4450 CONNECTION_CHANGED_INVALID_CHANNEL_NAME = 7,
4459 CONNECTION_CHANGED_INVALID_TOKEN = 8,
4463 CONNECTION_CHANGED_TOKEN_EXPIRED = 9,
4471 CONNECTION_CHANGED_REJECTED_BY_SERVER = 10,
4475 CONNECTION_CHANGED_SETTING_PROXY_SERVER = 11,
4479 CONNECTION_CHANGED_RENEW_TOKEN = 12,
4484 CONNECTION_CHANGED_CLIENT_IP_ADDRESS_CHANGED = 13,
4489 CONNECTION_CHANGED_KEEP_ALIVE_TIMEOUT = 14,
4493 CONNECTION_CHANGED_REJOIN_SUCCESS = 15,
4497 CONNECTION_CHANGED_LOST = 16,
4501 CONNECTION_CHANGED_ECHO_TEST = 17,
4505 CONNECTION_CHANGED_CLIENT_IP_ADDRESS_CHANGED_BY_USER = 18,
4509 CONNECTION_CHANGED_SAME_UID_LOGIN = 19,
4513 CONNECTION_CHANGED_TOO_MANY_BROADCASTERS = 20,
4514
4518 CONNECTION_CHANGED_LICENSE_VALIDATION_FAILURE = 21,
4519 /*
4520 * 22: The connection is failed due to certification verify failure.
4521 */
4522 CONNECTION_CHANGED_CERTIFICATION_VERYFY_FAILURE = 22,
4526 CONNECTION_CHANGED_STREAM_CHANNEL_NOT_AVAILABLE = 23,
4530 CONNECTION_CHANGED_INCONSISTENT_APPID = 24,
4531 };
4532
4536 enum CLIENT_ROLE_CHANGE_FAILED_REASON {
4540 CLIENT_ROLE_CHANGE_FAILED_TOO_MANY_BROADCASTERS = 1,
4544 CLIENT_ROLE_CHANGE_FAILED_NOT_AUTHORIZED = 2,
4549 CLIENT_ROLE_CHANGE_FAILED_REQUEST_TIME_OUT __deprecated = 3,
4554 CLIENT_ROLE_CHANGE_FAILED_CONNECTION_FAILED __deprecated = 4,
4555 };
4556
4560 enum WLACC_MESSAGE_REASON {
4564 WLACC_MESSAGE_REASON_WEAK_SIGNAL = 0,
4568 WLACC_MESSAGE_REASON_CHANNEL_CONGESTION = 1,
4569 };
4570
4574 enum WLACC_SUGGEST_ACTION {
4578 WLACC_SUGGEST_ACTION_CLOSE_TO_WIFI = 0,
4582 WLACC_SUGGEST_ACTION_CONNECT_SSID = 1,
4587 WLACC_SUGGEST_ACTION_CHECK_5G = 2,
4592 WLACC_SUGGEST_ACTION_MODIFY_SSID = 3,
4593 };
4594
4598 struct WlAccStats {
4602 unsigned short e2eDelayPercent;
4606 unsigned short frozenRatioPercent;
4610 unsigned short lossRatePercent;
4611 };
4612
4616 enum NETWORK_TYPE {
4620 NETWORK_TYPE_UNKNOWN = -1,
4624 NETWORK_TYPE_DISCONNECTED = 0,
4628 NETWORK_TYPE_LAN = 1,
4632 NETWORK_TYPE_WIFI = 2,
4636 NETWORK_TYPE_MOBILE_2G = 3,
4640 NETWORK_TYPE_MOBILE_3G = 4,
4644 NETWORK_TYPE_MOBILE_4G = 5,
4648 NETWORK_TYPE_MOBILE_5G = 6,
4649 };
4650
4654 enum VIDEO_VIEW_SETUP_MODE {
4658 VIDEO_VIEW_SETUP_REPLACE = 0,
4662 VIDEO_VIEW_SETUP_ADD = 1,
4666 VIDEO_VIEW_SETUP_REMOVE = 2,
4667 };
4668
4672 struct VideoCanvas {
4676 uid_t uid;
4677
4682 uid_t subviewUid;
4686 view_t view;
4690 uint32_t backgroundColor;
4695 media::base::RENDER_MODE_TYPE renderMode;
4705 VIDEO_MIRROR_MODE_TYPE mirrorMode;
4710 VIDEO_VIEW_SETUP_MODE setupMode;
4715 VIDEO_SOURCE_TYPE sourceType;
4721 int mediaPlayerId;
4727 Rectangle cropArea;
4733 bool enableAlphaMask;
4738 media::base::VIDEO_MODULE_POSITION position;
4739
4740 VideoCanvas()
4741 : uid(0),
4742 subviewUid(0),
4743 view(NULL),
4744 backgroundColor(0x00000000),
4745 renderMode(media::base::RENDER_MODE_HIDDEN),
4746 mirrorMode(VIDEO_MIRROR_MODE_AUTO),
4747 setupMode(VIDEO_VIEW_SETUP_REPLACE),
4748 sourceType(VIDEO_SOURCE_CAMERA_PRIMARY),
4749 mediaPlayerId(-ERR_NOT_READY),
4750 cropArea(0, 0, 0, 0),
4751 enableAlphaMask(false),
4752 position(media::base::POSITION_POST_CAPTURER) {}
4753
4754 VideoCanvas(view_t v, media::base::RENDER_MODE_TYPE m, VIDEO_MIRROR_MODE_TYPE mt)
4755 : uid(0),
4756 subviewUid(0),
4757 view(v),
4758 backgroundColor(0x00000000),
4759 renderMode(m),
4760 mirrorMode(mt),
4761 setupMode(VIDEO_VIEW_SETUP_REPLACE),
4762 sourceType(VIDEO_SOURCE_CAMERA_PRIMARY),
4763 mediaPlayerId(-ERR_NOT_READY),
4764 cropArea(0, 0, 0, 0),
4765 enableAlphaMask(false),
4766 position(media::base::POSITION_POST_CAPTURER) {}
4767
4768 VideoCanvas(view_t v, media::base::RENDER_MODE_TYPE m, VIDEO_MIRROR_MODE_TYPE mt, uid_t u)
4769 : uid(u),
4770 subviewUid(0),
4771 view(v),
4772 backgroundColor(0x00000000),
4773 renderMode(m),
4774 mirrorMode(mt),
4775 setupMode(VIDEO_VIEW_SETUP_REPLACE),
4776 sourceType(VIDEO_SOURCE_CAMERA_PRIMARY),
4777 mediaPlayerId(-ERR_NOT_READY),
4778 cropArea(0, 0, 0, 0),
4779 enableAlphaMask(false),
4780 position(media::base::POSITION_POST_CAPTURER) {}
4781
4782 VideoCanvas(view_t v, media::base::RENDER_MODE_TYPE m, VIDEO_MIRROR_MODE_TYPE mt, uid_t u,
4783 uid_t subu)
4784 : uid(u),
4785 subviewUid(subu),
4786 view(v),
4787 backgroundColor(0x00000000),
4788 renderMode(m),
4789 mirrorMode(mt),
4790 setupMode(VIDEO_VIEW_SETUP_REPLACE),
4791 sourceType(VIDEO_SOURCE_CAMERA_PRIMARY),
4792 mediaPlayerId(-ERR_NOT_READY),
4793 cropArea(0, 0, 0, 0),
4794 enableAlphaMask(false),
4795 position(media::base::POSITION_POST_CAPTURER) {}
4796 };
4797
4800 struct BeautyOptions {
4803 enum LIGHTENING_CONTRAST_LEVEL {
4805 LIGHTENING_CONTRAST_LOW = 0,
4807 LIGHTENING_CONTRAST_NORMAL = 1,
4809 LIGHTENING_CONTRAST_HIGH = 2,
4810 };
4811
4815 LIGHTENING_CONTRAST_LEVEL lighteningContrastLevel;
4816
4819 float lighteningLevel;
4820
4824 float smoothnessLevel;
4825
4829 float rednessLevel;
4830
4834 float sharpnessLevel;
4835
4836 BeautyOptions(LIGHTENING_CONTRAST_LEVEL contrastLevel, float lightening, float smoothness,
4837 float redness, float sharpness)
4838 : lighteningContrastLevel(contrastLevel),
4839 lighteningLevel(lightening),
4840 smoothnessLevel(smoothness),
4841 rednessLevel(redness),
4842 sharpnessLevel(sharpness) {}
4843
4844 BeautyOptions()
4845 : lighteningContrastLevel(LIGHTENING_CONTRAST_NORMAL),
4846 lighteningLevel(0),
4847 smoothnessLevel(0),
4848 rednessLevel(0),
4849 sharpnessLevel(0) {}
4850 };
4851
4856 struct FaceShapeAreaOptions {
4859 enum FACE_SHAPE_AREA {
4861 FACE_SHAPE_AREA_NONE = -1,
4863 FACE_SHAPE_AREA_HEADSCALE = 0,
4865 FACE_SHAPE_AREA_FOREHEAD = 1,
4867 FACE_SHAPE_AREA_FACECONTOUR = 2,
4869 FACE_SHAPE_AREA_FACELENGTH = 3,
4871 FACE_SHAPE_AREA_FACEWIDTH = 4,
4873 FACE_SHAPE_AREA_CHEEKBONE = 5,
4875 FACE_SHAPE_AREA_CHEEK = 6,
4877 FACE_SHAPE_AREA_CHIN = 7,
4879 FACE_SHAPE_AREA_EYESCALE = 8,
4881 FACE_SHAPE_AREA_NOSELENGTH = 9,
4883 FACE_SHAPE_AREA_NOSEWIDTH = 10,
4885 FACE_SHAPE_AREA_MOUTHSCALE = 11,
4886 };
4887
4890 FACE_SHAPE_AREA shapeArea;
4891
4897 int shapeIntensity;
4898
4899 FaceShapeAreaOptions(FACE_SHAPE_AREA shapeArea, int areaIntensity) : shapeArea(shapeArea), shapeIntensity(areaIntensity) {}
4900
4901 FaceShapeAreaOptions() : shapeArea(FACE_SHAPE_AREA_NONE), shapeIntensity(0) {}
4902 };
4903
4908 struct FaceShapeBeautyOptions {
4911 enum FACE_SHAPE_BEAUTY_STYLE {
4913 FACE_SHAPE_BEAUTY_STYLE_FEMALE = 0,
4915 FACE_SHAPE_BEAUTY_STYLE_MALE = 1,
4916 };
4917
4920 FACE_SHAPE_BEAUTY_STYLE shapeStyle;
4921
4924 int styleIntensity;
4925
4926 FaceShapeBeautyOptions(FACE_SHAPE_BEAUTY_STYLE shapeStyle, int styleIntensity) : shapeStyle(shapeStyle), styleIntensity(styleIntensity) {}
4927
4928 FaceShapeBeautyOptions() : shapeStyle(FACE_SHAPE_BEAUTY_STYLE_FEMALE), styleIntensity(50) {}
4929 };
4930
4935 struct FilterEffectOptions {
4950 const char * path;
4951
4955 float strength;
4956
4957 FilterEffectOptions(const char * lut3dPath, float filterStrength) : path(lut3dPath), strength(filterStrength) {}
4958
4959 FilterEffectOptions() : path(OPTIONAL_NULLPTR), strength(0.5) {}
4960 };
4961
4962 struct LowlightEnhanceOptions {
4966 enum LOW_LIGHT_ENHANCE_MODE {
4970 LOW_LIGHT_ENHANCE_AUTO = 0,
4972 LOW_LIGHT_ENHANCE_MANUAL = 1,
4973 };
4977 enum LOW_LIGHT_ENHANCE_LEVEL {
4983 LOW_LIGHT_ENHANCE_LEVEL_HIGH_QUALITY = 0,
4988 LOW_LIGHT_ENHANCE_LEVEL_FAST = 1,
4989 };
4990
4993 LOW_LIGHT_ENHANCE_MODE mode;
4994
4997 LOW_LIGHT_ENHANCE_LEVEL level;
4998
4999 LowlightEnhanceOptions(LOW_LIGHT_ENHANCE_MODE lowlightMode, LOW_LIGHT_ENHANCE_LEVEL lowlightLevel)
5000 : mode(lowlightMode), level(lowlightLevel) {}
5001
5002 LowlightEnhanceOptions()
5003 : mode(LOW_LIGHT_ENHANCE_AUTO), level(LOW_LIGHT_ENHANCE_LEVEL_HIGH_QUALITY) {}
5004 };
5010 struct VideoDenoiserOptions {
5013 enum VIDEO_DENOISER_MODE {
5016 VIDEO_DENOISER_AUTO = 0,
5018 VIDEO_DENOISER_MANUAL = 1,
5019 };
5023 enum VIDEO_DENOISER_LEVEL {
5030 VIDEO_DENOISER_LEVEL_HIGH_QUALITY = 0,
5038 VIDEO_DENOISER_LEVEL_FAST = 1,
5039 };
5042 VIDEO_DENOISER_MODE mode;
5043
5046 VIDEO_DENOISER_LEVEL level;
5047
5048 VideoDenoiserOptions(VIDEO_DENOISER_MODE denoiserMode, VIDEO_DENOISER_LEVEL denoiserLevel)
5049 : mode(denoiserMode), level(denoiserLevel) {}
5050
5051 VideoDenoiserOptions() : mode(VIDEO_DENOISER_AUTO), level(VIDEO_DENOISER_LEVEL_HIGH_QUALITY) {}
5052 };
5053
5058 struct ColorEnhanceOptions {
5063 float strengthLevel;
5064
5073 float skinProtectLevel;
5074
5075 ColorEnhanceOptions(float stength, float skinProtect)
5076 : strengthLevel(stength), skinProtectLevel(skinProtect) {}
5077
5078 ColorEnhanceOptions() : strengthLevel(0), skinProtectLevel(1) {}
5079 };
5080
5084 struct VirtualBackgroundSource {
5087 enum BACKGROUND_SOURCE_TYPE {
5091 BACKGROUND_NONE = 0,
5095 BACKGROUND_COLOR = 1,
5099 BACKGROUND_IMG = 2,
5103 BACKGROUND_BLUR = 3,
5107 BACKGROUND_VIDEO = 4,
5108 };
5109
5112 enum BACKGROUND_BLUR_DEGREE {
5115 BLUR_DEGREE_LOW = 1,
5118 BLUR_DEGREE_MEDIUM = 2,
5121 BLUR_DEGREE_HIGH = 3,
5122 };
5123
5126 BACKGROUND_SOURCE_TYPE background_source_type;
5127
5137 unsigned int color;
5138
5147 const char* source;
5148
5153 BACKGROUND_BLUR_DEGREE blur_degree;
5154
5155 VirtualBackgroundSource()
5156 : background_source_type(BACKGROUND_COLOR),
5157 color(0xffffff),
5158 source(OPTIONAL_NULLPTR),
5159 blur_degree(BLUR_DEGREE_HIGH) {}
5160 };
5161
5162 struct SegmentationProperty {
5163 enum SEG_MODEL_TYPE {
5164
5165 SEG_MODEL_AI = 1,
5166 SEG_MODEL_GREEN = 2
5167 };
5168
5169 SEG_MODEL_TYPE modelType;
5170
5171 float greenCapacity;
5172
5173 SegmentationProperty() : modelType(SEG_MODEL_AI), greenCapacity(0.5) {}
5174 };
5175
5178 enum AUDIO_TRACK_TYPE {
5182 AUDIO_TRACK_INVALID = -1,
5189 AUDIO_TRACK_MIXABLE = 0,
5195 AUDIO_TRACK_DIRECT = 1,
5196 };
5197
5200 struct AudioTrackConfig {
5206 bool enableLocalPlayback;
5212 bool enableAudioProcessing;
5213
5214 AudioTrackConfig() : enableLocalPlayback(true),enableAudioProcessing(false) {}
5215 };
5216
5237 enum VOICE_BEAUTIFIER_PRESET {
5240 VOICE_BEAUTIFIER_OFF = 0x00000000,
5246 CHAT_BEAUTIFIER_MAGNETIC = 0x01010100,
5252 CHAT_BEAUTIFIER_FRESH = 0x01010200,
5258 CHAT_BEAUTIFIER_VITALITY = 0x01010300,
5268 SINGING_BEAUTIFIER = 0x01020100,
5271 TIMBRE_TRANSFORMATION_VIGOROUS = 0x01030100,
5274 TIMBRE_TRANSFORMATION_DEEP = 0x01030200,
5277 TIMBRE_TRANSFORMATION_MELLOW = 0x01030300,
5280 TIMBRE_TRANSFORMATION_FALSETTO = 0x01030400,
5283 TIMBRE_TRANSFORMATION_FULL = 0x01030500,
5286 TIMBRE_TRANSFORMATION_CLEAR = 0x01030600,
5289 TIMBRE_TRANSFORMATION_RESOUNDING = 0x01030700,
5292 TIMBRE_TRANSFORMATION_RINGING = 0x01030800,
5303 ULTRA_HIGH_QUALITY_VOICE = 0x01040100
5304 };
5305
5328 enum AUDIO_EFFECT_PRESET {
5331 AUDIO_EFFECT_OFF = 0x00000000,
5334 ROOM_ACOUSTICS_KTV = 0x02010100,
5337 ROOM_ACOUSTICS_VOCAL_CONCERT = 0x02010200,
5340 ROOM_ACOUSTICS_STUDIO = 0x02010300,
5343 ROOM_ACOUSTICS_PHONOGRAPH = 0x02010400,
5350 ROOM_ACOUSTICS_VIRTUAL_STEREO = 0x02010500,
5353 ROOM_ACOUSTICS_SPACIAL = 0x02010600,
5356 ROOM_ACOUSTICS_ETHEREAL = 0x02010700,
5368 ROOM_ACOUSTICS_3D_VOICE = 0x02010800,
5379 ROOM_ACOUSTICS_VIRTUAL_SURROUND_SOUND = 0x02010900,
5387 ROOM_ACOUSTICS_CHORUS = 0x02010D00,
5394 VOICE_CHANGER_EFFECT_UNCLE = 0x02020100,
5400 VOICE_CHANGER_EFFECT_OLDMAN = 0x02020200,
5406 VOICE_CHANGER_EFFECT_BOY = 0x02020300,
5413 VOICE_CHANGER_EFFECT_SISTER = 0x02020400,
5419 VOICE_CHANGER_EFFECT_GIRL = 0x02020500,
5423 VOICE_CHANGER_EFFECT_PIGKING = 0x02020600,
5426 VOICE_CHANGER_EFFECT_HULK = 0x02020700,
5433 STYLE_TRANSFORMATION_RNB = 0x02030100,
5440 STYLE_TRANSFORMATION_POPULAR = 0x02030200,
5445 PITCH_CORRECTION = 0x02040100,
5446
5450 };
5451
5454 enum VOICE_CONVERSION_PRESET {
5457 VOICE_CONVERSION_OFF = 0x00000000,
5461 VOICE_CHANGER_NEUTRAL = 0x03010100,
5465 VOICE_CHANGER_SWEET = 0x03010200,
5469 VOICE_CHANGER_SOLID = 0x03010300,
5473 VOICE_CHANGER_BASS = 0x03010400,
5476 VOICE_CHANGER_CARTOON = 0x03010500,
5479 VOICE_CHANGER_CHILDLIKE = 0x03010600,
5482 VOICE_CHANGER_PHONE_OPERATOR = 0x03010700,
5485 VOICE_CHANGER_MONSTER = 0x03010800,
5488 VOICE_CHANGER_TRANSFORMERS = 0x03010900,
5491 VOICE_CHANGER_GROOT = 0x03010A00,
5494 VOICE_CHANGER_DARTH_VADER = 0x03010B00,
5497 VOICE_CHANGER_IRON_LADY = 0x03010C00,
5500 VOICE_CHANGER_SHIN_CHAN = 0x03010D00,
5503 VOICE_CHANGER_GIRLISH_MAN = 0x03010E00,
5506 VOICE_CHANGER_CHIPMUNK = 0x03010F00,
5507
5508 };
5509
5512 enum HEADPHONE_EQUALIZER_PRESET {
5515 HEADPHONE_EQUALIZER_OFF = 0x00000000,
5518 HEADPHONE_EQUALIZER_OVEREAR = 0x04000001,
5521 HEADPHONE_EQUALIZER_INEAR = 0x04000002
5522 };
5523
5526 enum VOICE_AI_TUNER_TYPE {
5529 VOICE_AI_TUNER_MATURE_MALE,
5532 VOICE_AI_TUNER_FRESH_MALE,
5535 VOICE_AI_TUNER_ELEGANT_FEMALE,
5538 VOICE_AI_TUNER_SWEET_FEMALE,
5541 VOICE_AI_TUNER_WARM_MALE_SINGING,
5544 VOICE_AI_TUNER_GENTLE_FEMALE_SINGING,
5547 VOICE_AI_TUNER_HUSKY_MALE_SINGING,
5550 VOICE_AI_TUNER_WARM_ELEGANT_FEMALE_SINGING,
5553 VOICE_AI_TUNER_POWERFUL_MALE_SINGING,
5556 VOICE_AI_TUNER_DREAMY_FEMALE_SINGING,
5557 };
5558
5562 struct ScreenAudioParameters {
5566 int sampleRate;
5570 int channels;
5575 int captureSignalVolume;
5576
5577 #if defined(__APPLE__) && !TARGET_OS_IOS
5578 bool excludeCurrentProcessAudio = true;
5579 ScreenAudioParameters(): sampleRate(48000), channels(2), captureSignalVolume(100) {}
5580 #else
5581 ScreenAudioParameters(): sampleRate(16000), channels(2), captureSignalVolume(100) {}
5582 #endif
5583 };
5584
5588 struct ScreenCaptureParameters {
5589
5599 bool captureAudio;
5603 ScreenAudioParameters audioParams;
5604
5618 VideoDimensions dimensions;
5624 int frameRate;
5630 int bitrate;
5635 bool captureMouseCursor;
5642 bool windowFocus;
5649 view_t* excludeWindowList;
5653 int excludeWindowCount;
5654
5658 int highLightWidth;
5662 unsigned int highLightColor;
5671 bool enableHighLight;
5672
5673 ScreenCaptureParameters()
5674 : captureAudio(false),
5675 dimensions(1920, 1080),
5676 frameRate(5),
5677 bitrate(STANDARD_BITRATE),
5678 captureMouseCursor(true),
5679 windowFocus(false),
5680 excludeWindowList(OPTIONAL_NULLPTR),
5681 excludeWindowCount(0),
5682 highLightWidth(0),
5683 highLightColor(0),
5684 enableHighLight(false) {}
5685 ScreenCaptureParameters(const VideoDimensions& d, int f, int b)
5686 : captureAudio(false),dimensions(d),
5687 frameRate(f),
5688 bitrate(b),
5689 captureMouseCursor(true),
5690 windowFocus(false),
5691 excludeWindowList(OPTIONAL_NULLPTR),
5692 excludeWindowCount(0),
5693 highLightWidth(0),
5694 highLightColor(0),
5695 enableHighLight(false) {}
5696 ScreenCaptureParameters(int width, int height, int f, int b)
5697 : captureAudio(false),
5698 dimensions(width, height),
5699 frameRate(f),
5700 bitrate(b),
5701 captureMouseCursor(true),
5702 windowFocus(false),
5703 excludeWindowList(OPTIONAL_NULLPTR),
5704 excludeWindowCount(0),
5705 highLightWidth(0),
5706 highLightColor(0),
5707 enableHighLight(false) {}
5708 ScreenCaptureParameters(int width, int height, int f, int b, bool cur, bool fcs)
5709 : captureAudio(false),
5710 dimensions(width, height),
5711 frameRate(f),
5712 bitrate(b),
5713 captureMouseCursor(cur),
5714 windowFocus(fcs),
5715 excludeWindowList(OPTIONAL_NULLPTR),
5716 excludeWindowCount(0),
5717 highLightWidth(0),
5718 highLightColor(0),
5719 enableHighLight(false) {}
5720 ScreenCaptureParameters(int width, int height, int f, int b, view_t* ex, int cnt)
5721 : captureAudio(false),
5722 dimensions(width, height),
5723 frameRate(f),
5724 bitrate(b),
5725 captureMouseCursor(true),
5726 windowFocus(false),
5727 excludeWindowList(ex),
5728 excludeWindowCount(cnt),
5729 highLightWidth(0),
5730 highLightColor(0),
5731 enableHighLight(false) {}
5732 ScreenCaptureParameters(int width, int height, int f, int b, bool cur, bool fcs, view_t* ex,
5733 int cnt)
5734 : captureAudio(false),
5735 dimensions(width, height),
5736 frameRate(f),
5737 bitrate(b),
5738 captureMouseCursor(cur),
5739 windowFocus(fcs),
5740 excludeWindowList(ex),
5741 excludeWindowCount(cnt),
5742 highLightWidth(0),
5743 highLightColor(0),
5744 enableHighLight(false) {}
5745 };
5746
5750 enum AUDIO_RECORDING_QUALITY_TYPE {
5755 AUDIO_RECORDING_QUALITY_LOW = 0,
5760 AUDIO_RECORDING_QUALITY_MEDIUM = 1,
5765 AUDIO_RECORDING_QUALITY_HIGH = 2,
5769 AUDIO_RECORDING_QUALITY_ULTRA_HIGH = 3,
5770 };
5771
5775 enum AUDIO_FILE_RECORDING_TYPE {
5779 AUDIO_FILE_RECORDING_MIC = 1,
5783 AUDIO_FILE_RECORDING_PLAYBACK = 2,
5787 AUDIO_FILE_RECORDING_MIXED = 3,
5788 };
5789
5793 enum AUDIO_ENCODED_FRAME_OBSERVER_POSITION {
5797 AUDIO_ENCODED_FRAME_OBSERVER_POSITION_RECORD = 1,
5801 AUDIO_ENCODED_FRAME_OBSERVER_POSITION_PLAYBACK = 2,
5805 AUDIO_ENCODED_FRAME_OBSERVER_POSITION_MIXED = 3,
5806 };
5807
5811 struct AudioRecordingConfiguration {
5817 const char* filePath;
5823 bool encode;
5834 int sampleRate;
5838 AUDIO_FILE_RECORDING_TYPE fileRecordingType;
5843 AUDIO_RECORDING_QUALITY_TYPE quality;
5844
5850 int recordingChannel;
5851
5852 AudioRecordingConfiguration()
5853 : filePath(OPTIONAL_NULLPTR),
5854 encode(false),
5855 sampleRate(32000),
5856 fileRecordingType(AUDIO_FILE_RECORDING_MIXED),
5857 quality(AUDIO_RECORDING_QUALITY_LOW),
5858 recordingChannel(1) {}
5859
5860 AudioRecordingConfiguration(const char* file_path, int sample_rate,
5861 AUDIO_RECORDING_QUALITY_TYPE quality_type, int channel)
5862 : filePath(file_path),
5863 encode(false),
5864 sampleRate(sample_rate),
5865 fileRecordingType(AUDIO_FILE_RECORDING_MIXED),
5866 quality(quality_type),
5867 recordingChannel(channel) {}
5868
5869 AudioRecordingConfiguration(const char* file_path, bool enc, int sample_rate,
5870 AUDIO_FILE_RECORDING_TYPE type,
5871 AUDIO_RECORDING_QUALITY_TYPE quality_type, int channel)
5872 : filePath(file_path),
5873 encode(enc),
5874 sampleRate(sample_rate),
5875 fileRecordingType(type),
5876 quality(quality_type),
5877 recordingChannel(channel) {}
5878
5879 AudioRecordingConfiguration(const AudioRecordingConfiguration& rhs)
5880 : filePath(rhs.filePath),
5881 encode(rhs.encode),
5882 sampleRate(rhs.sampleRate),
5883 fileRecordingType(rhs.fileRecordingType),
5884 quality(rhs.quality),
5885 recordingChannel(rhs.recordingChannel) {}
5886 };
5887
5891 struct AudioEncodedFrameObserverConfig {
5895 AUDIO_ENCODED_FRAME_OBSERVER_POSITION postionType;
5899 AUDIO_ENCODING_TYPE encodingType;
5900
5901 AudioEncodedFrameObserverConfig()
5902 : postionType(AUDIO_ENCODED_FRAME_OBSERVER_POSITION_PLAYBACK),
5903 encodingType(AUDIO_ENCODING_TYPE_OPUS_48000_MEDIUM) {}
5904 };
5908 class IAudioEncodedFrameObserver {
5909 public:
5922 virtual void onRecordAudioEncodedFrame(const uint8_t* frameBuffer, int length,
5923 const EncodedAudioFrameInfo& audioEncodedFrameInfo) = 0;
5924
5937 virtual void onPlaybackAudioEncodedFrame(const uint8_t* frameBuffer, int length,
5938 const EncodedAudioFrameInfo& audioEncodedFrameInfo) = 0;
5939
5952 virtual void onMixedAudioEncodedFrame(const uint8_t* frameBuffer, int length,
5953 const EncodedAudioFrameInfo& audioEncodedFrameInfo) = 0;
5954
5955 virtual ~IAudioEncodedFrameObserver() {}
5956 };
5957
5960 enum AREA_CODE {
5964 AREA_CODE_CN = 0x00000001,
5968 AREA_CODE_NA = 0x00000002,
5972 AREA_CODE_EU = 0x00000004,
5976 AREA_CODE_AS = 0x00000008,
5980 AREA_CODE_JP = 0x00000010,
5984 AREA_CODE_IN = 0x00000020,
5988 AREA_CODE_GLOB = (0xFFFFFFFF)
5989 };
5990
5995 enum AREA_CODE_EX {
5999 AREA_CODE_OC = 0x00000040,
6003 AREA_CODE_SA = 0x00000080,
6007 AREA_CODE_AF = 0x00000100,
6011 AREA_CODE_KR = 0x00000200,
6015 AREA_CODE_HKMC = 0x00000400,
6019 AREA_CODE_US = 0x00000800,
6023 AREA_CODE_RU = 0x00001000,
6027 AREA_CODE_OVS = 0xFFFFFFFE
6028 };
6029
6033 enum CHANNEL_MEDIA_RELAY_ERROR {
6036 RELAY_OK = 0,
6039 RELAY_ERROR_SERVER_ERROR_RESPONSE = 1,
6046 RELAY_ERROR_SERVER_NO_RESPONSE = 2,
6049 RELAY_ERROR_NO_RESOURCE_AVAILABLE = 3,
6052 RELAY_ERROR_FAILED_JOIN_SRC = 4,
6055 RELAY_ERROR_FAILED_JOIN_DEST = 5,
6058 RELAY_ERROR_FAILED_PACKET_RECEIVED_FROM_SRC = 6,
6061 RELAY_ERROR_FAILED_PACKET_SENT_TO_DEST = 7,
6065 RELAY_ERROR_SERVER_CONNECTION_LOST = 8,
6068 RELAY_ERROR_INTERNAL_ERROR = 9,
6071 RELAY_ERROR_SRC_TOKEN_EXPIRED = 10,
6074 RELAY_ERROR_DEST_TOKEN_EXPIRED = 11,
6075 };
6076
6080 enum CHANNEL_MEDIA_RELAY_STATE {
6084 RELAY_STATE_IDLE = 0,
6087 RELAY_STATE_CONNECTING = 1,
6090 RELAY_STATE_RUNNING = 2,
6093 RELAY_STATE_FAILURE = 3,
6094 };
6095
6098 struct ChannelMediaInfo {
6101 uid_t uid;
6105 const char* channelName;
6109 const char* token;
6110
6111 ChannelMediaInfo() : uid(0), channelName(NULL), token(NULL) {}
6112 ChannelMediaInfo(const char* c, const char* t, uid_t u) : uid(u), channelName(c), token(t) {}
6113 };
6114
6117 struct ChannelMediaRelayConfiguration {
6130 ChannelMediaInfo* srcInfo;
6146 ChannelMediaInfo* destInfos;
6151 int destCount;
6152
6153 ChannelMediaRelayConfiguration()
6154 : srcInfo(OPTIONAL_NULLPTR), destInfos(OPTIONAL_NULLPTR), destCount(0) {}
6155 };
6156
6160 struct UplinkNetworkInfo {
6164 int video_encoder_target_bitrate_bps;
6165
6166 UplinkNetworkInfo() : video_encoder_target_bitrate_bps(0) {}
6167
6168 bool operator==(const UplinkNetworkInfo& rhs) const {
6169 return (video_encoder_target_bitrate_bps == rhs.video_encoder_target_bitrate_bps);
6170 }
6171 };
6172
6173 struct DownlinkNetworkInfo {
6174 struct PeerDownlinkInfo {
6178 const char* userId;
6182 VIDEO_STREAM_TYPE stream_type;
6186 REMOTE_VIDEO_DOWNSCALE_LEVEL current_downscale_level;
6190 int expected_bitrate_bps;
6191
6192 PeerDownlinkInfo()
6193 : userId(OPTIONAL_NULLPTR),
6194 stream_type(VIDEO_STREAM_HIGH),
6195 current_downscale_level(REMOTE_VIDEO_DOWNSCALE_LEVEL_NONE),
6196 expected_bitrate_bps(-1) {}
6197
6198 PeerDownlinkInfo(const PeerDownlinkInfo& rhs)
6199 : stream_type(rhs.stream_type),
6200 current_downscale_level(rhs.current_downscale_level),
6201 expected_bitrate_bps(rhs.expected_bitrate_bps) {
6202 if (rhs.userId != OPTIONAL_NULLPTR) {
6203 const size_t len = std::strlen(rhs.userId);
6204 char* buf = new char[len + 1];
6205 std::memcpy(buf, rhs.userId, len);
6206 buf[len] = '\0';
6207 userId = buf;
6208 }
6209 }
6210
6211 PeerDownlinkInfo& operator=(const PeerDownlinkInfo& rhs) {
6212 if (this == &rhs) return *this;
6213 userId = OPTIONAL_NULLPTR;
6214 stream_type = rhs.stream_type;
6215 current_downscale_level = rhs.current_downscale_level;
6216 expected_bitrate_bps = rhs.expected_bitrate_bps;
6217 if (rhs.userId != OPTIONAL_NULLPTR) {
6218 const size_t len = std::strlen(rhs.userId);
6219 char* buf = new char[len + 1];
6220 std::memcpy(buf, rhs.userId, len);
6221 buf[len] = '\0';
6222 userId = buf;
6223 }
6224 return *this;
6225 }
6226
6227 ~PeerDownlinkInfo() { delete[] userId; }
6228 };
6229
6233 int lastmile_buffer_delay_time_ms;
6237 int bandwidth_estimation_bps;
6241 int total_downscale_level_count;
6245 PeerDownlinkInfo* peer_downlink_info;
6249 int total_received_video_count;
6250
6251 DownlinkNetworkInfo()
6252 : lastmile_buffer_delay_time_ms(-1),
6253 bandwidth_estimation_bps(-1),
6254 total_downscale_level_count(-1),
6255 peer_downlink_info(OPTIONAL_NULLPTR),
6256 total_received_video_count(-1) {}
6257
6258 DownlinkNetworkInfo(const DownlinkNetworkInfo& info)
6259 : lastmile_buffer_delay_time_ms(info.lastmile_buffer_delay_time_ms),
6260 bandwidth_estimation_bps(info.bandwidth_estimation_bps),
6261 total_downscale_level_count(info.total_downscale_level_count),
6262 peer_downlink_info(OPTIONAL_NULLPTR),
6263 total_received_video_count(info.total_received_video_count) {
6264 if (total_received_video_count <= 0) return;
6265 peer_downlink_info = new PeerDownlinkInfo[total_received_video_count];
6266 for (int i = 0; i < total_received_video_count; ++i)
6267 peer_downlink_info[i] = info.peer_downlink_info[i];
6268 }
6269
6270 DownlinkNetworkInfo& operator=(const DownlinkNetworkInfo& rhs) {
6271 if (this == &rhs) return *this;
6272 lastmile_buffer_delay_time_ms = rhs.lastmile_buffer_delay_time_ms;
6273 bandwidth_estimation_bps = rhs.bandwidth_estimation_bps;
6274 total_downscale_level_count = rhs.total_downscale_level_count;
6275 peer_downlink_info = OPTIONAL_NULLPTR;
6276 total_received_video_count = rhs.total_received_video_count;
6277 if (total_received_video_count > 0) {
6278 peer_downlink_info = new PeerDownlinkInfo[total_received_video_count];
6279 for (int i = 0; i < total_received_video_count; ++i)
6280 peer_downlink_info[i] = rhs.peer_downlink_info[i];
6281 }
6282 return *this;
6283 }
6284
6285 ~DownlinkNetworkInfo() { delete[] peer_downlink_info; }
6286 };
6287
6294 enum ENCRYPTION_MODE {
6297 AES_128_XTS = 1,
6300 AES_128_ECB = 2,
6303 AES_256_XTS = 3,
6306 SM4_128_ECB = 4,
6309 AES_128_GCM = 5,
6312 AES_256_GCM = 6,
6316 AES_128_GCM2 = 7,
6320 AES_256_GCM2 = 8,
6323 MODE_END,
6324 };
6325
6327 struct EncryptionConfig {
6332 ENCRYPTION_MODE encryptionMode;
6339 const char* encryptionKey;
6347 uint8_t encryptionKdfSalt[32];
6348
6349 bool datastreamEncryptionEnabled;
6350
6351 EncryptionConfig()
6352 : encryptionMode(AES_128_GCM2),
6353 encryptionKey(OPTIONAL_NULLPTR),
6354 datastreamEncryptionEnabled(false) {
6355 memset(encryptionKdfSalt, 0, sizeof(encryptionKdfSalt));
6356 }
6357
6359 const char* getEncryptionString() const {
6360 switch (encryptionMode) {
6361 case AES_128_XTS:
6362 return "aes-128-xts";
6363 case AES_128_ECB:
6364 return "aes-128-ecb";
6365 case AES_256_XTS:
6366 return "aes-256-xts";
6367 case SM4_128_ECB:
6368 return "sm4-128-ecb";
6369 case AES_128_GCM:
6370 return "aes-128-gcm";
6371 case AES_256_GCM:
6372 return "aes-256-gcm";
6373 case AES_128_GCM2:
6374 return "aes-128-gcm-2";
6375 case AES_256_GCM2:
6376 return "aes-256-gcm-2";
6377 default:
6378 return "aes-128-gcm-2";
6379 }
6380 return "aes-128-gcm-2";
6381 }
6383 };
6384
6387 enum ENCRYPTION_ERROR_TYPE {
6391 ENCRYPTION_ERROR_INTERNAL_FAILURE = 0,
6396 ENCRYPTION_ERROR_DECRYPTION_FAILURE = 1,
6400 ENCRYPTION_ERROR_ENCRYPTION_FAILURE = 2,
6405 ENCRYPTION_ERROR_DATASTREAM_DECRYPTION_FAILURE = 3,
6409 ENCRYPTION_ERROR_DATASTREAM_ENCRYPTION_FAILURE = 4,
6410 };
6411
6412 enum UPLOAD_ERROR_REASON {
6413 UPLOAD_SUCCESS = 0,
6414 UPLOAD_NET_ERROR = 1,
6415 UPLOAD_SERVER_ERROR = 2,
6416 };
6417
6420 enum PERMISSION_TYPE {
6424 RECORD_AUDIO = 0,
6428 CAMERA = 1,
6429
6430 SCREEN_CAPTURE = 2,
6431 };
6432
6436 enum STREAM_SUBSCRIBE_STATE {
6440 SUB_STATE_IDLE = 0,
6454 SUB_STATE_NO_SUBSCRIBED = 1,
6458 SUB_STATE_SUBSCRIBING = 2,
6462 SUB_STATE_SUBSCRIBED = 3
6463 };
6464
6468 enum STREAM_PUBLISH_STATE {
6472 PUB_STATE_IDLE = 0,
6483 PUB_STATE_NO_PUBLISHED = 1,
6487 PUB_STATE_PUBLISHING = 2,
6491 PUB_STATE_PUBLISHED = 3
6492 };
6493
6497 struct EchoTestConfiguration {
6498 view_t view;
6499 bool enableAudio;
6500 bool enableVideo;
6501 const char* token;
6502 const char* channelId;
6503 int intervalInSeconds;
6504
6505 EchoTestConfiguration(view_t v, bool ea, bool ev, const char* t, const char* c, const int is)
6506 : view(v), enableAudio(ea), enableVideo(ev), token(t), channelId(c), intervalInSeconds(is) {}
6507
6508 EchoTestConfiguration()
6509 : view(OPTIONAL_NULLPTR),
6510 enableAudio(true),
6511 enableVideo(true),
6512 token(OPTIONAL_NULLPTR),
6513 channelId(OPTIONAL_NULLPTR),
6514 intervalInSeconds(2) {}
6515 };
6516
6520 struct UserInfo {
6524 uid_t uid;
6528 char userAccount[MAX_USER_ACCOUNT_LENGTH];
6529
6530 UserInfo() : uid(0) { userAccount[0] = '\0'; }
6531 };
6532
6536 enum EAR_MONITORING_FILTER_TYPE {
6540 EAR_MONITORING_FILTER_NONE = (1 << 0),
6545 EAR_MONITORING_FILTER_BUILT_IN_AUDIO_FILTERS = (1 << 1),
6549 EAR_MONITORING_FILTER_NOISE_SUPPRESSION = (1 << 2),
6555 EAR_MONITORING_FILTER_REUSE_POST_PROCESSING_FILTER = (1 << 15),
6556 };
6557
6561 enum THREAD_PRIORITY_TYPE {
6565 LOWEST = 0,
6569 LOW = 1,
6573 NORMAL = 2,
6577 HIGH = 3,
6581 HIGHEST = 4,
6585 CRITICAL = 5,
6586 };
6587
6588 #if defined(__ANDROID__) || (defined(__APPLE__) && (TARGET_OS_IOS || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)))
6589
6593 struct ScreenVideoParameters {
6620 VideoDimensions dimensions;
6626 int frameRate = 15;
6631 int bitrate;
6632 /*
6633 * The content hint of the screen sharing:
6634 */
6635 VIDEO_CONTENT_HINT contentHint = VIDEO_CONTENT_HINT::CONTENT_HINT_MOTION;
6636
6637 ScreenVideoParameters() : dimensions(1280, 720) {}
6638 };
6639
6643 struct ScreenCaptureParameters2 {
6653 bool captureAudio = false;
6657 ScreenAudioParameters audioParams;
6667 bool captureVideo = true;
6671 ScreenVideoParameters videoParams;
6672 };
6673 #endif
6674
6678 enum MEDIA_TRACE_EVENT {
6682 MEDIA_TRACE_EVENT_VIDEO_RENDERED = 0,
6686 MEDIA_TRACE_EVENT_VIDEO_DECODED,
6687 };
6688
6692 struct VideoRenderingTracingInfo {
6696 int elapsedTime;
6703 int start2JoinChannel;
6707 int join2JoinSuccess;
6715 int joinSuccess2RemoteJoined;
6723 int remoteJoined2SetView;
6732 int remoteJoined2UnmuteVideo;
6741 int remoteJoined2PacketReceived;
6742 };
6743
6744 enum CONFIG_FETCH_TYPE {
6748 CONFIG_FETCH_TYPE_INITIALIZE = 1,
6752 CONFIG_FETCH_TYPE_JOIN_CHANNEL = 2,
6753 };
6754
6756 enum LOCAL_PROXY_MODE {
6759 ConnectivityFirst = 0,
6762 LocalOnly = 1,
6763 };
6764
6765 struct LogUploadServerInfo {
6768 const char* serverDomain;
6771 const char* serverPath;
6774 int serverPort;
6779 bool serverHttps;
6780
6781 LogUploadServerInfo() : serverDomain(NULL), serverPath(NULL), serverPort(0), serverHttps(true) {}
6782
6783 LogUploadServerInfo(const char* domain, const char* path, int port, bool https)
6784 : serverDomain(domain), serverPath(path), serverPort(port), serverHttps(https) {}
6785 };
6786
6787 struct AdvancedConfigInfo {
6790 LogUploadServerInfo logUploadServer;
6791 };
6792
6793 struct LocalAccessPointConfiguration {
6796 const char** ipList;
6799 int ipListSize;
6802 const char** domainList;
6805 int domainListSize;
6810 const char* verifyDomainName;
6813 LOCAL_PROXY_MODE mode;
6816 AdvancedConfigInfo advancedConfig;
6822 bool disableAut;
6823 LocalAccessPointConfiguration()
6824 : ipList(NULL),
6825 ipListSize(0),
6826 domainList(NULL),
6827 domainListSize(0),
6828 verifyDomainName(NULL),
6829 mode(ConnectivityFirst),
6830 disableAut(true) {}
6831 };
6832
6833 enum RecorderStreamType {
6834 RTC,
6835 PREVIEW,
6836 };
6837
6841 struct RecorderStreamInfo {
6845 const char* channelId;
6849 uid_t uid;
6853 RecorderStreamType type;
6854 RecorderStreamInfo() : channelId(NULL), uid(0), type(RTC) {}
6855 RecorderStreamInfo(const char* channelId, uid_t uid)
6856 : channelId(channelId), uid(uid), type(RTC) {}
6857 RecorderStreamInfo(const char* channelId, uid_t uid, RecorderStreamType type)
6858 : channelId(channelId), uid(uid), type(type) {}
6859 };
6860 } // namespace rtc
6861
6862 namespace base {
6863
6864 class IEngineBase {
6865 public:
6866 virtual int queryInterface(rtc::INTERFACE_ID_TYPE iid, void** inter) = 0;
6867 virtual ~IEngineBase() {}
6868 };
6869
6870 class AParameter : public agora::util::AutoPtr<IAgoraParameter> {
6871 public:
6872 AParameter(IEngineBase& engine) { initialize(&engine); }
6873 AParameter(IEngineBase* engine) { initialize(engine); }
6874 AParameter(IAgoraParameter* p) : agora::util::AutoPtr<IAgoraParameter>(p) {}
6875
6876 private:
6877 bool initialize(IEngineBase* engine) {
6878 IAgoraParameter* p = OPTIONAL_NULLPTR;
6879 if (engine && !engine->queryInterface(rtc::AGORA_IID_PARAMETER_ENGINE, (void**)&p)) reset(p);
6880 return p != OPTIONAL_NULLPTR;
6881 }
6882 };
6883
6884 class LicenseCallback {
6885 public:
6886 virtual ~LicenseCallback() {}
6887 virtual void onCertificateRequired() = 0;
6888 virtual void onLicenseRequest() = 0;
6889 virtual void onLicenseValidated() = 0;
6890 virtual void onLicenseError(int result) = 0;
6891 };
6892
6893 } // namespace base
6894
6898 struct SpatialAudioParams {
6902 Optional<double> speaker_azimuth;
6906 Optional<double> speaker_elevation;
6910 Optional<double> speaker_distance;
6914 Optional<int> speaker_orientation;
6918 Optional<bool> enable_blur;
6922 Optional<bool> enable_air_absorb;
6926 Optional<double> speaker_attenuation;
6930 Optional<bool> enable_doppler;
6931 };
6935 struct VideoLayout {
6939 const char* channelId;
6943 rtc::uid_t uid;
6947 user_id_t strUid;
6951 uint32_t x;
6955 uint32_t y;
6959 uint32_t width;
6963 uint32_t height;
6968 uint32_t videoState;
6969
6970 VideoLayout()
6971 : channelId(OPTIONAL_NULLPTR),
6972 uid(0),
6973 strUid(OPTIONAL_NULLPTR),
6974 x(0),
6975 y(0),
6976 width(0),
6977 height(0),
6978 videoState(0) {}
6979 };
6980 } // namespace agora
6981
6987 AGORA_API const char* AGORA_CALL getAgoraSdkVersion(int* build);
6988
6994 AGORA_API const char* AGORA_CALL getAgoraSdkErrorDescription(int err);
6995
6996 AGORA_API int AGORA_CALL setAgoraSdkExternalSymbolLoader(void* (*func)(const char* symname));
6997
7005 AGORA_API int AGORA_CALL createAgoraCredential(agora::util::AString& credential);
7006
7020 AGORA_API int AGORA_CALL getAgoraCertificateVerifyResult(const char* credential_buf,
7021 int credential_len,
7022 const char* certificate_buf,
7023 int certificate_len);
7024
7032 AGORA_API void setAgoraLicenseCallback(agora::base::LicenseCallback* callback);
7033
7041 AGORA_API agora::base::LicenseCallback* getAgoraLicenseCallback();
7042
7043 /*
7044 * Get monotonic time in ms which can be used by capture time,
7045 * typical scenario is as follows:
7046 *
7047 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7048 * | // custom audio/video base capture time, e.g. the first audio/video capture time. | | int64_t
7049 * custom_capture_time_base; | | | |
7050 * int64_t agora_monotonic_time = getAgoraCurrentMonotonicTimeInMs(); |
7051 * | | | // offset is fixed once calculated in the begining. | | const int64_t offset =
7052 * agora_monotonic_time - custom_capture_time_base; | | | | //
7053 * realtime_custom_audio/video_capture_time is the origin capture time that customer provided.| | //
7054 * actual_audio/video_capture_time is the actual capture time transfered to sdk. | |
7055 * int64_t actual_audio_capture_time = realtime_custom_audio_capture_time + offset; |
7056 * | int64_t actual_video_capture_time = realtime_custom_video_capture_time + offset; |
7057 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7058 *
7059 * @return
7060 * - >= 0: Success.
7061 * - < 0: Failure.
7062 */
7063 AGORA_API int64_t AGORA_CALL getAgoraCurrentMonotonicTimeInMs();
agora::rtc::LiveTranscoding::transcodingUsers
TranscodingUser * transcodingUsers
Definition: AgoraBase.h:4021
agora::rtc::LogUploadServerInfo::serverDomain
const char * serverDomain
Definition: AgoraBase.h:6768
agora::rtc::IPacketObserver::onReceiveVideoPacket
virtual bool onReceiveVideoPacket(Packet &packet)=0
agora::rtc::VideoCanvas::mediaPlayerId
int mediaPlayerId
Definition: AgoraBase.h:4721
agora::rtc::RtcImage::width
int width
Definition: AgoraBase.h:3794
agora::rtc::TranscodingVideoStream::zOrder
int zOrder
Definition: AgoraBase.h:4158
agora::rtc::RtcStats::firstAudioPacketDuration
int firstAudioPacketDuration
Definition: AgoraBase.h:2429
agora::rtc::ScreenAudioParameters::captureSignalVolume
int captureSignalVolume
Definition: AgoraBase.h:5575
agora::VideoLayout
Definition: AgoraBase.h:6935
agora::rtc::FilterEffectOptions::strength
float strength
Definition: AgoraBase.h:4955
agora::rtc::SimulcastConfig::STREAM_LAYER_1
@ STREAM_LAYER_1
Definition: AgoraBase.h:2166
agora::VideoLayout::channelId
const char * channelId
Definition: AgoraBase.h:6939
agora::rtc::UserInfo
Definition: AgoraBase.h:6520
agora::rtc::FilterEffectOptions
Definition: AgoraBase.h:4935
agora::rtc::TranscodingVideoStream::alpha
double alpha
Definition: AgoraBase.h:4164
agora::rtc::EncodedAudioFrameInfo::captureTimeMs
int64_t captureTimeMs
Definition: AgoraBase.h:1520
agora::rtc::VideoEncoderConfiguration::degradationPreference
DEGRADATION_PREFERENCE degradationPreference
Definition: AgoraBase.h:2016
agora::rtc::LastmileProbeResult
Definition: AgoraBase.h:4391
agora::rtc::AudioEncodedFrameObserverConfig
Definition: AgoraBase.h:5891
agora::rtc::DownlinkNetworkInfo::PeerDownlinkInfo::userId
const char * userId
Definition: AgoraBase.h:6178
agora::rtc::ScreenCaptureParameters
Definition: AgoraBase.h:5588
agora::VideoLayout::x
uint32_t x
Definition: AgoraBase.h:6951
agora::rtc::WatermarkRatio
Definition: AgoraBase.h:2252
agora::rtc::AudioVolumeInfo
Definition: AgoraBase.h:3405
agora::rtc::VirtualBackgroundSource::BACKGROUND_BLUR_DEGREE
BACKGROUND_BLUR_DEGREE
Definition: AgoraBase.h:5112
agora::rtc::DownlinkNetworkInfo::PeerDownlinkInfo::current_downscale_level
REMOTE_VIDEO_DOWNSCALE_LEVEL current_downscale_level
Definition: AgoraBase.h:6186
agora::rtc::LastmileProbeResult::uplinkReport
LastmileProbeOneWayResult uplinkReport
Definition: AgoraBase.h:4399
agora::rtc::EncodedVideoFrameInfo::rotation
VIDEO_ORIENTATION rotation
Definition: AgoraBase.h:1716
agora::rtc::AdvancedConfigInfo::logUploadServer
LogUploadServerInfo logUploadServer
Definition: AgoraBase.h:6790
agora::rtc::BeautyOptions
Definition: AgoraBase.h:4800
agora::rtc::SenderOptions
Definition: AgoraBase.h:1254
agora::rtc::ScreenCaptureParameters::bitrate
int bitrate
Definition: AgoraBase.h:5630
agora::rtc::BeautyOptions::lighteningLevel
float lighteningLevel
Definition: AgoraBase.h:4819
agora::rtc::RtcStats::txVideoBytes
unsigned int txVideoBytes
Definition: AgoraBase.h:2338
agora::rtc::VirtualBackgroundSource::BACKGROUND_BLUR
@ BACKGROUND_BLUR
Definition: AgoraBase.h:5103
agora::rtc::LiveTranscoding::backgroundColor
unsigned int backgroundColor
Definition: AgoraBase.h:4011
agora::base::IAgoraParameter
Definition: IAgoraParameter.h:147
agora::rtc::DownlinkNetworkInfo::peer_downlink_info
PeerDownlinkInfo * peer_downlink_info
Definition: AgoraBase.h:6245
agora::rtc::AudioVolumeInfo::voicePitch
double voicePitch
Definition: AgoraBase.h:3435
agora::rtc::LastmileProbeConfig
Definition: AgoraBase.h:4321
agora::rtc::TranscodingUser::y
int y
Definition: AgoraBase.h:3913
agora::rtc::ScreenCaptureParameters::highLightWidth
int highLightWidth
Definition: AgoraBase.h:5658
agora::rtc::RtcStats::rxKBitRate
unsigned short rxKBitRate
Definition: AgoraBase.h:2354
agora::rtc::RtcStats::memoryTotalUsageRatio
double memoryTotalUsageRatio
Definition: AgoraBase.h:2414
agora::rtc::LocalAudioStats::txPacketLossRate
unsigned short txPacketLossRate
Definition: AgoraBase.h:3603
agora::rtc::VideoFormat::fps
int fps
Definition: AgoraBase.h:2746
agora::SpatialAudioParams::speaker_elevation
Optional< double > speaker_elevation
Definition: AgoraBase.h:6906
agora::rtc::VideoEncoderConfiguration::minBitrate
int minBitrate
Definition: AgoraBase.h:2008
agora::rtc::ScreenCaptureParameters::enableHighLight
bool enableHighLight
Definition: AgoraBase.h:5671
agora::rtc::VideoDenoiserOptions::VIDEO_DENOISER_AUTO
@ VIDEO_DENOISER_AUTO
Definition: AgoraBase.h:5016
agora::rtc::VideoCanvas::setupMode
VIDEO_VIEW_SETUP_MODE setupMode
Definition: AgoraBase.h:4710
agora::rtc::LowlightEnhanceOptions::LOW_LIGHT_ENHANCE_LEVEL_HIGH_QUALITY
@ LOW_LIGHT_ENHANCE_LEVEL_HIGH_QUALITY
Definition: AgoraBase.h:4983
agora::rtc::TranscodingUser::audioChannel
int audioChannel
Definition: AgoraBase.h:3956
agora::rtc::SimulcastConfig::StreamLayerIndex
StreamLayerIndex
Definition: AgoraBase.h:2162
agora::rtc::RtcStats::firstAudioPacketDurationAfterUnmute
int firstAudioPacketDurationAfterUnmute
Definition: AgoraBase.h:2449
agora::rtc::SimulcastConfig::STREAM_LAYER_2
@ STREAM_LAYER_2
Definition: AgoraBase.h:2170
agora::rtc::VideoFormat::width
int width
Definition: AgoraBase.h:2738
agora::rtc::ScreenCaptureParameters::windowFocus
bool windowFocus
Definition: AgoraBase.h:5642
agora::rtc::AudioEncodedFrameObserverConfig::encodingType
AUDIO_ENCODING_TYPE encodingType
Definition: AgoraBase.h:5899
agora::rtc::SenderOptions::codecType
VIDEO_CODEC_TYPE codecType
Definition: AgoraBase.h:1263
agora::rtc::EncodedAudioFrameInfo::codec
AUDIO_CODEC_TYPE codec
Definition: AgoraBase.h:1497
agora::rtc::LiveTranscoding::videoGop
int videoGop
Definition: AgoraBase.h:4002
agora::rtc::ChannelMediaRelayConfiguration::destCount
int destCount
Definition: AgoraBase.h:6151
agora::rtc::LocalAudioStats::audioDeviceDelay
int audioDeviceDelay
Definition: AgoraBase.h:3607
agora::rtc::LastmileProbeOneWayResult::jitter
unsigned int jitter
Definition: AgoraBase.h:4379
agora::rtc::BeautyOptions::smoothnessLevel
float smoothnessLevel
Definition: AgoraBase.h:4824
agora::rtc::VideoDenoiserOptions::level
VIDEO_DENOISER_LEVEL level
Definition: AgoraBase.h:5046
agora::rtc::VideoCanvas::mirrorMode
VIDEO_MIRROR_MODE_TYPE mirrorMode
Definition: AgoraBase.h:4705
agora::rtc::RtcStats::duration
unsigned int duration
Definition: AgoraBase.h:2322
agora::rtc::SimulcastStreamConfig::framerate
int framerate
Definition: AgoraBase.h:2147
agora::rtc::VideoDimensions::height
int height
Definition: AgoraBase.h:1108
agora::rtc::LocalAccessPointConfiguration::mode
LOCAL_PROXY_MODE mode
Definition: AgoraBase.h:6813
agora::rtc::LastmileProbeConfig::probeUplink
bool probeUplink
Definition: AgoraBase.h:4328
agora::rtc::RecorderStreamInfo::channelId
const char * channelId
Definition: AgoraBase.h:6845
agora::rtc::LocalAccessPointConfiguration
Definition: AgoraBase.h:6793
agora::rtc::FilterEffectOptions::path
const char * path
Definition: AgoraBase.h:4950
agora::rtc::LiveTranscoding::videoCodecType
VIDEO_CODEC_TYPE_FOR_STREAM videoCodecType
Definition: AgoraBase.h:4013
agora::rtc::VideoDenoiserOptions::VIDEO_DENOISER_MODE
VIDEO_DENOISER_MODE
Definition: AgoraBase.h:5013
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_NOSEWIDTH
@ FACE_SHAPE_AREA_NOSEWIDTH
Definition: AgoraBase.h:4883
agora::rtc::LiveTranscoding
Definition: AgoraBase.h:3965
agora::rtc::RtcStats::txBytes
unsigned int txBytes
Definition: AgoraBase.h:2326
agora::rtc::VideoFormat::height
int height
Definition: AgoraBase.h:2742
agora::rtc::Rectangle
Definition: AgoraBase.h:2221
agora::rtc::LocalAccessPointConfiguration::ipList
const char ** ipList
Definition: AgoraBase.h:6796
agora::rtc::VideoCanvas::uid
uid_t uid
Definition: AgoraBase.h:4676
agora::rtc::RtcStats::firstVideoPacketDuration
int firstVideoPacketDuration
Definition: AgoraBase.h:2434
agora::rtc::AudioRecordingConfiguration::filePath
const char * filePath
Definition: AgoraBase.h:5817
agora::rtc::EncodedVideoFrameInfo
Definition: AgoraBase.h:1640
agora::rtc::ColorEnhanceOptions::strengthLevel
float strengthLevel
Definition: AgoraBase.h:5063
agora::SpatialAudioParams::speaker_distance
Optional< double > speaker_distance
Definition: AgoraBase.h:6910
agora::rtc::VirtualBackgroundSource::BACKGROUND_NONE
@ BACKGROUND_NONE
Definition: AgoraBase.h:5091
agora::rtc::FaceShapeBeautyOptions::shapeStyle
FACE_SHAPE_BEAUTY_STYLE shapeStyle
Definition: AgoraBase.h:4920
agora::rtc::BeautyOptions::rednessLevel
float rednessLevel
Definition: AgoraBase.h:4829
agora::rtc::RtcStats::rxVideoBytes
unsigned int rxVideoBytes
Definition: AgoraBase.h:2346
agora::rtc::TranscodingVideoStream::remoteUserUid
uid_t remoteUserUid
Definition: AgoraBase.h:4123
agora::rtc::VideoEncoderConfiguration::dimensions
VideoDimensions dimensions
Definition: AgoraBase.h:1929
agora::rtc::EncodedVideoFrameInfo::uid
uid_t uid
Definition: AgoraBase.h:1689
agora::rtc::EncodedAudioFrameInfo
Definition: AgoraBase.h:1479
agora::util::AutoPtr
Definition: AgoraBase.h:100
agora::rtc::LastmileProbeOneWayResult::packetLossRate
unsigned int packetLossRate
Definition: AgoraBase.h:4375
agora::UserInfo::hasAudio
bool hasAudio
Definition: AgoraBase.h:830
agora::rtc::ScreenCaptureParameters::excludeWindowCount
int excludeWindowCount
Definition: AgoraBase.h:5653
agora::rtc::IPacketObserver::Packet
Definition: AgoraBase.h:3463
agora::rtc::AudioTrackConfig::enableLocalPlayback
bool enableLocalPlayback
Definition: AgoraBase.h:5206
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_NOSELENGTH
@ FACE_SHAPE_AREA_NOSELENGTH
Definition: AgoraBase.h:4881
agora::rtc::LiveTranscoding::audioCodecProfile
AUDIO_CODEC_PROFILE_TYPE audioCodecProfile
Definition: AgoraBase.h:4075
agora::rtc::RecorderStreamInfo::uid
uid_t uid
Definition: AgoraBase.h:6849
agora::rtc::VideoEncoderConfiguration
Definition: AgoraBase.h:1921
agora::rtc::Rectangle::width
int width
Definition: AgoraBase.h:2233
agora::rtc::SimulcastConfig::StreamLayerConfig::framerate
int framerate
Definition: AgoraBase.h:2204
agora::rtc::VideoEncoderConfiguration::bitrate
int bitrate
Definition: AgoraBase.h:1991
agora::rtc::VideoRenderingTracingInfo::remoteJoined2UnmuteVideo
int remoteJoined2UnmuteVideo
Definition: AgoraBase.h:6732
agora::util::AList
Definition: AgoraBase.h:233
agora::rtc::RtcStats::firstVideoKeyFrameDecodedDurationAfterUnmute
int firstVideoKeyFrameDecodedDurationAfterUnmute
Definition: AgoraBase.h:2464
agora::rtc::VideoSubscriptionOptions
Definition: AgoraBase.h:1610
agora::rtc::TranscodingUser
Definition: AgoraBase.h:3897
agora::rtc::EchoTestConfiguration
Definition: AgoraBase.h:6497
agora::rtc::RtcImage
Definition: AgoraBase.h:3775
agora::rtc::TranscodingUser::x
int x
Definition: AgoraBase.h:3907
agora::rtc::DownlinkNetworkInfo::PeerDownlinkInfo::stream_type
VIDEO_STREAM_TYPE stream_type
Definition: AgoraBase.h:6182
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_FACECONTOUR
@ FACE_SHAPE_AREA_FACECONTOUR
Definition: AgoraBase.h:4867
agora::rtc::ChannelMediaInfo::token
const char * token
Definition: AgoraBase.h:6109
agora::rtc::VideoRenderingTracingInfo::remoteJoined2PacketReceived
int remoteJoined2PacketReceived
Definition: AgoraBase.h:6741
agora::rtc::AudioRecordingConfiguration::encode
bool encode
Definition: AgoraBase.h:5823
agora::rtc::BeautyOptions::lighteningContrastLevel
LIGHTENING_CONTRAST_LEVEL lighteningContrastLevel
Definition: AgoraBase.h:4815
agora::rtc::WatermarkRatio::yRatio
float yRatio
Definition: AgoraBase.h:2265
agora::SpatialAudioParams::enable_blur
Optional< bool > enable_blur
Definition: AgoraBase.h:6918
agora::rtc::SimulcastStreamConfig
Definition: AgoraBase.h:2134
agora::rtc::LiveTranscoding::audioBitrate
int audioBitrate
Definition: AgoraBase.h:4063
agora::rtc::FaceShapeAreaOptions::shapeArea
FACE_SHAPE_AREA shapeArea
Definition: AgoraBase.h:4890
agora::rtc::ChannelMediaRelayConfiguration::destInfos
ChannelMediaInfo * destInfos
Definition: AgoraBase.h:6146
agora::rtc::RtcImage::x
int x
Definition: AgoraBase.h:3785
agora::rtc::VirtualBackgroundSource::background_source_type
BACKGROUND_SOURCE_TYPE background_source_type
Definition: AgoraBase.h:5126
agora::rtc::FaceShapeBeautyOptions
Definition: AgoraBase.h:4908
agora::rtc::TranscodingVideoStream::sourceType
VIDEO_SOURCE_TYPE sourceType
Definition: AgoraBase.h:4117
agora::rtc::LocalTranscoderConfiguration::syncWithPrimaryCamera
bool syncWithPrimaryCamera
Definition: AgoraBase.h:4211
agora::rtc::RtcImage::zOrder
int zOrder
Definition: AgoraBase.h:3806
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_FACELENGTH
@ FACE_SHAPE_AREA_FACELENGTH
Definition: AgoraBase.h:4869
agora::rtc::MixedAudioStream
Definition: AgoraBase.h:4251
agora::rtc::ClientRoleOptions::audienceLatencyLevel
AUDIENCE_LATENCY_LEVEL_TYPE audienceLatencyLevel
Definition: AgoraBase.h:2570
agora::rtc::AudioVolumeInfo::volume
unsigned int volume
Definition: AgoraBase.h:3418
agora::rtc::TranscodingUser::uid
uid_t uid
Definition: AgoraBase.h:3901
agora::rtc::VideoCanvas::enableAlphaMask
bool enableAlphaMask
Definition: AgoraBase.h:4733
agora::rtc::VideoRenderingTracingInfo::elapsedTime
int elapsedTime
Definition: AgoraBase.h:6696
agora::rtc::LiveStreamAdvancedFeature::featureName
const char * featureName
Definition: AgoraBase.h:3835
agora::rtc::AdvancedConfigInfo
Definition: AgoraBase.h:6787
agora::rtc::ScreenAudioParameters::channels
int channels
Definition: AgoraBase.h:5570
agora::rtc::Rectangle::y
int y
Definition: AgoraBase.h:2229
agora::rtc::LocalAudioStats::sentBitrate
int sentBitrate
Definition: AgoraBase.h:3594
agora::rtc::RtcImage::url
const char * url
Definition: AgoraBase.h:3780
agora::rtc::IPacketObserver::Packet::buffer
const unsigned char * buffer
Definition: AgoraBase.h:3469
agora::rtc::EncodedVideoFrameInfo::decodeTimeMs
int64_t decodeTimeMs
Definition: AgoraBase.h:1729
agora::rtc::RtcStats::firstVideoKeyFrameRenderedDurationAfterUnmute
int firstVideoKeyFrameRenderedDurationAfterUnmute
Definition: AgoraBase.h:2469
agora::rtc::SimulcastConfig::configs
StreamLayerConfig configs[STREAM_LAYER_COUNT_MAX]
Definition: AgoraBase.h:2215
agora::rtc::ColorEnhanceOptions
Definition: AgoraBase.h:5058
agora::rtc::AudioRecordingConfiguration::sampleRate
int sampleRate
Definition: AgoraBase.h:5834
agora::UserInfo::userId
util::AString userId
Definition: AgoraBase.h:824
agora::rtc::UplinkNetworkInfo
Definition: AgoraBase.h:6160
agora::rtc::WatermarkOptions::positionInPortraitMode
Rectangle positionInPortraitMode
Definition: AgoraBase.h:2297
agora::rtc::LocalAccessPointConfiguration::advancedConfig
AdvancedConfigInfo advancedConfig
Definition: AgoraBase.h:6816
agora::rtc::LastmileProbeResult::downlinkReport
LastmileProbeOneWayResult downlinkReport
Definition: AgoraBase.h:4403
agora::rtc::LiveTranscoding::watermarkCount
unsigned int watermarkCount
Definition: AgoraBase.h:4042
agora::rtc::Rectangle::x
int x
Definition: AgoraBase.h:2225
agora::rtc::LocalTranscoderConfiguration::videoInputStreams
TranscodingVideoStream * videoInputStreams
Definition: AgoraBase.h:4197
agora::util::IString
Definition: AgoraBase.h:172
agora::rtc::LocalAccessPointConfiguration::verifyDomainName
const char * verifyDomainName
Definition: AgoraBase.h:6810
agora::SpatialAudioParams::enable_air_absorb
Optional< bool > enable_air_absorb
Definition: AgoraBase.h:6922
agora::rtc::LowlightEnhanceOptions::LOW_LIGHT_ENHANCE_LEVEL
LOW_LIGHT_ENHANCE_LEVEL
Definition: AgoraBase.h:4977
agora::rtc::EncodedAudioFrameInfo::advancedSettings
EncodedAudioFrameAdvancedSettings advancedSettings
Definition: AgoraBase.h:1515
agora::rtc::LocalTranscoderConfiguration
Definition: AgoraBase.h:4189
agora::rtc::BeautyOptions::LIGHTENING_CONTRAST_LEVEL
LIGHTENING_CONTRAST_LEVEL
Definition: AgoraBase.h:4803
agora::rtc::WatermarkRatio::xRatio
float xRatio
Definition: AgoraBase.h:2259
agora::rtc::LocalAudioStats::sentSampleRate
int sentSampleRate
Definition: AgoraBase.h:3590
agora::rtc::VideoSubscriptionOptions::type
Optional< VIDEO_STREAM_TYPE > type
Definition: AgoraBase.h:1617
agora::rtc::RecorderStreamInfo::type
RecorderStreamType type
Definition: AgoraBase.h:6853
agora::rtc::LocalAudioMixerConfiguration::audioInputStreams
MixedAudioStream * audioInputStreams
Definition: AgoraBase.h:4306
agora::rtc::LastmileProbeConfig::expectedDownlinkBitrate
unsigned int expectedDownlinkBitrate
Definition: AgoraBase.h:4345
agora::rtc::RtcStats::cpuTotalUsage
double cpuTotalUsage
Definition: AgoraBase.h:2397
agora::rtc::IPacketObserver::Packet::size
unsigned int size
Definition: AgoraBase.h:3473
agora::rtc::LiveTranscoding::advancedFeatures
LiveStreamAdvancedFeature * advancedFeatures
Definition: AgoraBase.h:4079
agora::rtc::LiveTranscoding::backgroundImageCount
unsigned int backgroundImageCount
Definition: AgoraBase.h:4055
agora::rtc::IPacketObserver
Definition: AgoraBase.h:3457
agora::rtc::LiveTranscoding::backgroundImage
RtcImage * backgroundImage
Definition: AgoraBase.h:4050
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_CHIN
@ FACE_SHAPE_AREA_CHIN
Definition: AgoraBase.h:4877
agora::rtc::RtcStats::cpuAppUsage
double cpuAppUsage
Definition: AgoraBase.h:2386
agora::VideoLayout::width
uint32_t width
Definition: AgoraBase.h:6959
agora::rtc::VideoFormat
Definition: AgoraBase.h:2725
agora::rtc::AdvanceOptions
Definition: AgoraBase.h:1781
agora::rtc::TranscodingUser::alpha
double alpha
Definition: AgoraBase.h:3935
agora::rtc::MixedAudioStream::trackId
track_id_t trackId
Definition: AgoraBase.h:4270
agora::rtc::WatermarkOptions::watermarkRatio
WatermarkRatio watermarkRatio
Definition: AgoraBase.h:2302
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_CHEEKBONE
@ FACE_SHAPE_AREA_CHEEKBONE
Definition: AgoraBase.h:4873
agora::rtc::DataStreamConfig
Definition: AgoraBase.h:2089
agora::rtc::AdvanceOptions::compressionPreference
COMPRESSION_PREFERENCE compressionPreference
Definition: AgoraBase.h:1790
agora::rtc::LocalAudioMixerConfiguration::streamCount
unsigned int streamCount
Definition: AgoraBase.h:4302
agora::rtc::RtcStats::txAudioBytes
unsigned int txAudioBytes
Definition: AgoraBase.h:2334
agora::rtc::RtcStats::connectTimeMs
int connectTimeMs
Definition: AgoraBase.h:2424
agora::rtc::LastmileProbeResult::state
LASTMILE_PROBE_RESULT_STATE state
Definition: AgoraBase.h:4395
agora::rtc::VideoEncoderConfiguration::advanceOptions
AdvanceOptions advanceOptions
Definition: AgoraBase.h:2028
agora::rtc::VideoCanvas::position
media::base::VIDEO_MODULE_POSITION position
Definition: AgoraBase.h:4738
agora::rtc::ChannelMediaInfo::channelName
const char * channelName
Definition: AgoraBase.h:6105
agora::rtc::LiveTranscoding::height
int height
Definition: AgoraBase.h:3979
agora::rtc::EncodedAudioFrameAdvancedSettings::speech
bool speech
Definition: AgoraBase.h:1467
agora::rtc::LocalAudioMixerConfiguration
Definition: AgoraBase.h:4298
agora::rtc::EncodedVideoFrameInfo::codecType
VIDEO_CODEC_TYPE codecType
Definition: AgoraBase.h:1694
agora::rtc::DownlinkNetworkInfo
Definition: AgoraBase.h:6173
agora::rtc::RtcStats::txVideoKBitRate
unsigned short txVideoKBitRate
Definition: AgoraBase.h:2370
agora::rtc::RtcStats::rxAudioBytes
unsigned int rxAudioBytes
Definition: AgoraBase.h:2342
agora::rtc::EncodedAudioFrameAdvancedSettings::sendEvenIfEmpty
bool sendEvenIfEmpty
Definition: AgoraBase.h:1473
agora::SpatialAudioParams::enable_doppler
Optional< bool > enable_doppler
Definition: AgoraBase.h:6930
agora::rtc::RtcStats::txAudioKBitRate
unsigned short txAudioKBitRate
Definition: AgoraBase.h:2362
agora::VideoLayout::height
uint32_t height
Definition: AgoraBase.h:6963
agora::rtc::AudioVolumeInfo::uid
uid_t uid
Definition: AgoraBase.h:3412
agora::rtc::BeautyOptions::LIGHTENING_CONTRAST_LOW
@ LIGHTENING_CONTRAST_LOW
Definition: AgoraBase.h:4805
agora::rtc::DownlinkNetworkInfo::lastmile_buffer_delay_time_ms
int lastmile_buffer_delay_time_ms
Definition: AgoraBase.h:6233
agora::rtc::LiveTranscoding::videoBitrate
int videoBitrate
Definition: AgoraBase.h:3985
agora::rtc::FaceShapeBeautyOptions::FACE_SHAPE_BEAUTY_STYLE_FEMALE
@ FACE_SHAPE_BEAUTY_STYLE_FEMALE
Definition: AgoraBase.h:4913
agora::rtc::VideoTrackInfo::trackId
track_id_t trackId
Definition: AgoraBase.h:3350
agora::rtc::VideoTrackInfo::encodedFrameOnly
bool encodedFrameOnly
Definition: AgoraBase.h:3364
agora::rtc::FaceShapeBeautyOptions::FACE_SHAPE_BEAUTY_STYLE
FACE_SHAPE_BEAUTY_STYLE
Definition: AgoraBase.h:4911
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_CHEEK
@ FACE_SHAPE_AREA_CHEEK
Definition: AgoraBase.h:4875
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_MOUTHSCALE
@ FACE_SHAPE_AREA_MOUTHSCALE
Definition: AgoraBase.h:4885
agora::rtc::TranscodingUser::width
int width
Definition: AgoraBase.h:3917
agora::rtc::FaceShapeBeautyOptions::FACE_SHAPE_BEAUTY_STYLE_MALE
@ FACE_SHAPE_BEAUTY_STYLE_MALE
Definition: AgoraBase.h:4915
agora::rtc::ScreenCaptureParameters::highLightColor
unsigned int highLightColor
Definition: AgoraBase.h:5662
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_FACEWIDTH
@ FACE_SHAPE_AREA_FACEWIDTH
Definition: AgoraBase.h:4871
agora::base::AParameter
Definition: AgoraBase.h:6870
agora::rtc::BeautyOptions::sharpnessLevel
float sharpnessLevel
Definition: AgoraBase.h:4834
agora::rtc::EncryptionConfig::encryptionMode
ENCRYPTION_MODE encryptionMode
Definition: AgoraBase.h:6332
agora::util::AOutputIterator
Definition: AgoraBase.h:202
agora::rtc::WatermarkOptions::positionInLandscapeMode
Rectangle positionInLandscapeMode
Definition: AgoraBase.h:2292
agora::rtc::IAudioEncodedFrameObserver
Definition: AgoraBase.h:5908
agora::rtc::EncodedVideoFrameInfo::width
int width
Definition: AgoraBase.h:1698
agora::rtc::ScreenAudioParameters
Definition: AgoraBase.h:5562
agora::rtc::VideoTrackInfo::ownerUid
uid_t ownerUid
Definition: AgoraBase.h:3346
agora::rtc::VideoRenderingTracingInfo::join2JoinSuccess
int join2JoinSuccess
Definition: AgoraBase.h:6707
agora::rtc::LastmileProbeOneWayResult::availableBandwidth
unsigned int availableBandwidth
Definition: AgoraBase.h:4383
agora::rtc::EncodedVideoFrameInfo::captureTimeMs
int64_t captureTimeMs
Definition: AgoraBase.h:1725
agora::rtc::EncodedVideoFrameInfo::framesPerSecond
int framesPerSecond
Definition: AgoraBase.h:1708
agora::rtc::LiveTranscoding::transcodingExtraInfo
const char * transcodingExtraInfo
Definition: AgoraBase.h:4027
agora::rtc::DownlinkNetworkInfo::PeerDownlinkInfo
Definition: AgoraBase.h:6174
agora::rtc::SimulcastConfig::StreamLayerConfig
Definition: AgoraBase.h:2196
agora::rtc::VideoTrackInfo::codecType
VIDEO_CODEC_TYPE codecType
Definition: AgoraBase.h:3358
agora::rtc::LiveTranscoding::metadata
const char * metadata
Definition: AgoraBase.h:4031
agora::rtc::LiveTranscoding::audioSampleRate
AUDIO_SAMPLE_RATE_TYPE audioSampleRate
Definition: AgoraBase.h:4059
agora::rtc::ChannelMediaRelayConfiguration
Definition: AgoraBase.h:6117
agora::rtc::VirtualBackgroundSource::blur_degree
BACKGROUND_BLUR_DEGREE blur_degree
Definition: AgoraBase.h:5153
agora::rtc::UserInfo::uid
uid_t uid
Definition: AgoraBase.h:6524
agora::rtc::DataStreamConfig::ordered
bool ordered
Definition: AgoraBase.h:2110
agora::rtc::LiveStreamAdvancedFeature
Definition: AgoraBase.h:3822
agora::rtc::VirtualBackgroundSource::color
unsigned int color
Definition: AgoraBase.h:5137
agora::rtc::LastmileProbeOneWayResult
Definition: AgoraBase.h:4371
agora::rtc::VideoDenoiserOptions
Definition: AgoraBase.h:5010
agora::rtc::WatermarkRatio::widthRatio
float widthRatio
Definition: AgoraBase.h:2272
agora::rtc::VideoDenoiserOptions::VIDEO_DENOISER_LEVEL_HIGH_QUALITY
@ VIDEO_DENOISER_LEVEL_HIGH_QUALITY
Definition: AgoraBase.h:5030
agora::rtc::VideoCanvas::cropArea
Rectangle cropArea
Definition: AgoraBase.h:4727
agora::rtc::AudioPcmDataInfo::samplesOut
size_t samplesOut
Definition: AgoraBase.h:1547
agora::rtc::VideoEncoderConfiguration::frameRate
int frameRate
Definition: AgoraBase.h:1933
agora::rtc::Rectangle::height
int height
Definition: AgoraBase.h:2237
agora::rtc::AudioPcmDataInfo::elapsedTimeMs
int64_t elapsedTimeMs
Definition: AgoraBase.h:1551
agora::rtc::WatermarkOptions::mode
WATERMARK_FIT_MODE mode
Definition: AgoraBase.h:2306
agora::rtc::MixedAudioStream::channelId
const char * channelId
Definition: AgoraBase.h:4265
agora::rtc::EncodedAudioFrameInfo::sampleRateHz
int sampleRateHz
Definition: AgoraBase.h:1501
agora::UserInfo
Definition: AgoraBase.h:820
agora::rtc::RtcStats::txPacketLossRate
int txPacketLossRate
Definition: AgoraBase.h:2473
agora::rtc::VirtualBackgroundSource
Definition: AgoraBase.h:5084
agora::rtc::WlAccStats::frozenRatioPercent
unsigned short frozenRatioPercent
Definition: AgoraBase.h:4606
agora::rtc::LowlightEnhanceOptions::level
LOW_LIGHT_ENHANCE_LEVEL level
Definition: AgoraBase.h:4997
agora::rtc::VideoCanvas::view
view_t view
Definition: AgoraBase.h:4686
agora::rtc::TranscodingVideoStream::imageUrl
const char * imageUrl
Definition: AgoraBase.h:4129
agora::rtc::ScreenCaptureParameters::audioParams
ScreenAudioParameters audioParams
Definition: AgoraBase.h:5603
agora::rtc::AudioEncodedFrameObserverConfig::postionType
AUDIO_ENCODED_FRAME_OBSERVER_POSITION postionType
Definition: AgoraBase.h:5895
agora::rtc::IPacketObserver::onSendAudioPacket
virtual bool onSendAudioPacket(Packet &packet)=0
agora::rtc::EncryptionConfig::encryptionKdfSalt
uint8_t encryptionKdfSalt[32]
Definition: AgoraBase.h:6347
agora::rtc::WlAccStats::lossRatePercent
unsigned short lossRatePercent
Definition: AgoraBase.h:4610
agora::rtc::ScreenCaptureParameters::captureAudio
bool captureAudio
Definition: AgoraBase.h:5599
agora::rtc::VirtualBackgroundSource::BACKGROUND_IMG
@ BACKGROUND_IMG
Definition: AgoraBase.h:5099
agora::rtc::LiveTranscoding::watermark
RtcImage * watermark
Definition: AgoraBase.h:4037
agora::rtc::AudioVolumeInfo::vad
unsigned int vad
Definition: AgoraBase.h:3429
agora::rtc::ChannelMediaInfo
Definition: AgoraBase.h:6098
agora::UserInfo::hasVideo
bool hasVideo
Definition: AgoraBase.h:836
agora::rtc::LowlightEnhanceOptions::LOW_LIGHT_ENHANCE_MANUAL
@ LOW_LIGHT_ENHANCE_MANUAL
Definition: AgoraBase.h:4972
agora::rtc::DownlinkNetworkInfo::total_downscale_level_count
int total_downscale_level_count
Definition: AgoraBase.h:6241
agora::VideoLayout::y
uint32_t y
Definition: AgoraBase.h:6955
agora::rtc::WlAccStats
Definition: AgoraBase.h:4598
agora::rtc::DownlinkNetworkInfo::bandwidth_estimation_bps
int bandwidth_estimation_bps
Definition: AgoraBase.h:6237
agora::rtc::LocalAudioStats::aecEstimatedDelay
int aecEstimatedDelay
Definition: AgoraBase.h:3619
agora::rtc::VideoCanvas::renderMode
media::base::RENDER_MODE_TYPE renderMode
Definition: AgoraBase.h:4695
agora::SpatialAudioParams::speaker_orientation
Optional< int > speaker_orientation
Definition: AgoraBase.h:6914
agora::rtc::LocalAudioStats::earMonitorDelay
int earMonitorDelay
Definition: AgoraBase.h:3615
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA
FACE_SHAPE_AREA
Definition: AgoraBase.h:4859
agora::rtc::VideoTrackInfo::sourceType
VIDEO_SOURCE_TYPE sourceType
Definition: AgoraBase.h:3368
agora::rtc::RtcStats::txKBitRate
unsigned short txKBitRate
Definition: AgoraBase.h:2350
agora::rtc::EncodedAudioFrameInfo::numberOfChannels
int numberOfChannels
Definition: AgoraBase.h:1511
agora::rtc::EncodedVideoFrameInfo::streamType
VIDEO_STREAM_TYPE streamType
Definition: AgoraBase.h:1733
agora::rtc::SimulcastConfig::STREAM_LAYER_6
@ STREAM_LAYER_6
Definition: AgoraBase.h:2186
agora::rtc::LocalAudioStats::audioPlayoutDelay
int audioPlayoutDelay
Definition: AgoraBase.h:3611
agora::SpatialAudioParams::speaker_attenuation
Optional< double > speaker_attenuation
Definition: AgoraBase.h:6926
agora::rtc::VideoTrackInfo::observationPosition
uint32_t observationPosition
Definition: AgoraBase.h:3372
agora::rtc::AdvanceOptions::encodeAlpha
bool encodeAlpha
Definition: AgoraBase.h:1796
agora::VideoLayout::strUid
user_id_t strUid
Definition: AgoraBase.h:6947
agora::rtc::LogUploadServerInfo
Definition: AgoraBase.h:6765
agora::rtc::VideoDenoiserOptions::VIDEO_DENOISER_LEVEL
VIDEO_DENOISER_LEVEL
Definition: AgoraBase.h:5023
agora::rtc::AudioTrackConfig::enableAudioProcessing
bool enableAudioProcessing
Definition: AgoraBase.h:5212
agora::rtc::VideoCanvas::sourceType
VIDEO_SOURCE_TYPE sourceType
Definition: AgoraBase.h:4715
agora::rtc::CodecCapInfo
Definition: AgoraBase.h:1898
agora::rtc::ScreenCaptureParameters::frameRate
int frameRate
Definition: AgoraBase.h:5624
agora::rtc::AudioRecordingConfiguration::recordingChannel
int recordingChannel
Definition: AgoraBase.h:5850
agora::rtc::RtcStats::firstVideoKeyFramePacketDurationAfterUnmute
int firstVideoKeyFramePacketDurationAfterUnmute
Definition: AgoraBase.h:2459
agora::rtc::LiveTranscoding::audioChannels
int audioChannels
Definition: AgoraBase.h:4072
agora::rtc::RtcImage::height
int height
Definition: AgoraBase.h:3798
agora::rtc::SimulcastStreamConfig::dimensions
VideoDimensions dimensions
Definition: AgoraBase.h:2138
agora::rtc::EncodedVideoFrameInfo::frameType
VIDEO_FRAME_TYPE frameType
Definition: AgoraBase.h:1712
agora::rtc::LastmileProbeConfig::probeDownlink
bool probeDownlink
Definition: AgoraBase.h:4334
agora::rtc::RtcStats::userCount
unsigned int userCount
Definition: AgoraBase.h:2378
agora::rtc::LocalTranscoderConfiguration::streamCount
unsigned int streamCount
Definition: AgoraBase.h:4193
agora::rtc::BeautyOptions::LIGHTENING_CONTRAST_HIGH
@ LIGHTENING_CONTRAST_HIGH
Definition: AgoraBase.h:4809
agora::base::LicenseCallback
Definition: AgoraBase.h:6884
agora::rtc::EncryptionConfig
Definition: AgoraBase.h:6327
agora::rtc::LiveTranscoding::videoCodecProfile
VIDEO_CODEC_PROFILE_TYPE videoCodecProfile
Definition: AgoraBase.h:4007
agora::rtc::SimulcastConfig::STREAM_LOW
@ STREAM_LOW
Definition: AgoraBase.h:2190
agora::rtc::VirtualBackgroundSource::BACKGROUND_SOURCE_TYPE
BACKGROUND_SOURCE_TYPE
Definition: AgoraBase.h:5087
agora::rtc::VideoRenderingTracingInfo::start2JoinChannel
int start2JoinChannel
Definition: AgoraBase.h:6703
agora::rtc::VideoCanvas::backgroundColor
uint32_t backgroundColor
Definition: AgoraBase.h:4690
agora::rtc::LocalAccessPointConfiguration::disableAut
bool disableAut
Definition: AgoraBase.h:6822
agora::rtc::ScreenAudioParameters::sampleRate
int sampleRate
Definition: AgoraBase.h:5566
agora::rtc::ScreenCaptureParameters::dimensions
VideoDimensions dimensions
Definition: AgoraBase.h:5618
agora::rtc::VideoDimensions::width
int width
Definition: AgoraBase.h:1104
agora::rtc::TranscodingVideoStream::x
int x
Definition: AgoraBase.h:4138
agora::rtc::LiveTranscoding::lowLatency
bool lowLatency
Definition: AgoraBase.h:3998
agora::rtc::TranscodingVideoStream
Definition: AgoraBase.h:4113
agora::rtc::VirtualBackgroundSource::source
const char * source
Definition: AgoraBase.h:5147
agora::rtc::LogUploadServerInfo::serverPath
const char * serverPath
Definition: AgoraBase.h:6771
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_EYESCALE
@ FACE_SHAPE_AREA_EYESCALE
Definition: AgoraBase.h:4879
agora::rtc::SimulcastConfig::STREAM_LAYER_5
@ STREAM_LAYER_5
Definition: AgoraBase.h:2182
agora::VideoLayout::videoState
uint32_t videoState
Definition: AgoraBase.h:6968
agora::rtc::MixedAudioStream::sourceType
AUDIO_SOURCE_TYPE sourceType
Definition: AgoraBase.h:4255
agora::rtc::RtcStats
Definition: AgoraBase.h:2318
agora::rtc::VideoSubscriptionOptions::encodedFrameOnly
Optional< bool > encodedFrameOnly
Definition: AgoraBase.h:1623
agora::rtc::IAudioEncodedFrameObserver::onRecordAudioEncodedFrame
virtual void onRecordAudioEncodedFrame(const uint8_t *frameBuffer, int length, const EncodedAudioFrameInfo &audioEncodedFrameInfo)=0
agora::rtc::VirtualBackgroundSource::BACKGROUND_VIDEO
@ BACKGROUND_VIDEO
Definition: AgoraBase.h:5107
agora::rtc::WatermarkOptions::visibleInPreview
bool visibleInPreview
Definition: AgoraBase.h:2287
agora::rtc::LowlightEnhanceOptions
Definition: AgoraBase.h:4962
agora::rtc::TranscodingUser::zOrder
int zOrder
Definition: AgoraBase.h:3929
agora::rtc::UplinkNetworkInfo::video_encoder_target_bitrate_bps
int video_encoder_target_bitrate_bps
Definition: AgoraBase.h:6164
agora::rtc::LiveTranscoding::width
int width
Definition: AgoraBase.h:3972
agora::rtc::AudioPcmDataInfo
Definition: AgoraBase.h:1525
agora::rtc::RtcStats::rxBytes
unsigned int rxBytes
Definition: AgoraBase.h:2330
agora::rtc::RtcStats::rxVideoKBitRate
unsigned short rxVideoKBitRate
Definition: AgoraBase.h:2366
agora::rtc::VideoDenoiserOptions::mode
VIDEO_DENOISER_MODE mode
Definition: AgoraBase.h:5042
agora::rtc::RtcStats::rxAudioKBitRate
unsigned short rxAudioKBitRate
Definition: AgoraBase.h:2358
agora::rtc::LocalAudioStats::numChannels
int numChannels
Definition: AgoraBase.h:3586
agora::rtc::VideoRenderingTracingInfo::remoteJoined2SetView
int remoteJoined2SetView
Definition: AgoraBase.h:6723
agora::rtc::SimulcastConfig::STREAM_LAYER_COUNT_MAX
@ STREAM_LAYER_COUNT_MAX
Definition: AgoraBase.h:2194
agora::rtc::WatermarkOptions
Definition: AgoraBase.h:2281
agora::rtc::VideoEncoderConfiguration::mirrorMode
VIDEO_MIRROR_MODE_TYPE mirrorMode
Definition: AgoraBase.h:2023
agora::rtc::LocalAudioStats
Definition: AgoraBase.h:3582
agora::rtc::RecorderStreamInfo
Definition: AgoraBase.h:6841
agora::rtc::LogUploadServerInfo::serverPort
int serverPort
Definition: AgoraBase.h:6774
agora::rtc::SimulcastConfig
Definition: AgoraBase.h:2158
agora::rtc::ScreenCaptureParameters::captureMouseCursor
bool captureMouseCursor
Definition: AgoraBase.h:5635
agora::rtc::DownlinkNetworkInfo::total_received_video_count
int total_received_video_count
Definition: AgoraBase.h:6249
agora::rtc::MixedAudioStream::remoteUserUid
uid_t remoteUserUid
Definition: AgoraBase.h:4260
agora::rtc::RtcImage::y
int y
Definition: AgoraBase.h:3790
agora::rtc::FocalLengthInfo::focalLengthType
CAMERA_FOCAL_LENGTH_TYPE focalLengthType
Definition: AgoraBase.h:1915
agora::rtc::EncodedAudioFrameAdvancedSettings
Definition: AgoraBase.h:1459
agora::rtc::RtcStats::memoryAppUsageRatio
double memoryAppUsageRatio
Definition: AgoraBase.h:2409
agora::rtc::RtcStats::gatewayRtt
int gatewayRtt
Definition: AgoraBase.h:2404
agora::rtc::LastmileProbeConfig::expectedUplinkBitrate
unsigned int expectedUplinkBitrate
Definition: AgoraBase.h:4340
agora::rtc::VideoTrackInfo::isLocal
bool isLocal
Definition: AgoraBase.h:3342
agora::rtc::DownlinkNetworkInfo::PeerDownlinkInfo::expected_bitrate_bps
int expected_bitrate_bps
Definition: AgoraBase.h:6190
agora::rtc::IAudioEncodedFrameObserver::onPlaybackAudioEncodedFrame
virtual void onPlaybackAudioEncodedFrame(const uint8_t *frameBuffer, int length, const EncodedAudioFrameInfo &audioEncodedFrameInfo)=0
agora::rtc::AdvanceOptions::encodingPreference
ENCODING_PREFERENCE encodingPreference
Definition: AgoraBase.h:1785
agora::rtc::VideoTrackInfo::channelId
const char * channelId
Definition: AgoraBase.h:3354
agora::rtc::IAudioEncodedFrameObserver::onMixedAudioEncodedFrame
virtual void onMixedAudioEncodedFrame(const uint8_t *frameBuffer, int length, const EncodedAudioFrameInfo &audioEncodedFrameInfo)=0
agora::rtc::LowlightEnhanceOptions::LOW_LIGHT_ENHANCE_LEVEL_FAST
@ LOW_LIGHT_ENHANCE_LEVEL_FAST
Definition: AgoraBase.h:4988
agora::rtc::RtcStats::firstVideoKeyFramePacketDuration
int firstVideoKeyFramePacketDuration
Definition: AgoraBase.h:2439
agora::rtc::CodecCapInfo::codecLevels
CodecCapLevels codecLevels
Definition: AgoraBase.h:1904
agora::rtc::LiveTranscoding::advancedFeatureCount
unsigned int advancedFeatureCount
Definition: AgoraBase.h:4082
agora::rtc::CodecCapInfo::codecCapMask
int codecCapMask
Definition: AgoraBase.h:1902
agora::rtc::AudioRecordingConfiguration
Definition: AgoraBase.h:5811
agora::SpatialAudioParams::speaker_azimuth
Optional< double > speaker_azimuth
Definition: AgoraBase.h:6902
agora::rtc::LowlightEnhanceOptions::LOW_LIGHT_ENHANCE_MODE
LOW_LIGHT_ENHANCE_MODE
Definition: AgoraBase.h:4966
agora::util::IContainer
Definition: AgoraBase.h:193
agora::rtc::VirtualBackgroundSource::BLUR_DEGREE_HIGH
@ BLUR_DEGREE_HIGH
Definition: AgoraBase.h:5121
agora::rtc::LocalAudioMixerConfiguration::syncWithLocalMic
bool syncWithLocalMic
Definition: AgoraBase.h:4313
agora::rtc::VideoDimensions
Definition: AgoraBase.h:1100
agora::rtc::VirtualBackgroundSource::BLUR_DEGREE_LOW
@ BLUR_DEGREE_LOW
Definition: AgoraBase.h:5115
agora::rtc::VideoRenderingTracingInfo::joinSuccess2RemoteJoined
int joinSuccess2RemoteJoined
Definition: AgoraBase.h:6715
agora::rtc::FaceShapeAreaOptions::shapeIntensity
int shapeIntensity
Definition: AgoraBase.h:4897
agora::rtc::TranscodingVideoStream::height
int height
Definition: AgoraBase.h:4151
agora::rtc::DataStreamConfig::syncWithAudio
bool syncWithAudio
Definition: AgoraBase.h:2101
agora::rtc::LowlightEnhanceOptions::mode
LOW_LIGHT_ENHANCE_MODE mode
Definition: AgoraBase.h:4993
agora::rtc::LiveTranscoding::userCount
unsigned int userCount
Definition: AgoraBase.h:4017
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_FOREHEAD
@ FACE_SHAPE_AREA_FOREHEAD
Definition: AgoraBase.h:4865
agora::util::CopyableAutoPtr
Definition: AgoraBase.h:156
agora::rtc::CodecCapInfo::codecType
VIDEO_CODEC_TYPE codecType
Definition: AgoraBase.h:1900
agora::rtc::AudioTrackConfig
Definition: AgoraBase.h:5200
agora::rtc::FocalLengthInfo::cameraDirection
int cameraDirection
Definition: AgoraBase.h:1913
agora::rtc::LocalAccessPointConfiguration::ipListSize
int ipListSize
Definition: AgoraBase.h:6799
agora::rtc::SimulcastConfig::STREAM_LAYER_4
@ STREAM_LAYER_4
Definition: AgoraBase.h:2178
agora::rtc::TranscodingVideoStream::width
int width
Definition: AgoraBase.h:4147
agora::rtc::TranscodingVideoStream::mirror
bool mirror
Definition: AgoraBase.h:4171
agora::rtc::SimulcastStreamConfig::kBitrate
int kBitrate
Definition: AgoraBase.h:2143
agora::rtc::RtcImage::alpha
double alpha
Definition: AgoraBase.h:3812
agora::rtc::TranscodingVideoStream::mediaPlayerId
int mediaPlayerId
Definition: AgoraBase.h:4133
agora::rtc::VideoCanvas::subviewUid
uid_t subviewUid
Definition: AgoraBase.h:4682
agora::rtc::EncryptionConfig::encryptionKey
const char * encryptionKey
Definition: AgoraBase.h:6339
agora::rtc::EncodedVideoFrameInfo::trackId
int trackId
Definition: AgoraBase.h:1720
agora::rtc::VirtualBackgroundSource::BLUR_DEGREE_MEDIUM
@ BLUR_DEGREE_MEDIUM
Definition: AgoraBase.h:5118
agora::rtc::ScreenCaptureParameters::excludeWindowList
view_t * excludeWindowList
Definition: AgoraBase.h:5649
agora::rtc::LocalAccessPointConfiguration::domainList
const char ** domainList
Definition: AgoraBase.h:6802
agora::rtc::SimulcastConfig::STREAM_LAYER_3
@ STREAM_LAYER_3
Definition: AgoraBase.h:2174
agora::rtc::IPacketObserver::onSendVideoPacket
virtual bool onSendVideoPacket(Packet &packet)=0
agora::rtc::AudioPcmDataInfo::samplesPerChannel
size_t samplesPerChannel
Definition: AgoraBase.h:1539
agora::rtc::VideoTrackInfo
Definition: AgoraBase.h:3327
agora::rtc::LocalTranscoderConfiguration::videoOutputConfiguration
VideoEncoderConfiguration videoOutputConfiguration
Definition: AgoraBase.h:4202
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_HEADSCALE
@ FACE_SHAPE_AREA_HEADSCALE
Definition: AgoraBase.h:4863
agora::rtc::SenderOptions::ccMode
TCcMode ccMode
Definition: AgoraBase.h:1258
agora::rtc::SimulcastConfig::StreamLayerConfig::dimensions
VideoDimensions dimensions
Definition: AgoraBase.h:2200
agora::rtc::VirtualBackgroundSource::BACKGROUND_COLOR
@ BACKGROUND_COLOR
Definition: AgoraBase.h:5095
agora::rtc::AudioPcmDataInfo::ntpTimeMs
int64_t ntpTimeMs
Definition: AgoraBase.h:1555
agora::rtc::LowlightEnhanceOptions::LOW_LIGHT_ENHANCE_AUTO
@ LOW_LIGHT_ENHANCE_AUTO
Definition: AgoraBase.h:4970
agora::rtc::RtcStats::firstVideoPacketDurationAfterUnmute
int firstVideoPacketDurationAfterUnmute
Definition: AgoraBase.h:2454
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_NONE
@ FACE_SHAPE_AREA_NONE
Definition: AgoraBase.h:4861
agora::rtc::LiveTranscoding::videoFramerate
int videoFramerate
Definition: AgoraBase.h:3991
agora::rtc::RtcStats::rxPacketLossRate
int rxPacketLossRate
Definition: AgoraBase.h:2477
agora::rtc::RtcStats::lastmileDelay
unsigned short lastmileDelay
Definition: AgoraBase.h:2374
agora::rtc::FaceShapeAreaOptions
Definition: AgoraBase.h:4856
agora::rtc::CodecCapLevels
Definition: AgoraBase.h:1888
agora::SpatialAudioParams
Definition: AgoraBase.h:6898
agora::rtc::ColorEnhanceOptions::skinProtectLevel
float skinProtectLevel
Definition: AgoraBase.h:5073
agora::rtc::VideoDenoiserOptions::VIDEO_DENOISER_LEVEL_FAST
@ VIDEO_DENOISER_LEVEL_FAST
Definition: AgoraBase.h:5038
agora::rtc::VideoEncoderConfiguration::codecType
VIDEO_CODEC_TYPE codecType
Definition: AgoraBase.h:1925
agora::rtc::LastmileProbeResult::rtt
unsigned int rtt
Definition: AgoraBase.h:4407
agora::rtc::TranscodingVideoStream::y
int y
Definition: AgoraBase.h:4143
agora::rtc::RtcStats::packetsBeforeFirstKeyFramePacket
int packetsBeforeFirstKeyFramePacket
Definition: AgoraBase.h:2444
agora::rtc::BeautyOptions::LIGHTENING_CONTRAST_NORMAL
@ LIGHTENING_CONTRAST_NORMAL
Definition: AgoraBase.h:4807
agora::rtc::ChannelMediaRelayConfiguration::srcInfo
ChannelMediaInfo * srcInfo
Definition: AgoraBase.h:6130
agora::rtc::VideoEncoderConfiguration::orientationMode
ORIENTATION_MODE orientationMode
Definition: AgoraBase.h:2012
agora::rtc::WlAccStats::e2eDelayPercent
unsigned short e2eDelayPercent
Definition: AgoraBase.h:4602
agora::rtc::LiveStreamAdvancedFeature::opened
bool opened
Definition: AgoraBase.h:3842
agora::rtc::FocalLengthInfo
Definition: AgoraBase.h:1911
agora::rtc::DeviceInfo
Definition: AgoraBase.h:3443
agora::base::IEngineBase
Definition: AgoraBase.h:6864
agora::rtc::SenderOptions::targetBitrate
int targetBitrate
Definition: AgoraBase.h:1324
agora::rtc::AudioRecordingConfiguration::quality
AUDIO_RECORDING_QUALITY_TYPE quality
Definition: AgoraBase.h:5843
agora::util::IIterator
Definition: AgoraBase.h:184
agora::rtc::UserInfo::userAccount
char userAccount[MAX_USER_ACCOUNT_LENGTH]
Definition: AgoraBase.h:6528
agora::rtc::VideoRenderingTracingInfo
Definition: AgoraBase.h:6692
agora::rtc::LogUploadServerInfo::serverHttps
bool serverHttps
Definition: AgoraBase.h:6779
agora::rtc::VideoDenoiserOptions::VIDEO_DENOISER_MANUAL
@ VIDEO_DENOISER_MANUAL
Definition: AgoraBase.h:5018
agora::rtc::EncodedAudioFrameInfo::samplesPerChannel
int samplesPerChannel
Definition: AgoraBase.h:1507
agora::rtc::EncodedVideoFrameInfo::height
int height
Definition: AgoraBase.h:1702
agora::rtc::RtcStats::memoryAppUsageInKbytes
int memoryAppUsageInKbytes
Definition: AgoraBase.h:2419
agora::rtc::FaceShapeBeautyOptions::styleIntensity
int styleIntensity
Definition: AgoraBase.h:4924
agora::VideoLayout::uid
rtc::uid_t uid
Definition: AgoraBase.h:6943
agora::Optional< VIDEO_STREAM_TYPE >
agora::rtc::LocalAccessPointConfiguration::domainListSize
int domainListSize
Definition: AgoraBase.h:6805
agora::rtc::ClientRoleOptions
Definition: AgoraBase.h:2565
agora::rtc::TranscodingUser::height
int height
Definition: AgoraBase.h:3921
agora::rtc::IPacketObserver::onReceiveAudioPacket
virtual bool onReceiveAudioPacket(Packet &packet)=0
agora::rtc::VideoCanvas
Definition: AgoraBase.h:4672
agora::rtc::LocalAudioStats::internalCodec
int internalCodec
Definition: AgoraBase.h:3598
agora::rtc::AudioRecordingConfiguration::fileRecordingType
AUDIO_FILE_RECORDING_TYPE fileRecordingType
Definition: AgoraBase.h:5838
agora::rtc::SegmentationProperty
Definition: AgoraBase.h:5162
agora::rtc::SimulcastConfig::StreamLayerConfig::enable
bool enable
Definition: AgoraBase.h:2208
agora::rtc::ChannelMediaInfo::uid
uid_t uid
Definition: AgoraBase.h:6101