1 #ifndef __AGORA_RTC_API_H__
2 #define __AGORA_RTC_API_H__
12 #if defined(__BUILDING_AGORA_SDK__)
13 #define __agora_api__ __declspec(dllexport)
15 #define __agora_api__ __declspec(dllimport)
21 #define AGORA_TOKEN_MAX_LEN 512
22 #define AGORA_CMD_PARAM_MAX_LEN 256
23 #define AGORA_CREDENTIAL_MAX_LEN 256
24 #define AGORA_CERTIFICATE_MAX_LEN 1024
245 void (*on_join_channel_success)(
const char *channel,
int elapsed_ms);
250 void (*on_connection_lost)(
const char *channel);
259 void (*on_rejoin_channel_success)(
const char *channel,
int elapsed);
269 void (*on_error)(
const char *channel,
int code,
const char *msg);
276 void (*on_user_joined)(
const char *channel, uint32_t uid,
int elapsed_ms);
283 void (*on_user_offline)(
const char *channel, uint32_t uid,
int reason);
293 void (*on_user_mute_audio)(
const char *channel, uint32_t uid,
int muted);
302 void (*on_user_mute_video)(
const char *channel, uint32_t uid,
int muted);
311 void (*on_key_frame_gen_req)(
const char *channel, uint32_t uid, uint8_t stream_id);
321 void (*on_audio_data)(
const char *channel, uint32_t uid, uint16_t sent_ts, uint8_t codec,
322 const void *data_ptr,
size_t data_len);
336 void (*on_video_data)(
const char *channel, uint32_t uid, uint16_t sent_ts, uint8_t codec,
337 uint8_t stream_id,
int is_key_frame,
const void *data_ptr,
size_t data_len);
349 void (*on_rdt_availability_changed)(
const char *channel,
int is_available);
359 void (*on_cmd)(
const char *channel, uint32_t uid,
int cmd,
const void *param_ptr,
369 void (*on_data_from_rdt)(
const char *channel, uint32_t uid,
const void *data_ptr,
size_t data_len);
377 void (*on_target_bitrate_changed)(
const char *channel, uint32_t target_bps);
387 void (*on_local_user_registered)(
const char *uname, uint32_t uid);
395 void (*on_remote_user_registered)(
const char *uname, uint32_t uid);
448 const char *credential,
int credential_len);
476 const char *sdk_log_dir);
512 const char *sdk_log_dir);