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 #elif defined(__APPLE__)
47 
48 #include <TargetConditionals.h>
49 
50 #define AGORA_API extern "C" __attribute__((visibility("default")))
51 #define AGORA_CPP_API __attribute__((visibility("default")))
52 #define AGORA_CALL
53 
54 #elif defined(__ANDROID__) || defined(__linux__)
55 
56 #define AGORA_API extern "C" __attribute__((visibility("default")))
57 #define AGORA_CPP_API __attribute__((visibility("default")))
58 #define AGORA_CALL
59 
60 #define __deprecated
61 
62 #else // !_WIN32 && !__APPLE__ && !(__ANDROID__ || __linux__)
63 
64 #define AGORA_API extern "C"
65 #define AGORA_CPP_API
66 #define AGORA_CALL
67 
68 #define __deprecated
69 
70 #endif // _WIN32
71 
72 #ifndef OPTIONAL_ENUM_SIZE_T
73 #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
74 #define OPTIONAL_ENUM_SIZE_T enum : size_t
75 #else
76 #define OPTIONAL_ENUM_SIZE_T enum
77 #endif
78 #endif
79 
80 #ifndef OPTIONAL_NULLPTR
81 #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
82 #define OPTIONAL_NULLPTR nullptr
83 #else
84 #define OPTIONAL_NULLPTR NULL
85 #endif
86 #endif
87 
88 #define INVALID_DISPLAY_ID (-2)
89 
90 namespace agora {
91 namespace util {
92 
93 template <class T>
94 class AutoPtr {
95  protected:
96  typedef T value_type;
97  typedef T* pointer_type;
98 
99  public:
100  explicit AutoPtr(pointer_type p = OPTIONAL_NULLPTR) : ptr_(p) {}
101 
102  ~AutoPtr() {
103  if (ptr_) {
104  ptr_->release();
105  ptr_ = OPTIONAL_NULLPTR;
106  }
107  }
108 
109  operator bool() const { return (ptr_ != OPTIONAL_NULLPTR); }
110 
111  value_type& operator*() const { return *get(); }
112 
113  pointer_type operator->() const { return get(); }
114 
115  pointer_type get() const { return ptr_; }
116 
117  pointer_type release() {
118  pointer_type ret = ptr_;
119  ptr_ = 0;
120  return ret;
121  }
122 
123  void reset(pointer_type ptr = OPTIONAL_NULLPTR) {
124  if (ptr != ptr_ && ptr_) {
125  ptr_->release();
126  }
127 
128  ptr_ = ptr;
129  }
130 
131  template <class C1, class C2>
132  bool queryInterface(C1* c, C2 iid) {
133  pointer_type p = OPTIONAL_NULLPTR;
134  if (c && !c->queryInterface(iid, reinterpret_cast<void**>(&p))) {
135  reset(p);
136  }
137 
138  return (p != OPTIONAL_NULLPTR);
139  }
140 
141  private:
142  AutoPtr(const AutoPtr&);
143  AutoPtr& operator=(const AutoPtr&);
144 
145  private:
146  pointer_type ptr_;
147 };
148 
149 template <class T>
150 class CopyableAutoPtr : public AutoPtr<T> {
151  typedef typename AutoPtr<T>::pointer_type pointer_type;
152 
153  public:
154  explicit CopyableAutoPtr(pointer_type p = 0) : AutoPtr<T>(p) {}
155  CopyableAutoPtr(const CopyableAutoPtr& rhs) { this->reset(rhs.clone()); }
156  CopyableAutoPtr& operator=(const CopyableAutoPtr& rhs) {
157  if (this != &rhs) this->reset(rhs.clone());
158  return *this;
159  }
160  pointer_type clone() const {
161  if (!this->get()) return OPTIONAL_NULLPTR;
162  return this->get()->clone();
163  }
164 };
165 
166 class IString {
167  public:
168  virtual bool empty() const = 0;
169  virtual const char* c_str() = 0;
170  virtual const char* data() = 0;
171  virtual size_t length() = 0;
172  virtual IString* clone() = 0;
173  virtual void release() = 0;
174  virtual ~IString() {}
175 };
177 
178 class IIterator {
179  public:
180  virtual void* current() = 0;
181  virtual const void* const_current() const = 0;
182  virtual bool next() = 0;
183  virtual void release() = 0;
184  virtual ~IIterator() {}
185 };
186 
187 class IContainer {
188  public:
189  virtual IIterator* begin() = 0;
190  virtual size_t size() const = 0;
191  virtual void release() = 0;
192  virtual ~IContainer() {}
193 };
194 
195 template <class T>
197  IIterator* p;
198 
199  public:
200  typedef T value_type;
201  typedef value_type& reference;
202  typedef const value_type& const_reference;
203  typedef value_type* pointer;
204  typedef const value_type* const_pointer;
205  explicit AOutputIterator(IIterator* it = OPTIONAL_NULLPTR) : p(it) {}
206  ~AOutputIterator() {
207  if (p) p->release();
208  }
209  AOutputIterator(const AOutputIterator& rhs) : p(rhs.p) {}
210  AOutputIterator& operator++() {
211  p->next();
212  return *this;
213  }
214  bool operator==(const AOutputIterator& rhs) const {
215  if (p && rhs.p)
216  return p->current() == rhs.p->current();
217  else
218  return valid() == rhs.valid();
219  }
220  bool operator!=(const AOutputIterator& rhs) const { return !this->operator==(rhs); }
221  reference operator*() { return *reinterpret_cast<pointer>(p->current()); }
222  const_reference operator*() const { return *reinterpret_cast<const_pointer>(p->const_current()); }
223  bool valid() const { return p && p->current() != OPTIONAL_NULLPTR; }
224 };
225 
226 template <class T>
227 class AList {
228  IContainer* container;
229  bool owner;
230 
231  public:
232  typedef T value_type;
233  typedef value_type& reference;
234  typedef const value_type& const_reference;
235  typedef value_type* pointer;
236  typedef const value_type* const_pointer;
237  typedef size_t size_type;
240 
241  public:
242  AList() : container(OPTIONAL_NULLPTR), owner(false) {}
243  AList(IContainer* c, bool take_ownership) : container(c), owner(take_ownership) {}
244  ~AList() { reset(); }
245  void reset(IContainer* c = OPTIONAL_NULLPTR, bool take_ownership = false) {
246  if (owner && container) container->release();
247  container = c;
248  owner = take_ownership;
249  }
250  iterator begin() { return container ? iterator(container->begin()) : iterator(OPTIONAL_NULLPTR); }
251  iterator end() { return iterator(OPTIONAL_NULLPTR); }
252  size_type size() const { return container ? container->size() : 0; }
253  bool empty() const { return size() == 0; }
254 };
255 
256 } // namespace util
257 
261 enum CHANNEL_PROFILE_TYPE {
267  CHANNEL_PROFILE_COMMUNICATION = 0,
273  CHANNEL_PROFILE_LIVE_BROADCASTING = 1,
278  CHANNEL_PROFILE_GAME __deprecated = 2,
284  CHANNEL_PROFILE_CLOUD_GAMING __deprecated = 3,
285 
290  CHANNEL_PROFILE_COMMUNICATION_1v1 __deprecated = 4,
291 };
292 
296 enum WARN_CODE_TYPE {
301  WARN_INVALID_VIEW = 8,
306  WARN_INIT_VIDEO = 16,
311  WARN_PENDING = 20,
316  WARN_NO_AVAILABLE_CHANNEL = 103,
322  WARN_LOOKUP_CHANNEL_TIMEOUT = 104,
327  WARN_LOOKUP_CHANNEL_REJECTED = 105,
333  WARN_OPEN_CHANNEL_TIMEOUT = 106,
338  WARN_OPEN_CHANNEL_REJECTED = 107,
339 
340  // sdk: 100~1000
344  WARN_SWITCH_LIVE_VIDEO_TIMEOUT = 111,
348  WARN_SET_CLIENT_ROLE_TIMEOUT = 118,
352  WARN_OPEN_CHANNEL_INVALID_TICKET = 121,
356  WARN_OPEN_CHANNEL_TRY_NEXT_VOS = 122,
360  WARN_CHANNEL_CONNECTION_UNRECOVERABLE = 131,
364  WARN_CHANNEL_CONNECTION_IP_CHANGED = 132,
368  WARN_CHANNEL_CONNECTION_PORT_CHANGED = 133,
371  WARN_CHANNEL_SOCKET_ERROR = 134,
375  WARN_AUDIO_MIXING_OPEN_ERROR = 701,
379  WARN_ADM_RUNTIME_PLAYOUT_WARNING = 1014,
383  WARN_ADM_RUNTIME_RECORDING_WARNING = 1016,
387  WARN_ADM_RECORD_AUDIO_SILENCE = 1019,
391  WARN_ADM_PLAYOUT_MALFUNCTION = 1020,
395  WARN_ADM_RECORD_MALFUNCTION = 1021,
399  WARN_ADM_RECORD_AUDIO_LOWLEVEL = 1031,
403  WARN_ADM_PLAYOUT_AUDIO_LOWLEVEL = 1032,
411  WARN_ADM_WINDOWS_NO_DATA_READY_EVENT = 1040,
415  WARN_APM_HOWLING = 1051,
419  WARN_ADM_GLITCH_STATE = 1052,
423  WARN_ADM_IMPROPER_SETTINGS = 1053,
427  WARN_ADM_WIN_CORE_NO_RECORDING_DEVICE = 1322,
432  WARN_ADM_WIN_CORE_NO_PLAYOUT_DEVICE = 1323,
440  WARN_ADM_WIN_CORE_IMPROPER_CAPTURE_RELEASE = 1324,
441 };
442 
446 enum ERROR_CODE_TYPE {
450  ERR_OK = 0,
451  // 1~1000
455  ERR_FAILED = 1,
460  ERR_INVALID_ARGUMENT = 2,
467  ERR_NOT_READY = 3,
471  ERR_NOT_SUPPORTED = 4,
475  ERR_REFUSED = 5,
479  ERR_BUFFER_TOO_SMALL = 6,
483  ERR_NOT_INITIALIZED = 7,
487  ERR_INVALID_STATE = 8,
492  ERR_NO_PERMISSION = 9,
498  ERR_TIMEDOUT = 10,
503  ERR_CANCELED = 11,
509  ERR_TOO_OFTEN = 12,
515  ERR_BIND_SOCKET = 13,
520  ERR_NET_DOWN = 14,
526  ERR_JOIN_CHANNEL_REJECTED = 17,
533  ERR_LEAVE_CHANNEL_REJECTED = 18,
537  ERR_ALREADY_IN_USE = 19,
542  ERR_ABORTED = 20,
547  ERR_INIT_NET_ENGINE = 21,
552  ERR_RESOURCE_LIMITED = 22,
558  ERR_INVALID_APP_ID = 101,
563  ERR_INVALID_CHANNEL_NAME = 102,
569  ERR_NO_SERVER_RESOURCES = 103,
582  ERR_TOKEN_EXPIRED = 109,
599  ERR_INVALID_TOKEN = 110,
604  ERR_CONNECTION_INTERRUPTED = 111, // only used in web sdk
609  ERR_CONNECTION_LOST = 112, // only used in web sdk
614  ERR_NOT_IN_CHANNEL = 113,
619  ERR_SIZE_TOO_LARGE = 114,
624  ERR_BITRATE_LIMIT = 115,
629  ERR_TOO_MANY_DATA_STREAMS = 116,
633  ERR_STREAM_MESSAGE_TIMEOUT = 117,
637  ERR_SET_CLIENT_ROLE_NOT_AUTHORIZED = 119,
642  ERR_DECRYPTION_FAILED = 120,
646  ERR_INVALID_USER_ID = 121,
650  ERR_CLIENT_IS_BANNED_BY_SERVER = 123,
656  ERR_ENCRYPTED_STREAM_NOT_ALLOWED_PUBLISH = 130,
657 
661  ERR_LICENSE_CREDENTIAL_INVALID = 131,
662 
666  ERR_INVALID_USER_ACCOUNT = 134,
667 
673  ERR_MODULE_NOT_FOUND = 157,
674 
675  // Licensing, keep the license error code same as the main version
676  ERR_CERT_RAW = 157,
677  ERR_CERT_JSON_PART = 158,
678  ERR_CERT_JSON_INVAL = 159,
679  ERR_CERT_JSON_NOMEM = 160,
680  ERR_CERT_CUSTOM = 161,
681  ERR_CERT_CREDENTIAL = 162,
682  ERR_CERT_SIGN = 163,
683  ERR_CERT_FAIL = 164,
684  ERR_CERT_BUF = 165,
685  ERR_CERT_NULL = 166,
686  ERR_CERT_DUEDATE = 167,
687  ERR_CERT_REQUEST = 168,
688 
689  // PcmSend Error num
690  ERR_PCMSEND_FORMAT = 200, // unsupport pcm format
691  ERR_PCMSEND_BUFFEROVERFLOW = 201, // buffer overflow, the pcm send rate too quickly
692 
694  // signaling: 400~600
695  ERR_LOGIN_ALREADY_LOGIN = 428,
696 
698  // 1001~2000
702  ERR_LOAD_MEDIA_ENGINE = 1001,
708  ERR_ADM_GENERAL_ERROR = 1005,
713  ERR_ADM_INIT_PLAYOUT = 1008,
717  ERR_ADM_START_PLAYOUT = 1009,
721  ERR_ADM_STOP_PLAYOUT = 1010,
726  ERR_ADM_INIT_RECORDING = 1011,
730  ERR_ADM_START_RECORDING = 1012,
734  ERR_ADM_STOP_RECORDING = 1013,
738  ERR_VDM_CAMERA_NOT_AUTHORIZED = 1501,
739 };
740 
741 enum LICENSE_ERROR_TYPE {
745  LICENSE_ERR_INVALID = 1,
749  LICENSE_ERR_EXPIRE = 2,
753  LICENSE_ERR_MINUTES_EXCEED = 3,
757  LICENSE_ERR_LIMITED_PERIOD = 4,
761  LICENSE_ERR_DIFF_DEVICES = 5,
765  LICENSE_ERR_INTERNAL = 99,
766 };
767 
771 enum AUDIO_SESSION_OPERATION_RESTRICTION {
775  AUDIO_SESSION_OPERATION_RESTRICTION_NONE = 0,
779  AUDIO_SESSION_OPERATION_RESTRICTION_SET_CATEGORY = 1,
783  AUDIO_SESSION_OPERATION_RESTRICTION_CONFIGURE_SESSION = 1 << 1,
788  AUDIO_SESSION_OPERATION_RESTRICTION_DEACTIVATE_SESSION = 1 << 2,
793  AUDIO_SESSION_OPERATION_RESTRICTION_ALL = 1 << 7,
794 };
795 
796 typedef const char* user_id_t;
797 typedef void* view_t;
798 
802 struct UserInfo {
812  bool hasAudio;
818  bool hasVideo;
819 
820  UserInfo() : hasAudio(false), hasVideo(false) {}
821 };
822 
823 typedef util::AList<UserInfo> UserList;
824 
825 // Shared between Agora Service and Rtc Engine
826 namespace rtc {
827 
831 enum USER_OFFLINE_REASON_TYPE {
835  USER_OFFLINE_QUIT = 0,
841  USER_OFFLINE_DROPPED = 1,
845  USER_OFFLINE_BECOME_AUDIENCE = 2,
846 };
847 
848 enum INTERFACE_ID_TYPE {
849  AGORA_IID_AUDIO_DEVICE_MANAGER = 1,
850  AGORA_IID_VIDEO_DEVICE_MANAGER = 2,
851  AGORA_IID_PARAMETER_ENGINE = 3,
852  AGORA_IID_MEDIA_ENGINE = 4,
853  AGORA_IID_AUDIO_ENGINE = 5,
854  AGORA_IID_VIDEO_ENGINE = 6,
855  AGORA_IID_RTC_CONNECTION = 7,
856  AGORA_IID_SIGNALING_ENGINE = 8,
857  AGORA_IID_MEDIA_ENGINE_REGULATOR = 9,
858  AGORA_IID_LOCAL_SPATIAL_AUDIO = 11,
859  AGORA_IID_STATE_SYNC = 13,
860  AGORA_IID_META_SERVICE = 14,
861  AGORA_IID_MUSIC_CONTENT_CENTER = 15,
862  AGORA_IID_H265_TRANSCODER = 16,
863 };
864 
868 enum QUALITY_TYPE {
873  QUALITY_UNKNOWN __deprecated = 0,
877  QUALITY_EXCELLENT = 1,
882  QUALITY_GOOD = 2,
886  QUALITY_POOR = 3,
890  QUALITY_BAD = 4,
894  QUALITY_VBAD = 5,
898  QUALITY_DOWN = 6,
902  QUALITY_UNSUPPORTED = 7,
906  QUALITY_DETECTING = 8,
907 };
908 
912 enum FIT_MODE_TYPE {
917  MODE_COVER = 1,
918 
924  MODE_CONTAIN = 2,
925 };
926 
930 enum VIDEO_ORIENTATION {
934  VIDEO_ORIENTATION_0 = 0,
938  VIDEO_ORIENTATION_90 = 90,
942  VIDEO_ORIENTATION_180 = 180,
946  VIDEO_ORIENTATION_270 = 270
947 };
948 
952 enum FRAME_RATE {
956  FRAME_RATE_FPS_1 = 1,
960  FRAME_RATE_FPS_7 = 7,
964  FRAME_RATE_FPS_10 = 10,
968  FRAME_RATE_FPS_15 = 15,
972  FRAME_RATE_FPS_24 = 24,
976  FRAME_RATE_FPS_30 = 30,
980  FRAME_RATE_FPS_60 = 60,
981 };
982 
983 enum FRAME_WIDTH {
984  FRAME_WIDTH_960 = 960,
985 };
986 
987 enum FRAME_HEIGHT {
988  FRAME_HEIGHT_540 = 540,
989 };
990 
991 
995 enum VIDEO_FRAME_TYPE {
997  VIDEO_FRAME_TYPE_BLANK_FRAME = 0,
999  VIDEO_FRAME_TYPE_KEY_FRAME = 3,
1001  VIDEO_FRAME_TYPE_DELTA_FRAME = 4,
1003  VIDEO_FRAME_TYPE_B_FRAME = 5,
1005  VIDEO_FRAME_TYPE_DROPPABLE_FRAME = 6,
1007  VIDEO_FRAME_TYPE_UNKNOW
1008 };
1009 
1013 enum ORIENTATION_MODE {
1021  ORIENTATION_MODE_ADAPTIVE = 0,
1028  ORIENTATION_MODE_FIXED_LANDSCAPE = 1,
1035  ORIENTATION_MODE_FIXED_PORTRAIT = 2,
1036 };
1037 
1041 enum DEGRADATION_PREFERENCE {
1049  MAINTAIN_QUALITY = 0,
1055  MAINTAIN_FRAMERATE = 1,
1062  MAINTAIN_BALANCED = 2,
1066  MAINTAIN_RESOLUTION = 3,
1070  DISABLED = 100,
1071 };
1072 
1080  int width;
1084  int height;
1085  VideoDimensions() : width(640), height(480) {}
1086  VideoDimensions(int w, int h) : width(w), height(h) {}
1087  bool operator==(const VideoDimensions& rhs) const {
1088  return width == rhs.width && height == rhs.height;
1089  }
1090 };
1091 
1097 const int STANDARD_BITRATE = 0;
1098 
1106 const int COMPATIBLE_BITRATE = -1;
1107 
1111 const int DEFAULT_MIN_BITRATE = -1;
1112 
1116 const int DEFAULT_MIN_BITRATE_EQUAL_TO_TARGET_BITRATE = -2;
1117 
1121 enum SCREEN_CAPTURE_FRAMERATE_CAPABILITY {
1122  SCREEN_CAPTURE_FRAMERATE_CAPABILITY_15_FPS = 0,
1123  SCREEN_CAPTURE_FRAMERATE_CAPABILITY_30_FPS = 1,
1124  SCREEN_CAPTURE_FRAMERATE_CAPABILITY_60_FPS = 2,
1125 };
1126 
1130 enum VIDEO_CODEC_CAPABILITY_LEVEL {
1132  CODEC_CAPABILITY_LEVEL_UNSPECIFIED = -1,
1134  CODEC_CAPABILITY_LEVEL_BASIC_SUPPORT = 5,
1136  CODEC_CAPABILITY_LEVEL_1080P30FPS = 10,
1138  CODEC_CAPABILITY_LEVEL_1080P60FPS = 20,
1140  CODEC_CAPABILITY_LEVEL_4K60FPS = 30,
1141 };
1142 
1146 enum VIDEO_CODEC_TYPE {
1147  VIDEO_CODEC_NONE = 0,
1151  VIDEO_CODEC_VP8 = 1,
1155  VIDEO_CODEC_H264 = 2,
1159  VIDEO_CODEC_H265 = 3,
1164  VIDEO_CODEC_GENERIC = 6,
1168  VIDEO_CODEC_GENERIC_H264 = 7,
1172  VIDEO_CODEC_AV1 = 12,
1176  VIDEO_CODEC_VP9 = 13,
1180  VIDEO_CODEC_GENERIC_JPEG = 20,
1181 };
1182 
1186 enum TCcMode {
1190  CC_ENABLED,
1194  CC_DISABLED,
1195 };
1196 
1204  TCcMode ccMode;
1208  VIDEO_CODEC_TYPE codecType;
1209 
1267 
1268  SenderOptions()
1269  : ccMode(CC_ENABLED),
1270  codecType(VIDEO_CODEC_H265),
1271  targetBitrate(6500) {}
1272 };
1273 
1277 enum AUDIO_CODEC_TYPE {
1281  AUDIO_CODEC_OPUS = 1,
1282  // kIsac = 2,
1286  AUDIO_CODEC_PCMA = 3,
1290  AUDIO_CODEC_PCMU = 4,
1294  AUDIO_CODEC_G722 = 5,
1295  // kIlbc = 6,
1297  // AUDIO_CODEC_AAC = 7,
1301  AUDIO_CODEC_AACLC = 8,
1305  AUDIO_CODEC_HEAAC = 9,
1309  AUDIO_CODEC_JC1 = 10,
1313  AUDIO_CODEC_HEAAC2 = 11,
1317  AUDIO_CODEC_LPCNET = 12,
1318 };
1319 
1323 enum AUDIO_ENCODING_TYPE {
1328  AUDIO_ENCODING_TYPE_AAC_16000_LOW = 0x010101,
1333  AUDIO_ENCODING_TYPE_AAC_16000_MEDIUM = 0x010102,
1338  AUDIO_ENCODING_TYPE_AAC_32000_LOW = 0x010201,
1343  AUDIO_ENCODING_TYPE_AAC_32000_MEDIUM = 0x010202,
1348  AUDIO_ENCODING_TYPE_AAC_32000_HIGH = 0x010203,
1353  AUDIO_ENCODING_TYPE_AAC_48000_MEDIUM = 0x010302,
1358  AUDIO_ENCODING_TYPE_AAC_48000_HIGH = 0x010303,
1363  AUDIO_ENCODING_TYPE_OPUS_16000_LOW = 0x020101,
1368  AUDIO_ENCODING_TYPE_OPUS_16000_MEDIUM = 0x020102,
1373  AUDIO_ENCODING_TYPE_OPUS_48000_MEDIUM = 0x020302,
1378  AUDIO_ENCODING_TYPE_OPUS_48000_HIGH = 0x020303,
1379 };
1380 
1384 enum WATERMARK_FIT_MODE {
1389  FIT_MODE_COVER_POSITION,
1394  FIT_MODE_USE_IMAGE_RATIO
1395 };
1396 
1402  : speech(true),
1403  sendEvenIfEmpty(true) {}
1404 
1410  bool speech;
1417 };
1418 
1424  : codec(AUDIO_CODEC_AACLC),
1425  sampleRateHz(0),
1426  samplesPerChannel(0),
1427  numberOfChannels(0),
1428  captureTimeMs(0) {}
1429 
1431  : codec(rhs.codec),
1440  AUDIO_CODEC_TYPE codec;
1459 
1463  int64_t captureTimeMs;
1464 };
1469  AudioPcmDataInfo() : samplesPerChannel(0), channelNum(0), samplesOut(0), elapsedTimeMs(0), ntpTimeMs(0) {}
1470 
1473  channelNum(rhs.channelNum),
1474  samplesOut(rhs.samplesOut),
1476  ntpTimeMs(rhs.ntpTimeMs) {}
1477 
1482 
1483  int16_t channelNum;
1484 
1485  // Output
1489  size_t samplesOut;
1493  int64_t elapsedTimeMs;
1497  int64_t ntpTimeMs;
1498 };
1502 enum H264PacketizeMode {
1506  NonInterleaved = 0, // Mode 1 - STAP-A, FU-A is allowed
1510  SingleNalUnit, // Mode 0 - only single NALU allowed
1511 };
1512 
1516 enum VIDEO_STREAM_TYPE {
1520  VIDEO_STREAM_HIGH = 0,
1524  VIDEO_STREAM_LOW = 1,
1525 };
1526 
1541 
1543 };
1544 
1545 
1548 enum MAX_USER_ACCOUNT_LENGTH_TYPE
1549 {
1552  MAX_USER_ACCOUNT_LENGTH = 256
1553 };
1554 
1560  : uid(0),
1561  codecType(VIDEO_CODEC_H264),
1562  width(0),
1563  height(0),
1564  framesPerSecond(0),
1565  frameType(VIDEO_FRAME_TYPE_BLANK_FRAME),
1566  rotation(VIDEO_ORIENTATION_0),
1567  trackId(0),
1568  captureTimeMs(0),
1569  decodeTimeMs(0),
1570  streamType(VIDEO_STREAM_HIGH) {}
1571 
1573  : uid(rhs.uid),
1574  codecType(rhs.codecType),
1575  width(rhs.width),
1576  height(rhs.height),
1578  frameType(rhs.frameType),
1579  rotation(rhs.rotation),
1580  trackId(rhs.trackId),
1583  streamType(rhs.streamType) {}
1584 
1585  EncodedVideoFrameInfo& operator=(const EncodedVideoFrameInfo& rhs) {
1586  if (this == &rhs) return *this;
1587  uid = rhs.uid;
1588  codecType = rhs.codecType;
1589  width = rhs.width;
1590  height = rhs.height;
1592  frameType = rhs.frameType;
1593  rotation = rhs.rotation;
1594  trackId = rhs.trackId;
1596  decodeTimeMs = rhs.decodeTimeMs;
1597  streamType = rhs.streamType;
1598  return *this;
1599  }
1600 
1604  uid_t uid;
1608  VIDEO_CODEC_TYPE codecType;
1612  int width;
1616  int height;
1626  VIDEO_FRAME_TYPE frameType;
1630  VIDEO_ORIENTATION rotation;
1634  int trackId; // This can be reserved for multiple video tracks, we need to create different ssrc
1635  // and additional payload for later implementation.
1639  int64_t captureTimeMs;
1643  int64_t decodeTimeMs;
1647  VIDEO_STREAM_TYPE streamType;
1648 
1649 };
1650 
1654 enum COMPRESSION_PREFERENCE {
1658  PREFER_LOW_LATENCY,
1662  PREFER_QUALITY,
1663 };
1664 
1668 enum ENCODING_PREFERENCE {
1672  PREFER_AUTO = -1,
1676  PREFER_SOFTWARE = 0,
1680  PREFER_HARDWARE = 1,
1681 };
1682 
1687 
1691  ENCODING_PREFERENCE encodingPreference;
1692 
1696  COMPRESSION_PREFERENCE compressionPreference;
1697 
1698  AdvanceOptions() : encodingPreference(PREFER_AUTO),
1699  compressionPreference(PREFER_LOW_LATENCY) {}
1700 
1701  AdvanceOptions(ENCODING_PREFERENCE encoding_preference,
1702  COMPRESSION_PREFERENCE compression_preference) :
1703  encodingPreference(encoding_preference),
1704  compressionPreference(compression_preference) {}
1705 
1706  bool operator==(const AdvanceOptions& rhs) const {
1707  return encodingPreference == rhs.encodingPreference &&
1708  compressionPreference == rhs.compressionPreference;
1709  }
1710 
1711 };
1712 
1716 enum VIDEO_MIRROR_MODE_TYPE {
1720  VIDEO_MIRROR_MODE_AUTO = 0,
1724  VIDEO_MIRROR_MODE_ENABLED = 1,
1728  VIDEO_MIRROR_MODE_DISABLED = 2,
1729 };
1730 
1731 
1733 enum CODEC_CAP_MASK {
1735  CODEC_CAP_MASK_NONE = 0,
1736 
1738  CODEC_CAP_MASK_HW_DEC = 1 << 0,
1739 
1741  CODEC_CAP_MASK_HW_ENC = 1 << 1,
1742 
1744  CODEC_CAP_MASK_SW_DEC = 1 << 2,
1745 
1747  CODEC_CAP_MASK_SW_ENC = 1 << 3,
1748 };
1749 
1751  VIDEO_CODEC_CAPABILITY_LEVEL hwDecodingLevel;
1752  VIDEO_CODEC_CAPABILITY_LEVEL swDecodingLevel;
1753 
1754  CodecCapLevels(): hwDecodingLevel(CODEC_CAPABILITY_LEVEL_UNSPECIFIED), swDecodingLevel(CODEC_CAPABILITY_LEVEL_UNSPECIFIED) {}
1755 };
1756 
1760  VIDEO_CODEC_TYPE codecType;
1765 
1766  CodecCapInfo(): codecType(VIDEO_CODEC_NONE), codecCapMask(0) {}
1767 };
1768 
1776  VIDEO_CODEC_TYPE codecType;
1841  int bitrate;
1842 
1862  ORIENTATION_MODE orientationMode;
1866  DEGRADATION_PREFERENCE degradationPreference;
1867 
1872  VIDEO_MIRROR_MODE_TYPE mirrorMode;
1873 
1878 
1879  VideoEncoderConfiguration(const VideoDimensions& d, int f, int b, ORIENTATION_MODE m, VIDEO_MIRROR_MODE_TYPE mirror = VIDEO_MIRROR_MODE_DISABLED)
1880  : codecType(VIDEO_CODEC_NONE),
1881  dimensions(d),
1882  frameRate(f),
1883  bitrate(b),
1884  minBitrate(DEFAULT_MIN_BITRATE),
1885  orientationMode(m),
1886  degradationPreference(MAINTAIN_QUALITY),
1887  mirrorMode(mirror),
1888  advanceOptions(PREFER_AUTO, PREFER_LOW_LATENCY) {}
1889  VideoEncoderConfiguration(int width, int height, int f, int b, ORIENTATION_MODE m, VIDEO_MIRROR_MODE_TYPE mirror = VIDEO_MIRROR_MODE_DISABLED)
1890  : codecType(VIDEO_CODEC_NONE),
1891  dimensions(width, height),
1892  frameRate(f),
1893  bitrate(b),
1894  minBitrate(DEFAULT_MIN_BITRATE),
1895  orientationMode(m),
1896  degradationPreference(MAINTAIN_QUALITY),
1897  mirrorMode(mirror),
1898  advanceOptions(PREFER_AUTO, PREFER_LOW_LATENCY) {}
1899  VideoEncoderConfiguration(const VideoEncoderConfiguration& config)
1900  : codecType(config.codecType),
1901  dimensions(config.dimensions),
1902  frameRate(config.frameRate),
1903  bitrate(config.bitrate),
1904  minBitrate(config.minBitrate),
1907  mirrorMode(config.mirrorMode),
1908  advanceOptions(config.advanceOptions) {}
1909  VideoEncoderConfiguration()
1910  : codecType(VIDEO_CODEC_NONE),
1911  dimensions(FRAME_WIDTH_960, FRAME_HEIGHT_540),
1912  frameRate(FRAME_RATE_FPS_15),
1913  bitrate(STANDARD_BITRATE),
1914  minBitrate(DEFAULT_MIN_BITRATE),
1915  orientationMode(ORIENTATION_MODE_ADAPTIVE),
1916  degradationPreference(MAINTAIN_QUALITY),
1917  mirrorMode(VIDEO_MIRROR_MODE_DISABLED),
1918  advanceOptions(PREFER_AUTO, PREFER_LOW_LATENCY) {}
1919 
1920  VideoEncoderConfiguration& operator=(const VideoEncoderConfiguration& rhs) {
1921  if (this == &rhs) return *this;
1922  codecType = rhs.codecType;
1923  dimensions = rhs.dimensions;
1924  frameRate = rhs.frameRate;
1925  bitrate = rhs.bitrate;
1926  minBitrate = rhs.minBitrate;
1927  orientationMode = rhs.orientationMode;
1928  degradationPreference = rhs.degradationPreference;
1929  mirrorMode = rhs.mirrorMode;
1930  advanceOptions = rhs.advanceOptions;
1931  return *this;
1932  }
1933 };
1934 
1958  bool ordered;
1959 };
1960 
1964 enum SIMULCAST_STREAM_MODE {
1965  /*
1966  * disable simulcast stream until receive request for enable simulcast stream by other broadcaster
1967  */
1968  AUTO_SIMULCAST_STREAM = -1,
1969  /*
1970  * disable simulcast stream
1971  */
1972  DISABLE_SIMULCAST_STREAM = 0,
1973  /*
1974  * always enable simulcast stream
1975  */
1976  ENABLE_SIMULCAST_STREAM = 1,
1977 };
1978 
1995  SimulcastStreamConfig() : dimensions(160, 120), kBitrate(65), framerate(5) {}
1996  bool operator==(const SimulcastStreamConfig& rhs) const {
1997  return dimensions == rhs.dimensions && kBitrate == rhs.kBitrate && framerate == rhs.framerate;
1998  }
1999 };
2000 
2005 struct Rectangle {
2009  int x;
2013  int y;
2017  int width;
2021  int height;
2022 
2023  Rectangle() : x(0), y(0), width(0), height(0) {}
2024  Rectangle(int xx, int yy, int ww, int hh) : x(xx), y(yy), width(ww), height(hh) {}
2025 };
2026 
2041  float xRatio;
2047  float yRatio;
2053  float widthRatio;
2054 
2055  WatermarkRatio() : xRatio(0.0), yRatio(0.0), widthRatio(0.0) {}
2056  WatermarkRatio(float x, float y, float width) : xRatio(x), yRatio(y), widthRatio(width) {}
2057 };
2058 
2087  WATERMARK_FIT_MODE mode;
2088 
2090  : visibleInPreview(true),
2091  positionInLandscapeMode(0, 0, 0, 0),
2092  positionInPortraitMode(0, 0, 0, 0),
2093  mode(FIT_MODE_COVER_POSITION) {}
2094 };
2095 
2099 struct RtcStats {
2103  unsigned int duration;
2107  unsigned int txBytes;
2111  unsigned int rxBytes;
2115  unsigned int txAudioBytes;
2119  unsigned int txVideoBytes;
2123  unsigned int rxAudioBytes;
2127  unsigned int rxVideoBytes;
2131  unsigned short txKBitRate;
2135  unsigned short rxKBitRate;
2139  unsigned short rxAudioKBitRate;
2143  unsigned short txAudioKBitRate;
2147  unsigned short rxVideoKBitRate;
2151  unsigned short txVideoKBitRate;
2155  unsigned short lastmileDelay;
2159  unsigned int userCount;
2166  double cpuAppUsage;
2256  RtcStats()
2257  : duration(0),
2258  txBytes(0),
2259  rxBytes(0),
2260  txAudioBytes(0),
2261  txVideoBytes(0),
2262  rxAudioBytes(0),
2263  rxVideoBytes(0),
2264  txKBitRate(0),
2265  rxKBitRate(0),
2266  rxAudioKBitRate(0),
2267  txAudioKBitRate(0),
2268  rxVideoKBitRate(0),
2269  txVideoKBitRate(0),
2270  lastmileDelay(0),
2271  userCount(0),
2272  cpuAppUsage(0.0),
2273  cpuTotalUsage(0.0),
2274  gatewayRtt(0),
2275  memoryAppUsageRatio(0.0),
2276  memoryTotalUsageRatio(0.0),
2278  connectTimeMs(0),
2288  txPacketLossRate(0),
2289  rxPacketLossRate(0) {}
2290 };
2291 
2295 enum CLIENT_ROLE_TYPE {
2299  CLIENT_ROLE_BROADCASTER = 1,
2303  CLIENT_ROLE_AUDIENCE = 2,
2304 };
2305 
2309 enum QUALITY_ADAPT_INDICATION {
2313  ADAPT_NONE = 0,
2317  ADAPT_UP_BANDWIDTH = 1,
2321  ADAPT_DOWN_BANDWIDTH = 2,
2322 };
2323 
2328 enum AUDIENCE_LATENCY_LEVEL_TYPE
2329 {
2333  AUDIENCE_LATENCY_LEVEL_LOW_LATENCY = 1,
2337  AUDIENCE_LATENCY_LEVEL_ULTRA_LOW_LATENCY = 2,
2338 };
2339 
2344 {
2348  AUDIENCE_LATENCY_LEVEL_TYPE audienceLatencyLevel;
2349 
2351  : audienceLatencyLevel(AUDIENCE_LATENCY_LEVEL_ULTRA_LOW_LATENCY) {}
2352 };
2353 
2357 enum EXPERIENCE_QUALITY_TYPE {
2359  EXPERIENCE_QUALITY_GOOD = 0,
2361  EXPERIENCE_QUALITY_BAD = 1,
2362 };
2363 
2367 enum EXPERIENCE_POOR_REASON {
2371  EXPERIENCE_REASON_NONE = 0,
2375  REMOTE_NETWORK_QUALITY_POOR = 1,
2379  LOCAL_NETWORK_QUALITY_POOR = 2,
2383  WIRELESS_SIGNAL_POOR = 4,
2388  WIFI_BLUETOOTH_COEXIST = 8,
2389 };
2390 
2394 enum AUDIO_AINS_MODE {
2398  AINS_MODE_BALANCED = 0,
2402  AINS_MODE_AGGRESSIVE = 1,
2406  AINS_MODE_ULTRALOWLATENCY = 2
2407 };
2408 
2412 enum AUDIO_PROFILE_TYPE {
2421  AUDIO_PROFILE_DEFAULT = 0,
2425  AUDIO_PROFILE_SPEECH_STANDARD = 1,
2429  AUDIO_PROFILE_MUSIC_STANDARD = 2,
2436  AUDIO_PROFILE_MUSIC_STANDARD_STEREO = 3,
2440  AUDIO_PROFILE_MUSIC_HIGH_QUALITY = 4,
2447  AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO = 5,
2451  AUDIO_PROFILE_IOT = 6,
2452  AUDIO_PROFILE_NUM = 7
2453 };
2454 
2458 enum AUDIO_SCENARIO_TYPE {
2463  AUDIO_SCENARIO_DEFAULT = 0,
2469  AUDIO_SCENARIO_GAME_STREAMING = 3,
2475  AUDIO_SCENARIO_CHATROOM = 5,
2479  AUDIO_SCENARIO_CHORUS = 7,
2483  AUDIO_SCENARIO_MEETING = 8,
2487  AUDIO_SCENARIO_NUM = 9,
2488 };
2489 
2493 struct VideoFormat {
2494  OPTIONAL_ENUM_SIZE_T {
2496  kMaxWidthInPixels = 3840,
2498  kMaxHeightInPixels = 2160,
2500  kMaxFps = 60,
2501  };
2502 
2506  int width; // Number of pixels.
2510  int height; // Number of pixels.
2514  int fps;
2515  VideoFormat() : width(FRAME_WIDTH_960), height(FRAME_HEIGHT_540), fps(FRAME_RATE_FPS_15) {}
2516  VideoFormat(int w, int h, int f) : width(w), height(h), fps(f) {}
2517 
2518  bool operator<(const VideoFormat& fmt) const {
2519  if (height != fmt.height) {
2520  return height < fmt.height;
2521  } else if (width != fmt.width) {
2522  return width < fmt.width;
2523  } else {
2524  return fps < fmt.fps;
2525  }
2526  }
2527  bool operator==(const VideoFormat& fmt) const {
2528  return width == fmt.width && height == fmt.height && fps == fmt.fps;
2529  }
2530  bool operator!=(const VideoFormat& fmt) const {
2531  return !operator==(fmt);
2532  }
2533 };
2534 
2538 enum VIDEO_CONTENT_HINT {
2542  CONTENT_HINT_NONE,
2549  CONTENT_HINT_MOTION,
2555  CONTENT_HINT_DETAILS
2556 };
2560 enum SCREEN_SCENARIO_TYPE {
2566  SCREEN_SCENARIO_DOCUMENT = 1,
2571  SCREEN_SCENARIO_GAMING = 2,
2576  SCREEN_SCENARIO_VIDEO = 3,
2582  SCREEN_SCENARIO_RDC = 4,
2583 };
2584 
2585 
2589 enum VIDEO_APPLICATION_SCENARIO_TYPE {
2593  APPLICATION_SCENARIO_GENERAL = 0,
2597  APPLICATION_SCENARIO_MEETING = 1,
2598 };
2599 
2603 enum VIDEO_QOE_PREFERENCE_TYPE {
2607  VIDEO_QOE_PREFERENCE_BALANCE = 1,
2611  VIDEO_QOE_PREFERENCE_DELAY_FIRST = 2,
2615  VIDEO_QOE_PREFERENCE_PICTURE_QUALITY_FIRST = 3,
2619  VIDEO_QOE_PREFERENCE_FLUENCY_FIRST = 4,
2620 
2621 };
2622 
2626 enum CAPTURE_BRIGHTNESS_LEVEL_TYPE {
2630  CAPTURE_BRIGHTNESS_LEVEL_INVALID = -1,
2633  CAPTURE_BRIGHTNESS_LEVEL_NORMAL = 0,
2636  CAPTURE_BRIGHTNESS_LEVEL_BRIGHT = 1,
2639  CAPTURE_BRIGHTNESS_LEVEL_DARK = 2,
2640 };
2641 
2645 enum LOCAL_AUDIO_STREAM_STATE {
2649  LOCAL_AUDIO_STREAM_STATE_STOPPED = 0,
2653  LOCAL_AUDIO_STREAM_STATE_RECORDING = 1,
2657  LOCAL_AUDIO_STREAM_STATE_ENCODING = 2,
2661  LOCAL_AUDIO_STREAM_STATE_FAILED = 3
2662 };
2663 
2667 enum LOCAL_AUDIO_STREAM_REASON {
2671  LOCAL_AUDIO_STREAM_REASON_OK = 0,
2675  LOCAL_AUDIO_STREAM_REASON_FAILURE = 1,
2679  LOCAL_AUDIO_STREAM_REASON_DEVICE_NO_PERMISSION = 2,
2686  LOCAL_AUDIO_STREAM_REASON_DEVICE_BUSY = 3,
2690  LOCAL_AUDIO_STREAM_REASON_RECORD_FAILURE = 4,
2694  LOCAL_AUDIO_STREAM_REASON_ENCODE_FAILURE = 5,
2697  LOCAL_AUDIO_STREAM_REASON_NO_RECORDING_DEVICE = 6,
2700  LOCAL_AUDIO_STREAM_REASON_NO_PLAYOUT_DEVICE = 7,
2704  LOCAL_AUDIO_STREAM_REASON_INTERRUPTED = 8,
2707  LOCAL_AUDIO_STREAM_REASON_RECORD_INVALID_ID = 9,
2710  LOCAL_AUDIO_STREAM_REASON_PLAYOUT_INVALID_ID = 10,
2711 };
2712 
2715 enum LOCAL_VIDEO_STREAM_STATE {
2719  LOCAL_VIDEO_STREAM_STATE_STOPPED = 0,
2724  LOCAL_VIDEO_STREAM_STATE_CAPTURING = 1,
2728  LOCAL_VIDEO_STREAM_STATE_ENCODING = 2,
2732  LOCAL_VIDEO_STREAM_STATE_FAILED = 3
2733 };
2734 
2738 enum LOCAL_VIDEO_STREAM_REASON {
2742  LOCAL_VIDEO_STREAM_REASON_OK = 0,
2746  LOCAL_VIDEO_STREAM_REASON_FAILURE = 1,
2751  LOCAL_VIDEO_STREAM_REASON_DEVICE_NO_PERMISSION = 2,
2756  LOCAL_VIDEO_STREAM_REASON_DEVICE_BUSY = 3,
2762  LOCAL_VIDEO_STREAM_REASON_CAPTURE_FAILURE = 4,
2766  LOCAL_VIDEO_STREAM_REASON_CODEC_NOT_SUPPORT = 5,
2771  LOCAL_VIDEO_STREAM_REASON_CAPTURE_INBACKGROUND = 6,
2778  LOCAL_VIDEO_STREAM_REASON_CAPTURE_MULTIPLE_FOREGROUND_APPS = 7,
2784  LOCAL_VIDEO_STREAM_REASON_DEVICE_NOT_FOUND = 8,
2789  LOCAL_VIDEO_STREAM_REASON_DEVICE_DISCONNECTED = 9,
2794  LOCAL_VIDEO_STREAM_REASON_DEVICE_INVALID_ID = 10,
2798  LOCAL_VIDEO_STREAM_REASON_DEVICE_SYSTEM_PRESSURE = 101,
2804  LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_MINIMIZED = 11,
2819  LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_CLOSED = 12,
2821  LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_OCCLUDED = 13,
2823  LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_NOT_SUPPORTED = 20,
2825  LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_FAILURE = 21,
2827  LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_NO_PERMISSION = 22,
2833  LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_AUTO_FALLBACK = 24,
2835  LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_HIDDEN = 25,
2837  LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_RECOVER_FROM_HIDDEN = 26,
2839  LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_RECOVER_FROM_MINIMIZED = 27,
2847  LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_PAUSED = 28,
2849  LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_RESUMED = 29,
2850 
2851 };
2852 
2856 enum REMOTE_AUDIO_STATE
2857 {
2863  REMOTE_AUDIO_STATE_STOPPED = 0, // Default state, audio is started or remote user disabled/muted audio stream
2867  REMOTE_AUDIO_STATE_STARTING = 1, // The first audio frame packet has been received
2873  REMOTE_AUDIO_STATE_DECODING = 2, // The first remote audio frame has been decoded or fronzen state ends
2878  REMOTE_AUDIO_STATE_FROZEN = 3, // Remote audio is frozen, probably due to network issue
2883  REMOTE_AUDIO_STATE_FAILED = 4, // Remote audio play failed
2884 };
2885 
2889 enum REMOTE_AUDIO_STATE_REASON
2890 {
2894  REMOTE_AUDIO_REASON_INTERNAL = 0,
2898  REMOTE_AUDIO_REASON_NETWORK_CONGESTION = 1,
2902  REMOTE_AUDIO_REASON_NETWORK_RECOVERY = 2,
2907  REMOTE_AUDIO_REASON_LOCAL_MUTED = 3,
2912  REMOTE_AUDIO_REASON_LOCAL_UNMUTED = 4,
2917  REMOTE_AUDIO_REASON_REMOTE_MUTED = 5,
2922  REMOTE_AUDIO_REASON_REMOTE_UNMUTED = 6,
2926  REMOTE_AUDIO_REASON_REMOTE_OFFLINE = 7,
2927 };
2928 
2932 enum REMOTE_VIDEO_STATE {
2938  REMOTE_VIDEO_STATE_STOPPED = 0,
2942  REMOTE_VIDEO_STATE_STARTING = 1,
2948  REMOTE_VIDEO_STATE_DECODING = 2,
2952  REMOTE_VIDEO_STATE_FROZEN = 3,
2956  REMOTE_VIDEO_STATE_FAILED = 4,
2957 };
2961 enum REMOTE_VIDEO_STATE_REASON {
2965  REMOTE_VIDEO_STATE_REASON_INTERNAL = 0,
2969  REMOTE_VIDEO_STATE_REASON_NETWORK_CONGESTION = 1,
2973  REMOTE_VIDEO_STATE_REASON_NETWORK_RECOVERY = 2,
2977  REMOTE_VIDEO_STATE_REASON_LOCAL_MUTED = 3,
2981  REMOTE_VIDEO_STATE_REASON_LOCAL_UNMUTED = 4,
2985  REMOTE_VIDEO_STATE_REASON_REMOTE_MUTED = 5,
2989  REMOTE_VIDEO_STATE_REASON_REMOTE_UNMUTED = 6,
2993  REMOTE_VIDEO_STATE_REASON_REMOTE_OFFLINE = 7,
2997  REMOTE_VIDEO_STATE_REASON_AUDIO_FALLBACK = 8,
3001  REMOTE_VIDEO_STATE_REASON_AUDIO_FALLBACK_RECOVERY = 9,
3004  REMOTE_VIDEO_STATE_REASON_VIDEO_STREAM_TYPE_CHANGE_TO_LOW = 10,
3007  REMOTE_VIDEO_STATE_REASON_VIDEO_STREAM_TYPE_CHANGE_TO_HIGH = 11,
3010  REMOTE_VIDEO_STATE_REASON_SDK_IN_BACKGROUND = 12,
3011 
3014  REMOTE_VIDEO_STATE_REASON_CODEC_NOT_SUPPORT = 13,
3015 
3016 };
3017 
3021 enum REMOTE_USER_STATE {
3025  USER_STATE_MUTE_AUDIO = (1 << 0),
3029  USER_STATE_MUTE_VIDEO = (1 << 1),
3033  USER_STATE_ENABLE_VIDEO = (1 << 4),
3037  USER_STATE_ENABLE_LOCAL_VIDEO = (1 << 8),
3038 };
3039 
3045  VideoTrackInfo()
3046  : isLocal(false), ownerUid(0), trackId(0), channelId(OPTIONAL_NULLPTR)
3047  , streamType(VIDEO_STREAM_HIGH), codecType(VIDEO_CODEC_H265)
3048  , encodedFrameOnly(false), sourceType(VIDEO_SOURCE_CAMERA_PRIMARY)
3049  , observationPosition(agora::media::base::POSITION_POST_CAPTURER) {}
3055  bool isLocal;
3059  uid_t ownerUid;
3063  track_id_t trackId;
3067  const char* channelId;
3071  VIDEO_STREAM_TYPE streamType;
3075  VIDEO_CODEC_TYPE codecType;
3085  VIDEO_SOURCE_TYPE sourceType;
3090 };
3091 
3095 enum REMOTE_VIDEO_DOWNSCALE_LEVEL {
3099  REMOTE_VIDEO_DOWNSCALE_LEVEL_NONE,
3103  REMOTE_VIDEO_DOWNSCALE_LEVEL_1,
3107  REMOTE_VIDEO_DOWNSCALE_LEVEL_2,
3111  REMOTE_VIDEO_DOWNSCALE_LEVEL_3,
3115  REMOTE_VIDEO_DOWNSCALE_LEVEL_4,
3116 };
3117 
3128  uid_t uid;
3134  unsigned int volume; // [0,255]
3144  unsigned int vad;
3150  double voicePitch;
3151 
3152  AudioVolumeInfo() : uid(0), volume(0), vad(0), voicePitch(0.0) {}
3153 };
3154 
3158 struct DeviceInfo {
3159  /*
3160  * Whether the audio device supports ultra-low-latency capture and playback:
3161  * - `true`: The device supports ultra-low-latency capture and playback.
3162  * - `false`: The device does not support ultra-low-latency capture and playback.
3163  */
3164  bool isLowLatencyAudioSupported;
3165 
3166  DeviceInfo() : isLowLatencyAudioSupported(false) {}
3167 };
3168 
3173  public:
3174  virtual ~IPacketObserver() {}
3178  struct Packet {
3184  const unsigned char* buffer;
3188  unsigned int size;
3189 
3190  Packet() : buffer(OPTIONAL_NULLPTR), size(0) {}
3191  };
3199  virtual bool onSendAudioPacket(Packet& packet) = 0;
3207  virtual bool onSendVideoPacket(Packet& packet) = 0;
3215  virtual bool onReceiveAudioPacket(Packet& packet) = 0;
3223  virtual bool onReceiveVideoPacket(Packet& packet) = 0;
3224 };
3225 
3229 enum AUDIO_SAMPLE_RATE_TYPE {
3233  AUDIO_SAMPLE_RATE_32000 = 32000,
3237  AUDIO_SAMPLE_RATE_44100 = 44100,
3241  AUDIO_SAMPLE_RATE_48000 = 48000,
3242 };
3246 enum VIDEO_CODEC_TYPE_FOR_STREAM {
3250  VIDEO_CODEC_H264_FOR_STREAM = 1,
3254  VIDEO_CODEC_H265_FOR_STREAM = 2,
3255 };
3256 
3260 enum VIDEO_CODEC_PROFILE_TYPE {
3264  VIDEO_CODEC_PROFILE_BASELINE = 66,
3268  VIDEO_CODEC_PROFILE_MAIN = 77,
3272  VIDEO_CODEC_PROFILE_HIGH = 100,
3273 };
3274 
3275 
3279 enum AUDIO_CODEC_PROFILE_TYPE {
3283  AUDIO_CODEC_PROFILE_LC_AAC = 0,
3287  AUDIO_CODEC_PROFILE_HE_AAC = 1,
3291  AUDIO_CODEC_PROFILE_HE_AAC_V2 = 2,
3292 };
3293 
3298 {
3318  unsigned short txPacketLossRate;
3335 };
3336 
3337 
3341 enum RTMP_STREAM_PUBLISH_STATE {
3345  RTMP_STREAM_PUBLISH_STATE_IDLE = 0,
3349  RTMP_STREAM_PUBLISH_STATE_CONNECTING = 1,
3353  RTMP_STREAM_PUBLISH_STATE_RUNNING = 2,
3359  RTMP_STREAM_PUBLISH_STATE_RECOVERING = 3,
3363  RTMP_STREAM_PUBLISH_STATE_FAILURE = 4,
3367  RTMP_STREAM_PUBLISH_STATE_DISCONNECTING = 5,
3368 };
3369 
3373 enum RTMP_STREAM_PUBLISH_REASON {
3377  RTMP_STREAM_PUBLISH_REASON_OK = 0,
3382  RTMP_STREAM_PUBLISH_REASON_INVALID_ARGUMENT = 1,
3386  RTMP_STREAM_PUBLISH_REASON_ENCRYPTED_STREAM_NOT_ALLOWED = 2,
3390  RTMP_STREAM_PUBLISH_REASON_CONNECTION_TIMEOUT = 3,
3394  RTMP_STREAM_PUBLISH_REASON_INTERNAL_SERVER_ERROR = 4,
3398  RTMP_STREAM_PUBLISH_REASON_RTMP_SERVER_ERROR = 5,
3402  RTMP_STREAM_PUBLISH_REASON_TOO_OFTEN = 6,
3406  RTMP_STREAM_PUBLISH_REASON_REACH_LIMIT = 7,
3410  RTMP_STREAM_PUBLISH_REASON_NOT_AUTHORIZED = 8,
3414  RTMP_STREAM_PUBLISH_REASON_STREAM_NOT_FOUND = 9,
3418  RTMP_STREAM_PUBLISH_REASON_FORMAT_NOT_SUPPORTED = 10,
3422  RTMP_STREAM_PUBLISH_REASON_NOT_BROADCASTER = 11, // Note: match to ERR_PUBLISH_STREAM_NOT_BROADCASTER in AgoraBase.h
3426  RTMP_STREAM_PUBLISH_REASON_TRANSCODING_NO_MIX_STREAM = 13, // Note: match to ERR_PUBLISH_STREAM_TRANSCODING_NO_MIX_STREAM in AgoraBase.h
3430  RTMP_STREAM_PUBLISH_REASON_NET_DOWN = 14, // Note: match to ERR_NET_DOWN in AgoraBase.h
3434  RTMP_STREAM_PUBLISH_REASON_INVALID_APPID = 15, // Note: match to ERR_PUBLISH_STREAM_APPID_INVALID in AgoraBase.h
3436  RTMP_STREAM_PUBLISH_REASON_INVALID_PRIVILEGE = 16,
3440  RTMP_STREAM_UNPUBLISH_REASON_OK = 100,
3441 };
3442 
3444 enum RTMP_STREAMING_EVENT {
3448  RTMP_STREAMING_EVENT_FAILED_LOAD_IMAGE = 1,
3452  RTMP_STREAMING_EVENT_URL_ALREADY_IN_USE = 2,
3456  RTMP_STREAMING_EVENT_ADVANCED_FEATURE_NOT_SUPPORT = 3,
3460  RTMP_STREAMING_EVENT_REQUEST_TOO_OFTEN = 4,
3461 };
3462 
3466 typedef struct RtcImage {
3470  const char* url;
3474  int x;
3478  int y;
3482  int width;
3486  int height;
3494  int zOrder;
3500  double alpha;
3501 
3502  RtcImage() : url(OPTIONAL_NULLPTR), x(0), y(0), width(0), height(0), zOrder(0), alpha(1.0) {}
3503 } RtcImage;
3510  LiveStreamAdvancedFeature() : featureName(OPTIONAL_NULLPTR), opened(false) {}
3511  LiveStreamAdvancedFeature(const char* feat_name, bool open) : featureName(feat_name), opened(open) {}
3513  // static const char* LBHQ = "lbhq";
3515  // static const char* VEO = "veo";
3516 
3520  const char* featureName;
3521 
3527  bool opened;
3528 } ;
3529 
3533 enum CONNECTION_STATE_TYPE
3534 {
3540  CONNECTION_STATE_DISCONNECTED = 1,
3549  CONNECTION_STATE_CONNECTING = 2,
3557  CONNECTION_STATE_CONNECTED = 3,
3567  CONNECTION_STATE_RECONNECTING = 4,
3576  CONNECTION_STATE_FAILED = 5,
3577 };
3578 
3586  uid_t uid;
3590  int x;
3594  int y;
3598  int width;
3602  int height;
3610  int zOrder;
3616  double alpha;
3630 
3631  TranscodingUser()
3632  : uid(0),
3633  x(0),
3634  y(0),
3635  width(0),
3636  height(0),
3637  zOrder(0),
3638  alpha(1.0),
3639  audioChannel(0) {}
3640 };
3641 
3652  int width;
3659  int height;
3670 
3677 
3685  VIDEO_CODEC_PROFILE_TYPE videoCodecProfile;
3688  unsigned int backgroundColor;
3690  VIDEO_CODEC_TYPE_FOR_STREAM videoCodecType;
3694  unsigned int userCount;
3703 
3706  const char* metadata;
3715  unsigned int watermarkCount;
3716 
3725  unsigned int backgroundImageCount;
3726 
3729  AUDIO_SAMPLE_RATE_TYPE audioSampleRate;
3743  AUDIO_CODEC_PROFILE_TYPE audioCodecProfile;
3747 
3749  unsigned int advancedFeatureCount;
3750 
3751  LiveTranscoding()
3752  : width(360),
3753  height(640),
3754  videoBitrate(400),
3755  videoFramerate(15),
3756  lowLatency(false),
3757  videoGop(30),
3758  videoCodecProfile(VIDEO_CODEC_PROFILE_HIGH),
3759  backgroundColor(0x000000),
3760  videoCodecType(VIDEO_CODEC_H264_FOR_STREAM),
3761  userCount(0),
3762  transcodingUsers(OPTIONAL_NULLPTR),
3763  transcodingExtraInfo(OPTIONAL_NULLPTR),
3764  metadata(OPTIONAL_NULLPTR),
3765  watermark(OPTIONAL_NULLPTR),
3766  watermarkCount(0),
3767  backgroundImage(OPTIONAL_NULLPTR),
3769  audioSampleRate(AUDIO_SAMPLE_RATE_48000),
3770  audioBitrate(48),
3771  audioChannels(1),
3772  audioCodecProfile(AUDIO_CODEC_PROFILE_LC_AAC),
3773  advancedFeatures(OPTIONAL_NULLPTR),
3774  advancedFeatureCount(0) {}
3775 };
3776 
3784  VIDEO_SOURCE_TYPE sourceType;
3794  const char* imageUrl;
3802  int x;
3806  int y;
3810  int width;
3814  int height;
3820  int zOrder;
3824  double alpha;
3831  bool mirror;
3832 
3834  : sourceType(VIDEO_SOURCE_CAMERA_PRIMARY),
3835  remoteUserUid(0),
3836  imageUrl(OPTIONAL_NULLPTR),
3837  x(0),
3838  y(0),
3839  width(0),
3840  height(0),
3841  zOrder(0),
3842  alpha(1.0),
3843  mirror(false) {}
3844 };
3845 
3853  unsigned int streamCount;
3868 
3870 };
3871 
3872 enum VIDEO_TRANSCODER_ERROR {
3876  VT_ERR_VIDEO_SOURCE_NOT_READY = 1,
3880  VT_ERR_INVALID_VIDEO_SOURCE_TYPE = 2,
3884  VT_ERR_INVALID_IMAGE_PATH = 3,
3888  VT_ERR_UNSUPPORT_IMAGE_FORMAT = 4,
3892  VT_ERR_INVALID_LAYOUT = 5,
3896  VT_ERR_INTERNAL = 20
3897 };
3898 
3925 };
3926 
3930 enum LASTMILE_PROBE_RESULT_STATE {
3934  LASTMILE_PROBE_RESULT_COMPLETE = 1,
3938  LASTMILE_PROBE_RESULT_INCOMPLETE_NO_BWE = 2,
3942  LASTMILE_PROBE_RESULT_UNAVAILABLE = 3
3943 };
3944 
3952  unsigned int packetLossRate;
3956  unsigned int jitter;
3960  unsigned int availableBandwidth;
3961 
3963  jitter(0),
3964  availableBandwidth(0) {}
3965 };
3966 
3974  LASTMILE_PROBE_RESULT_STATE state;
3986  unsigned int rtt;
3987 
3989  : state(LASTMILE_PROBE_RESULT_UNAVAILABLE),
3990  rtt(0) {}
3991 };
3992 
3996 enum CONNECTION_CHANGED_REASON_TYPE
3997 {
4001  CONNECTION_CHANGED_CONNECTING = 0,
4005  CONNECTION_CHANGED_JOIN_SUCCESS = 1,
4009  CONNECTION_CHANGED_INTERRUPTED = 2,
4013  CONNECTION_CHANGED_BANNED_BY_SERVER = 3,
4017  CONNECTION_CHANGED_JOIN_FAILED = 4,
4021  CONNECTION_CHANGED_LEAVE_CHANNEL = 5,
4025  CONNECTION_CHANGED_INVALID_APP_ID = 6,
4029  CONNECTION_CHANGED_INVALID_CHANNEL_NAME = 7,
4035  CONNECTION_CHANGED_INVALID_TOKEN = 8,
4039  CONNECTION_CHANGED_TOKEN_EXPIRED = 9,
4045  CONNECTION_CHANGED_REJECTED_BY_SERVER = 10,
4049  CONNECTION_CHANGED_SETTING_PROXY_SERVER = 11,
4053  CONNECTION_CHANGED_RENEW_TOKEN = 12,
4057  CONNECTION_CHANGED_CLIENT_IP_ADDRESS_CHANGED = 13,
4061  CONNECTION_CHANGED_KEEP_ALIVE_TIMEOUT = 14,
4065  CONNECTION_CHANGED_REJOIN_SUCCESS = 15,
4069  CONNECTION_CHANGED_LOST = 16,
4073  CONNECTION_CHANGED_ECHO_TEST = 17,
4077  CONNECTION_CHANGED_CLIENT_IP_ADDRESS_CHANGED_BY_USER = 18,
4081  CONNECTION_CHANGED_SAME_UID_LOGIN = 19,
4085  CONNECTION_CHANGED_TOO_MANY_BROADCASTERS = 20,
4086 
4090  CONNECTION_CHANGED_LICENSE_VALIDATION_FAILURE = 21,
4091  /*
4092  * 22: The connection is failed due to certification verify failure.
4093  */
4094  CONNECTION_CHANGED_CERTIFICATION_VERYFY_FAILURE = 22,
4098  CONNECTION_CHANGED_STREAM_CHANNEL_NOT_AVAILABLE = 23,
4102  CONNECTION_CHANGED_INCONSISTENT_APPID = 24,
4103 };
4104 
4108 enum CLIENT_ROLE_CHANGE_FAILED_REASON {
4112  CLIENT_ROLE_CHANGE_FAILED_TOO_MANY_BROADCASTERS = 1,
4116  CLIENT_ROLE_CHANGE_FAILED_NOT_AUTHORIZED = 2,
4120  CLIENT_ROLE_CHANGE_FAILED_REQUEST_TIME_OUT = 3,
4124  CLIENT_ROLE_CHANGE_FAILED_CONNECTION_FAILED = 4,
4125 };
4126 
4130 enum WLACC_MESSAGE_REASON {
4134  WLACC_MESSAGE_REASON_WEAK_SIGNAL = 0,
4138  WLACC_MESSAGE_REASON_CHANNEL_CONGESTION = 1,
4139 };
4140 
4144 enum WLACC_SUGGEST_ACTION {
4148  WLACC_SUGGEST_ACTION_CLOSE_TO_WIFI = 0,
4152  WLACC_SUGGEST_ACTION_CONNECT_SSID = 1,
4156  WLACC_SUGGEST_ACTION_CHECK_5G = 2,
4160  WLACC_SUGGEST_ACTION_MODIFY_SSID = 3,
4161 };
4162 
4166 struct WlAccStats {
4170  unsigned short e2eDelayPercent;
4174  unsigned short frozenRatioPercent;
4178  unsigned short lossRatePercent;
4179 };
4180 
4184 enum NETWORK_TYPE {
4188  NETWORK_TYPE_UNKNOWN = -1,
4192  NETWORK_TYPE_DISCONNECTED = 0,
4196  NETWORK_TYPE_LAN = 1,
4200  NETWORK_TYPE_WIFI = 2,
4204  NETWORK_TYPE_MOBILE_2G = 3,
4208  NETWORK_TYPE_MOBILE_3G = 4,
4212  NETWORK_TYPE_MOBILE_4G = 5,
4216  NETWORK_TYPE_MOBILE_5G = 6,
4217 };
4218 
4222 enum VIDEO_VIEW_SETUP_MODE {
4226  VIDEO_VIEW_SETUP_REPLACE = 0,
4230  VIDEO_VIEW_SETUP_ADD = 1,
4234  VIDEO_VIEW_SETUP_REMOVE = 2,
4235 };
4236 
4240 struct VideoCanvas {
4244  uid_t uid;
4245 
4249  uid_t subviewUid;
4253  view_t view;
4262  media::base::RENDER_MODE_TYPE renderMode;
4272  VIDEO_MIRROR_MODE_TYPE mirrorMode;
4277  VIDEO_VIEW_SETUP_MODE setupMode;
4282  VIDEO_SOURCE_TYPE sourceType;
4305  media::base::VIDEO_MODULE_POSITION position;
4306 
4307  VideoCanvas()
4308  : uid(0), subviewUid(0), view(NULL), backgroundColor(0x00000000), renderMode(media::base::RENDER_MODE_HIDDEN), mirrorMode(VIDEO_MIRROR_MODE_AUTO),
4309  setupMode(VIDEO_VIEW_SETUP_REPLACE), sourceType(VIDEO_SOURCE_CAMERA_PRIMARY), mediaPlayerId(-ERR_NOT_READY),
4310  cropArea(0, 0, 0, 0), enableAlphaMask(false), position(media::base::POSITION_POST_CAPTURER) {}
4311 
4312  VideoCanvas(view_t v, media::base::RENDER_MODE_TYPE m, VIDEO_MIRROR_MODE_TYPE mt)
4313  : uid(0), subviewUid(0), view(v), backgroundColor(0x00000000), renderMode(m), mirrorMode(mt), setupMode(VIDEO_VIEW_SETUP_REPLACE),
4314  sourceType(VIDEO_SOURCE_CAMERA_PRIMARY), mediaPlayerId(-ERR_NOT_READY),
4315  cropArea(0, 0, 0, 0), enableAlphaMask(false), position(media::base::POSITION_POST_CAPTURER) {}
4316 
4317  VideoCanvas(view_t v, media::base::RENDER_MODE_TYPE m, VIDEO_MIRROR_MODE_TYPE mt, uid_t u)
4318  : uid(u), subviewUid(0), view(v), backgroundColor(0x00000000), renderMode(m), mirrorMode(mt), setupMode(VIDEO_VIEW_SETUP_REPLACE),
4319  sourceType(VIDEO_SOURCE_CAMERA_PRIMARY), mediaPlayerId(-ERR_NOT_READY),
4320  cropArea(0, 0, 0, 0), enableAlphaMask(false), position(media::base::POSITION_POST_CAPTURER) {}
4321 
4322  VideoCanvas(view_t v, media::base::RENDER_MODE_TYPE m, VIDEO_MIRROR_MODE_TYPE mt, uid_t u, uid_t subu)
4323  : uid(u), subviewUid(subu), view(v), backgroundColor(0x00000000), renderMode(m), mirrorMode(mt), setupMode(VIDEO_VIEW_SETUP_REPLACE),
4324  sourceType(VIDEO_SOURCE_CAMERA_PRIMARY), mediaPlayerId(-ERR_NOT_READY),
4325  cropArea(0, 0, 0, 0), enableAlphaMask(false), position(media::base::POSITION_POST_CAPTURER) {}
4326 };
4327 
4340  };
4341 
4345 
4348 
4352 
4356 
4360 
4361  BeautyOptions(LIGHTENING_CONTRAST_LEVEL contrastLevel, float lightening, float smoothness, float redness, float sharpness) : lighteningContrastLevel(contrastLevel), lighteningLevel(lightening), smoothnessLevel(smoothness), rednessLevel(redness), sharpnessLevel(sharpness) {}
4362 
4364 };
4365 
4375  };
4388  };
4389 
4393 
4397 
4398  LowlightEnhanceOptions(LOW_LIGHT_ENHANCE_MODE lowlightMode, LOW_LIGHT_ENHANCE_LEVEL lowlightLevel) : mode(lowlightMode), level(lowlightLevel) {}
4399 
4401 };
4415  };
4436  };
4440 
4444 
4445  VideoDenoiserOptions(VIDEO_DENOISER_MODE denoiserMode, VIDEO_DENOISER_LEVEL denoiserLevel) : mode(denoiserMode), level(denoiserLevel) {}
4446 
4448 };
4449 
4458 
4464 
4465  ColorEnhanceOptions(float stength, float skinProtect) : strengthLevel(stength), skinProtectLevel(skinProtect) {}
4466 
4468 };
4469 
4497  };
4498 
4508  };
4509 
4513 
4522  unsigned int color;
4523 
4530  const char* source;
4531 
4536 
4538 };
4539 
4541 
4542  enum SEG_MODEL_TYPE {
4543 
4544  SEG_MODEL_AI = 1,
4545  SEG_MODEL_GREEN = 2
4546  };
4547 
4548  SEG_MODEL_TYPE modelType;
4549 
4550  float greenCapacity;
4551 
4552 
4553  SegmentationProperty() : modelType(SEG_MODEL_AI), greenCapacity(0.5){}
4554 };
4555 
4558 enum AUDIO_TRACK_TYPE {
4562  AUDIO_TRACK_INVALID = -1,
4569  AUDIO_TRACK_MIXABLE = 0,
4575  AUDIO_TRACK_DIRECT = 1,
4576 };
4577 
4587 
4589  : enableLocalPlayback(true) {}
4590 };
4591 
4612 enum VOICE_BEAUTIFIER_PRESET {
4615  VOICE_BEAUTIFIER_OFF = 0x00000000,
4621  CHAT_BEAUTIFIER_MAGNETIC = 0x01010100,
4627  CHAT_BEAUTIFIER_FRESH = 0x01010200,
4633  CHAT_BEAUTIFIER_VITALITY = 0x01010300,
4642  SINGING_BEAUTIFIER = 0x01020100,
4645  TIMBRE_TRANSFORMATION_VIGOROUS = 0x01030100,
4648  TIMBRE_TRANSFORMATION_DEEP = 0x01030200,
4651  TIMBRE_TRANSFORMATION_MELLOW = 0x01030300,
4654  TIMBRE_TRANSFORMATION_FALSETTO = 0x01030400,
4657  TIMBRE_TRANSFORMATION_FULL = 0x01030500,
4660  TIMBRE_TRANSFORMATION_CLEAR = 0x01030600,
4663  TIMBRE_TRANSFORMATION_RESOUNDING = 0x01030700,
4666  TIMBRE_TRANSFORMATION_RINGING = 0x01030800,
4676  ULTRA_HIGH_QUALITY_VOICE = 0x01040100
4677 };
4678 
4698 enum AUDIO_EFFECT_PRESET {
4701  AUDIO_EFFECT_OFF = 0x00000000,
4704  ROOM_ACOUSTICS_KTV = 0x02010100,
4707  ROOM_ACOUSTICS_VOCAL_CONCERT = 0x02010200,
4710  ROOM_ACOUSTICS_STUDIO = 0x02010300,
4713  ROOM_ACOUSTICS_PHONOGRAPH = 0x02010400,
4720  ROOM_ACOUSTICS_VIRTUAL_STEREO = 0x02010500,
4723  ROOM_ACOUSTICS_SPACIAL = 0x02010600,
4726  ROOM_ACOUSTICS_ETHEREAL = 0x02010700,
4738  ROOM_ACOUSTICS_3D_VOICE = 0x02010800,
4749  ROOM_ACOUSTICS_VIRTUAL_SURROUND_SOUND = 0x02010900,
4756  VOICE_CHANGER_EFFECT_UNCLE = 0x02020100,
4762  VOICE_CHANGER_EFFECT_OLDMAN = 0x02020200,
4768  VOICE_CHANGER_EFFECT_BOY = 0x02020300,
4775  VOICE_CHANGER_EFFECT_SISTER = 0x02020400,
4781  VOICE_CHANGER_EFFECT_GIRL = 0x02020500,
4785  VOICE_CHANGER_EFFECT_PIGKING = 0x02020600,
4788  VOICE_CHANGER_EFFECT_HULK = 0x02020700,
4795  STYLE_TRANSFORMATION_RNB = 0x02030100,
4802  STYLE_TRANSFORMATION_POPULAR = 0x02030200,
4807  PITCH_CORRECTION = 0x02040100,
4808 
4812 };
4813 
4816 enum VOICE_CONVERSION_PRESET {
4819  VOICE_CONVERSION_OFF = 0x00000000,
4822  VOICE_CHANGER_NEUTRAL = 0x03010100,
4825  VOICE_CHANGER_SWEET = 0x03010200,
4828  VOICE_CHANGER_SOLID = 0x03010300,
4831  VOICE_CHANGER_BASS = 0x03010400,
4834  VOICE_CHANGER_CARTOON = 0x03010500,
4837  VOICE_CHANGER_CHILDLIKE = 0x03010600,
4840  VOICE_CHANGER_PHONE_OPERATOR = 0x03010700,
4843  VOICE_CHANGER_MONSTER = 0x03010800,
4846  VOICE_CHANGER_TRANSFORMERS = 0x03010900,
4849  VOICE_CHANGER_GROOT = 0x03010A00,
4852  VOICE_CHANGER_DARTH_VADER = 0x03010B00,
4855  VOICE_CHANGER_IRON_LADY = 0x03010C00,
4858  VOICE_CHANGER_SHIN_CHAN = 0x03010D00,
4861  VOICE_CHANGER_GIRLISH_MAN = 0x03010E00,
4864  VOICE_CHANGER_CHIPMUNK = 0x03010F00,
4865 
4866 };
4867 
4870 enum HEADPHONE_EQUALIZER_PRESET {
4873  HEADPHONE_EQUALIZER_OFF = 0x00000000,
4876  HEADPHONE_EQUALIZER_OVEREAR = 0x04000001,
4879  HEADPHONE_EQUALIZER_INEAR = 0x04000002
4880 };
4881 
4911  int bitrate;
4934 
4942  unsigned int highLightColor;
4951 
4953  : dimensions(1920, 1080), frameRate(5), bitrate(STANDARD_BITRATE), captureMouseCursor(true), windowFocus(false), excludeWindowList(OPTIONAL_NULLPTR), excludeWindowCount(0), highLightWidth(0), highLightColor(0), enableHighLight(false) {}
4954  ScreenCaptureParameters(const VideoDimensions& d, int f, int b)
4956  ScreenCaptureParameters(int width, int height, int f, int b)
4957  : dimensions(width, height), frameRate(f), bitrate(b), captureMouseCursor(true), windowFocus(false), excludeWindowList(OPTIONAL_NULLPTR), excludeWindowCount(0), highLightWidth(0), highLightColor(0), enableHighLight(false){}
4958  ScreenCaptureParameters(int width, int height, int f, int b, bool cur, bool fcs)
4959  : dimensions(width, height), frameRate(f), bitrate(b), captureMouseCursor(cur), windowFocus(fcs), excludeWindowList(OPTIONAL_NULLPTR), excludeWindowCount(0), highLightWidth(0), highLightColor(0), enableHighLight(false) {}
4960  ScreenCaptureParameters(int width, int height, int f, int b, view_t *ex, int cnt)
4962  ScreenCaptureParameters(int width, int height, int f, int b, bool cur, bool fcs, view_t *ex, int cnt)
4964 };
4965 
4969 enum AUDIO_RECORDING_QUALITY_TYPE {
4973  AUDIO_RECORDING_QUALITY_LOW = 0,
4977  AUDIO_RECORDING_QUALITY_MEDIUM = 1,
4981  AUDIO_RECORDING_QUALITY_HIGH = 2,
4985  AUDIO_RECORDING_QUALITY_ULTRA_HIGH = 3,
4986 };
4987 
4991 enum AUDIO_FILE_RECORDING_TYPE {
4995  AUDIO_FILE_RECORDING_MIC = 1,
4999  AUDIO_FILE_RECORDING_PLAYBACK = 2,
5003  AUDIO_FILE_RECORDING_MIXED = 3,
5004 };
5005 
5009 enum AUDIO_ENCODED_FRAME_OBSERVER_POSITION {
5013  AUDIO_ENCODED_FRAME_OBSERVER_POSITION_RECORD = 1,
5017  AUDIO_ENCODED_FRAME_OBSERVER_POSITION_PLAYBACK = 2,
5021  AUDIO_ENCODED_FRAME_OBSERVER_POSITION_MIXED = 3,
5022 };
5023 
5032  const char* filePath;
5038  bool encode;
5052  AUDIO_FILE_RECORDING_TYPE fileRecordingType;
5057  AUDIO_RECORDING_QUALITY_TYPE quality;
5058 
5065 
5067  : filePath(OPTIONAL_NULLPTR),
5068  encode(false),
5069  sampleRate(32000),
5070  fileRecordingType(AUDIO_FILE_RECORDING_MIXED),
5071  quality(AUDIO_RECORDING_QUALITY_LOW),
5072  recordingChannel(1) {}
5073 
5074  AudioRecordingConfiguration(const char* file_path, int sample_rate, AUDIO_RECORDING_QUALITY_TYPE quality_type, int channel)
5075  : filePath(file_path),
5076  encode(false),
5077  sampleRate(sample_rate),
5078  fileRecordingType(AUDIO_FILE_RECORDING_MIXED),
5079  quality(quality_type),
5080  recordingChannel(channel) {}
5081 
5082  AudioRecordingConfiguration(const char* file_path, bool enc, int sample_rate, AUDIO_FILE_RECORDING_TYPE type, AUDIO_RECORDING_QUALITY_TYPE quality_type, int channel)
5083  : filePath(file_path),
5084  encode(enc),
5085  sampleRate(sample_rate),
5086  fileRecordingType(type),
5087  quality(quality_type),
5088  recordingChannel(channel) {}
5089 
5090  AudioRecordingConfiguration(const AudioRecordingConfiguration &rhs)
5091  : filePath(rhs.filePath),
5092  encode(rhs.encode),
5093  sampleRate(rhs.sampleRate),
5095  quality(rhs.quality),
5097 };
5098 
5106  AUDIO_ENCODED_FRAME_OBSERVER_POSITION postionType;
5110  AUDIO_ENCODING_TYPE encodingType;
5111 
5113  : postionType(AUDIO_ENCODED_FRAME_OBSERVER_POSITION_PLAYBACK),
5114  encodingType(AUDIO_ENCODING_TYPE_OPUS_48000_MEDIUM){}
5115 
5116 };
5121 public:
5132 virtual void onRecordAudioEncodedFrame(const uint8_t* frameBuffer, int length, const EncodedAudioFrameInfo& audioEncodedFrameInfo) = 0;
5133 
5144 virtual void onPlaybackAudioEncodedFrame(const uint8_t* frameBuffer, int length, const EncodedAudioFrameInfo& audioEncodedFrameInfo) = 0;
5145 
5156 virtual void onMixedAudioEncodedFrame(const uint8_t* frameBuffer, int length, const EncodedAudioFrameInfo& audioEncodedFrameInfo) = 0;
5157 
5158 virtual ~IAudioEncodedFrameObserver () {}
5159 };
5160 
5163 enum AREA_CODE {
5167  AREA_CODE_CN = 0x00000001,
5171  AREA_CODE_NA = 0x00000002,
5175  AREA_CODE_EU = 0x00000004,
5179  AREA_CODE_AS = 0x00000008,
5183  AREA_CODE_JP = 0x00000010,
5187  AREA_CODE_IN = 0x00000020,
5191  AREA_CODE_GLOB = (0xFFFFFFFF)
5192 };
5193 
5194 enum AREA_CODE_EX {
5198  AREA_CODE_OC = 0x00000040,
5202  AREA_CODE_SA = 0x00000080,
5206  AREA_CODE_AF = 0x00000100,
5210  AREA_CODE_KR = 0x00000200,
5214  AREA_CODE_HKMC = 0x00000400,
5218  AREA_CODE_US = 0x00000800,
5222  AREA_CODE_OVS = 0xFFFFFFFE
5223 };
5224 
5228 enum CHANNEL_MEDIA_RELAY_ERROR {
5231  RELAY_OK = 0,
5234  RELAY_ERROR_SERVER_ERROR_RESPONSE = 1,
5240  RELAY_ERROR_SERVER_NO_RESPONSE = 2,
5243  RELAY_ERROR_NO_RESOURCE_AVAILABLE = 3,
5246  RELAY_ERROR_FAILED_JOIN_SRC = 4,
5249  RELAY_ERROR_FAILED_JOIN_DEST = 5,
5252  RELAY_ERROR_FAILED_PACKET_RECEIVED_FROM_SRC = 6,
5255  RELAY_ERROR_FAILED_PACKET_SENT_TO_DEST = 7,
5259  RELAY_ERROR_SERVER_CONNECTION_LOST = 8,
5262  RELAY_ERROR_INTERNAL_ERROR = 9,
5265  RELAY_ERROR_SRC_TOKEN_EXPIRED = 10,
5268  RELAY_ERROR_DEST_TOKEN_EXPIRED = 11,
5269 };
5270 
5274 enum CHANNEL_MEDIA_RELAY_STATE {
5278  RELAY_STATE_IDLE = 0,
5281  RELAY_STATE_CONNECTING = 1,
5284  RELAY_STATE_RUNNING = 2,
5287  RELAY_STATE_FAILURE = 3,
5288 };
5289 
5295  uid_t uid;
5299  const char* channelName;
5303  const char* token;
5304 
5305  ChannelMediaInfo() : uid(0), channelName(NULL), token(NULL) {}
5306  ChannelMediaInfo(const char* c, const char* t, uid_t u) : uid(u), channelName(c), token(t) {}
5307 };
5308 
5345 
5346  ChannelMediaRelayConfiguration() : srcInfo(OPTIONAL_NULLPTR), destInfos(OPTIONAL_NULLPTR), destCount(0) {}
5347 };
5348 
5357 
5359 
5360  bool operator==(const UplinkNetworkInfo& rhs) const {
5362  }
5363 };
5364 
5370  const char* userId;
5374  VIDEO_STREAM_TYPE stream_type;
5378  REMOTE_VIDEO_DOWNSCALE_LEVEL current_downscale_level;
5383 
5385  : userId(OPTIONAL_NULLPTR),
5386  stream_type(VIDEO_STREAM_HIGH),
5387  current_downscale_level(REMOTE_VIDEO_DOWNSCALE_LEVEL_NONE),
5388  expected_bitrate_bps(-1) {}
5389 
5391  : stream_type(rhs.stream_type),
5394  if (rhs.userId != OPTIONAL_NULLPTR) {
5395  const int len = std::strlen(rhs.userId);
5396  char* buf = new char[len + 1];
5397  std::memcpy(buf, rhs.userId, len);
5398  buf[len] = '\0';
5399  userId = buf;
5400  }
5401  }
5402 
5403  PeerDownlinkInfo& operator=(const PeerDownlinkInfo& rhs) {
5404  if (this == &rhs) return *this;
5405  userId = OPTIONAL_NULLPTR;
5406  stream_type = rhs.stream_type;
5407  current_downscale_level = rhs.current_downscale_level;
5408  expected_bitrate_bps = rhs.expected_bitrate_bps;
5409  if (rhs.userId != OPTIONAL_NULLPTR) {
5410  const int len = std::strlen(rhs.userId);
5411  char* buf = new char[len + 1];
5412  std::memcpy(buf, rhs.userId, len);
5413  buf[len] = '\0';
5414  userId = buf;
5415  }
5416  return *this;
5417  }
5418 
5419  ~PeerDownlinkInfo() { delete[] userId; }
5420  };
5421 
5442 
5447  peer_downlink_info(OPTIONAL_NULLPTR),
5449 
5454  peer_downlink_info(OPTIONAL_NULLPTR),
5456  if (total_received_video_count <= 0) return;
5457  peer_downlink_info = new PeerDownlinkInfo[total_received_video_count];
5458  for (int i = 0; i < total_received_video_count; ++i)
5460  }
5461 
5462  DownlinkNetworkInfo& operator=(const DownlinkNetworkInfo& rhs) {
5463  if (this == &rhs) return *this;
5464  lastmile_buffer_delay_time_ms = rhs.lastmile_buffer_delay_time_ms;
5465  bandwidth_estimation_bps = rhs.bandwidth_estimation_bps;
5466  total_downscale_level_count = rhs.total_downscale_level_count;
5467  peer_downlink_info = OPTIONAL_NULLPTR;
5468  total_received_video_count = rhs.total_received_video_count;
5469  if (total_received_video_count > 0) {
5470  peer_downlink_info = new PeerDownlinkInfo[total_received_video_count];
5471  for (int i = 0; i < total_received_video_count; ++i)
5472  peer_downlink_info[i] = rhs.peer_downlink_info[i];
5473  }
5474  return *this;
5475  }
5476 
5477  ~DownlinkNetworkInfo() { delete[] peer_downlink_info; }
5478 };
5479 
5486 enum ENCRYPTION_MODE {
5489  AES_128_XTS = 1,
5492  AES_128_ECB = 2,
5495  AES_256_XTS = 3,
5498  SM4_128_ECB = 4,
5501  AES_128_GCM = 5,
5504  AES_256_GCM = 6,
5508  AES_128_GCM2 = 7,
5511  AES_256_GCM2 = 8,
5514  MODE_END,
5515 };
5516 
5523  ENCRYPTION_MODE encryptionMode;
5529  const char* encryptionKey;
5536  uint8_t encryptionKdfSalt[32];
5537 
5539  : encryptionMode(AES_128_GCM2),
5540  encryptionKey(OPTIONAL_NULLPTR)
5541  {
5542  memset(encryptionKdfSalt, 0, sizeof(encryptionKdfSalt));
5543  }
5544 
5546  const char* getEncryptionString() const {
5547  switch(encryptionMode) {
5548  case AES_128_XTS:
5549  return "aes-128-xts";
5550  case AES_128_ECB:
5551  return "aes-128-ecb";
5552  case AES_256_XTS:
5553  return "aes-256-xts";
5554  case SM4_128_ECB:
5555  return "sm4-128-ecb";
5556  case AES_128_GCM:
5557  return "aes-128-gcm";
5558  case AES_256_GCM:
5559  return "aes-256-gcm";
5560  case AES_128_GCM2:
5561  return "aes-128-gcm-2";
5562  case AES_256_GCM2:
5563  return "aes-256-gcm-2";
5564  default:
5565  return "aes-128-gcm-2";
5566  }
5567  return "aes-128-gcm-2";
5568  }
5570 };
5571 
5574 enum ENCRYPTION_ERROR_TYPE {
5578  ENCRYPTION_ERROR_INTERNAL_FAILURE = 0,
5582  ENCRYPTION_ERROR_DECRYPTION_FAILURE = 1,
5586  ENCRYPTION_ERROR_ENCRYPTION_FAILURE = 2,
5587 };
5588 
5589 enum UPLOAD_ERROR_REASON
5590 {
5591  UPLOAD_SUCCESS = 0,
5592  UPLOAD_NET_ERROR = 1,
5593  UPLOAD_SERVER_ERROR = 2,
5594 };
5595 
5598 enum PERMISSION_TYPE {
5602  RECORD_AUDIO = 0,
5606  CAMERA = 1,
5607 
5608  SCREEN_CAPTURE = 2,
5609 };
5610 
5614 enum STREAM_SUBSCRIBE_STATE {
5618  SUB_STATE_IDLE = 0,
5631  SUB_STATE_NO_SUBSCRIBED = 1,
5635  SUB_STATE_SUBSCRIBING = 2,
5639  SUB_STATE_SUBSCRIBED = 3
5640 };
5641 
5645 enum STREAM_PUBLISH_STATE {
5649  PUB_STATE_IDLE = 0,
5657  PUB_STATE_NO_PUBLISHED = 1,
5661  PUB_STATE_PUBLISHING = 2,
5665  PUB_STATE_PUBLISHED = 3
5666 };
5667 
5672  view_t view;
5673  bool enableAudio;
5674  bool enableVideo;
5675  const char* token;
5676  const char* channelId;
5677  int intervalInSeconds;
5678 
5679  EchoTestConfiguration(view_t v, bool ea, bool ev, const char* t, const char* c, const int is)
5680  : view(v), enableAudio(ea), enableVideo(ev), token(t), channelId(c), intervalInSeconds(is) {}
5681 
5683  : view(OPTIONAL_NULLPTR), enableAudio(true), enableVideo(true), token(OPTIONAL_NULLPTR), channelId(OPTIONAL_NULLPTR), intervalInSeconds(2) {}
5684 };
5685 
5689 struct UserInfo {
5693  uid_t uid;
5697  char userAccount[MAX_USER_ACCOUNT_LENGTH];
5698 
5699  UserInfo() : uid(0) {
5700  userAccount[0] = '\0';
5701  }
5702 };
5703 
5707 enum EAR_MONITORING_FILTER_TYPE {
5711  EAR_MONITORING_FILTER_NONE = (1<<0),
5716  EAR_MONITORING_FILTER_BUILT_IN_AUDIO_FILTERS = (1<<1),
5720  EAR_MONITORING_FILTER_NOISE_SUPPRESSION = (1<<2)
5721 };
5722 
5726 enum THREAD_PRIORITY_TYPE {
5730  LOWEST = 0,
5734  LOW = 1,
5738  NORMAL = 2,
5742  HIGH = 3,
5746  HIGHEST = 4,
5750  CRITICAL = 5,
5751 };
5752 
5753 #if defined(__ANDROID__) || (defined(__APPLE__) && TARGET_OS_IOS)
5754 
5758 struct ScreenVideoParameters {
5785  VideoDimensions dimensions;
5791  int frameRate = 15;
5796  int bitrate;
5797  /*
5798  * The content hint of the screen sharing:
5799  */
5800  VIDEO_CONTENT_HINT contentHint = VIDEO_CONTENT_HINT::CONTENT_HINT_MOTION;
5801 
5802  ScreenVideoParameters() : dimensions(1280, 720) {}
5803 };
5804 
5808 struct ScreenAudioParameters {
5812  int sampleRate = 16000;
5816  int channels = 2;
5821  int captureSignalVolume = 100;
5822 };
5823 
5827 struct ScreenCaptureParameters2 {
5837  bool captureAudio = false;
5841  ScreenAudioParameters audioParams;
5851  bool captureVideo = true;
5855  ScreenVideoParameters videoParams;
5856 };
5857 #endif
5858 
5862 enum MEDIA_TRACE_EVENT {
5866  MEDIA_TRACE_EVENT_VIDEO_RENDERED = 0,
5870  MEDIA_TRACE_EVENT_VIDEO_DECODED,
5871 };
5872 
5926 };
5927 
5928 enum CONFIG_FETCH_TYPE {
5932  CONFIG_FETCH_TYPE_INITIALIZE = 1,
5936  CONFIG_FETCH_TYPE_JOIN_CHANNEL = 2,
5937 };
5938 
5939 
5941 enum LOCAL_PROXY_MODE {
5944  ConnectivityFirst = 0,
5947  LocalOnly = 1,
5948 };
5949 
5953  const char* serverDomain;
5956  const char* serverPath;
5965 
5966  LogUploadServerInfo() : serverDomain(NULL), serverPath(NULL), serverPort(0), serverHttps(true) {}
5967 
5968  LogUploadServerInfo(const char* domain, const char* path, int port, bool https) : serverDomain(domain), serverPath(path), serverPort(port), serverHttps(https) {}
5969 };
5970 
5975 };
5976 
5980  const char** ipList;
5986  const char** domainList;
5993  const char* verifyDomainName;
5996  LOCAL_PROXY_MODE mode;
6006  LocalAccessPointConfiguration() : ipList(NULL), ipListSize(0), domainList(NULL), domainListSize(0), verifyDomainName(NULL), mode(ConnectivityFirst), disableAut(true) {}
6007 };
6008 
6013  const char* channelId;
6017  uid_t uid;
6021  RecorderStreamInfo() : channelId(NULL), uid(0) {}
6022  RecorderStreamInfo(const char* channelId, uid_t uid) : channelId(channelId), uid(uid) {}
6023 };
6024 } // namespace rtc
6025 
6026 namespace base {
6027 
6029  public:
6030  virtual int queryInterface(rtc::INTERFACE_ID_TYPE iid, void** inter) = 0;
6031  virtual ~IEngineBase() {}
6032 };
6033 
6034 class AParameter : public agora::util::AutoPtr<IAgoraParameter> {
6035  public:
6036  AParameter(IEngineBase& engine) { initialize(&engine); }
6037  AParameter(IEngineBase* engine) { initialize(engine); }
6039 
6040  private:
6041  bool initialize(IEngineBase* engine) {
6042  IAgoraParameter* p = OPTIONAL_NULLPTR;
6043  if (engine && !engine->queryInterface(rtc::AGORA_IID_PARAMETER_ENGINE, (void**)&p)) reset(p);
6044  return p != OPTIONAL_NULLPTR;
6045  }
6046 };
6047 
6049  public:
6050  virtual ~LicenseCallback() {}
6051  virtual void onCertificateRequired() = 0;
6052  virtual void onLicenseRequest() = 0;
6053  virtual void onLicenseValidated() = 0;
6054  virtual void onLicenseError(int result) = 0;
6055 };
6056 
6057 } // namespace base
6058 
6095 };
6100 {
6104  const char* channelId;
6108  rtc::uid_t uid;
6112  user_id_t strUid;
6116  uint32_t x;
6120  uint32_t y;
6124  uint32_t width;
6128  uint32_t height;
6133  uint32_t videoState;
6134 
6135  VideoLayout() : channelId(OPTIONAL_NULLPTR), uid(0), strUid(OPTIONAL_NULLPTR), x(0), y(0), width(0), height(0), videoState(0) {}
6136 };
6137 } // namespace agora
6138 
6144 AGORA_API const char* AGORA_CALL getAgoraSdkVersion(int* build);
6145 
6151 AGORA_API const char* AGORA_CALL getAgoraSdkErrorDescription(int err);
6152 
6153 AGORA_API int AGORA_CALL setAgoraSdkExternalSymbolLoader(void* (*func)(const char* symname));
6154 
6162 AGORA_API int AGORA_CALL createAgoraCredential(agora::util::AString &credential);
6163 
6177 AGORA_API int AGORA_CALL getAgoraCertificateVerifyResult(const char *credential_buf, int credential_len,
6178  const char *certificate_buf, int certificate_len);
6179 
6187 AGORA_API void setAgoraLicenseCallback(agora::base::LicenseCallback *callback);
6188 
6196 AGORA_API agora::base::LicenseCallback* getAgoraLicenseCallback();
6197 
6198 /*
6199  * Get monotonic time in ms which can be used by capture time,
6200  * typical scenario is as follows:
6201  *
6202  * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6203  * | // custom audio/video base capture time, e.g. the first audio/video capture time. |
6204  * | int64_t custom_capture_time_base; |
6205  * | |
6206  * | int64_t agora_monotonic_time = getAgoraCurrentMonotonicTimeInMs(); |
6207  * | |
6208  * | // offset is fixed once calculated in the begining. |
6209  * | const int64_t offset = agora_monotonic_time - custom_capture_time_base; |
6210  * | |
6211  * | // realtime_custom_audio/video_capture_time is the origin capture time that customer provided.|
6212  * | // actual_audio/video_capture_time is the actual capture time transfered to sdk. |
6213  * | int64_t actual_audio_capture_time = realtime_custom_audio_capture_time + offset; |
6214  * | int64_t actual_video_capture_time = realtime_custom_video_capture_time + offset; |
6215  * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6216  *
6217  * @return
6218  * - >= 0: Success.
6219  * - < 0: Failure.
6220  */
6221 AGORA_API int64_t AGORA_CALL getAgoraCurrentMonotonicTimeInMs();
agora::rtc::LiveTranscoding::transcodingUsers
TranscodingUser * transcodingUsers
Definition: AgoraBase.h:3697
agora::rtc::LogUploadServerInfo::serverDomain
const char * serverDomain
Definition: AgoraBase.h:5953
agora::rtc::IPacketObserver::onReceiveVideoPacket
virtual bool onReceiveVideoPacket(Packet &packet)=0
agora::rtc::VideoCanvas::mediaPlayerId
int mediaPlayerId
Definition: AgoraBase.h:4288
agora::rtc::RtcImage::width
int width
Definition: AgoraBase.h:3482
agora::rtc::TranscodingVideoStream::zOrder
int zOrder
Definition: AgoraBase.h:3820
agora::rtc::RtcStats::firstAudioPacketDuration
int firstAudioPacketDuration
Definition: AgoraBase.h:2207
agora::VideoLayout
Definition: AgoraBase.h:6100
agora::VideoLayout::channelId
const char * channelId
Definition: AgoraBase.h:6104
agora::rtc::UserInfo
Definition: AgoraBase.h:5689
agora::rtc::TranscodingVideoStream::alpha
double alpha
Definition: AgoraBase.h:3824
agora::rtc::EncodedAudioFrameInfo::captureTimeMs
int64_t captureTimeMs
Definition: AgoraBase.h:1463
agora::rtc::VideoEncoderConfiguration::degradationPreference
DEGRADATION_PREFERENCE degradationPreference
Definition: AgoraBase.h:1866
agora::rtc::LastmileProbeResult
Definition: AgoraBase.h:3970
agora::rtc::AudioEncodedFrameObserverConfig
Definition: AgoraBase.h:5102
agora::rtc::ScreenCaptureParameters
Definition: AgoraBase.h:4885
agora::VideoLayout::x
uint32_t x
Definition: AgoraBase.h:6116
agora::rtc::WatermarkRatio
Definition: AgoraBase.h:2035
agora::rtc::AudioVolumeInfo
Definition: AgoraBase.h:3121
agora::rtc::VirtualBackgroundSource::BACKGROUND_BLUR_DEGREE
BACKGROUND_BLUR_DEGREE
Definition: AgoraBase.h:4501
agora::rtc::LastmileProbeResult::uplinkReport
LastmileProbeOneWayResult uplinkReport
Definition: AgoraBase.h:3978
agora::rtc::EncodedVideoFrameInfo::rotation
VIDEO_ORIENTATION rotation
Definition: AgoraBase.h:1630
agora::rtc::AdvancedConfigInfo::logUploadServer
LogUploadServerInfo logUploadServer
Definition: AgoraBase.h:5974
agora::rtc::BeautyOptions
Definition: AgoraBase.h:4330
agora::rtc::SenderOptions
Definition: AgoraBase.h:1200
agora::rtc::ScreenCaptureParameters::bitrate
int bitrate
Definition: AgoraBase.h:4911
agora::rtc::BeautyOptions::lighteningLevel
float lighteningLevel
Definition: AgoraBase.h:4347
agora::rtc::RtcStats::txVideoBytes
unsigned int txVideoBytes
Definition: AgoraBase.h:2119
agora::rtc::VirtualBackgroundSource::BACKGROUND_BLUR
@ BACKGROUND_BLUR
Definition: AgoraBase.h:4492
agora::rtc::LiveTranscoding::backgroundColor
unsigned int backgroundColor
Definition: AgoraBase.h:3688
agora::base::IAgoraParameter
Definition: IAgoraParameter.h:149
agora::rtc::AudioVolumeInfo::voicePitch
double voicePitch
Definition: AgoraBase.h:3150
agora::rtc::LastmileProbeConfig
Definition: AgoraBase.h:3902
agora::rtc::TranscodingUser::y
int y
Definition: AgoraBase.h:3594
agora::rtc::ScreenCaptureParameters::highLightWidth
int highLightWidth
Definition: AgoraBase.h:4938
agora::rtc::RtcStats::rxKBitRate
unsigned short rxKBitRate
Definition: AgoraBase.h:2135
agora::rtc::RtcStats::memoryTotalUsageRatio
double memoryTotalUsageRatio
Definition: AgoraBase.h:2192
agora::rtc::LocalAudioStats::txPacketLossRate
unsigned short txPacketLossRate
Definition: AgoraBase.h:3318
agora::rtc::VideoFormat::fps
int fps
Definition: AgoraBase.h:2514
agora::SpatialAudioParams::speaker_elevation
Optional< double > speaker_elevation
Definition: AgoraBase.h:6070
agora::rtc::VideoEncoderConfiguration::minBitrate
int minBitrate
Definition: AgoraBase.h:1858
agora::rtc::ScreenCaptureParameters::enableHighLight
bool enableHighLight
Definition: AgoraBase.h:4950
agora::rtc::VideoDenoiserOptions::VIDEO_DENOISER_AUTO
@ VIDEO_DENOISER_AUTO
Definition: AgoraBase.h:4412
agora::rtc::VideoCanvas::setupMode
VIDEO_VIEW_SETUP_MODE setupMode
Definition: AgoraBase.h:4277
agora::rtc::LowlightEnhanceOptions::LOW_LIGHT_ENHANCE_LEVEL_HIGH_QUALITY
@ LOW_LIGHT_ENHANCE_LEVEL_HIGH_QUALITY
Definition: AgoraBase.h:4383
agora::rtc::TranscodingUser::audioChannel
int audioChannel
Definition: AgoraBase.h:3629
agora::rtc::RtcStats::firstAudioPacketDurationAfterUnmute
int firstAudioPacketDurationAfterUnmute
Definition: AgoraBase.h:2227
agora::rtc::VideoFormat::width
int width
Definition: AgoraBase.h:2506
agora::rtc::ScreenCaptureParameters::windowFocus
bool windowFocus
Definition: AgoraBase.h:4922
agora::rtc::AudioEncodedFrameObserverConfig::encodingType
AUDIO_ENCODING_TYPE encodingType
Definition: AgoraBase.h:5110
agora::rtc::SenderOptions::codecType
VIDEO_CODEC_TYPE codecType
Definition: AgoraBase.h:1208
agora::rtc::EncodedAudioFrameInfo::codec
AUDIO_CODEC_TYPE codec
Definition: AgoraBase.h:1440
agora::rtc::LiveTranscoding::videoGop
int videoGop
Definition: AgoraBase.h:3680
agora::rtc::ChannelMediaRelayConfiguration::destCount
int destCount
Definition: AgoraBase.h:5344
agora::rtc::LocalAudioStats::audioDeviceDelay
int audioDeviceDelay
Definition: AgoraBase.h:3322
agora::rtc::LastmileProbeOneWayResult::jitter
unsigned int jitter
Definition: AgoraBase.h:3956
agora::rtc::BeautyOptions::smoothnessLevel
float smoothnessLevel
Definition: AgoraBase.h:4351
agora::rtc::VideoDenoiserOptions::level
VIDEO_DENOISER_LEVEL level
Definition: AgoraBase.h:4443
agora::rtc::VideoCanvas::mirrorMode
VIDEO_MIRROR_MODE_TYPE mirrorMode
Definition: AgoraBase.h:4272
agora::rtc::RtcStats::duration
unsigned int duration
Definition: AgoraBase.h:2103
agora::rtc::SimulcastStreamConfig::framerate
int framerate
Definition: AgoraBase.h:1994
agora::rtc::VideoDimensions::height
int height
Definition: AgoraBase.h:1084
agora::rtc::LocalAccessPointConfiguration::mode
LOCAL_PROXY_MODE mode
Definition: AgoraBase.h:5996
agora::rtc::LastmileProbeConfig::probeUplink
bool probeUplink
Definition: AgoraBase.h:3909
agora::rtc::LocalAccessPointConfiguration
Definition: AgoraBase.h:5977
agora::rtc::LiveTranscoding::videoCodecType
VIDEO_CODEC_TYPE_FOR_STREAM videoCodecType
Definition: AgoraBase.h:3690
agora::rtc::VideoDenoiserOptions::VIDEO_DENOISER_MODE
VIDEO_DENOISER_MODE
Definition: AgoraBase.h:4410
agora::rtc::LiveTranscoding
Definition: AgoraBase.h:3645
agora::rtc::RtcStats::txBytes
unsigned int txBytes
Definition: AgoraBase.h:2107
agora::rtc::VideoFormat::height
int height
Definition: AgoraBase.h:2510
agora::rtc::Rectangle
Definition: AgoraBase.h:2005
agora::rtc::LocalAccessPointConfiguration::ipList
const char ** ipList
Definition: AgoraBase.h:5980
agora::rtc::VideoCanvas::uid
uid_t uid
Definition: AgoraBase.h:4244
agora::rtc::RtcStats::firstVideoPacketDuration
int firstVideoPacketDuration
Definition: AgoraBase.h:2212
agora::rtc::AudioRecordingConfiguration::filePath
const char * filePath
Definition: AgoraBase.h:5032
agora::rtc::EncodedVideoFrameInfo
Definition: AgoraBase.h:1558
agora::rtc::ColorEnhanceOptions::strengthLevel
float strengthLevel
Definition: AgoraBase.h:4457
agora::SpatialAudioParams::speaker_distance
Optional< double > speaker_distance
Definition: AgoraBase.h:6074
agora::rtc::VirtualBackgroundSource::BACKGROUND_NONE
@ BACKGROUND_NONE
Definition: AgoraBase.h:4480
agora::rtc::BeautyOptions::rednessLevel
float rednessLevel
Definition: AgoraBase.h:4355
agora::rtc::RtcStats::rxVideoBytes
unsigned int rxVideoBytes
Definition: AgoraBase.h:2127
agora::rtc::TranscodingVideoStream::remoteUserUid
uid_t remoteUserUid
Definition: AgoraBase.h:3789
agora::rtc::VideoEncoderConfiguration::dimensions
VideoDimensions dimensions
Definition: AgoraBase.h:1780
agora::rtc::EncodedVideoFrameInfo::uid
uid_t uid
Definition: AgoraBase.h:1604
agora::rtc::EncodedAudioFrameInfo
Definition: AgoraBase.h:1422
agora::util::AutoPtr
Definition: AgoraBase.h:94
agora::rtc::LastmileProbeOneWayResult::packetLossRate
unsigned int packetLossRate
Definition: AgoraBase.h:3952
agora::UserInfo::hasAudio
bool hasAudio
Definition: AgoraBase.h:812
agora::rtc::ScreenCaptureParameters::excludeWindowCount
int excludeWindowCount
Definition: AgoraBase.h:4933
agora::rtc::IPacketObserver::Packet
Definition: AgoraBase.h:3178
agora::rtc::AudioTrackConfig::enableLocalPlayback
bool enableLocalPlayback
Definition: AgoraBase.h:4586
agora::rtc::LiveTranscoding::audioCodecProfile
AUDIO_CODEC_PROFILE_TYPE audioCodecProfile
Definition: AgoraBase.h:3743
agora::rtc::RecorderStreamInfo::uid
uid_t uid
Definition: AgoraBase.h:6017
agora::rtc::VideoEncoderConfiguration
Definition: AgoraBase.h:1772
agora::rtc::Rectangle::width
int width
Definition: AgoraBase.h:2017
agora::rtc::VideoEncoderConfiguration::bitrate
int bitrate
Definition: AgoraBase.h:1841
agora::rtc::VideoRenderingTracingInfo::remoteJoined2UnmuteVideo
int remoteJoined2UnmuteVideo
Definition: AgoraBase.h:5916
agora::util::AList
Definition: AgoraBase.h:227
agora::rtc::RtcStats::firstVideoKeyFrameDecodedDurationAfterUnmute
int firstVideoKeyFrameDecodedDurationAfterUnmute
Definition: AgoraBase.h:2242
agora::rtc::VideoSubscriptionOptions
Definition: AgoraBase.h:1527
agora::rtc::TranscodingUser
Definition: AgoraBase.h:3582
agora::rtc::EchoTestConfiguration
Definition: AgoraBase.h:5671
agora::rtc::RtcImage
Definition: AgoraBase.h:3466
agora::rtc::TranscodingUser::x
int x
Definition: AgoraBase.h:3590
agora::rtc::ChannelMediaInfo::token
const char * token
Definition: AgoraBase.h:5303
agora::rtc::VideoRenderingTracingInfo::remoteJoined2PacketReceived
int remoteJoined2PacketReceived
Definition: AgoraBase.h:5925
agora::rtc::AudioRecordingConfiguration::encode
bool encode
Definition: AgoraBase.h:5038
agora::rtc::BeautyOptions::lighteningContrastLevel
LIGHTENING_CONTRAST_LEVEL lighteningContrastLevel
Definition: AgoraBase.h:4344
agora::rtc::WatermarkRatio::yRatio
float yRatio
Definition: AgoraBase.h:2047
agora::SpatialAudioParams::enable_blur
Optional< bool > enable_blur
Definition: AgoraBase.h:6082
agora::rtc::SimulcastStreamConfig
Definition: AgoraBase.h:1982
agora::rtc::LiveTranscoding::audioBitrate
int audioBitrate
Definition: AgoraBase.h:3732
agora::rtc::ChannelMediaRelayConfiguration::destInfos
ChannelMediaInfo * destInfos
Definition: AgoraBase.h:5339
agora::rtc::RtcImage::x
int x
Definition: AgoraBase.h:3474
agora::rtc::VirtualBackgroundSource::background_source_type
BACKGROUND_SOURCE_TYPE background_source_type
Definition: AgoraBase.h:4512
agora::rtc::TranscodingVideoStream::sourceType
VIDEO_SOURCE_TYPE sourceType
Definition: AgoraBase.h:3784
agora::rtc::LocalTranscoderConfiguration::syncWithPrimaryCamera
bool syncWithPrimaryCamera
Definition: AgoraBase.h:3867
agora::rtc::RtcImage::zOrder
int zOrder
Definition: AgoraBase.h:3494
agora::rtc::ClientRoleOptions::audienceLatencyLevel
AUDIENCE_LATENCY_LEVEL_TYPE audienceLatencyLevel
Definition: AgoraBase.h:2348
agora::rtc::AudioVolumeInfo::volume
unsigned int volume
Definition: AgoraBase.h:3134
agora::rtc::TranscodingUser::uid
uid_t uid
Definition: AgoraBase.h:3586
agora::rtc::VideoCanvas::enableAlphaMask
bool enableAlphaMask
Definition: AgoraBase.h:4300
agora::rtc::VideoRenderingTracingInfo::elapsedTime
int elapsedTime
Definition: AgoraBase.h:5880
agora::rtc::LiveStreamAdvancedFeature::featureName
const char * featureName
Definition: AgoraBase.h:3520
agora::rtc::AdvancedConfigInfo
Definition: AgoraBase.h:5971
agora::rtc::Rectangle::y
int y
Definition: AgoraBase.h:2013
agora::rtc::LocalAudioStats::sentBitrate
int sentBitrate
Definition: AgoraBase.h:3310
agora::rtc::RtcImage::url
const char * url
Definition: AgoraBase.h:3470
agora::rtc::IPacketObserver::Packet::buffer
const unsigned char * buffer
Definition: AgoraBase.h:3184
agora::rtc::EncodedVideoFrameInfo::decodeTimeMs
int64_t decodeTimeMs
Definition: AgoraBase.h:1643
agora::rtc::RtcStats::firstVideoKeyFrameRenderedDurationAfterUnmute
int firstVideoKeyFrameRenderedDurationAfterUnmute
Definition: AgoraBase.h:2247
agora::rtc::ColorEnhanceOptions
Definition: AgoraBase.h:4454
agora::rtc::AudioRecordingConfiguration::sampleRate
int sampleRate
Definition: AgoraBase.h:5048
agora::UserInfo::userId
util::AString userId
Definition: AgoraBase.h:806
agora::rtc::WatermarkOptions::positionInPortraitMode
Rectangle positionInPortraitMode
Definition: AgoraBase.h:2078
agora::rtc::LocalAccessPointConfiguration::advancedConfig
AdvancedConfigInfo advancedConfig
Definition: AgoraBase.h:5999
agora::rtc::LastmileProbeResult::downlinkReport
LastmileProbeOneWayResult downlinkReport
Definition: AgoraBase.h:3982
agora::rtc::LiveTranscoding::watermarkCount
unsigned int watermarkCount
Definition: AgoraBase.h:3715
agora::rtc::Rectangle::x
int x
Definition: AgoraBase.h:2009
agora::rtc::LocalTranscoderConfiguration::videoInputStreams
TranscodingVideoStream * videoInputStreams
Definition: AgoraBase.h:3857
agora::util::IString
Definition: AgoraBase.h:166
agora::rtc::LocalAccessPointConfiguration::verifyDomainName
const char * verifyDomainName
Definition: AgoraBase.h:5993
agora::SpatialAudioParams::enable_air_absorb
Optional< bool > enable_air_absorb
Definition: AgoraBase.h:6086
agora::rtc::LowlightEnhanceOptions::LOW_LIGHT_ENHANCE_LEVEL
LOW_LIGHT_ENHANCE_LEVEL
Definition: AgoraBase.h:4379
agora::rtc::EncodedAudioFrameInfo::advancedSettings
EncodedAudioFrameAdvancedSettings advancedSettings
Definition: AgoraBase.h:1458
agora::rtc::LocalTranscoderConfiguration
Definition: AgoraBase.h:3849
agora::rtc::BeautyOptions::LIGHTENING_CONTRAST_LEVEL
LIGHTENING_CONTRAST_LEVEL
Definition: AgoraBase.h:4333
agora::rtc::WatermarkRatio::xRatio
float xRatio
Definition: AgoraBase.h:2041
agora::rtc::LocalAudioStats::sentSampleRate
int sentSampleRate
Definition: AgoraBase.h:3306
agora::rtc::VideoSubscriptionOptions::type
Optional< VIDEO_STREAM_TYPE > type
Definition: AgoraBase.h:1534
agora::rtc::LastmileProbeConfig::expectedDownlinkBitrate
unsigned int expectedDownlinkBitrate
Definition: AgoraBase.h:3924
agora::rtc::RtcStats::cpuTotalUsage
double cpuTotalUsage
Definition: AgoraBase.h:2176
agora::rtc::IPacketObserver::Packet::size
unsigned int size
Definition: AgoraBase.h:3188
agora::rtc::LiveTranscoding::advancedFeatures
LiveStreamAdvancedFeature * advancedFeatures
Definition: AgoraBase.h:3746
agora::rtc::LiveTranscoding::backgroundImageCount
unsigned int backgroundImageCount
Definition: AgoraBase.h:3725
agora::rtc::IPacketObserver
Definition: AgoraBase.h:3172
agora::rtc::LiveTranscoding::backgroundImage
RtcImage * backgroundImage
Definition: AgoraBase.h:3721
agora::rtc::RtcStats::cpuAppUsage
double cpuAppUsage
Definition: AgoraBase.h:2166
agora::VideoLayout::width
uint32_t width
Definition: AgoraBase.h:6124
agora::rtc::VideoFormat
Definition: AgoraBase.h:2493
agora::rtc::AdvanceOptions
Definition: AgoraBase.h:1686
agora::rtc::TranscodingUser::alpha
double alpha
Definition: AgoraBase.h:3616
agora::rtc::WatermarkOptions::watermarkRatio
WatermarkRatio watermarkRatio
Definition: AgoraBase.h:2083
agora::rtc::DataStreamConfig
Definition: AgoraBase.h:1938
agora::rtc::AdvanceOptions::compressionPreference
COMPRESSION_PREFERENCE compressionPreference
Definition: AgoraBase.h:1696
agora::rtc::RtcStats::txAudioBytes
unsigned int txAudioBytes
Definition: AgoraBase.h:2115
agora::rtc::RtcStats::connectTimeMs
int connectTimeMs
Definition: AgoraBase.h:2202
agora::rtc::LastmileProbeResult::state
LASTMILE_PROBE_RESULT_STATE state
Definition: AgoraBase.h:3974
agora::rtc::VideoEncoderConfiguration::advanceOptions
AdvanceOptions advanceOptions
Definition: AgoraBase.h:1877
agora::rtc::VideoCanvas::position
media::base::VIDEO_MODULE_POSITION position
Definition: AgoraBase.h:4305
agora::rtc::ChannelMediaInfo::channelName
const char * channelName
Definition: AgoraBase.h:5299
agora::rtc::LiveTranscoding::height
int height
Definition: AgoraBase.h:3659
agora::rtc::EncodedAudioFrameAdvancedSettings::speech
bool speech
Definition: AgoraBase.h:1410
agora::rtc::EncodedVideoFrameInfo::codecType
VIDEO_CODEC_TYPE codecType
Definition: AgoraBase.h:1608
agora::rtc::RtcStats::txVideoKBitRate
unsigned short txVideoKBitRate
Definition: AgoraBase.h:2151
agora::rtc::RtcStats::rxAudioBytes
unsigned int rxAudioBytes
Definition: AgoraBase.h:2123
agora::rtc::EncodedAudioFrameAdvancedSettings::sendEvenIfEmpty
bool sendEvenIfEmpty
Definition: AgoraBase.h:1416
agora::SpatialAudioParams::enable_doppler
Optional< bool > enable_doppler
Definition: AgoraBase.h:6094
agora::rtc::RtcStats::txAudioKBitRate
unsigned short txAudioKBitRate
Definition: AgoraBase.h:2143
agora::VideoLayout::height
uint32_t height
Definition: AgoraBase.h:6128
agora::rtc::AudioVolumeInfo::uid
uid_t uid
Definition: AgoraBase.h:3128
agora::rtc::BeautyOptions::LIGHTENING_CONTRAST_LOW
@ LIGHTENING_CONTRAST_LOW
Definition: AgoraBase.h:4335
agora::rtc::LiveTranscoding::videoBitrate
int videoBitrate
Definition: AgoraBase.h:3664
agora::rtc::VideoTrackInfo::trackId
track_id_t trackId
Definition: AgoraBase.h:3063
agora::rtc::VideoTrackInfo::encodedFrameOnly
bool encodedFrameOnly
Definition: AgoraBase.h:3081
agora::rtc::TranscodingUser::width
int width
Definition: AgoraBase.h:3598
agora::rtc::ScreenCaptureParameters::highLightColor
unsigned int highLightColor
Definition: AgoraBase.h:4942
agora::base::AParameter
Definition: AgoraBase.h:6034
agora::rtc::BeautyOptions::sharpnessLevel
float sharpnessLevel
Definition: AgoraBase.h:4359
agora::rtc::EncryptionConfig::encryptionMode
ENCRYPTION_MODE encryptionMode
Definition: AgoraBase.h:5523
agora::util::AOutputIterator
Definition: AgoraBase.h:196
agora::rtc::WatermarkOptions::positionInLandscapeMode
Rectangle positionInLandscapeMode
Definition: AgoraBase.h:2073
agora::rtc::IAudioEncodedFrameObserver
Definition: AgoraBase.h:5120
agora::rtc::EncodedVideoFrameInfo::width
int width
Definition: AgoraBase.h:1612
agora::rtc::VideoTrackInfo::ownerUid
uid_t ownerUid
Definition: AgoraBase.h:3059
agora::rtc::VideoRenderingTracingInfo::join2JoinSuccess
int join2JoinSuccess
Definition: AgoraBase.h:5891
agora::rtc::LastmileProbeOneWayResult::availableBandwidth
unsigned int availableBandwidth
Definition: AgoraBase.h:3960
agora::rtc::EncodedVideoFrameInfo::captureTimeMs
int64_t captureTimeMs
Definition: AgoraBase.h:1639
agora::rtc::EncodedVideoFrameInfo::framesPerSecond
int framesPerSecond
Definition: AgoraBase.h:1622
agora::rtc::LiveTranscoding::transcodingExtraInfo
const char * transcodingExtraInfo
Definition: AgoraBase.h:3702
agora::rtc::VideoTrackInfo::codecType
VIDEO_CODEC_TYPE codecType
Definition: AgoraBase.h:3075
agora::rtc::LiveTranscoding::metadata
const char * metadata
Definition: AgoraBase.h:3706
agora::rtc::LiveTranscoding::audioSampleRate
AUDIO_SAMPLE_RATE_TYPE audioSampleRate
Definition: AgoraBase.h:3729
agora::rtc::ChannelMediaRelayConfiguration
Definition: AgoraBase.h:5311
agora::rtc::VirtualBackgroundSource::blur_degree
BACKGROUND_BLUR_DEGREE blur_degree
Definition: AgoraBase.h:4535
agora::rtc::UserInfo::uid
uid_t uid
Definition: AgoraBase.h:5693
agora::rtc::DataStreamConfig::ordered
bool ordered
Definition: AgoraBase.h:1958
agora::rtc::LiveStreamAdvancedFeature
Definition: AgoraBase.h:3509
agora::rtc::VirtualBackgroundSource::color
unsigned int color
Definition: AgoraBase.h:4522
agora::rtc::LastmileProbeOneWayResult
Definition: AgoraBase.h:3948
agora::rtc::VideoDenoiserOptions
Definition: AgoraBase.h:4407
agora::rtc::WatermarkRatio::widthRatio
float widthRatio
Definition: AgoraBase.h:2053
agora::rtc::VideoDenoiserOptions::VIDEO_DENOISER_LEVEL_HIGH_QUALITY
@ VIDEO_DENOISER_LEVEL_HIGH_QUALITY
Definition: AgoraBase.h:4424
agora::rtc::VideoCanvas::cropArea
Rectangle cropArea
Definition: AgoraBase.h:4294
agora::rtc::AudioPcmDataInfo::samplesOut
size_t samplesOut
Definition: AgoraBase.h:1489
agora::rtc::VideoEncoderConfiguration::frameRate
int frameRate
Definition: AgoraBase.h:1784
agora::rtc::Rectangle::height
int height
Definition: AgoraBase.h:2021
agora::rtc::AudioPcmDataInfo::elapsedTimeMs
int64_t elapsedTimeMs
Definition: AgoraBase.h:1493
agora::rtc::WatermarkOptions::mode
WATERMARK_FIT_MODE mode
Definition: AgoraBase.h:2087
agora::rtc::EncodedAudioFrameInfo::sampleRateHz
int sampleRateHz
Definition: AgoraBase.h:1444
agora::UserInfo
Definition: AgoraBase.h:802
agora::rtc::RtcStats::txPacketLossRate
int txPacketLossRate
Definition: AgoraBase.h:2251
agora::rtc::VirtualBackgroundSource
Definition: AgoraBase.h:4473
agora::rtc::WlAccStats::frozenRatioPercent
unsigned short frozenRatioPercent
Definition: AgoraBase.h:4174
agora::rtc::LowlightEnhanceOptions::level
LOW_LIGHT_ENHANCE_LEVEL level
Definition: AgoraBase.h:4396
agora::rtc::VideoCanvas::view
view_t view
Definition: AgoraBase.h:4253
agora::rtc::TranscodingVideoStream::imageUrl
const char * imageUrl
Definition: AgoraBase.h:3794
agora::rtc::AudioEncodedFrameObserverConfig::postionType
AUDIO_ENCODED_FRAME_OBSERVER_POSITION postionType
Definition: AgoraBase.h:5106
agora::rtc::IPacketObserver::onSendAudioPacket
virtual bool onSendAudioPacket(Packet &packet)=0
agora::rtc::EncryptionConfig::encryptionKdfSalt
uint8_t encryptionKdfSalt[32]
Definition: AgoraBase.h:5536
agora::rtc::WlAccStats::lossRatePercent
unsigned short lossRatePercent
Definition: AgoraBase.h:4178
agora::rtc::VirtualBackgroundSource::BACKGROUND_IMG
@ BACKGROUND_IMG
Definition: AgoraBase.h:4488
agora::rtc::LiveTranscoding::watermark
RtcImage * watermark
Definition: AgoraBase.h:3711
agora::rtc::AudioVolumeInfo::vad
unsigned int vad
Definition: AgoraBase.h:3144
agora::rtc::ChannelMediaInfo
Definition: AgoraBase.h:5292
agora::UserInfo::hasVideo
bool hasVideo
Definition: AgoraBase.h:818
agora::rtc::LowlightEnhanceOptions::LOW_LIGHT_ENHANCE_MANUAL
@ LOW_LIGHT_ENHANCE_MANUAL
Definition: AgoraBase.h:4374
agora::VideoLayout::y
uint32_t y
Definition: AgoraBase.h:6120
agora::rtc::WlAccStats
Definition: AgoraBase.h:4166
agora::rtc::RecorderStreamInfo::RecorderStreamInfo
RecorderStreamInfo()
Definition: AgoraBase.h:6021
agora::rtc::LocalAudioStats::aecEstimatedDelay
int aecEstimatedDelay
Definition: AgoraBase.h:3334
agora::rtc::VideoCanvas::renderMode
media::base::RENDER_MODE_TYPE renderMode
Definition: AgoraBase.h:4262
agora::SpatialAudioParams::speaker_orientation
Optional< int > speaker_orientation
Definition: AgoraBase.h:6078
agora::rtc::LocalAudioStats::earMonitorDelay
int earMonitorDelay
Definition: AgoraBase.h:3330
agora::rtc::VideoTrackInfo::sourceType
VIDEO_SOURCE_TYPE sourceType
Definition: AgoraBase.h:3085
agora::rtc::RtcStats::txKBitRate
unsigned short txKBitRate
Definition: AgoraBase.h:2131
agora::rtc::EncodedAudioFrameInfo::numberOfChannels
int numberOfChannels
Definition: AgoraBase.h:1454
agora::rtc::EncodedVideoFrameInfo::streamType
VIDEO_STREAM_TYPE streamType
Definition: AgoraBase.h:1647
agora::rtc::LocalAudioStats::audioPlayoutDelay
int audioPlayoutDelay
Definition: AgoraBase.h:3326
agora::SpatialAudioParams::speaker_attenuation
Optional< double > speaker_attenuation
Definition: AgoraBase.h:6090
agora::rtc::VideoTrackInfo::observationPosition
uint32_t observationPosition
Definition: AgoraBase.h:3089
agora::VideoLayout::strUid
user_id_t strUid
Definition: AgoraBase.h:6112
agora::rtc::LogUploadServerInfo
Definition: AgoraBase.h:5950
agora::rtc::VideoDenoiserOptions::VIDEO_DENOISER_LEVEL
VIDEO_DENOISER_LEVEL
Definition: AgoraBase.h:4419
agora::rtc::VideoCanvas::sourceType
VIDEO_SOURCE_TYPE sourceType
Definition: AgoraBase.h:4282
agora::rtc::CodecCapInfo
Definition: AgoraBase.h:1758
agora::rtc::ScreenCaptureParameters::frameRate
int frameRate
Definition: AgoraBase.h:4905
agora::rtc::AudioRecordingConfiguration::recordingChannel
int recordingChannel
Definition: AgoraBase.h:5064
agora::rtc::RtcStats::firstVideoKeyFramePacketDurationAfterUnmute
int firstVideoKeyFramePacketDurationAfterUnmute
Definition: AgoraBase.h:2237
agora::rtc::LiveTranscoding::audioChannels
int audioChannels
Definition: AgoraBase.h:3740
agora::rtc::RtcImage::height
int height
Definition: AgoraBase.h:3486
agora::rtc::SimulcastStreamConfig::dimensions
VideoDimensions dimensions
Definition: AgoraBase.h:1986
agora::rtc::EncodedVideoFrameInfo::frameType
VIDEO_FRAME_TYPE frameType
Definition: AgoraBase.h:1626
agora::rtc::LastmileProbeConfig::probeDownlink
bool probeDownlink
Definition: AgoraBase.h:3915
agora::rtc::RtcStats::userCount
unsigned int userCount
Definition: AgoraBase.h:2159
agora::rtc::LocalTranscoderConfiguration::streamCount
unsigned int streamCount
Definition: AgoraBase.h:3853
agora::rtc::BeautyOptions::LIGHTENING_CONTRAST_HIGH
@ LIGHTENING_CONTRAST_HIGH
Definition: AgoraBase.h:4339
agora::base::LicenseCallback
Definition: AgoraBase.h:6048
agora::rtc::EncryptionConfig
Definition: AgoraBase.h:5518
agora::rtc::LiveTranscoding::videoCodecProfile
VIDEO_CODEC_PROFILE_TYPE videoCodecProfile
Definition: AgoraBase.h:3685
agora::rtc::VirtualBackgroundSource::BACKGROUND_SOURCE_TYPE
BACKGROUND_SOURCE_TYPE
Definition: AgoraBase.h:4476
agora::rtc::VideoRenderingTracingInfo::start2JoinChannel
int start2JoinChannel
Definition: AgoraBase.h:5887
agora::rtc::VideoCanvas::backgroundColor
uint32_t backgroundColor
Definition: AgoraBase.h:4257
agora::rtc::LocalAccessPointConfiguration::disableAut
bool disableAut
Definition: AgoraBase.h:6005
agora::rtc::ScreenCaptureParameters::dimensions
VideoDimensions dimensions
Definition: AgoraBase.h:4899
agora::rtc::VideoDimensions::width
int width
Definition: AgoraBase.h:1080
agora::rtc::TranscodingVideoStream::x
int x
Definition: AgoraBase.h:3802
agora::rtc::LiveTranscoding::lowLatency
bool lowLatency
Definition: AgoraBase.h:3676
agora::rtc::TranscodingVideoStream
Definition: AgoraBase.h:3780
agora::rtc::VirtualBackgroundSource::source
const char * source
Definition: AgoraBase.h:4530
agora::rtc::LogUploadServerInfo::serverPath
const char * serverPath
Definition: AgoraBase.h:5956
agora::VideoLayout::videoState
uint32_t videoState
Definition: AgoraBase.h:6133
agora::rtc::RtcStats
Definition: AgoraBase.h:2099
agora::rtc::VideoSubscriptionOptions::encodedFrameOnly
Optional< bool > encodedFrameOnly
Definition: AgoraBase.h:1540
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:4496
agora::rtc::WatermarkOptions::visibleInPreview
bool visibleInPreview
Definition: AgoraBase.h:2068
agora::rtc::LowlightEnhanceOptions
Definition: AgoraBase.h:4366
agora::rtc::TranscodingUser::zOrder
int zOrder
Definition: AgoraBase.h:3610
agora::rtc::LiveTranscoding::width
int width
Definition: AgoraBase.h:3652
agora::rtc::AudioPcmDataInfo
Definition: AgoraBase.h:1468
agora::rtc::RtcStats::rxBytes
unsigned int rxBytes
Definition: AgoraBase.h:2111
agora::rtc::RtcStats::rxVideoKBitRate
unsigned short rxVideoKBitRate
Definition: AgoraBase.h:2147
agora::rtc::VideoDenoiserOptions::mode
VIDEO_DENOISER_MODE mode
Definition: AgoraBase.h:4439
agora::rtc::RtcStats::rxAudioKBitRate
unsigned short rxAudioKBitRate
Definition: AgoraBase.h:2139
agora::rtc::LocalAudioStats::numChannels
int numChannels
Definition: AgoraBase.h:3302
agora::rtc::VideoRenderingTracingInfo::remoteJoined2SetView
int remoteJoined2SetView
Definition: AgoraBase.h:5907
agora::rtc::WatermarkOptions
Definition: AgoraBase.h:2062
agora::rtc::VideoEncoderConfiguration::mirrorMode
VIDEO_MIRROR_MODE_TYPE mirrorMode
Definition: AgoraBase.h:1872
agora::rtc::LocalAudioStats
Definition: AgoraBase.h:3298
agora::rtc::RecorderStreamInfo
Definition: AgoraBase.h:6012
agora::rtc::LogUploadServerInfo::serverPort
int serverPort
Definition: AgoraBase.h:5959
agora::rtc::ScreenCaptureParameters::captureMouseCursor
bool captureMouseCursor
Definition: AgoraBase.h:4916
agora::rtc::RtcImage::y
int y
Definition: AgoraBase.h:3478
agora::rtc::EncodedAudioFrameAdvancedSettings
Definition: AgoraBase.h:1400
agora::rtc::RtcStats::memoryAppUsageRatio
double memoryAppUsageRatio
Definition: AgoraBase.h:2187
agora::rtc::RtcStats::gatewayRtt
int gatewayRtt
Definition: AgoraBase.h:2182
agora::rtc::LastmileProbeConfig::expectedUplinkBitrate
unsigned int expectedUplinkBitrate
Definition: AgoraBase.h:3920
agora::rtc::VideoTrackInfo::isLocal
bool isLocal
Definition: AgoraBase.h:3055
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:1691
agora::rtc::VideoTrackInfo::channelId
const char * channelId
Definition: AgoraBase.h:3067
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:4387
agora::rtc::RtcStats::firstVideoKeyFramePacketDuration
int firstVideoKeyFramePacketDuration
Definition: AgoraBase.h:2217
agora::rtc::CodecCapInfo::codecLevels
CodecCapLevels codecLevels
Definition: AgoraBase.h:1764
agora::rtc::VideoTrackInfo::streamType
VIDEO_STREAM_TYPE streamType
Definition: AgoraBase.h:3071
agora::rtc::LiveTranscoding::advancedFeatureCount
unsigned int advancedFeatureCount
Definition: AgoraBase.h:3749
agora::rtc::CodecCapInfo::codecCapMask
int codecCapMask
Definition: AgoraBase.h:1762
agora::rtc::AudioRecordingConfiguration
Definition: AgoraBase.h:5027
agora::SpatialAudioParams::speaker_azimuth
Optional< double > speaker_azimuth
Definition: AgoraBase.h:6066
agora::rtc::LowlightEnhanceOptions::LOW_LIGHT_ENHANCE_MODE
LOW_LIGHT_ENHANCE_MODE
Definition: AgoraBase.h:4370
agora::util::IContainer
Definition: AgoraBase.h:187
agora::rtc::VirtualBackgroundSource::BLUR_DEGREE_HIGH
@ BLUR_DEGREE_HIGH
Definition: AgoraBase.h:4507
agora::rtc::VideoDimensions
Definition: AgoraBase.h:1076
agora::rtc::VirtualBackgroundSource::BLUR_DEGREE_LOW
@ BLUR_DEGREE_LOW
Definition: AgoraBase.h:4503
agora::rtc::VideoRenderingTracingInfo::joinSuccess2RemoteJoined
int joinSuccess2RemoteJoined
Definition: AgoraBase.h:5899
agora::rtc::TranscodingVideoStream::height
int height
Definition: AgoraBase.h:3814
agora::rtc::DataStreamConfig::syncWithAudio
bool syncWithAudio
Definition: AgoraBase.h:1950
agora::rtc::LowlightEnhanceOptions::mode
LOW_LIGHT_ENHANCE_MODE mode
Definition: AgoraBase.h:4392
agora::rtc::LiveTranscoding::userCount
unsigned int userCount
Definition: AgoraBase.h:3694
agora::util::CopyableAutoPtr
Definition: AgoraBase.h:150
agora::rtc::CodecCapInfo::codecType
VIDEO_CODEC_TYPE codecType
Definition: AgoraBase.h:1760
agora::rtc::AudioTrackConfig
Definition: AgoraBase.h:4580
agora::rtc::LocalAccessPointConfiguration::ipListSize
int ipListSize
Definition: AgoraBase.h:5983
agora::rtc::TranscodingVideoStream::width
int width
Definition: AgoraBase.h:3810
agora::rtc::TranscodingVideoStream::mirror
bool mirror
Definition: AgoraBase.h:3831
agora::rtc::SimulcastStreamConfig::kBitrate
int kBitrate
Definition: AgoraBase.h:1990
agora::rtc::RtcImage::alpha
double alpha
Definition: AgoraBase.h:3500
agora::rtc::TranscodingVideoStream::mediaPlayerId
int mediaPlayerId
Definition: AgoraBase.h:3798
agora::rtc::VideoCanvas::subviewUid
uid_t subviewUid
Definition: AgoraBase.h:4249
agora::rtc::EncryptionConfig::encryptionKey
const char * encryptionKey
Definition: AgoraBase.h:5529
agora::rtc::EncodedVideoFrameInfo::trackId
int trackId
Definition: AgoraBase.h:1634
agora::rtc::VirtualBackgroundSource::BLUR_DEGREE_MEDIUM
@ BLUR_DEGREE_MEDIUM
Definition: AgoraBase.h:4505
agora::rtc::ScreenCaptureParameters::excludeWindowList
view_t * excludeWindowList
Definition: AgoraBase.h:4929
agora::rtc::LocalAccessPointConfiguration::domainList
const char ** domainList
Definition: AgoraBase.h:5986
agora::rtc::IPacketObserver::onSendVideoPacket
virtual bool onSendVideoPacket(Packet &packet)=0
agora::rtc::AudioPcmDataInfo::samplesPerChannel
size_t samplesPerChannel
Definition: AgoraBase.h:1481
agora::rtc::VideoTrackInfo
Definition: AgoraBase.h:3044
agora::rtc::LocalTranscoderConfiguration::videoOutputConfiguration
VideoEncoderConfiguration videoOutputConfiguration
Definition: AgoraBase.h:3861
agora::rtc::SenderOptions::ccMode
TCcMode ccMode
Definition: AgoraBase.h:1204
agora::rtc::VirtualBackgroundSource::BACKGROUND_COLOR
@ BACKGROUND_COLOR
Definition: AgoraBase.h:4484
agora::rtc::AudioPcmDataInfo::ntpTimeMs
int64_t ntpTimeMs
Definition: AgoraBase.h:1497
agora::rtc::LowlightEnhanceOptions::LOW_LIGHT_ENHANCE_AUTO
@ LOW_LIGHT_ENHANCE_AUTO
Definition: AgoraBase.h:4372
agora::rtc::RtcStats::firstVideoPacketDurationAfterUnmute
int firstVideoPacketDurationAfterUnmute
Definition: AgoraBase.h:2232
agora::rtc::LiveTranscoding::videoFramerate
int videoFramerate
Definition: AgoraBase.h:3669
agora::rtc::RtcStats::rxPacketLossRate
int rxPacketLossRate
Definition: AgoraBase.h:2255
agora::rtc::RtcStats::lastmileDelay
unsigned short lastmileDelay
Definition: AgoraBase.h:2155
agora::rtc::CodecCapLevels
Definition: AgoraBase.h:1750
agora::SpatialAudioParams
Definition: AgoraBase.h:6062
agora::rtc::ColorEnhanceOptions::skinProtectLevel
float skinProtectLevel
Definition: AgoraBase.h:4463
agora::rtc::VideoDenoiserOptions::VIDEO_DENOISER_LEVEL_FAST
@ VIDEO_DENOISER_LEVEL_FAST
Definition: AgoraBase.h:4429
agora::rtc::VideoEncoderConfiguration::codecType
VIDEO_CODEC_TYPE codecType
Definition: AgoraBase.h:1776
agora::rtc::LastmileProbeResult::rtt
unsigned int rtt
Definition: AgoraBase.h:3986
agora::rtc::TranscodingVideoStream::y
int y
Definition: AgoraBase.h:3806
agora::rtc::RtcStats::packetsBeforeFirstKeyFramePacket
int packetsBeforeFirstKeyFramePacket
Definition: AgoraBase.h:2222
agora::rtc::BeautyOptions::LIGHTENING_CONTRAST_NORMAL
@ LIGHTENING_CONTRAST_NORMAL
Definition: AgoraBase.h:4337
agora::rtc::ChannelMediaRelayConfiguration::srcInfo
ChannelMediaInfo * srcInfo
Definition: AgoraBase.h:5324
agora::rtc::VideoEncoderConfiguration::orientationMode
ORIENTATION_MODE orientationMode
Definition: AgoraBase.h:1862
agora::rtc::WlAccStats::e2eDelayPercent
unsigned short e2eDelayPercent
Definition: AgoraBase.h:4170
agora::rtc::VideoDenoiserOptions::VIDEO_DENOISER_LEVEL_STRENGTH
@ VIDEO_DENOISER_LEVEL_STRENGTH
Definition: AgoraBase.h:4435
agora::rtc::LiveStreamAdvancedFeature::opened
bool opened
Definition: AgoraBase.h:3527
agora::rtc::DeviceInfo
Definition: AgoraBase.h:3158
agora::base::IEngineBase
Definition: AgoraBase.h:6028
agora::rtc::SenderOptions::targetBitrate
int targetBitrate
Definition: AgoraBase.h:1266
agora::rtc::AudioRecordingConfiguration::quality
AUDIO_RECORDING_QUALITY_TYPE quality
Definition: AgoraBase.h:5057
agora::util::IIterator
Definition: AgoraBase.h:178
agora::rtc::UserInfo::userAccount
char userAccount[MAX_USER_ACCOUNT_LENGTH]
Definition: AgoraBase.h:5697
agora::rtc::VideoRenderingTracingInfo
Definition: AgoraBase.h:5876
agora::rtc::LogUploadServerInfo::serverHttps
bool serverHttps
Definition: AgoraBase.h:5964
agora::rtc::VideoDenoiserOptions::VIDEO_DENOISER_MANUAL
@ VIDEO_DENOISER_MANUAL
Definition: AgoraBase.h:4414
agora::rtc::EncodedAudioFrameInfo::samplesPerChannel
int samplesPerChannel
Definition: AgoraBase.h:1450
agora::rtc::EncodedVideoFrameInfo::height
int height
Definition: AgoraBase.h:1616
agora::rtc::RtcStats::memoryAppUsageInKbytes
int memoryAppUsageInKbytes
Definition: AgoraBase.h:2197
agora::VideoLayout::uid
rtc::uid_t uid
Definition: AgoraBase.h:6108
agora::Optional< VIDEO_STREAM_TYPE >
agora::rtc::LocalAccessPointConfiguration::domainListSize
int domainListSize
Definition: AgoraBase.h:5989
agora::rtc::ClientRoleOptions
Definition: AgoraBase.h:2344
agora::rtc::TranscodingUser::height
int height
Definition: AgoraBase.h:3602
agora::rtc::IPacketObserver::onReceiveAudioPacket
virtual bool onReceiveAudioPacket(Packet &packet)=0
agora::rtc::VideoCanvas
Definition: AgoraBase.h:4240
agora::rtc::LocalAudioStats::internalCodec
int internalCodec
Definition: AgoraBase.h:3314
agora::rtc::AudioRecordingConfiguration::fileRecordingType
AUDIO_FILE_RECORDING_TYPE fileRecordingType
Definition: AgoraBase.h:5052
agora::rtc::SegmentationProperty
Definition: AgoraBase.h:4540
agora::rtc::ChannelMediaInfo::uid
uid_t uid
Definition: AgoraBase.h:5295