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
4857 struct FaceShapeAreaOptions {
4863 enum FACE_SHAPE_AREA {
4865 FACE_SHAPE_AREA_NONE = -1,
4871 FACE_SHAPE_AREA_HEADSCALE = 100,
4877 FACE_SHAPE_AREA_FOREHEAD = 101,
4883 FACE_SHAPE_AREA_FACECONTOUR = 102,
4889 FACE_SHAPE_AREA_FACELENGTH = 103,
4895 FACE_SHAPE_AREA_FACEWIDTH = 104,
4901 FACE_SHAPE_AREA_CHEEKBONE = 105,
4907 FACE_SHAPE_AREA_CHEEK = 106,
4914 FACE_SHAPE_AREA_MANDIBLE = 107,
4920 FACE_SHAPE_AREA_CHIN = 108,
4926 FACE_SHAPE_AREA_EYESCALE = 200,
4933 FACE_SHAPE_AREA_EYEDISTANCE = 201,
4940 FACE_SHAPE_AREA_EYEPOSITION = 202,
4947 FACE_SHAPE_AREA_LOWEREYELID = 203,
4954 FACE_SHAPE_AREA_EYEPUPILS = 204,
4961 FACE_SHAPE_AREA_EYEINNERCORNER = 205,
4968 FACE_SHAPE_AREA_EYEOUTERCORNER = 206,
4973 FACE_SHAPE_AREA_NOSELENGTH = 300,
4980 FACE_SHAPE_AREA_NOSEWIDTH = 301,
4987 FACE_SHAPE_AREA_NOSEWING = 302,
4994 FACE_SHAPE_AREA_NOSEROOT = 303,
5001 FACE_SHAPE_AREA_NOSEBRIDGE = 304,
5008 FACE_SHAPE_AREA_NOSETIP = 305,
5015 FACE_SHAPE_AREA_NOSEGENERAL = 306,
5022 FACE_SHAPE_AREA_MOUTHSCALE = 400,
5029 FACE_SHAPE_AREA_MOUTHPOSITION = 401,
5036 FACE_SHAPE_AREA_MOUTHSMILE = 402,
5043 FACE_SHAPE_AREA_MOUTHLIP = 403,
5050 FACE_SHAPE_AREA_EYEBROWPOSITION = 500,
5057 FACE_SHAPE_AREA_EYEBROWTHICKNESS = 501,
5058 };
5059
5062 FACE_SHAPE_AREA shapeArea;
5063
5067 int shapeIntensity;
5068
5069 FaceShapeAreaOptions(FACE_SHAPE_AREA shapeArea, int areaIntensity) : shapeArea(shapeArea), shapeIntensity(areaIntensity) {}
5070
5071 FaceShapeAreaOptions() : shapeArea(FACE_SHAPE_AREA_NONE), shapeIntensity(0) {}
5072 };
5073
5078 struct FaceShapeBeautyOptions {
5084 enum FACE_SHAPE_BEAUTY_STYLE {
5088 FACE_SHAPE_BEAUTY_STYLE_FEMALE = 0,
5092 FACE_SHAPE_BEAUTY_STYLE_MALE = 1,
5097 FACE_SHAPE_BEAUTY_STYLE_NATURAL = 2,
5098 };
5099
5102 FACE_SHAPE_BEAUTY_STYLE shapeStyle;
5103
5106 int styleIntensity;
5107
5108 FaceShapeBeautyOptions(FACE_SHAPE_BEAUTY_STYLE shapeStyle, int styleIntensity) : shapeStyle(shapeStyle), styleIntensity(styleIntensity) {}
5109
5110 FaceShapeBeautyOptions() : shapeStyle(FACE_SHAPE_BEAUTY_STYLE_FEMALE), styleIntensity(50) {}
5111 };
5112
5117 struct FilterEffectOptions {
5132 const char * path;
5133
5137 float strength;
5138
5139 FilterEffectOptions(const char * lut3dPath, float filterStrength) : path(lut3dPath), strength(filterStrength) {}
5140
5141 FilterEffectOptions() : path(OPTIONAL_NULLPTR), strength(0.5) {}
5142 };
5143
5144 struct LowlightEnhanceOptions {
5148 enum LOW_LIGHT_ENHANCE_MODE {
5152 LOW_LIGHT_ENHANCE_AUTO = 0,
5154 LOW_LIGHT_ENHANCE_MANUAL = 1,
5155 };
5159 enum LOW_LIGHT_ENHANCE_LEVEL {
5165 LOW_LIGHT_ENHANCE_LEVEL_HIGH_QUALITY = 0,
5170 LOW_LIGHT_ENHANCE_LEVEL_FAST = 1,
5171 };
5172
5175 LOW_LIGHT_ENHANCE_MODE mode;
5176
5179 LOW_LIGHT_ENHANCE_LEVEL level;
5180
5181 LowlightEnhanceOptions(LOW_LIGHT_ENHANCE_MODE lowlightMode, LOW_LIGHT_ENHANCE_LEVEL lowlightLevel)
5182 : mode(lowlightMode), level(lowlightLevel) {}
5183
5184 LowlightEnhanceOptions()
5185 : mode(LOW_LIGHT_ENHANCE_AUTO), level(LOW_LIGHT_ENHANCE_LEVEL_HIGH_QUALITY) {}
5186 };
5192 struct VideoDenoiserOptions {
5195 enum VIDEO_DENOISER_MODE {
5198 VIDEO_DENOISER_AUTO = 0,
5200 VIDEO_DENOISER_MANUAL = 1,
5201 };
5205 enum VIDEO_DENOISER_LEVEL {
5212 VIDEO_DENOISER_LEVEL_HIGH_QUALITY = 0,
5220 VIDEO_DENOISER_LEVEL_FAST = 1,
5221 };
5224 VIDEO_DENOISER_MODE mode;
5225
5228 VIDEO_DENOISER_LEVEL level;
5229
5230 VideoDenoiserOptions(VIDEO_DENOISER_MODE denoiserMode, VIDEO_DENOISER_LEVEL denoiserLevel)
5231 : mode(denoiserMode), level(denoiserLevel) {}
5232
5233 VideoDenoiserOptions() : mode(VIDEO_DENOISER_AUTO), level(VIDEO_DENOISER_LEVEL_HIGH_QUALITY) {}
5234 };
5235
5240 struct ColorEnhanceOptions {
5245 float strengthLevel;
5246
5255 float skinProtectLevel;
5256
5257 ColorEnhanceOptions(float stength, float skinProtect)
5258 : strengthLevel(stength), skinProtectLevel(skinProtect) {}
5259
5260 ColorEnhanceOptions() : strengthLevel(0), skinProtectLevel(1) {}
5261 };
5262
5266 struct VirtualBackgroundSource {
5269 enum BACKGROUND_SOURCE_TYPE {
5273 BACKGROUND_NONE = 0,
5277 BACKGROUND_COLOR = 1,
5281 BACKGROUND_IMG = 2,
5285 BACKGROUND_BLUR = 3,
5289 BACKGROUND_VIDEO = 4,
5290 };
5291
5294 enum BACKGROUND_BLUR_DEGREE {
5297 BLUR_DEGREE_LOW = 1,
5300 BLUR_DEGREE_MEDIUM = 2,
5303 BLUR_DEGREE_HIGH = 3,
5304 };
5305
5308 BACKGROUND_SOURCE_TYPE background_source_type;
5309
5319 unsigned int color;
5320
5329 const char* source;
5330
5335 BACKGROUND_BLUR_DEGREE blur_degree;
5336
5337 VirtualBackgroundSource()
5338 : background_source_type(BACKGROUND_COLOR),
5339 color(0xffffff),
5340 source(OPTIONAL_NULLPTR),
5341 blur_degree(BLUR_DEGREE_HIGH) {}
5342 };
5343
5344 struct SegmentationProperty {
5345 enum SEG_MODEL_TYPE {
5346
5347 SEG_MODEL_AI = 1,
5348 SEG_MODEL_GREEN = 2
5349 };
5350
5351 SEG_MODEL_TYPE modelType;
5352
5353 float greenCapacity;
5354
5355 SegmentationProperty() : modelType(SEG_MODEL_AI), greenCapacity(0.5) {}
5356 };
5357
5360 enum AUDIO_TRACK_TYPE {
5364 AUDIO_TRACK_INVALID = -1,
5371 AUDIO_TRACK_MIXABLE = 0,
5377 AUDIO_TRACK_DIRECT = 1,
5378 };
5379
5382 struct AudioTrackConfig {
5388 bool enableLocalPlayback;
5394 bool enableAudioProcessing;
5395
5396 AudioTrackConfig() : enableLocalPlayback(true),enableAudioProcessing(false) {}
5397 };
5398
5419 enum VOICE_BEAUTIFIER_PRESET {
5422 VOICE_BEAUTIFIER_OFF = 0x00000000,
5428 CHAT_BEAUTIFIER_MAGNETIC = 0x01010100,
5434 CHAT_BEAUTIFIER_FRESH = 0x01010200,
5440 CHAT_BEAUTIFIER_VITALITY = 0x01010300,
5450 SINGING_BEAUTIFIER = 0x01020100,
5453 TIMBRE_TRANSFORMATION_VIGOROUS = 0x01030100,
5456 TIMBRE_TRANSFORMATION_DEEP = 0x01030200,
5459 TIMBRE_TRANSFORMATION_MELLOW = 0x01030300,
5462 TIMBRE_TRANSFORMATION_FALSETTO = 0x01030400,
5465 TIMBRE_TRANSFORMATION_FULL = 0x01030500,
5468 TIMBRE_TRANSFORMATION_CLEAR = 0x01030600,
5471 TIMBRE_TRANSFORMATION_RESOUNDING = 0x01030700,
5474 TIMBRE_TRANSFORMATION_RINGING = 0x01030800,
5485 ULTRA_HIGH_QUALITY_VOICE = 0x01040100
5486 };
5487
5510 enum AUDIO_EFFECT_PRESET {
5513 AUDIO_EFFECT_OFF = 0x00000000,
5516 ROOM_ACOUSTICS_KTV = 0x02010100,
5519 ROOM_ACOUSTICS_VOCAL_CONCERT = 0x02010200,
5522 ROOM_ACOUSTICS_STUDIO = 0x02010300,
5525 ROOM_ACOUSTICS_PHONOGRAPH = 0x02010400,
5532 ROOM_ACOUSTICS_VIRTUAL_STEREO = 0x02010500,
5535 ROOM_ACOUSTICS_SPACIAL = 0x02010600,
5538 ROOM_ACOUSTICS_ETHEREAL = 0x02010700,
5550 ROOM_ACOUSTICS_3D_VOICE = 0x02010800,
5561 ROOM_ACOUSTICS_VIRTUAL_SURROUND_SOUND = 0x02010900,
5569 ROOM_ACOUSTICS_CHORUS = 0x02010D00,
5576 VOICE_CHANGER_EFFECT_UNCLE = 0x02020100,
5582 VOICE_CHANGER_EFFECT_OLDMAN = 0x02020200,
5588 VOICE_CHANGER_EFFECT_BOY = 0x02020300,
5595 VOICE_CHANGER_EFFECT_SISTER = 0x02020400,
5601 VOICE_CHANGER_EFFECT_GIRL = 0x02020500,
5605 VOICE_CHANGER_EFFECT_PIGKING = 0x02020600,
5608 VOICE_CHANGER_EFFECT_HULK = 0x02020700,
5615 STYLE_TRANSFORMATION_RNB = 0x02030100,
5622 STYLE_TRANSFORMATION_POPULAR = 0x02030200,
5627 PITCH_CORRECTION = 0x02040100,
5628
5632 };
5633
5636 enum VOICE_CONVERSION_PRESET {
5639 VOICE_CONVERSION_OFF = 0x00000000,
5643 VOICE_CHANGER_NEUTRAL = 0x03010100,
5647 VOICE_CHANGER_SWEET = 0x03010200,
5651 VOICE_CHANGER_SOLID = 0x03010300,
5655 VOICE_CHANGER_BASS = 0x03010400,
5658 VOICE_CHANGER_CARTOON = 0x03010500,
5661 VOICE_CHANGER_CHILDLIKE = 0x03010600,
5664 VOICE_CHANGER_PHONE_OPERATOR = 0x03010700,
5667 VOICE_CHANGER_MONSTER = 0x03010800,
5670 VOICE_CHANGER_TRANSFORMERS = 0x03010900,
5673 VOICE_CHANGER_GROOT = 0x03010A00,
5676 VOICE_CHANGER_DARTH_VADER = 0x03010B00,
5679 VOICE_CHANGER_IRON_LADY = 0x03010C00,
5682 VOICE_CHANGER_SHIN_CHAN = 0x03010D00,
5685 VOICE_CHANGER_GIRLISH_MAN = 0x03010E00,
5688 VOICE_CHANGER_CHIPMUNK = 0x03010F00,
5689
5690 };
5691
5694 enum HEADPHONE_EQUALIZER_PRESET {
5697 HEADPHONE_EQUALIZER_OFF = 0x00000000,
5700 HEADPHONE_EQUALIZER_OVEREAR = 0x04000001,
5703 HEADPHONE_EQUALIZER_INEAR = 0x04000002
5704 };
5705
5708 enum VOICE_AI_TUNER_TYPE {
5711 VOICE_AI_TUNER_MATURE_MALE,
5714 VOICE_AI_TUNER_FRESH_MALE,
5717 VOICE_AI_TUNER_ELEGANT_FEMALE,
5720 VOICE_AI_TUNER_SWEET_FEMALE,
5723 VOICE_AI_TUNER_WARM_MALE_SINGING,
5726 VOICE_AI_TUNER_GENTLE_FEMALE_SINGING,
5729 VOICE_AI_TUNER_HUSKY_MALE_SINGING,
5732 VOICE_AI_TUNER_WARM_ELEGANT_FEMALE_SINGING,
5735 VOICE_AI_TUNER_POWERFUL_MALE_SINGING,
5738 VOICE_AI_TUNER_DREAMY_FEMALE_SINGING,
5739 };
5740
5744 struct ScreenAudioParameters {
5748 int sampleRate;
5752 int channels;
5757 int captureSignalVolume;
5758
5759 #if defined(__APPLE__) && !TARGET_OS_IOS
5760 bool excludeCurrentProcessAudio = true;
5761 ScreenAudioParameters(): sampleRate(48000), channels(2), captureSignalVolume(100) {}
5762 #else
5763 ScreenAudioParameters(): sampleRate(16000), channels(2), captureSignalVolume(100) {}
5764 #endif
5765 };
5766
5770 struct ScreenCaptureParameters {
5771
5781 bool captureAudio;
5785 ScreenAudioParameters audioParams;
5786
5800 VideoDimensions dimensions;
5806 int frameRate;
5812 int bitrate;
5817 bool captureMouseCursor;
5824 bool windowFocus;
5831 view_t* excludeWindowList;
5835 int excludeWindowCount;
5836
5840 int highLightWidth;
5844 unsigned int highLightColor;
5853 bool enableHighLight;
5854
5855 ScreenCaptureParameters()
5856 : captureAudio(false),
5857 dimensions(1920, 1080),
5858 frameRate(5),
5859 bitrate(STANDARD_BITRATE),
5860 captureMouseCursor(true),
5861 windowFocus(false),
5862 excludeWindowList(OPTIONAL_NULLPTR),
5863 excludeWindowCount(0),
5864 highLightWidth(0),
5865 highLightColor(0),
5866 enableHighLight(false) {}
5867 ScreenCaptureParameters(const VideoDimensions& d, int f, int b)
5868 : captureAudio(false),dimensions(d),
5869 frameRate(f),
5870 bitrate(b),
5871 captureMouseCursor(true),
5872 windowFocus(false),
5873 excludeWindowList(OPTIONAL_NULLPTR),
5874 excludeWindowCount(0),
5875 highLightWidth(0),
5876 highLightColor(0),
5877 enableHighLight(false) {}
5878 ScreenCaptureParameters(int width, int height, int f, int b)
5879 : captureAudio(false),
5880 dimensions(width, height),
5881 frameRate(f),
5882 bitrate(b),
5883 captureMouseCursor(true),
5884 windowFocus(false),
5885 excludeWindowList(OPTIONAL_NULLPTR),
5886 excludeWindowCount(0),
5887 highLightWidth(0),
5888 highLightColor(0),
5889 enableHighLight(false) {}
5890 ScreenCaptureParameters(int width, int height, int f, int b, bool cur, bool fcs)
5891 : captureAudio(false),
5892 dimensions(width, height),
5893 frameRate(f),
5894 bitrate(b),
5895 captureMouseCursor(cur),
5896 windowFocus(fcs),
5897 excludeWindowList(OPTIONAL_NULLPTR),
5898 excludeWindowCount(0),
5899 highLightWidth(0),
5900 highLightColor(0),
5901 enableHighLight(false) {}
5902 ScreenCaptureParameters(int width, int height, int f, int b, view_t* ex, int cnt)
5903 : captureAudio(false),
5904 dimensions(width, height),
5905 frameRate(f),
5906 bitrate(b),
5907 captureMouseCursor(true),
5908 windowFocus(false),
5909 excludeWindowList(ex),
5910 excludeWindowCount(cnt),
5911 highLightWidth(0),
5912 highLightColor(0),
5913 enableHighLight(false) {}
5914 ScreenCaptureParameters(int width, int height, int f, int b, bool cur, bool fcs, view_t* ex,
5915 int cnt)
5916 : captureAudio(false),
5917 dimensions(width, height),
5918 frameRate(f),
5919 bitrate(b),
5920 captureMouseCursor(cur),
5921 windowFocus(fcs),
5922 excludeWindowList(ex),
5923 excludeWindowCount(cnt),
5924 highLightWidth(0),
5925 highLightColor(0),
5926 enableHighLight(false) {}
5927 };
5928
5932 enum AUDIO_RECORDING_QUALITY_TYPE {
5937 AUDIO_RECORDING_QUALITY_LOW = 0,
5942 AUDIO_RECORDING_QUALITY_MEDIUM = 1,
5947 AUDIO_RECORDING_QUALITY_HIGH = 2,
5951 AUDIO_RECORDING_QUALITY_ULTRA_HIGH = 3,
5952 };
5953
5957 enum AUDIO_FILE_RECORDING_TYPE {
5961 AUDIO_FILE_RECORDING_MIC = 1,
5965 AUDIO_FILE_RECORDING_PLAYBACK = 2,
5969 AUDIO_FILE_RECORDING_MIXED = 3,
5970 };
5971
5975 enum AUDIO_ENCODED_FRAME_OBSERVER_POSITION {
5979 AUDIO_ENCODED_FRAME_OBSERVER_POSITION_RECORD = 1,
5983 AUDIO_ENCODED_FRAME_OBSERVER_POSITION_PLAYBACK = 2,
5987 AUDIO_ENCODED_FRAME_OBSERVER_POSITION_MIXED = 3,
5988 };
5989
5993 struct AudioRecordingConfiguration {
5999 const char* filePath;
6005 bool encode;
6016 int sampleRate;
6020 AUDIO_FILE_RECORDING_TYPE fileRecordingType;
6025 AUDIO_RECORDING_QUALITY_TYPE quality;
6026
6032 int recordingChannel;
6033
6034 AudioRecordingConfiguration()
6035 : filePath(OPTIONAL_NULLPTR),
6036 encode(false),
6037 sampleRate(32000),
6038 fileRecordingType(AUDIO_FILE_RECORDING_MIXED),
6039 quality(AUDIO_RECORDING_QUALITY_LOW),
6040 recordingChannel(1) {}
6041
6042 AudioRecordingConfiguration(const char* file_path, int sample_rate,
6043 AUDIO_RECORDING_QUALITY_TYPE quality_type, int channel)
6044 : filePath(file_path),
6045 encode(false),
6046 sampleRate(sample_rate),
6047 fileRecordingType(AUDIO_FILE_RECORDING_MIXED),
6048 quality(quality_type),
6049 recordingChannel(channel) {}
6050
6051 AudioRecordingConfiguration(const char* file_path, bool enc, int sample_rate,
6052 AUDIO_FILE_RECORDING_TYPE type,
6053 AUDIO_RECORDING_QUALITY_TYPE quality_type, int channel)
6054 : filePath(file_path),
6055 encode(enc),
6056 sampleRate(sample_rate),
6057 fileRecordingType(type),
6058 quality(quality_type),
6059 recordingChannel(channel) {}
6060
6061 AudioRecordingConfiguration(const AudioRecordingConfiguration& rhs)
6062 : filePath(rhs.filePath),
6063 encode(rhs.encode),
6064 sampleRate(rhs.sampleRate),
6065 fileRecordingType(rhs.fileRecordingType),
6066 quality(rhs.quality),
6067 recordingChannel(rhs.recordingChannel) {}
6068 };
6069
6073 struct AudioEncodedFrameObserverConfig {
6077 AUDIO_ENCODED_FRAME_OBSERVER_POSITION postionType;
6081 AUDIO_ENCODING_TYPE encodingType;
6082
6083 AudioEncodedFrameObserverConfig()
6084 : postionType(AUDIO_ENCODED_FRAME_OBSERVER_POSITION_PLAYBACK),
6085 encodingType(AUDIO_ENCODING_TYPE_OPUS_48000_MEDIUM) {}
6086 };
6090 class IAudioEncodedFrameObserver {
6091 public:
6104 virtual void onRecordAudioEncodedFrame(const uint8_t* frameBuffer, int length,
6105 const EncodedAudioFrameInfo& audioEncodedFrameInfo) = 0;
6106
6119 virtual void onPlaybackAudioEncodedFrame(const uint8_t* frameBuffer, int length,
6120 const EncodedAudioFrameInfo& audioEncodedFrameInfo) = 0;
6121
6134 virtual void onMixedAudioEncodedFrame(const uint8_t* frameBuffer, int length,
6135 const EncodedAudioFrameInfo& audioEncodedFrameInfo) = 0;
6136
6137 virtual ~IAudioEncodedFrameObserver() {}
6138 };
6139
6142 enum AREA_CODE {
6146 AREA_CODE_CN = 0x00000001,
6150 AREA_CODE_NA = 0x00000002,
6154 AREA_CODE_EU = 0x00000004,
6158 AREA_CODE_AS = 0x00000008,
6162 AREA_CODE_JP = 0x00000010,
6166 AREA_CODE_IN = 0x00000020,
6170 AREA_CODE_GLOB = (0xFFFFFFFF)
6171 };
6172
6177 enum AREA_CODE_EX {
6181 AREA_CODE_OC = 0x00000040,
6185 AREA_CODE_SA = 0x00000080,
6189 AREA_CODE_AF = 0x00000100,
6193 AREA_CODE_KR = 0x00000200,
6197 AREA_CODE_HKMC = 0x00000400,
6201 AREA_CODE_US = 0x00000800,
6205 AREA_CODE_RU = 0x00001000,
6209 AREA_CODE_OVS = 0xFFFFFFFE
6210 };
6211
6215 enum CHANNEL_MEDIA_RELAY_ERROR {
6218 RELAY_OK = 0,
6221 RELAY_ERROR_SERVER_ERROR_RESPONSE = 1,
6228 RELAY_ERROR_SERVER_NO_RESPONSE = 2,
6231 RELAY_ERROR_NO_RESOURCE_AVAILABLE = 3,
6234 RELAY_ERROR_FAILED_JOIN_SRC = 4,
6237 RELAY_ERROR_FAILED_JOIN_DEST = 5,
6240 RELAY_ERROR_FAILED_PACKET_RECEIVED_FROM_SRC = 6,
6243 RELAY_ERROR_FAILED_PACKET_SENT_TO_DEST = 7,
6247 RELAY_ERROR_SERVER_CONNECTION_LOST = 8,
6250 RELAY_ERROR_INTERNAL_ERROR = 9,
6253 RELAY_ERROR_SRC_TOKEN_EXPIRED = 10,
6256 RELAY_ERROR_DEST_TOKEN_EXPIRED = 11,
6257 };
6258
6262 enum CHANNEL_MEDIA_RELAY_STATE {
6266 RELAY_STATE_IDLE = 0,
6269 RELAY_STATE_CONNECTING = 1,
6272 RELAY_STATE_RUNNING = 2,
6275 RELAY_STATE_FAILURE = 3,
6276 };
6277
6280 struct ChannelMediaInfo {
6283 uid_t uid;
6287 const char* channelName;
6291 const char* token;
6292
6293 ChannelMediaInfo() : uid(0), channelName(NULL), token(NULL) {}
6294 ChannelMediaInfo(const char* c, const char* t, uid_t u) : uid(u), channelName(c), token(t) {}
6295 };
6296
6299 struct ChannelMediaRelayConfiguration {
6312 ChannelMediaInfo* srcInfo;
6328 ChannelMediaInfo* destInfos;
6333 int destCount;
6334
6335 ChannelMediaRelayConfiguration()
6336 : srcInfo(OPTIONAL_NULLPTR), destInfos(OPTIONAL_NULLPTR), destCount(0) {}
6337 };
6338
6342 struct UplinkNetworkInfo {
6346 int video_encoder_target_bitrate_bps;
6347
6348 UplinkNetworkInfo() : video_encoder_target_bitrate_bps(0) {}
6349
6350 bool operator==(const UplinkNetworkInfo& rhs) const {
6351 return (video_encoder_target_bitrate_bps == rhs.video_encoder_target_bitrate_bps);
6352 }
6353 };
6354
6355 struct DownlinkNetworkInfo {
6356 struct PeerDownlinkInfo {
6360 const char* userId;
6364 VIDEO_STREAM_TYPE stream_type;
6368 REMOTE_VIDEO_DOWNSCALE_LEVEL current_downscale_level;
6372 int expected_bitrate_bps;
6373
6374 PeerDownlinkInfo()
6375 : userId(OPTIONAL_NULLPTR),
6376 stream_type(VIDEO_STREAM_HIGH),
6377 current_downscale_level(REMOTE_VIDEO_DOWNSCALE_LEVEL_NONE),
6378 expected_bitrate_bps(-1) {}
6379
6380 PeerDownlinkInfo(const PeerDownlinkInfo& rhs)
6381 : stream_type(rhs.stream_type),
6382 current_downscale_level(rhs.current_downscale_level),
6383 expected_bitrate_bps(rhs.expected_bitrate_bps) {
6384 if (rhs.userId != OPTIONAL_NULLPTR) {
6385 const size_t len = std::strlen(rhs.userId);
6386 char* buf = new char[len + 1];
6387 std::memcpy(buf, rhs.userId, len);
6388 buf[len] = '\0';
6389 userId = buf;
6390 }
6391 }
6392
6393 PeerDownlinkInfo& operator=(const PeerDownlinkInfo& rhs) {
6394 if (this == &rhs) return *this;
6395 userId = OPTIONAL_NULLPTR;
6396 stream_type = rhs.stream_type;
6397 current_downscale_level = rhs.current_downscale_level;
6398 expected_bitrate_bps = rhs.expected_bitrate_bps;
6399 if (rhs.userId != OPTIONAL_NULLPTR) {
6400 const size_t len = std::strlen(rhs.userId);
6401 char* buf = new char[len + 1];
6402 std::memcpy(buf, rhs.userId, len);
6403 buf[len] = '\0';
6404 userId = buf;
6405 }
6406 return *this;
6407 }
6408
6409 ~PeerDownlinkInfo() { delete[] userId; }
6410 };
6411
6415 int lastmile_buffer_delay_time_ms;
6419 int bandwidth_estimation_bps;
6423 int total_downscale_level_count;
6427 PeerDownlinkInfo* peer_downlink_info;
6431 int total_received_video_count;
6432
6433 DownlinkNetworkInfo()
6434 : lastmile_buffer_delay_time_ms(-1),
6435 bandwidth_estimation_bps(-1),
6436 total_downscale_level_count(-1),
6437 peer_downlink_info(OPTIONAL_NULLPTR),
6438 total_received_video_count(-1) {}
6439
6440 DownlinkNetworkInfo(const DownlinkNetworkInfo& info)
6441 : lastmile_buffer_delay_time_ms(info.lastmile_buffer_delay_time_ms),
6442 bandwidth_estimation_bps(info.bandwidth_estimation_bps),
6443 total_downscale_level_count(info.total_downscale_level_count),
6444 peer_downlink_info(OPTIONAL_NULLPTR),
6445 total_received_video_count(info.total_received_video_count) {
6446 if (total_received_video_count <= 0) return;
6447 peer_downlink_info = new PeerDownlinkInfo[total_received_video_count];
6448 for (int i = 0; i < total_received_video_count; ++i)
6449 peer_downlink_info[i] = info.peer_downlink_info[i];
6450 }
6451
6452 DownlinkNetworkInfo& operator=(const DownlinkNetworkInfo& rhs) {
6453 if (this == &rhs) return *this;
6454 lastmile_buffer_delay_time_ms = rhs.lastmile_buffer_delay_time_ms;
6455 bandwidth_estimation_bps = rhs.bandwidth_estimation_bps;
6456 total_downscale_level_count = rhs.total_downscale_level_count;
6457 peer_downlink_info = OPTIONAL_NULLPTR;
6458 total_received_video_count = rhs.total_received_video_count;
6459 if (total_received_video_count > 0) {
6460 peer_downlink_info = new PeerDownlinkInfo[total_received_video_count];
6461 for (int i = 0; i < total_received_video_count; ++i)
6462 peer_downlink_info[i] = rhs.peer_downlink_info[i];
6463 }
6464 return *this;
6465 }
6466
6467 ~DownlinkNetworkInfo() { delete[] peer_downlink_info; }
6468 };
6469
6476 enum ENCRYPTION_MODE {
6479 AES_128_XTS = 1,
6482 AES_128_ECB = 2,
6485 AES_256_XTS = 3,
6488 SM4_128_ECB = 4,
6491 AES_128_GCM = 5,
6494 AES_256_GCM = 6,
6498 AES_128_GCM2 = 7,
6502 AES_256_GCM2 = 8,
6505 MODE_END,
6506 };
6507
6509 struct EncryptionConfig {
6514 ENCRYPTION_MODE encryptionMode;
6521 const char* encryptionKey;
6529 uint8_t encryptionKdfSalt[32];
6530
6531 bool datastreamEncryptionEnabled;
6532
6533 EncryptionConfig()
6534 : encryptionMode(AES_128_GCM2),
6535 encryptionKey(OPTIONAL_NULLPTR),
6536 datastreamEncryptionEnabled(false) {
6537 memset(encryptionKdfSalt, 0, sizeof(encryptionKdfSalt));
6538 }
6539
6541 const char* getEncryptionString() const {
6542 switch (encryptionMode) {
6543 case AES_128_XTS:
6544 return "aes-128-xts";
6545 case AES_128_ECB:
6546 return "aes-128-ecb";
6547 case AES_256_XTS:
6548 return "aes-256-xts";
6549 case SM4_128_ECB:
6550 return "sm4-128-ecb";
6551 case AES_128_GCM:
6552 return "aes-128-gcm";
6553 case AES_256_GCM:
6554 return "aes-256-gcm";
6555 case AES_128_GCM2:
6556 return "aes-128-gcm-2";
6557 case AES_256_GCM2:
6558 return "aes-256-gcm-2";
6559 default:
6560 return "aes-128-gcm-2";
6561 }
6562 return "aes-128-gcm-2";
6563 }
6565 };
6566
6569 enum ENCRYPTION_ERROR_TYPE {
6573 ENCRYPTION_ERROR_INTERNAL_FAILURE = 0,
6578 ENCRYPTION_ERROR_DECRYPTION_FAILURE = 1,
6582 ENCRYPTION_ERROR_ENCRYPTION_FAILURE = 2,
6587 ENCRYPTION_ERROR_DATASTREAM_DECRYPTION_FAILURE = 3,
6591 ENCRYPTION_ERROR_DATASTREAM_ENCRYPTION_FAILURE = 4,
6592 };
6593
6594 enum UPLOAD_ERROR_REASON {
6595 UPLOAD_SUCCESS = 0,
6596 UPLOAD_NET_ERROR = 1,
6597 UPLOAD_SERVER_ERROR = 2,
6598 };
6599
6602 enum PERMISSION_TYPE {
6606 RECORD_AUDIO = 0,
6610 CAMERA = 1,
6611
6612 SCREEN_CAPTURE = 2,
6613 };
6614
6618 enum STREAM_SUBSCRIBE_STATE {
6622 SUB_STATE_IDLE = 0,
6636 SUB_STATE_NO_SUBSCRIBED = 1,
6640 SUB_STATE_SUBSCRIBING = 2,
6644 SUB_STATE_SUBSCRIBED = 3
6645 };
6646
6650 enum STREAM_PUBLISH_STATE {
6654 PUB_STATE_IDLE = 0,
6665 PUB_STATE_NO_PUBLISHED = 1,
6669 PUB_STATE_PUBLISHING = 2,
6673 PUB_STATE_PUBLISHED = 3
6674 };
6675
6679 struct EchoTestConfiguration {
6680 view_t view;
6681 bool enableAudio;
6682 bool enableVideo;
6683 const char* token;
6684 const char* channelId;
6685 int intervalInSeconds;
6686
6687 EchoTestConfiguration(view_t v, bool ea, bool ev, const char* t, const char* c, const int is)
6688 : view(v), enableAudio(ea), enableVideo(ev), token(t), channelId(c), intervalInSeconds(is) {}
6689
6690 EchoTestConfiguration()
6691 : view(OPTIONAL_NULLPTR),
6692 enableAudio(true),
6693 enableVideo(true),
6694 token(OPTIONAL_NULLPTR),
6695 channelId(OPTIONAL_NULLPTR),
6696 intervalInSeconds(2) {}
6697 };
6698
6702 struct UserInfo {
6706 uid_t uid;
6710 char userAccount[MAX_USER_ACCOUNT_LENGTH];
6711
6712 UserInfo() : uid(0) { userAccount[0] = '\0'; }
6713 };
6714
6718 enum EAR_MONITORING_FILTER_TYPE {
6722 EAR_MONITORING_FILTER_NONE = (1 << 0),
6727 EAR_MONITORING_FILTER_BUILT_IN_AUDIO_FILTERS = (1 << 1),
6731 EAR_MONITORING_FILTER_NOISE_SUPPRESSION = (1 << 2),
6737 EAR_MONITORING_FILTER_REUSE_POST_PROCESSING_FILTER = (1 << 15),
6738 };
6739
6743 enum THREAD_PRIORITY_TYPE {
6747 LOWEST = 0,
6751 LOW = 1,
6755 NORMAL = 2,
6759 HIGH = 3,
6763 HIGHEST = 4,
6767 CRITICAL = 5,
6768 };
6769
6770 #if defined(__ANDROID__) || (defined(__APPLE__) && (TARGET_OS_IOS || (defined(TARGET_OS_VISION) && TARGET_OS_VISION)))
6771
6775 struct ScreenVideoParameters {
6802 VideoDimensions dimensions;
6808 int frameRate = 15;
6813 int bitrate;
6814 /*
6815 * The content hint of the screen sharing:
6816 */
6817 VIDEO_CONTENT_HINT contentHint = VIDEO_CONTENT_HINT::CONTENT_HINT_MOTION;
6818
6819 ScreenVideoParameters() : dimensions(1280, 720) {}
6820 };
6821
6825 struct ScreenCaptureParameters2 {
6835 bool captureAudio = false;
6839 ScreenAudioParameters audioParams;
6849 bool captureVideo = true;
6853 ScreenVideoParameters videoParams;
6854 };
6855 #endif
6856
6860 enum MEDIA_TRACE_EVENT {
6864 MEDIA_TRACE_EVENT_VIDEO_RENDERED = 0,
6868 MEDIA_TRACE_EVENT_VIDEO_DECODED,
6869 };
6870
6874 struct VideoRenderingTracingInfo {
6878 int elapsedTime;
6885 int start2JoinChannel;
6889 int join2JoinSuccess;
6897 int joinSuccess2RemoteJoined;
6905 int remoteJoined2SetView;
6914 int remoteJoined2UnmuteVideo;
6923 int remoteJoined2PacketReceived;
6924 };
6925
6926 enum CONFIG_FETCH_TYPE {
6930 CONFIG_FETCH_TYPE_INITIALIZE = 1,
6934 CONFIG_FETCH_TYPE_JOIN_CHANNEL = 2,
6935 };
6936
6938 enum LOCAL_PROXY_MODE {
6941 ConnectivityFirst = 0,
6944 LocalOnly = 1,
6945 };
6946
6947 struct LogUploadServerInfo {
6950 const char* serverDomain;
6953 const char* serverPath;
6956 int serverPort;
6961 bool serverHttps;
6962
6963 LogUploadServerInfo() : serverDomain(NULL), serverPath(NULL), serverPort(0), serverHttps(true) {}
6964
6965 LogUploadServerInfo(const char* domain, const char* path, int port, bool https)
6966 : serverDomain(domain), serverPath(path), serverPort(port), serverHttps(https) {}
6967 };
6968
6969 struct AdvancedConfigInfo {
6972 LogUploadServerInfo logUploadServer;
6973 };
6974
6975 struct LocalAccessPointConfiguration {
6978 const char** ipList;
6981 int ipListSize;
6984 const char** domainList;
6987 int domainListSize;
6992 const char* verifyDomainName;
6995 LOCAL_PROXY_MODE mode;
6998 AdvancedConfigInfo advancedConfig;
7004 bool disableAut;
7005 LocalAccessPointConfiguration()
7006 : ipList(NULL),
7007 ipListSize(0),
7008 domainList(NULL),
7009 domainListSize(0),
7010 verifyDomainName(NULL),
7011 mode(ConnectivityFirst),
7012 disableAut(true) {}
7013 };
7014
7015 enum RecorderStreamType {
7016 RTC,
7017 PREVIEW,
7018 };
7019
7023 struct RecorderStreamInfo {
7027 const char* channelId;
7031 uid_t uid;
7035 RecorderStreamType type;
7036 RecorderStreamInfo() : channelId(NULL), uid(0), type(RTC) {}
7037 RecorderStreamInfo(const char* channelId, uid_t uid)
7038 : channelId(channelId), uid(uid), type(RTC) {}
7039 RecorderStreamInfo(const char* channelId, uid_t uid, RecorderStreamType type)
7040 : channelId(channelId), uid(uid), type(type) {}
7041 };
7042 } // namespace rtc
7043
7044 namespace base {
7045
7046 class IEngineBase {
7047 public:
7048 virtual int queryInterface(rtc::INTERFACE_ID_TYPE iid, void** inter) = 0;
7049 virtual ~IEngineBase() {}
7050 };
7051
7052 class AParameter : public agora::util::AutoPtr<IAgoraParameter> {
7053 public:
7054 AParameter(IEngineBase& engine) { initialize(&engine); }
7055 AParameter(IEngineBase* engine) { initialize(engine); }
7056 AParameter(IAgoraParameter* p) : agora::util::AutoPtr<IAgoraParameter>(p) {}
7057
7058 private:
7059 bool initialize(IEngineBase* engine) {
7060 IAgoraParameter* p = OPTIONAL_NULLPTR;
7061 if (engine && !engine->queryInterface(rtc::AGORA_IID_PARAMETER_ENGINE, (void**)&p)) reset(p);
7062 return p != OPTIONAL_NULLPTR;
7063 }
7064 };
7065
7066 class LicenseCallback {
7067 public:
7068 virtual ~LicenseCallback() {}
7069 virtual void onCertificateRequired() = 0;
7070 virtual void onLicenseRequest() = 0;
7071 virtual void onLicenseValidated() = 0;
7072 virtual void onLicenseError(int result) = 0;
7073 };
7074
7075 } // namespace base
7076
7080 struct SpatialAudioParams {
7084 Optional<double> speaker_azimuth;
7088 Optional<double> speaker_elevation;
7092 Optional<double> speaker_distance;
7096 Optional<int> speaker_orientation;
7100 Optional<bool> enable_blur;
7104 Optional<bool> enable_air_absorb;
7108 Optional<double> speaker_attenuation;
7112 Optional<bool> enable_doppler;
7113 };
7117 struct VideoLayout {
7121 const char* channelId;
7125 rtc::uid_t uid;
7129 user_id_t strUid;
7133 uint32_t x;
7137 uint32_t y;
7141 uint32_t width;
7145 uint32_t height;
7150 uint32_t videoState;
7151
7152 VideoLayout()
7153 : channelId(OPTIONAL_NULLPTR),
7154 uid(0),
7155 strUid(OPTIONAL_NULLPTR),
7156 x(0),
7157 y(0),
7158 width(0),
7159 height(0),
7160 videoState(0) {}
7161 };
7162 } // namespace agora
7163
7169 AGORA_API const char* AGORA_CALL getAgoraSdkVersion(int* build);
7170
7176 AGORA_API const char* AGORA_CALL getAgoraSdkErrorDescription(int err);
7177
7178 AGORA_API int AGORA_CALL setAgoraSdkExternalSymbolLoader(void* (*func)(const char* symname));
7179
7187 AGORA_API int AGORA_CALL createAgoraCredential(agora::util::AString& credential);
7188
7202 AGORA_API int AGORA_CALL getAgoraCertificateVerifyResult(const char* credential_buf,
7203 int credential_len,
7204 const char* certificate_buf,
7205 int certificate_len);
7206
7214 AGORA_API void setAgoraLicenseCallback(agora::base::LicenseCallback* callback);
7215
7223 AGORA_API agora::base::LicenseCallback* getAgoraLicenseCallback();
7224
7225 /*
7226 * Get monotonic time in ms which can be used by capture time,
7227 * typical scenario is as follows:
7228 *
7229 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7230 * | // custom audio/video base capture time, e.g. the first audio/video capture time. | | int64_t
7231 * custom_capture_time_base; | | | |
7232 * int64_t agora_monotonic_time = getAgoraCurrentMonotonicTimeInMs(); |
7233 * | | | // offset is fixed once calculated in the begining. | | const int64_t offset =
7234 * agora_monotonic_time - custom_capture_time_base; | | | | //
7235 * realtime_custom_audio/video_capture_time is the origin capture time that customer provided.| | //
7236 * actual_audio/video_capture_time is the actual capture time transfered to sdk. | |
7237 * int64_t actual_audio_capture_time = realtime_custom_audio_capture_time + offset; |
7238 * | int64_t actual_video_capture_time = realtime_custom_video_capture_time + offset; |
7239 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7240 *
7241 * @return
7242 * - >= 0: Success.
7243 * - < 0: Failure.
7244 */
7245 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:6950
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:5757
agora::VideoLayout
Definition: AgoraBase.h:7117
agora::rtc::FilterEffectOptions::strength
float strength
Definition: AgoraBase.h:5137
agora::rtc::SimulcastConfig::STREAM_LAYER_1
@ STREAM_LAYER_1
Definition: AgoraBase.h:2166
agora::VideoLayout::channelId
const char * channelId
Definition: AgoraBase.h:7121
agora::rtc::UserInfo
Definition: AgoraBase.h:6702
agora::rtc::FilterEffectOptions
Definition: AgoraBase.h:5117
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:6073
agora::rtc::DownlinkNetworkInfo::PeerDownlinkInfo::userId
const char * userId
Definition: AgoraBase.h:6360
agora::rtc::ScreenCaptureParameters
Definition: AgoraBase.h:5770
agora::VideoLayout::x
uint32_t x
Definition: AgoraBase.h:7133
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:5294
agora::rtc::DownlinkNetworkInfo::PeerDownlinkInfo::current_downscale_level
REMOTE_VIDEO_DOWNSCALE_LEVEL current_downscale_level
Definition: AgoraBase.h:6368
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:6972
agora::rtc::BeautyOptions
Definition: AgoraBase.h:4800
agora::rtc::SenderOptions
Definition: AgoraBase.h:1254
agora::rtc::ScreenCaptureParameters::bitrate
int bitrate
Definition: AgoraBase.h:5812
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:5285
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:6427
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:5840
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:7088
agora::rtc::VideoEncoderConfiguration::minBitrate
int minBitrate
Definition: AgoraBase.h:2008
agora::rtc::ScreenCaptureParameters::enableHighLight
bool enableHighLight
Definition: AgoraBase.h:5853
agora::rtc::VideoDenoiserOptions::VIDEO_DENOISER_AUTO
@ VIDEO_DENOISER_AUTO
Definition: AgoraBase.h:5198
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:5165
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:5824
agora::rtc::AudioEncodedFrameObserverConfig::encodingType
AUDIO_ENCODING_TYPE encodingType
Definition: AgoraBase.h:6081
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:6333
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:5228
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:6995
agora::rtc::LastmileProbeConfig::probeUplink
bool probeUplink
Definition: AgoraBase.h:4328
agora::rtc::RecorderStreamInfo::channelId
const char * channelId
Definition: AgoraBase.h:7027
agora::rtc::LocalAccessPointConfiguration
Definition: AgoraBase.h:6975
agora::rtc::FilterEffectOptions::path
const char * path
Definition: AgoraBase.h:5132
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:5195
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_NOSEWIDTH
@ FACE_SHAPE_AREA_NOSEWIDTH
Definition: AgoraBase.h:4980
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:6978
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:5999
agora::rtc::EncodedVideoFrameInfo
Definition: AgoraBase.h:1640
agora::rtc::ColorEnhanceOptions::strengthLevel
float strengthLevel
Definition: AgoraBase.h:5245
agora::SpatialAudioParams::speaker_distance
Optional< double > speaker_distance
Definition: AgoraBase.h:7092
agora::rtc::VirtualBackgroundSource::BACKGROUND_NONE
@ BACKGROUND_NONE
Definition: AgoraBase.h:5273
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_MOUTHSMILE
@ FACE_SHAPE_AREA_MOUTHSMILE
Definition: AgoraBase.h:5036
agora::rtc::FaceShapeBeautyOptions::shapeStyle
FACE_SHAPE_BEAUTY_STYLE shapeStyle
Definition: AgoraBase.h:5102
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:5835
agora::rtc::IPacketObserver::Packet
Definition: AgoraBase.h:3463
agora::rtc::AudioTrackConfig::enableLocalPlayback
bool enableLocalPlayback
Definition: AgoraBase.h:5388
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_NOSELENGTH
@ FACE_SHAPE_AREA_NOSELENGTH
Definition: AgoraBase.h:4973
agora::rtc::LiveTranscoding::audioCodecProfile
AUDIO_CODEC_PROFILE_TYPE audioCodecProfile
Definition: AgoraBase.h:4075
agora::rtc::RecorderStreamInfo::uid
uid_t uid
Definition: AgoraBase.h:7031
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:6914
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:6679
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:6364
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_FACECONTOUR
@ FACE_SHAPE_AREA_FACECONTOUR
Definition: AgoraBase.h:4883
agora::rtc::ChannelMediaInfo::token
const char * token
Definition: AgoraBase.h:6291
agora::rtc::VideoRenderingTracingInfo::remoteJoined2PacketReceived
int remoteJoined2PacketReceived
Definition: AgoraBase.h:6923
agora::rtc::AudioRecordingConfiguration::encode
bool encode
Definition: AgoraBase.h:6005
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:7100
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:5062
agora::rtc::ChannelMediaRelayConfiguration::destInfos
ChannelMediaInfo * destInfos
Definition: AgoraBase.h:6328
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:5308
agora::rtc::FaceShapeBeautyOptions
Face shape beauty options. This structure defines options for facial adjustments of different facial ...
Definition: AgoraBase.h:5078
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:4889
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:6878
agora::rtc::LiveStreamAdvancedFeature::featureName
const char * featureName
Definition: AgoraBase.h:3835
agora::rtc::AdvancedConfigInfo
Definition: AgoraBase.h:6969
agora::rtc::ScreenAudioParameters::channels
int channels
Definition: AgoraBase.h:5752
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:5240
agora::rtc::AudioRecordingConfiguration::sampleRate
int sampleRate
Definition: AgoraBase.h:6016
agora::UserInfo::userId
util::AString userId
Definition: AgoraBase.h:824
agora::rtc::UplinkNetworkInfo
Definition: AgoraBase.h:6342
agora::rtc::WatermarkOptions::positionInPortraitMode
Rectangle positionInPortraitMode
Definition: AgoraBase.h:2297
agora::rtc::LocalAccessPointConfiguration::advancedConfig
AdvancedConfigInfo advancedConfig
Definition: AgoraBase.h:6998
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::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_EYEDISTANCE
@ FACE_SHAPE_AREA_EYEDISTANCE
Definition: AgoraBase.h:4933
agora::util::IString
Definition: AgoraBase.h:172
agora::rtc::LocalAccessPointConfiguration::verifyDomainName
const char * verifyDomainName
Definition: AgoraBase.h:6992
agora::SpatialAudioParams::enable_air_absorb
Optional< bool > enable_air_absorb
Definition: AgoraBase.h:7104
agora::rtc::LowlightEnhanceOptions::LOW_LIGHT_ENHANCE_LEVEL
LOW_LIGHT_ENHANCE_LEVEL
Definition: AgoraBase.h:5159
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:7035
agora::rtc::LocalAudioMixerConfiguration::audioInputStreams
MixedAudioStream * audioInputStreams
Definition: AgoraBase.h:4306
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_MOUTHPOSITION
@ FACE_SHAPE_AREA_MOUTHPOSITION
Definition: AgoraBase.h:5029
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::FaceShapeAreaOptions::FACE_SHAPE_AREA_NOSEWING
@ FACE_SHAPE_AREA_NOSEWING
Definition: AgoraBase.h:4987
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:4920
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_EYEBROWTHICKNESS
@ FACE_SHAPE_AREA_EYEBROWTHICKNESS
Definition: AgoraBase.h:5057
agora::rtc::RtcStats::cpuAppUsage
double cpuAppUsage
Definition: AgoraBase.h:2386
agora::VideoLayout::width
uint32_t width
Definition: AgoraBase.h:7141
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:4901
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:6287
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:6355
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:7112
agora::rtc::RtcStats::txAudioKBitRate
unsigned short txAudioKBitRate
Definition: AgoraBase.h:2362
agora::VideoLayout::height
uint32_t height
Definition: AgoraBase.h:7145
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:6415
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:5088
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
The face shape beauty style options.
Definition: AgoraBase.h:5084
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_CHEEK
@ FACE_SHAPE_AREA_CHEEK
Definition: AgoraBase.h:4907
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_MOUTHSCALE
@ FACE_SHAPE_AREA_MOUTHSCALE
Definition: AgoraBase.h:5022
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:5092
agora::rtc::ScreenCaptureParameters::highLightColor
unsigned int highLightColor
Definition: AgoraBase.h:5844
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_FACEWIDTH
@ FACE_SHAPE_AREA_FACEWIDTH
Definition: AgoraBase.h:4895
agora::base::AParameter
Definition: AgoraBase.h:7052
agora::rtc::BeautyOptions::sharpnessLevel
float sharpnessLevel
Definition: AgoraBase.h:4834
agora::rtc::EncryptionConfig::encryptionMode
ENCRYPTION_MODE encryptionMode
Definition: AgoraBase.h:6514
agora::util::AOutputIterator
Definition: AgoraBase.h:202
agora::rtc::WatermarkOptions::positionInLandscapeMode
Rectangle positionInLandscapeMode
Definition: AgoraBase.h:2292
agora::rtc::IAudioEncodedFrameObserver
Definition: AgoraBase.h:6090
agora::rtc::EncodedVideoFrameInfo::width
int width
Definition: AgoraBase.h:1698
agora::rtc::ScreenAudioParameters
Definition: AgoraBase.h:5744
agora::rtc::VideoTrackInfo::ownerUid
uid_t ownerUid
Definition: AgoraBase.h:3346
agora::rtc::VideoRenderingTracingInfo::join2JoinSuccess
int join2JoinSuccess
Definition: AgoraBase.h:6889
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:6356
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:6299
agora::rtc::VirtualBackgroundSource::blur_degree
BACKGROUND_BLUR_DEGREE blur_degree
Definition: AgoraBase.h:5335
agora::rtc::UserInfo::uid
uid_t uid
Definition: AgoraBase.h:6706
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:5319
agora::rtc::LastmileProbeOneWayResult
Definition: AgoraBase.h:4371
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_NOSEGENERAL
@ FACE_SHAPE_AREA_NOSEGENERAL
Definition: AgoraBase.h:5015
agora::rtc::VideoDenoiserOptions
Definition: AgoraBase.h:5192
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:5212
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:5266
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_EYEPUPILS
@ FACE_SHAPE_AREA_EYEPUPILS
Definition: AgoraBase.h:4954
agora::rtc::WlAccStats::frozenRatioPercent
unsigned short frozenRatioPercent
Definition: AgoraBase.h:4606
agora::rtc::LowlightEnhanceOptions::level
LOW_LIGHT_ENHANCE_LEVEL level
Definition: AgoraBase.h:5179
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:5785
agora::rtc::AudioEncodedFrameObserverConfig::postionType
AUDIO_ENCODED_FRAME_OBSERVER_POSITION postionType
Definition: AgoraBase.h:6077
agora::rtc::IPacketObserver::onSendAudioPacket
virtual bool onSendAudioPacket(Packet &packet)=0
agora::rtc::EncryptionConfig::encryptionKdfSalt
uint8_t encryptionKdfSalt[32]
Definition: AgoraBase.h:6529
agora::rtc::WlAccStats::lossRatePercent
unsigned short lossRatePercent
Definition: AgoraBase.h:4610
agora::rtc::ScreenCaptureParameters::captureAudio
bool captureAudio
Definition: AgoraBase.h:5781
agora::rtc::VirtualBackgroundSource::BACKGROUND_IMG
@ BACKGROUND_IMG
Definition: AgoraBase.h:5281
agora::rtc::LiveTranscoding::watermark
RtcImage * watermark
Definition: AgoraBase.h:4037
agora::rtc::AudioVolumeInfo::vad
unsigned int vad
Definition: AgoraBase.h:3429
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_NOSETIP
@ FACE_SHAPE_AREA_NOSETIP
Definition: AgoraBase.h:5008
agora::rtc::ChannelMediaInfo
Definition: AgoraBase.h:6280
agora::UserInfo::hasVideo
bool hasVideo
Definition: AgoraBase.h:836
agora::rtc::LowlightEnhanceOptions::LOW_LIGHT_ENHANCE_MANUAL
@ LOW_LIGHT_ENHANCE_MANUAL
Definition: AgoraBase.h:5154
agora::rtc::DownlinkNetworkInfo::total_downscale_level_count
int total_downscale_level_count
Definition: AgoraBase.h:6423
agora::VideoLayout::y
uint32_t y
Definition: AgoraBase.h:7137
agora::rtc::WlAccStats
Definition: AgoraBase.h:4598
agora::rtc::DownlinkNetworkInfo::bandwidth_estimation_bps
int bandwidth_estimation_bps
Definition: AgoraBase.h:6419
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:7096
agora::rtc::LocalAudioStats::earMonitorDelay
int earMonitorDelay
Definition: AgoraBase.h:3615
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA
FACE_SHAPE_AREA
The specific facial area to be adjusted.
Definition: AgoraBase.h:4863
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::FaceShapeAreaOptions::FACE_SHAPE_AREA_EYEINNERCORNER
@ FACE_SHAPE_AREA_EYEINNERCORNER
Definition: AgoraBase.h:4961
agora::rtc::LocalAudioStats::audioPlayoutDelay
int audioPlayoutDelay
Definition: AgoraBase.h:3611
agora::SpatialAudioParams::speaker_attenuation
Optional< double > speaker_attenuation
Definition: AgoraBase.h:7108
agora::rtc::VideoTrackInfo::observationPosition
uint32_t observationPosition
Definition: AgoraBase.h:3372
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_LOWEREYELID
@ FACE_SHAPE_AREA_LOWEREYELID
Definition: AgoraBase.h:4947
agora::rtc::AdvanceOptions::encodeAlpha
bool encodeAlpha
Definition: AgoraBase.h:1796
agora::VideoLayout::strUid
user_id_t strUid
Definition: AgoraBase.h:7129
agora::rtc::LogUploadServerInfo
Definition: AgoraBase.h:6947
agora::rtc::VideoDenoiserOptions::VIDEO_DENOISER_LEVEL
VIDEO_DENOISER_LEVEL
Definition: AgoraBase.h:5205
agora::rtc::AudioTrackConfig::enableAudioProcessing
bool enableAudioProcessing
Definition: AgoraBase.h:5394
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:5806
agora::rtc::AudioRecordingConfiguration::recordingChannel
int recordingChannel
Definition: AgoraBase.h:6032
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:7066
agora::rtc::EncryptionConfig
Definition: AgoraBase.h:6509
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:5269
agora::rtc::VideoRenderingTracingInfo::start2JoinChannel
int start2JoinChannel
Definition: AgoraBase.h:6885
agora::rtc::VideoCanvas::backgroundColor
uint32_t backgroundColor
Definition: AgoraBase.h:4690
agora::rtc::LocalAccessPointConfiguration::disableAut
bool disableAut
Definition: AgoraBase.h:7004
agora::rtc::ScreenAudioParameters::sampleRate
int sampleRate
Definition: AgoraBase.h:5748
agora::rtc::ScreenCaptureParameters::dimensions
VideoDimensions dimensions
Definition: AgoraBase.h:5800
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:5329
agora::rtc::LogUploadServerInfo::serverPath
const char * serverPath
Definition: AgoraBase.h:6953
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_EYESCALE
@ FACE_SHAPE_AREA_EYESCALE
Definition: AgoraBase.h:4926
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_MOUTHLIP
@ FACE_SHAPE_AREA_MOUTHLIP
Definition: AgoraBase.h:5043
agora::rtc::SimulcastConfig::STREAM_LAYER_5
@ STREAM_LAYER_5
Definition: AgoraBase.h:2182
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_NOSEBRIDGE
@ FACE_SHAPE_AREA_NOSEBRIDGE
Definition: AgoraBase.h:5001
agora::VideoLayout::videoState
uint32_t videoState
Definition: AgoraBase.h:7150
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:5289
agora::rtc::WatermarkOptions::visibleInPreview
bool visibleInPreview
Definition: AgoraBase.h:2287
agora::rtc::LowlightEnhanceOptions
Definition: AgoraBase.h:5144
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:6346
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:5224
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:6905
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:7023
agora::rtc::LogUploadServerInfo::serverPort
int serverPort
Definition: AgoraBase.h:6956
agora::rtc::SimulcastConfig
Definition: AgoraBase.h:2158
agora::rtc::ScreenCaptureParameters::captureMouseCursor
bool captureMouseCursor
Definition: AgoraBase.h:5817
agora::rtc::DownlinkNetworkInfo::total_received_video_count
int total_received_video_count
Definition: AgoraBase.h:6431
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::FaceShapeAreaOptions::FACE_SHAPE_AREA_EYEPOSITION
@ FACE_SHAPE_AREA_EYEPOSITION
Definition: AgoraBase.h:4940
agora::rtc::DownlinkNetworkInfo::PeerDownlinkInfo::expected_bitrate_bps
int expected_bitrate_bps
Definition: AgoraBase.h:6372
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:5170
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:5993
agora::SpatialAudioParams::speaker_azimuth
Optional< double > speaker_azimuth
Definition: AgoraBase.h:7084
agora::rtc::LowlightEnhanceOptions::LOW_LIGHT_ENHANCE_MODE
LOW_LIGHT_ENHANCE_MODE
Definition: AgoraBase.h:5148
agora::util::IContainer
Definition: AgoraBase.h:193
agora::rtc::VirtualBackgroundSource::BLUR_DEGREE_HIGH
@ BLUR_DEGREE_HIGH
Definition: AgoraBase.h:5303
agora::rtc::LocalAudioMixerConfiguration::syncWithLocalMic
bool syncWithLocalMic
Definition: AgoraBase.h:4313
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_MANDIBLE
@ FACE_SHAPE_AREA_MANDIBLE
Definition: AgoraBase.h:4914
agora::rtc::VideoDimensions
Definition: AgoraBase.h:1100
agora::rtc::VirtualBackgroundSource::BLUR_DEGREE_LOW
@ BLUR_DEGREE_LOW
Definition: AgoraBase.h:5297
agora::rtc::FaceShapeBeautyOptions::FACE_SHAPE_BEAUTY_STYLE_NATURAL
@ FACE_SHAPE_BEAUTY_STYLE_NATURAL
Definition: AgoraBase.h:5097
agora::rtc::VideoRenderingTracingInfo::joinSuccess2RemoteJoined
int joinSuccess2RemoteJoined
Definition: AgoraBase.h:6897
agora::rtc::FaceShapeAreaOptions::shapeIntensity
int shapeIntensity
Definition: AgoraBase.h:5067
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:5175
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:4877
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:5382
agora::rtc::FocalLengthInfo::cameraDirection
int cameraDirection
Definition: AgoraBase.h:1913
agora::rtc::LocalAccessPointConfiguration::ipListSize
int ipListSize
Definition: AgoraBase.h:6981
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::FaceShapeAreaOptions::FACE_SHAPE_AREA_EYEOUTERCORNER
@ FACE_SHAPE_AREA_EYEOUTERCORNER
Definition: AgoraBase.h:4968
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:6521
agora::rtc::EncodedVideoFrameInfo::trackId
int trackId
Definition: AgoraBase.h:1720
agora::rtc::VirtualBackgroundSource::BLUR_DEGREE_MEDIUM
@ BLUR_DEGREE_MEDIUM
Definition: AgoraBase.h:5300
agora::rtc::ScreenCaptureParameters::excludeWindowList
view_t * excludeWindowList
Definition: AgoraBase.h:5831
agora::rtc::LocalAccessPointConfiguration::domainList
const char ** domainList
Definition: AgoraBase.h:6984
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:4871
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:5277
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:5152
agora::rtc::RtcStats::firstVideoPacketDurationAfterUnmute
int firstVideoPacketDurationAfterUnmute
Definition: AgoraBase.h:2454
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_NONE
@ FACE_SHAPE_AREA_NONE
Definition: AgoraBase.h:4865
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
Face shape area options. This structure defines options for facial adjustments on different facial ar...
Definition: AgoraBase.h:4857
agora::rtc::CodecCapLevels
Definition: AgoraBase.h:1888
agora::SpatialAudioParams
Definition: AgoraBase.h:7080
agora::rtc::ColorEnhanceOptions::skinProtectLevel
float skinProtectLevel
Definition: AgoraBase.h:5255
agora::rtc::VideoDenoiserOptions::VIDEO_DENOISER_LEVEL_FAST
@ VIDEO_DENOISER_LEVEL_FAST
Definition: AgoraBase.h:5220
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::FaceShapeAreaOptions::FACE_SHAPE_AREA_NOSEROOT
@ FACE_SHAPE_AREA_NOSEROOT
Definition: AgoraBase.h:4994
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:6312
agora::rtc::VideoEncoderConfiguration::orientationMode
ORIENTATION_MODE orientationMode
Definition: AgoraBase.h:2012
agora::rtc::WlAccStats::e2eDelayPercent
unsigned short e2eDelayPercent
Definition: AgoraBase.h:4602
agora::rtc::FaceShapeAreaOptions::FACE_SHAPE_AREA_EYEBROWPOSITION
@ FACE_SHAPE_AREA_EYEBROWPOSITION
Definition: AgoraBase.h:5050
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:7046
agora::rtc::SenderOptions::targetBitrate
int targetBitrate
Definition: AgoraBase.h:1324
agora::rtc::AudioRecordingConfiguration::quality
AUDIO_RECORDING_QUALITY_TYPE quality
Definition: AgoraBase.h:6025
agora::util::IIterator
Definition: AgoraBase.h:184
agora::rtc::UserInfo::userAccount
char userAccount[MAX_USER_ACCOUNT_LENGTH]
Definition: AgoraBase.h:6710
agora::rtc::VideoRenderingTracingInfo
Definition: AgoraBase.h:6874
agora::rtc::LogUploadServerInfo::serverHttps
bool serverHttps
Definition: AgoraBase.h:6961
agora::rtc::VideoDenoiserOptions::VIDEO_DENOISER_MANUAL
@ VIDEO_DENOISER_MANUAL
Definition: AgoraBase.h:5200
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:5106
agora::VideoLayout::uid
rtc::uid_t uid
Definition: AgoraBase.h:7125
agora::Optional< VIDEO_STREAM_TYPE >
agora::rtc::LocalAccessPointConfiguration::domainListSize
int domainListSize
Definition: AgoraBase.h:6987
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:6020
agora::rtc::SegmentationProperty
Definition: AgoraBase.h:5344
agora::rtc::SimulcastConfig::StreamLayerConfig::enable
bool enable
Definition: AgoraBase.h:2208
agora::rtc::ChannelMediaInfo::uid
uid_t uid
Definition: AgoraBase.h:6283