7#ifndef _NIM_SDK_CPP_VCHAT_H_
8#define _NIM_SDK_CPP_VCHAT_H_
44 typedef std::function<void(
bool ret,
int code,
const std::string& file, int64_t time)>
Mp4OptCallback;
48 typedef std::function<void(
bool ret,
int code,
const std::string& json_extension)>
OptCallback;
50 typedef std::function<void(
int code, int64_t channel_id,
const std::string& json_extension)>
Opt2Callback;
52 typedef std::function<void(
int id,
bool ret,
int code,
const std::string& json_extension)>
EffectOptCallback;
53 typedef std::function<void(
const std::string& accid, uint64_t time,
const char* data, uint32_t size, int32_t channels, int32_t rate)>
62 static bool Init(
const std::string& server_setting_path);
73 static void SetProxy(
NIMProxyType type,
const std::string& host,
int port,
const std::string& user,
const std::string& password);
79 static void Cleanup();
114 static uint64_t NetDetectEx(int32_t ms_limit, nim::NIMNetDetectType type, nim::NIMNetDetectVideoQuality quality_type,
NetDetectCallback cb);
123 static void VChatRate(
int rating,
const std::string& description,
OptCallback cb);
143 static void StartDevice(nim::NIMDeviceType type,
144 const std::string& device_path,
155 static void EndDevice(nim::NIMDeviceType type);
170 static void RemoveDeviceStatusCb(nim::NIMDeviceType type);
203 static void SetAudioVolumn(
unsigned char volumn,
bool capture);
210 static unsigned char GetAudioVolumn(
bool capture);
217 static void SetAudioInputAutoVolumn(
bool auto_volumn);
223 static bool GetAudioInputAutoVolumn();
232 static void SetAudioProcess(
bool aec,
bool ns,
bool vad);
241 static void PreloadEffect(
int id,
const std::string& path,
EffectOptCallback cb);
279 static bool Start(
NIMVideoChatMode mode,
const std::string& apns_text,
const std::string& custom_info,
const std::string& json_info);
287 static bool SetTalkingMode(
NIMVideoChatMode mode,
const std::string& json_extension);
297 static bool CalleeAck(uint64_t channel_id,
bool accept,
const std::string& json_extension);
318 static void StartRecord(
const std::string& path,
const std::string& uid,
Mp4OptCallback cb);
328 static void StopRecord(
const std::string& uid,
Mp4OptCallback cb);
356 static void End(
const std::string& json_extension);
364 static void Relogin(
const std::string& session_id,
OptCallback cb);
373 static void SetVideoQuality(
int video_quality);
382 static void SetVideoBitrate(
int video_bitrate);
401 static void SetCustomData(
bool custom_audio,
bool custom_video);
411 static bool CustomAudioData(uint64_t time,
const char* data,
unsigned int size,
const char* json_extension);
428 static bool CustomVideoData(uint64_t time,
433 const char* json_extension);
452 static bool AccompanyingSound(
unsigned char id,
457 unsigned int channels,
458 const char* json_extension);
465 static void SetViewerMode(
bool viewer);
471 static bool GetViewerMode();
484 static void SetAudioMuted(
bool muted);
490 static bool GetAudioMuteEnabled();
497 static void SetAudioPlayMuted(
bool muted);
503 static bool GetAudioMutePlayEnabled();
510 static void SetRotateRemoteVideo(
bool rotate);
516 static bool IsRotateRemoteVideo();
529 static int GetVideoFrameScaleType();
542 static void SetMemberBlacklist(
const std::string& uid,
bool add,
bool audio,
const std::string& json_extension,
OptCallback cb);
555 static void CreateRoom(
const std::string& room_name,
const std::string& custom_info,
const std::string& json_extension,
Opt2Callback cb);
576 static void UpdateRtmpUrl(
const std::string& rtmp_url,
OptCallback cb);
604 static void SetUidAsMainPicture(
const std::string& uid,
const std::string& json_extension,
OptCallback cb);
613 static bool SetAutoPublish(
bool auto_pub,
bool auto_sub);
619 static bool IsAutoPublishVideo();
625 static bool IsAutoSubscribeVideo();
631 static bool IsAutoSubscribeAudio();
663 static void SubscribeVideo(
const std::string& uid,
OptCallback cb);
672 static void UnsubscribeVideo(
const std::string& uid,
OptCallback cb);
681 static void SubscribeAudio(
bool sub,
OptCallback cb);
698 static void AddRemoteAudioDataCb(
const std::string& uid,
OptCallback cb);
707 static void RemoveRemoteAudioDataCb(
const std::string& uid,
OptCallback cb);
Definition: nim_cpp_vchat.h:39
Mp4OptCallback AudioRecordCallback
音频录制事件通知回调模板
Definition: nim_cpp_vchat.h:46
std::function< void(int code, int64_t channel_id, const std::string &json_extension)> Opt2Callback
操作回调模板
Definition: nim_cpp_vchat.h:50
std::function< void(int, NetDetectCbInfo)> NetDetectCallback
网络探测回调模板
Definition: nim_cpp_vchat.h:42
std::function< void(bool ret, int code, const std::string &json_extension)> OptCallback
操作回调模板
Definition: nim_cpp_vchat.h:48
std::function< void(bool ret, int code, const std::string &file, int64_t time)> Mp4OptCallback
MP4录制事件通知回调模板
Definition: nim_cpp_vchat.h:44
std::function< void(int id, bool ret, int code, const std::string &json_extension)> EffectOptCallback
操作回调模板
Definition: nim_cpp_vchat.h:52
static NIMVChatConnectStatus GetConnectStatus()
std::function< void(const std::string &accid, uint64_t time, const char *data, uint32_t size, int32_t channels, int32_t rate)> RemoteAudioDataCallback
远端音频数据回调
Definition: nim_cpp_vchat.h:55
void(* nim_vchat_audio_data_cb_func_ex)(uint64_t time, const char *data, uint32_t size, int channels, int rate, int volume, const char *json_extension, const void *user_data)
Definition: nim_device_def.h:146
void(* nim_vchat_device_status_cb_func)(enum NIMDeviceType type, uint32_t status, const char *device_path, const char *json_extension, const void *user_data)
Definition: nim_device_def.h:121
void(* nim_vchat_enum_device_devpath_sync_cb_func)(bool ret, enum NIMDeviceType type, const char *json_extension, const void *user_data)
Definition: nim_device_def.h:105
void(* nim_vchat_start_device_cb_func)(enum NIMDeviceType type, bool ret, const char *json_extension, const void *user_data)
Definition: nim_device_def.h:163
void(* nim_vchat_audio_data_cb_func)(uint64_t time, const char *data, uint32_t size, const char *json_extension, const void *user_data)
Definition: nim_device_def.h:175
void(* nim_vchat_video_data_cb_func)(uint64_t time, const char *data, uint32_t size, uint32_t width, uint32_t height, const char *json_extension, const void *user_data)
Definition: nim_device_def.h:190
NIMProxyType
Definition: nim_global_def.h:204
#define NIM_SDK_CPPWRAPPER_DLL_API
Definition: nim_sdk_cpp_wrapper.h:38
NIMVChatVideoFrameRate
Definition: nim_vchat_def.h:129
NIMVChatVideoEncodeMode
Definition: nim_vchat_def.h:145
NIMVChatVideoFrameScaleType
Definition: nim_vchat_def.h:157
void(* nim_vchat_cb_func)(enum NIMVideoChatSessionType type, int64_t channel_id, int code, const char *json_extension, const void *user_data)
Definition: nim_vchat_def.h:694
NIMVChatControlType
Definition: nim_vchat_def.h:57
NIMVChatPublishVideoStreamMode
Definition: nim_vchat_def.h:408
NIMVideoChatMode
Definition: nim_vchat_def.h:89
NIMVChatConnectStatus
Definition: nim_vchat_def.h:97
网络探测回调信息
Definition: nim_cpp_vchat.h:20
int32_t rtt_max_
Definition: nim_cpp_vchat.h:24
NetDetectCbInfo()
Definition: nim_cpp_vchat.h:30
int32_t rtt_avg_
Definition: nim_cpp_vchat.h:26
int32_t res_code_
返回的错误码
Definition: nim_cpp_vchat.h:22
int32_t rtt_min_
Definition: nim_cpp_vchat.h:25
std::string expand_info_
Definition: nim_cpp_vchat.h:28
int32_t rtt_mdev_
Definition: nim_cpp_vchat.h:27
int32_t loss_
Definition: nim_cpp_vchat.h:23