NIM 跨平台 C++ SDK
载入中...
搜索中...
未找到
nim_device_def.h
浏览该文件的文档.
1
8#ifndef NIM_SDK_DLL_EXPORT_HEADERS_NIM_DEVICE_DEF_H_
9#define NIM_SDK_DLL_EXPORT_HEADERS_NIM_DEVICE_DEF_H_
10
11#include "public_defines.h"
12
13#ifdef __cplusplus
14extern "C" {
15#endif
30};
31
40};
41
56};
57
64 2,
65};
66
71static const char* kNIMDeviceName = "name";
73static const char* kNIMDevicePath = "path";
75static const char* kNIMDeviceSampleRate = "sample_rate";
77static const char* kNIMDeviceSampleBit = "sample_bit";
79static const char* kNIMDeviceDataUid = "uid";
81static const char* kNIMDeviceDataAccount = "account";
83static const char* kNIMDeviceWidth = "width";
85static const char* kNIMDeviceHeight = "height";
87static const char* kNIMVideoSubType = "subtype";
89static const char* kNIMDeviceId = "id";
91static const char* kNIMVolumeWork = "volume_work";
93static const char* kNIMDeviceHeadphone = "headphone"; // json extension params for vchat device key
95
105typedef void (*nim_vchat_enum_device_devpath_sync_cb_func)(bool ret, enum NIMDeviceType type, const char* json_extension, const void* user_data);
106
122 uint32_t status,
123 const char* device_path,
124 const char* json_extension,
125 const void* user_data);
126
146typedef void (*nim_vchat_audio_data_cb_func_ex)(uint64_t time,
147 const char* data,
148 uint32_t size,
149 int channels,
150 int rate,
151 int volume,
152 const char* json_extension,
153 const void* user_data);
154
163typedef void (*nim_vchat_start_device_cb_func)(enum NIMDeviceType type, bool ret, const char* json_extension, const void* user_data);
164
175typedef void (*nim_vchat_audio_data_cb_func)(uint64_t time, const char* data, uint32_t size, const char* json_extension, const void* user_data);
176
190typedef void (*nim_vchat_video_data_cb_func)(uint64_t time,
191 const char* data,
192 uint32_t size,
193 uint32_t width,
194 uint32_t height,
195 const char* json_extension,
196 const void* user_data);
197
207typedef void (*nim_vchat_audio_effect_opt_cb_func)(int id, bool ret, int code, const char* json_extension, const void* user_data);
208
209#ifdef __cplusplus
210};
211#endif //__cplusplus
212#endif // NIM_SDK_DLL_EXPORT_HEADERS_NIM_DEVICE_DEF_H_
static const char * kNIMDeviceHeadphone
int 大于0时标记为耳机设备
Definition: nim_device_def.h:93
static const char * kNIMVolumeWork
int32 大于0标识数据将使用音量参数进行换算(暂时只针对伴音数据)
Definition: nim_device_def.h:91
static const char * kNIMDevicePath
string 设备路径
Definition: nim_device_def.h:73
static const char * kNIMDeviceName
string 设备名称
Definition: nim_device_def.h:71
NIMDeviceStatus
Definition: nim_device_def.h:43
@ kNIMDeviceStatusChange
设备有变化
Definition: nim_device_def.h:47
@ kNIMDeviceStatusEnd
设备停止工作
Definition: nim_device_def.h:55
@ kNIMDeviceStatusReset
设备重新启动
Definition: nim_device_def.h:51
@ kNIMDeviceStatusWorkRemove
工作设备被移除
Definition: nim_device_def.h:49
@ kNIMDeviceStatusNoChange
设备没有变化
Definition: nim_device_def.h:45
@ kNIMDeviceStatusStart
设备开始工作
Definition: nim_device_def.h:53
static const char * kNIMDeviceHeight
int32 画面高
Definition: nim_device_def.h:85
static const char * kNIMDeviceDataAccount
用户账号 string
Definition: nim_device_def.h:81
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
static const char * kNIMDeviceWidth
int32 画面宽
Definition: nim_device_def.h:83
NIMAudioDataCbType
Definition: nim_device_def.h:59
@ kNIMAudioDataCbTypeHookAndMic
Definition: nim_device_def.h:62
@ kNIMAudioDataCbTypeHook
实时返回伴音数据,伴音数据保留原始的格式,伴音不再混音到通话数据中,如果还需要可以通过伴音数据通道再回传
Definition: nim_device_def.h:61
static const char * kNIMDeviceSampleRate
int32 采样频率
Definition: nim_device_def.h:75
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
NIMDeviceType
Definition: nim_device_def.h:17
@ kNIMDeviceTypeAudioHook
伴音,启动第三方播放器并获取音频数据(只允许存在一个进程钩子),只混音到发送的通话声音中
Definition: nim_device_def.h:29
@ kNIMDeviceTypeSoundcardCapturer
声卡声音采集,得到的数据混音到发送的通话声音中(此模式使用条件苛刻不建议使用)
Definition: nim_device_def.h:27
@ kNIMDeviceTypeVideo
摄像头
Definition: nim_device_def.h:25
@ kNIMDeviceTypeAudioOutChat
听筒设备用于通话音频数据(nim_vchat_start_device和nim_vchat_end_device中使用)
Definition: nim_device_def.h:23
@ kNIMDeviceTypeAudioOut
听筒设备用于播放本地采集音频数据,麦克风试音
Definition: nim_device_def.h:21
@ kNIMDeviceTypeAudioIn
麦克风设备
Definition: nim_device_def.h:19
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
static const char * kNIMVideoSubType
int32 视频数据类型,NIMVideoSubType
Definition: nim_device_def.h:87
static const char * kNIMDeviceId
string 标识ID
Definition: nim_device_def.h:89
static const char * kNIMDeviceSampleBit
int32 采样位深
Definition: nim_device_def.h:77
void(* nim_vchat_audio_effect_opt_cb_func)(int id, bool ret, int code, const char *json_extension, const void *user_data)
Definition: nim_device_def.h:207
NIMVideoSubType
Definition: nim_device_def.h:33
@ kNIMVideoSubTypeI420
YUV格式,存储 yyyyyyyy...uu...vv...
Definition: nim_device_def.h:39
@ kNIMVideoSubTypeRGB
24位位图格式 存储 (B,G,R)...
Definition: nim_device_def.h:37
@ kNIMVideoSubTypeARGB
32位位图格式 存储 (B,G,R,A)...
Definition: nim_device_def.h:35
static const char * kNIMDeviceDataUid
用户id int64
Definition: nim_device_def.h:79
NIM SDK 及 NIM ChatRoom SDK 公用头文件