NIM PC Cross Platform SDK
载入中...
搜索中...
未找到
nim_vchat_def.h 文件参考

音视频 接口相关的常量函数等定义头文件 更多...

#include "public_defines.h"

浏览源代码.

类型定义

typedef void(* nim_vchat_cb_func) (enum NIMVideoChatSessionType type, int64_t channel_id, int code, const char *json_extension, const void *user_data)
 
typedef void(* nim_vchat_mp4_record_opt_cb_func) (bool ret, int code, const char *file, int64_t time, const char *json_extension, const void *user_data)
 
typedef void(* nim_vchat_audio_record_opt_cb_func) (bool ret, int code, const char *file, int64_t time, const char *json_extension, const void *user_data)
 
typedef void(* nim_vchat_opt_cb_func) (bool ret, int code, const char *json_extension, const void *user_data)
 
typedef void(* nim_vchat_opt2_cb_func) (int code, int64_t channel_id, const char *json_extension, const void *user_data)
 
typedef void(* nim_vchat_rate_callback) (bool ret, int response_code, const char *json_extension, const void *user_data)
 
typedef void(* nim_vchat_remote_audio_data_cb_func) (uint64_t time, const char *data, unsigned int size, int channels, int rate, const char *json_extension, const void *user_data)
 

枚举

enum  NIMVideoChatSessionType {
  kNIMVideoChatSessionTypeStartRes = 1 , kNIMVideoChatSessionTypeInviteNotify = 2 , kNIMVideoChatSessionTypeCalleeAckRes = 3 , kNIMVideoChatSessionTypeCalleeAckNotify = 4 ,
  kNIMVideoChatSessionTypeControlRes = 5 , kNIMVideoChatSessionTypeControlNotify = 6 , kNIMVideoChatSessionTypeConnect = 7 , kNIMVideoChatSessionTypePeopleStatus = 8 ,
  kNIMVideoChatSessionTypeNetStatus = 9 , kNIMVideoChatSessionTypeHangupRes = 10 , kNIMVideoChatSessionTypeHangupNotify = 11 , kNIMVideoChatSessionTypeSyncAckNotify = 12 ,
  kNIMVideoChatSessionTypeMp4Notify = 13 , kNIMVideoChatSessionTypeInfoNotify = 14 , kNIMVideoChatSessionTypeVolumeNotify = 15 , kNIMVideoChatSessionTypeAuRecordNotify = 16 ,
  kNIMVideoChatSessionTypeLiveState = 17 , kNIMVideoChatSessionTypePubSubNotify = 18
}
 
enum  NIMVChatControlType {
  kNIMTagControlOpenAudio = 1 , kNIMTagControlCloseAudio = 2 , kNIMTagControlOpenVideo = 3 , kNIMTagControlCloseVideo = 4 ,
  kNIMTagControlAudioToVideo = 5 , kNIMTagControlAgreeAudioToVideo = 6 , kNIMTagControlRejectAudioToVideo = 7 , kNIMTagControlVideoToAudio = 8 ,
  kNIMTagControlBusyLine = 9 , kNIMTagControlCamaraNotAvailable = 10 , kNIMTagControlEnterBackground = 11 , kNIMTagControlReceiveStartNotifyFeedback = 12 ,
  kNIMTagControlMp4StartRecord = 13 , kNIMTagControlMp4StopRecord = 14
}
 
enum  NIMVideoChatMode { kNIMVideoChatModeAudio = 1 , kNIMVideoChatModeVideo = 2 }
 
enum  NIMVChatConnectStatus {
  kNIMVChatConnectNone = 0 , kNIMVChatConnecting = 1 , kNIMVChatConnected = 2 , kNIMVChatReConnecting = 3 ,
  kNIMVChatDisconnect = 4
}
 
enum  NIMVChatVideoQuality {
  kNIMVChatVideoQualityNormal = 0 , kNIMVChatVideoQualityLow = 1 , kNIMVChatVideoQualityMedium = 2 , kNIMVChatVideoQualityHigh = 3 ,
  kNIMVChatVideoQualitySuper = 4 , kNIMVChatVideoQuality540p = 5 , kNIMVChatVideoQuality720p = 6
}
 
enum  NIMVChatVideoFrameRate {
  kNIMVChatVideoFrameRateNormal = 0 , kNIMVChatVideoFrameRate5 = 1 , kNIMVChatVideoFrameRate10 = 2 , kNIMVChatVideoFrameRate15 = 3 ,
  kNIMVChatVideoFrameRate20 = 4 , kNIMVChatVideoFrameRate25 = 5
}
 
enum  NIMVChatVideoEncodeMode { kNIMVChatVEModeNormal = 0 , kNIMVChatVEModeFramerate = 1 , kNIMVChatVEModeQuality = 2 , kNIMVChatVEModeScreen = 3 }
 
enum  NIMVChatVideoFrameScaleType { kNIMVChatVideoFrameScaleNone = 0 , kNIMVChatVideoFrameScale1x1 = 1 , kNIMVChatVideoFrameScale4x3 = 2 , kNIMVChatVideoFrameScale16x9 = 3 }
 
enum  NIMVChatMp4RecordCode {
  kNIMVChatMp4RecordClose = 0 , kNIMVChatMp4RecordVideoSizeError = 1 , kNIMVChatMp4RecordOutDiskSpace = 2 , kNIMVChatMp4RecordThreadBusy = 3 ,
  kNIMVChatMp4RecordCreate = 200 , kNIMVChatMp4RecordExsit = 400 , kNIMVChatMp4RecordCreateError = 403 , kNIMVChatMp4RecordInvalid = 404
}
 
enum  NIMVChatAudioRecordCode {
  kNIMVChatAudioRecordClose = 0 , kNIMVChatAudioRecordOutDiskSpace = 2 , kNIMVChatAudioRecordCreate = 200 , kNIMVChatAudioRecordExsit = 400 ,
  kNIMVChatAudioRecordCreateError = 403 , kNIMVChatAudioRecordInvalid = 404
}
 
enum  NIMVChatVideoSplitMode {
  kNIMVChatSplitBottomHorFloating = 0 , kNIMVChatSplitTopHorFloating = 1 , kNIMVChatSplitLatticeTile = 2 , kNIMVChatSplitLatticeCuttingTile = 3 ,
  kNIMVChatSplitCustomLayout = 4 , kNIMVChatSplitAudioLayout = 5
}
 
enum  NIMVChatLiveStateCode {
  kNIMVChatLiveStateInitial = 500 , kNIMVChatLiveStateLayoutError = 501 , kNIMVChatLiveStateStartConnecting = 502 , kNIMVChatLiveStateConnectted = 503 ,
  kNIMVChatLiveStateConnectFail = 504 , kNIMVChatLiveStatePushing = 505 , kNIMVChatLiveStatePushFail = 506 , kNIMVChatLiveStateInnerError = 507 ,
  kNIMVChatLiveStatePeopleLimit = 508
}
 
enum  NIMVChatAudioMode { kNIMVChatAdModeDefault = 0 , kNIMVChatAdModeNormal = 1 , kNIMVChatAdModeHighVoip = 2 , kNIMVChatAdModeHighMusic = 3 }
 
enum  NIMVideoChatSessionStatus { kNIMVideoChatSessionStatusJoined = 0 , kNIMVideoChatSessionStatusLeaved = 1 }
 
enum  NIMVideoChatUserLeftType { kNIMVChatUserLeftTimeout = -1 , kNIMVChatUserLeftNormal = 0 }
 
enum  NIMVideoChatSessionNetStat { kNIMVChatNetStatusVideoClose = -1 , kNIMVideoChatSessionNetStatGood = 0 , kNIMVideoChatSessionNetStatPoor = 1 , kNIMVideoChatSessionNetStatBad = 2 }
 
enum  NIMVChatConnectErrorCode {
  kNIMVChatConnectDisconn = 0 , kNIMVChatConnectStartFail = 1 , kNIMVChatConnectTimeout = 101 , kNIMVChatConnectMeetingModeError = 102 ,
  kNIMVChatConnectRtmpModeError = 103 , kNIMVChatConnectRtmpNodesError = 104 , kNIMVChatConnectRtmpHostError = 105 , kNIMVChatConnectRtmpCreateError = 106 ,
  kNIMVChatJoinServerValidError = 107 , kNIMVChatJoinChannelClosed = 108 , kNIMVChatConnectSuccess = 200 , kNIMVChatConnectLayoutError = 208 ,
  kNIMVChatConnectInvalidParam = 400 , kNIMVChatConnectDesKey = 401 , kNIMVChatConnectInvalidRequst = 417 , kNIMVChatConnectServerUnknown = 500 ,
  kNIMVChatConnectLogout = 1001 , kNIMVChatChannelStartFail = 11000 , kNIMVChatChannelDisconnected = 11001 , kNIMVChatVersionSelfLow = 11002 ,
  kNIMVChatVersionRemoteLow = 11003 , kNIMVChatLocalChannelClosed = 11004 , kNIMVChatLocalChannelKicked = 11005
}
 
enum  NIMNetDetectType { kNIMNetDetectTypeAudio = 0 , kNIMNetDetectTypeVideo = 1 }
 
enum  NIMNetDetectVideoQuality {
  kNIMNDVideoQualityDefault = 0 , kNIMNDVideoQualityLow = 1 , kNIMNDVideoQualityMedium = 2 , kNIMNDVideoQualityHigh = 3 ,
  kNIMNDVideoQuality480p = 4 , kNIMNDVideoQuality540p = 5 , kNIMNDVideoQuality720p = 6
}
 
enum  NIMMainPictureOptCode {
  kNIMMainPictureOptSucess = 200 , kNIMMainPictureOptAuthError = 401 , kNIMMainPictureOptRoomNotExist = 404 , kNIMMainPictureOptUidNotExist = 405 ,
  kNIMMainPictureOptDataError = 417 , kNIMMainPictureOptError = 500 , kNIMMainPictureOptServerError = 600 , kNIMMainPictureOptInvalid = 11403
}
 
enum  NIMVChatServRecordType { kNIMVChatServRecordMixedSingle = 0 , kNIMVChatServRecordMixed = 1 , kNIMVChatServRecordSingle = 2 }
 
enum  NIMVChatPubSubNotifyType {
  kNIMVChatNotifyPublishVideoRet = 0 , kNIMVChatNotifyUnpublishVideoRet = 1 , kNIMVChatNotifyRemotePublishVideo = 2 , kNIMVChatNotifyRemoteUnpublishVideo = 3 ,
  kNIMVChatNotifySubscribeVideoRet = 4 , kNIMVChatNotifyUnsubscribeVideoRet = 5 , kNIMVChatNotifySubscribeAudioRet = 6 , kNIMVChatNotifyUnsubscribeAudioRet = 7
}
 
enum  NIMVChatPublishVideoStreamMode { kNIMVChatPublishVideoSingleStream = 0 , kNIMVChatPublishVideoDualStream = 1 }
 
enum  NIMVChatPublishVideoSimulcastRes { kNIMVChatPublishVideoSimulcastResHigh = 0 , kNIMVChatPublishVideoSimulcastResLow = 2 }
 
enum  NIMVChatPubSubErrorCode {
  kNIMVChatPSErrCodeSuccess = 0 , kNIMVChatPSErrCodeFail = -1 , kNIMVChatPSErrCodeViewerMode = -200 , kNIMVChatPSErrCodeAudioMode = -300 ,
  kNIMVChatPSErrCodeOptBusy = -400 , kNIMVChatPSErrCodeAutoMode = -500 , kNIMVChatPSErrCodeForbid = -600 , kNIMVChatPSErrCodeSubscribed = -700
}
 
enum  NIMVChatServerSubscribeFallbackStrategy { kNIMVChatSteamFallbackStrategyDisabled = 0 , kNIMVChatSteamFallbackStrategyAudioOnly = 2 }
 

变量

初始化 内容Json key for nim_vchat_init
static const char * kNIMVChatServerSettingPath = "server_setting_path"
 string 服务器配置文件路径
 
网络探测 内容Json key for nim_vchat_net_detect
static const char * kNIMNetDetectAppKey = "app_key"
 string 用户的app key
 
static const char * kNIMNetDetectTimeLimit = "time"
 int32 毫秒级的探测时长限制
 
static const char * kNIMNetDetectType = "type"
 int32 探测类型NIMNetDetectType
 
static const char * kNIMNetDetectQualityType = "quality_type"
 int32 kNIMNetDetectTypeVideo时有效,默认为0,视频探测类型NIMNetDetectVideoQuality
 
网络探测回调 内容Json key for nim_vchat_opt_cb_func
static const char * kNIMNetDetectTaskId = "task_id"
 uint64 任务id
 
static const char * kNIMNetDetectLoss = "loss"
 int 丢包率百分比
 
static const char * kNIMNetDetectRttmax = "rttmax"
 int rtt 最大值
 
static const char * kNIMNetDetectRttmin = "rttmin"
 int rtt 最小值
 
static const char * kNIMNetDetectRttavg = "rttavg"
 int rtt 平均值
 
static const char * kNIMNetDetectRttmdev = "rttmdev"
 int rtt 偏差值 mdev
 
static const char * kNIMNetDetectDetail = "detailinfo"
 string 扩展信息
 
json extension params for start join or ack accept
static const char * kNIMVChatUids = "uids"
 StrArray 帐号, ack无效
 
static const char * kNIMVChatSessionId = "session_id"
 string 发起会话的标识id,将在创建通话及结束通话时有效,帮助针对无channelid的情况下进行映射
 
static const char * kNIMVChatTimeout = "time_out"
 bool 是呼叫超时 true 是,false 否
 
static const char * kNIMVChatCustomVideo = "custom_video"
 int 是否用自主的视频数据 >0表示是
 
static const char * kNIMVChatCustomAudio = "custom_audio"
 int 是否用自主的音频数据 >0表示是
 
static const char * kNIMVChatRecord = "record"
 int 是否需要录制音频数据 >0表示是 (需要服务器配置支持,本地录制直接调用接口函数)
 
static const char * kNIMVChatVideoRecord = "video_record"
 int 是否需要录制视频数据 >0表示是 (需要服务器配置支持,本地录制直接调用接口函数)
 
static const char * kNIMVChatRecordType = "record_type"
 int 服务器录制模式NIMVChatServRecordType,默认为0 (需要服务器配置支持,并且开kNIMVChatRecord,kNIMVChatVideoRecord其中一个)
 
static const char * kNIMVChatRHostSpeaker = "r_host_speaker"
 int 服务器混录时指定本人主画面,默认为0, 非0表示打开(需要服务器配置支持,及录制模式打开混录,并且为多人中的第一个主画面配置)
 
static const char * kNIMVChatMaxVideoRate = "max_video_rate"
 int 视频发送编码码率 >=100000 <=5000000有效
 
static const char * kNIMVChatVideoQuality = "video_quality"
 int 视频聊天分辨率选择 NIMVChatVideoQuality
 
static const char * kNIMVChatVideoFrameRate = "frame_rate"
 int 视频画面帧率 NIMVChatVideoFrameRate
 
static const char * kNIMVChatAudioMode = "audio_mode"
 int 音频模式选择 NIMVChatAudioMode
 
static const char * kNIMVChatRtmpUrl = "rtmp_url"
 string 直播推流地址(加入多人时有效),非空代表主播旁路直播, kNIMVChatBypassRtmp决定是否开始推流
 
static const char * kNIMVChatBypassRtmp = "bypass_rtmp"
 int 是否旁路推流(如果rtmpurl为空是连麦观众,非空是主播的推流控制), >0表示是
 
static const char * kNIMVChatRtmpRecord = "rtmp_record"
 int 是否开启服务器对直播推流录制(需要开启服务器能力), >0表示是
 
static const char * kNIMVChatSplitMode = "split_mode"
 int 主播控制的直播推流时的分屏模式,见NIMVChatVideoSplitMode
 
static const char * kNIMVChatCustomLayout = "custom_layout"
 string 自定义布局,当主播选择kNIMVChatSplitCustomLayout或kNIMVChatSplitAudioLayout模式时生效
 
static const char * kNIMVChatPushEnable = "push_enable"
 int 是否需要推送 >0表示是 默认是
 
static const char * kNIMVChatNeedBadge = "need_badge"
 int 是否需要角标计数 >0表示是 默认是
 
static const char * kNIMVChatNeedFromNick = "need_nick"
 int 是否需要推送昵称 >0表示是 默认是
 
static const char * kNIMVChatApnsPayload = "payload"
 string JSON格式,推送payload
 
static const char * kNIMVChatSound = "sound"
 string 推送声音
 
static const char * kNIMVChatKeepCalling = "keepcalling"
 int, 是否强制持续呼叫(对方离线也会呼叫),1表示是,0表示否。默认是
 
static const char * kNIMVChatVEncodeMode = "v_encode_mode"
 int, 使用的视频编码策略NIMVChatVideoEncodeMode, 默认kNIMVChatVEModeNormal
 
static const char * kNIMVChatServerSubscribeFallbackStrategy = "server_sub_fb_stategy"
 int,服务器在下行弱网的时候切流策略NIMVChatServerSubscribeFallbackStrategy, 默认kNIMVChatSteamFallbackStrategyAudioOnly
 
json extension params for nim_vchat_cb_func
static const char * kNIMVChatUid = "uid"
 string 帐号
 
static const char * kNIMVChatStatus = "status"
 int 状态
 
static const char * kNIMVChatRecordAddr = "record_addr"
 string 录制地址(服务器开启录制时有效)
 
static const char * kNIMVChatRecordFile = "record_file"
 string 服务器音频录制文件名(服务器开启录制时有效)
 
static const char * kNIMVChatVideoRecordFile = "video_record_file"
 string 服务器视频录制文件名(服务器开启录制时有效)
 
static const char * kNIMVChatType = "type"
 int 状态
 
static const char * kNIMVChatTime = "time"
 int64 时间 单位毫秒
 
static const char * kNIMVChatAccept = "accept"
 int 是否接受 >0表示接受
 
static const char * kNIMVChatClient = "client"
 int 客户端类型 NIMClientType见nim_client_def.h
 
static const char * kNIMVChatMp4Start = "mp4_start"
 key Mp4写入数据开始 kNIMVChatMp4File kNIMVChatTime(本地时间点)
 
static const char * kNIMVChatMp4Close = "mp4_close"
 key 结束Mp4录制,返回时长及原因 kNIMVChatStatus(NIMVChatMp4RecordCode) kNIMVChatTime(时长) kNIMVChatMp4File
 
static const char * kNIMVChatMp4File = "mp4_file"
 string mp4录制地址
 
static const char * kNIMVChatAuRecordStart = "audio_record_start"
 key 音频录制写入数据开始 kNIMVChatFile kNIMVChatTime
 
static const char * kNIMVChatAuRecordClose = "audio_record_close"
 key 结束音频录制,返回时长及原因 kNIMVChatStatus(NIMVChatAudioRecordCode) kNIMVChatTime kNIMVChatFile
 
static const char * kNIMVChatFile = "file"
 string 文件地址
 
static const char * kNIMVChatCustomInfo = "custom_info"
 string 自定义数据
 
static const char * kNIMVChatVideo = "video"
 key 视频
 
static const char * kNIMVChatAudio = "audio"
 key 音频
 
static const char * kNIMVChatStaticInfo = "static_info"
 key 音视频实时状态
 
static const char * kNIMVChatFPS = "fps"
 int 每秒帧率或者每秒发包数
 
static const char * kNIMVChatKBPS = "KBps"
 int 每秒流量,单位为“千字节”
 
static const char * kNIMVChatLostRate = "lost_rate"
 int 丢包率,单位是百分比
 
static const char * kNIMVChatRtt = "rtt"
 int rtt 网络延迟
 
static const char * kNIMVChatAudioVolume = "audio_volume"
 key 音频实时音量通知,包含发送的音量kNIMVChatSelf和接收音量kNIMVChatReceiver,kNIMVChatStatus的音量值是pcm的平均值最大为int16_max
 
static const char * kNIMVChatSelf = "self"
 key 本人信息
 
static const char * kNIMVChatReceiver = "receiver"
 key 接收信息
 
static const char * kNIMVChatLiveState = "live_state"
 key 直播状态 kNIMVChatStatus(NIMVChatLiveStateCode)
 
static const char * kNIMVChatMp4AudioType = "mp4_audio"
 int mp4录制时音频情况,0标识只录制当前成员,1标识录制通话全部混音(等同音频文件录制的声音)
 
static const char * kNIMVChatMp4Recode = "mp4_recode"
 bool mp4录制时重新编码开关
 
static const char * kNIMVChatMp4Width = "mp4_width"
 int 录制的mp4的宽度,默认为0,小于16无效,无效时取视频默认大小
 
static const char * kNIMVChatMp4Height = "mp4_height"
 int 录制的mp4的高度,默认为0,小于16无效,无效时取视频默认大小
 
static const char * kNIMVChatTrafficStatRX = "trafficstat_rx"
 uint64 下行流量(字节)
 
static const char * kNIMVChatTrafficStatTX = "trafficstat_tx"
 uint64 上行流量(字节)
 
static const char * kNIMVChatVideoSimulcastResList = "video_simulcast_res_list"
 json array 订阅发布视频分辨率类型列表
 
json extension params for nim_vchat_create_room
static const char * kNIMVChatRoomConfig = "room_config"
 key 房间配置
 
static const char * kNIMVChatRTMPTasks = "rtmpTasks"
 array 推流参数配置,可以配置多个
 
static const char * kNIMVChatRTMPTaskID = "taskId"
 必填 string 推流任务ID
 
static const char * kNIMVChatRTMPURL = "streamUrl"
 必填 string 推流地址
 
static const char * kNIMVChatRTMPLayoutMode = "layoutMode"
 必填 int 连麦方式
 
static const char * kNIMVChatRTMPLayoutPara = "layoutPara"
 选填 string 自定义布局参数,仅对kNIMVChatSplitCustomLayout,kNIMVChatSplitAudioLayout模式有效
 
static const char * kNIMVChatRTMPRecord = "record"
 选填 bool 推流参数配置
 
static const char * kNIMVChatRTMPMainScreenAccid = "accid"
 选填 string 指定主屏显示的帐号
 
json extension params for nim_vchat_remote_audio_data_cb_func
static const char * kNIMVChatAccount = "account"
 用户账号 string
 

详细描述

音视频 接口相关的常量函数等定义头文件

作者
gq
日期
2015/5/5

类型定义说明

◆ nim_vchat_audio_record_opt_cb_func

void(* nim_vchat_audio_record_opt_cb_func)(bool ret, int code, const char *file, __int64 time, const char *json_extension, const void *user_data) NIM 音频录制操作回调,实际的开始录制和结束都会在nim_vchat_cb_func中返回
参数
[out]ret结果代码,true表示成功
[out]code对应NIMVChatAudioRecordCode,用于获得失败时的错误原因
[out]file文件路径
[out]time录制结束时有效,对应毫秒级的录制时长
[out]json_extensionJson string 无效扩展字段
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数cb,不做任何处理!
返回
void 无返回值

◆ nim_vchat_cb_func

void(* nim_vchat_cb_func)(NIMVideoChatSessionType type, int64_t channel_id, int code, const char *json_extension, const void *user_data)

NIM VChat 音视频通话中状态返回回调接口
根据NIMVideoChatSessionType的具体参数说明如下:
kNIMVideoChatSessionTypeStartRes, // 创建通话结果 code=200成功,json 返回kNIMVChatSessionId
kNIMVideoChatSessionTypeInviteNotify, // 通话邀请 code无效,json 返回kNIMVChatUid发起者,kNIMVChatType对应NIMVideoChatMode, kNIMVChatTime, kNIMVChatCustomInfo
kNIMVideoChatSessionTypeCalleeAckRes, // 确认通话,接受拒绝结果 json 无效 code: 200:成功 9103 : 已经在其他端接听 / 拒绝过这通电话
kNIMVideoChatSessionTypeCalleeAckNotify, // 确认通话,接受拒绝通知 code=无效,json 返回kNIMVChatUid对方,kNIMVChatType对应NIMVideoChatMode, kNIMVChatAccept
kNIMVideoChatSessionTypeControlRes, //NIMVChatControlType 结果 code=200成功,json 返回kNIMVChatType对应NIMVChatControlType
kNIMVideoChatSessionTypeControlNotify, //NIMVChatControlType 通知 code=无效,json 返回kNIMVChatUid对方,kNIMVChatType对应NIMVChatControlType
kNIMVideoChatSessionTypeConnect, // 通话中链接状态通知 code对应NIMVChatConnectErrorCode, 非200均失败并底层结束
// code=1001,代表通话注销结果,带通话本地时长(kNIMVChatTime)及数据量(kNIMVChatTrafficStatRX kNIMVChatTrafficStatTX)
kNIMVideoChatSessionTypePeopleStatus, // 通话中成员状态 code对应NIMVideoChatSessionStatus, json返回kNIMVChatUid,如果是离开带kNIMVChatStatus对应NIMVideoChatUserLeftType
kNIMVideoChatSessionTypeNetStatus, // 通话中网络状态 code对应NIMVideoChatSessionNetStat, json返回kNIMVChatUid
kNIMVideoChatSessionTypeHangupRes, // 通话主动结果 code=200成功,json无效
kNIMVideoChatSessionTypeHangupNotify, // 通话被挂断通知 code无效,json无效
kNIMVideoChatSessionTypeSyncAckNotify, // 其他端接听挂断后的同步通知 json 返回 kNIMVChatTime,kNIMVChatType对应NIMVideoChatMode,kNIMVChatAccept,kNIMVChatClient
kNIMVideoChatSessionTypeMp4Notify //windows(pc)有效.通知MP4录制状态,包括开始录制和结束录制, code无效,json(其他成员的录制通知带uid,自己的不带) 返回如下
// MP4开始 {"mp4_start":{ "mp4_file": "d:\\test.mp4", "time": 14496477000000, "uid":"id123" }}
// MP4结束 {"mp4_close":{ "mp4_file": "d:\\test.mp4", "time": 120000, "status": 0, "uid":"id123" }}
kNIMVideoChatSessionTypeAuRecordNotify //windows(pc)有效.通知音频录制状态,包括开始录制和结束录制 code无效,json 返回如下
// 录制开始 {"audio_record_start":{ "file": "d:\\test.aac", "time": 14496477000000 }}
// 录制结束 {"audio_record_close":{ "file": "d:\\test.aac", "time": 120000, "status": 0 }}
kNIMVideoChatSessionTypeInfoNotify // 实时状态 {"static_info":{"rtt":20, "video": {"fps":20, "KBps":200, "lost_rate":5, "width":1280,"height":720}, "audio": {"fps":17, "KBps":3", lost_rate":3 }}}
kNIMVideoChatSessionTypeVolumeNotify // 音量状态 {"audio_volume":{ "self": {"status":600}, "receiver": [{"uid":"id123","status":1000},{"uid":"id456","status":222}] }}
kNIMVideoChatSessionTypeLiveState //windows(pc)有效.直播状态 {"live_state":{"status":505 }}
kNIMVideoChatSessionTypePubSubNotify // 订阅及发布相关的通知,code返回(NIMVChatPubSubErrorCode),json包含kNIMVChatType(NIMVChatPubSubNotifyType) 远端视频额外带有kNIMVChatUid 本端订阅发布操作、远端发布带有kNIMVChatVideoSimulcastResList

参数
[out]typeNIMVideoChatSessionType
[out]channel_id通话的通道id
[out]code结果类型或错误类型
[out]json_extensionJson string 扩展
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数cb,不做任何处理!
返回
void 无返回值

◆ nim_vchat_mp4_record_opt_cb_func

void(* nim_vchat_mp4_record_opt_cb_func)(bool ret, int code, const char *file, int64_t time, const char *json_extension, const void *user_data) NIM MP4操作回调,实际的开始录制和结束都会在nim_vchat_cb_func中返回
参数
[out]ret结果代码,true表示成功
[out]code对应NIMVChatMp4RecordCode,用于获得失败时的错误原因
[out]file文件路径
[out]time录制结束时有效,对应毫秒级的录制时长
[out]json_extensionJson string 无效扩展字段
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数cb,不做任何处理!
返回
void 无返回值

◆ nim_vchat_opt2_cb_func

void(* nim_vchat_opt2_cb_func)(int code, int64_t channel_id, const char *json_extension, const void *user_data)

NIM 操作回调,通用的操作回调接口

参数
[out]code结果代码,code==200表示成功
[out]channel_id通道id
[out]json_extensionJson string 扩展字段kNIMVChatSessionId,加入多人的返回中带有kNIMVChatCustomInfo
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数cb,不做任何处理!
返回
void 无返回值

◆ nim_vchat_opt_cb_func

void(* nim_vchat_opt_cb_func)(bool ret, int code, const char *json_extension, const void *user_data)

NIM 操作回调,通用的操作回调接口

参数
[out]ret结果代码,true表示成功
[out]code暂时无效
[out]json_extensionJson string 扩展字段
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数cb,不做任何处理!
返回
void 无返回值

◆ nim_vchat_rate_callback

void(* nim_vchat_rate_callback)(bool ret, int response_code, const char *json_extension, const void *user_data)

用户反馈回调

参数
[out]ret反馈结果
[out]response_codeHTTP错误码
[out]json_extensionjson数据
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_vchat_remote_audio_data_cb_func

void(* nim_vchat_remote_audio_data_cb_func)(unsigned __int64 time, const char *data, unsigned int size, int channels, int rate, constchar *json_extension, const void *user_data) NIM Device 远端音频数据监听接口
参数
[out]time时间毫秒级,暂时无效
[out]data音频数据pcm格式
[out]sizedata的数据长度
[out]channels通道数
[out]rate采样频
[out]json_extensionJson 扩展,返回kNIMVChatAccount(远端用户id)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

枚举类型说明

◆ NIMMainPictureOptCode

房间主画面设置返回码

枚举值
kNIMMainPictureOptSucess 

操作成功

kNIMMainPictureOptAuthError 

认证错误

kNIMMainPictureOptRoomNotExist 

房间不存在

kNIMMainPictureOptUidNotExist 

房间下的uid不存在

kNIMMainPictureOptDataError 

请求数据不对

kNIMMainPictureOptError 

内部错误

kNIMMainPictureOptServerError 

服务器内部错误

kNIMMainPictureOptInvalid 

无效的操作

◆ NIMNetDetectType

探测类型

枚举值
kNIMNetDetectTypeAudio 

默认值,音频探测

kNIMNetDetectTypeVideo 

视频探测

◆ NIMNetDetectVideoQuality

视频探测类型

枚举值
kNIMNDVideoQualityDefault 

480P

kNIMNDVideoQualityLow 

256*144

kNIMNDVideoQualityMedium 

352*288

kNIMNDVideoQualityHigh 

480*360

kNIMNDVideoQuality480p 

640*480

kNIMNDVideoQuality540p 

960*540

kNIMNDVideoQuality720p 

1280*720

◆ NIMVChatAudioMode

音频模式

枚举值
kNIMVChatAdModeDefault 

默认值,为kNIMVChatAdModeHighVoip

kNIMVChatAdModeNormal 

窄带

kNIMVChatAdModeHighVoip 

高清语音

kNIMVChatAdModeHighMusic 

高清音乐。注意:高清音乐模式仅限耳机场景下使用,其他场景可能导致音频质量不佳

◆ NIMVChatAudioRecordCode

音频录制状态

枚举值
kNIMVChatAudioRecordClose 

录制正常结束

kNIMVChatAudioRecordOutDiskSpace 

录制结束,磁盘空间不足

kNIMVChatAudioRecordCreate 

文件创建成功

kNIMVChatAudioRecordExsit 

已经存在

kNIMVChatAudioRecordCreateError 

文件创建失败

kNIMVChatAudioRecordInvalid 

通话不存在

◆ NIMVChatConnectErrorCode

音视频服务器连接状态类型

枚举值
kNIMVChatConnectDisconn 

断开连接

kNIMVChatConnectStartFail 

启动失败

kNIMVChatConnectTimeout 

超时

kNIMVChatConnectMeetingModeError 

会议模式错误

kNIMVChatConnectRtmpModeError 

rtmp用户加入非rtmp频道

kNIMVChatConnectRtmpNodesError 

超过频道最多rtmp人数限制

kNIMVChatConnectRtmpHostError 

已经存在一个主播

kNIMVChatConnectRtmpCreateError 

需要旁路直播, 但频道创建者非主播

kNIMVChatJoinServerValidError 

服务器验证内部错误

kNIMVChatJoinChannelClosed 

频道已经关闭

kNIMVChatConnectSuccess 

成功

kNIMVChatConnectLayoutError 

主播自定义布局错误

kNIMVChatConnectInvalidParam 

错误参数

kNIMVChatConnectDesKey 

密码加密错误

kNIMVChatConnectInvalidRequst 

错误请求

kNIMVChatConnectServerUnknown 

服务器内部错误

kNIMVChatConnectLogout 

退出

kNIMVChatChannelStartFail 

发起失败

kNIMVChatChannelDisconnected 

断开连接

kNIMVChatVersionSelfLow 

本人SDK版本太低不兼容

kNIMVChatVersionRemoteLow 

对方SDK版本太低不兼容

kNIMVChatLocalChannelClosed 

通道被关闭

kNIMVChatLocalChannelKicked 

账号被踢

◆ NIMVChatConnectStatus

视频通话连接状态

枚举值
kNIMVChatConnectNone 

不在通话中

kNIMVChatConnecting 

正在连接中

kNIMVChatConnected 

正在通话中

kNIMVChatReConnecting 

正在重新连接中

kNIMVChatDisconnect 

连接断开

◆ NIMVChatControlType

音视频通话控制类型

枚举值
kNIMTagControlOpenAudio 

打开音频

kNIMTagControlCloseAudio 

关闭音频

kNIMTagControlOpenVideo 

打开视频

kNIMTagControlCloseVideo 

关闭视频

kNIMTagControlAudioToVideo 

请求从音频切换到视频

kNIMTagControlAgreeAudioToVideo 

同意从音频切换到视频

kNIMTagControlRejectAudioToVideo 

拒绝从音频切换到视频

kNIMTagControlVideoToAudio 

从视频切换到音频

kNIMTagControlBusyLine 

占线

kNIMTagControlCamaraNotAvailable 

告诉对方自己的摄像头不可用

kNIMTagControlEnterBackground 

告诉对方自已处于后台

kNIMTagControlReceiveStartNotifyFeedback 

告诉发送方自己已经收到请求了(用于通知发送方开始播放提示音)

kNIMTagControlMp4StartRecord 

告诉发送方自己开始录制

kNIMTagControlMp4StopRecord 

告诉发送方自己结束录制

◆ NIMVChatLiveStateCode

直播时的状态码。服务器定时更新,一些存在时间短的状态会获取不到

枚举值
kNIMVChatLiveStateInitial 
kNIMVChatLiveStateLayoutError 

主播设置定制布局,布局参数错误

kNIMVChatLiveStateStartConnecting 

开始连接

kNIMVChatLiveStateConnectted 

连接成功

kNIMVChatLiveStateConnectFail 

连接失败

kNIMVChatLiveStatePushing 

推流中

kNIMVChatLiveStatePushFail 

互动直播推流失败

kNIMVChatLiveStateInnerError 

内部错误

kNIMVChatLiveStatePeopleLimit 

人数超出限制

◆ NIMVChatMp4RecordCode

mp4录制状态

枚举值
kNIMVChatMp4RecordClose 

MP4结束

kNIMVChatMp4RecordVideoSizeError 

MP4结束,视频画面大小变化

kNIMVChatMp4RecordOutDiskSpace 

MP4结束,磁盘空间不足

kNIMVChatMp4RecordThreadBusy 

MP4结束,录制线程繁忙

kNIMVChatMp4RecordCreate 

MP4文件创建

kNIMVChatMp4RecordExsit 

MP4文件已经存在

kNIMVChatMp4RecordCreateError 

MP4文件创建失败

kNIMVChatMp4RecordInvalid 

通话不存在

◆ NIMVChatPublishVideoSimulcastRes

视频流类型

枚举值
kNIMVChatPublishVideoSimulcastResHigh 

高分辨率视频流

kNIMVChatPublishVideoSimulcastResLow 

低分辨率视频流

◆ NIMVChatPublishVideoStreamMode

发布视频流模式

枚举值
kNIMVChatPublishVideoSingleStream 

发布单流模式(默认)

kNIMVChatPublishVideoDualStream 

发布双流模式

◆ NIMVChatPubSubErrorCode

订阅及发布相关通知类型

枚举值
kNIMVChatPSErrCodeSuccess 

成功

kNIMVChatPSErrCodeFail 

失败

kNIMVChatPSErrCodeViewerMode 

发布操作失败,当前为观众模式

kNIMVChatPSErrCodeAudioMode 

视频发布操作失败,当前为音频模式

kNIMVChatPSErrCodeOptBusy 

操作繁忙

kNIMVChatPSErrCodeAutoMode 

模式互斥 (当前是自动发布)

kNIMVChatPSErrCodeForbid 

操作无效,对点对模式不支持订阅相关功能

kNIMVChatPSErrCodeSubscribed 

操作无效,视频类型冲突,需要取消之前订阅的流

◆ NIMVChatPubSubNotifyType

订阅及发布相关通知类型

枚举值
kNIMVChatNotifyPublishVideoRet 

本地视频发布操作的结果返回通知

kNIMVChatNotifyUnpublishVideoRet 

本地取消视频发布操作的结果返回通知

kNIMVChatNotifyRemotePublishVideo 

远端视频发布通知

kNIMVChatNotifyRemoteUnpublishVideo 

远端视频停止发布通知

kNIMVChatNotifySubscribeVideoRet 

本地订阅远端视频操作的结果返回通知

kNIMVChatNotifyUnsubscribeVideoRet 

本地取消订阅远端视频操作的结果返回通知

kNIMVChatNotifySubscribeAudioRet 

本地订阅远端音频操作的结果返回通知

kNIMVChatNotifyUnsubscribeAudioRet 

本地取消订阅远端音频操作的结果返回通知

◆ NIMVChatServerSubscribeFallbackStrategy

服务器在下行弱网的时候切流策略

枚举值
kNIMVChatSteamFallbackStrategyDisabled 

禁用服务器弱网切流策略

kNIMVChatSteamFallbackStrategyAudioOnly 

默认策略允许服务器切小流、关视频

◆ NIMVChatServRecordType

服务器录制模式,用于指定本人数据录制选择

枚举值
kNIMVChatServRecordMixedSingle 

服务器录制混录并带单人文件

kNIMVChatServRecordMixed 

服务器录制只混录

kNIMVChatServRecordSingle 

服务器录制只录本人单人文件

◆ NIMVChatVideoEncodeMode

视频编码策略

枚举值
kNIMVChatVEModeNormal 

默认值,清晰优先

kNIMVChatVEModeFramerate 

流畅优先

kNIMVChatVEModeQuality 

清晰优先

kNIMVChatVEModeScreen 

屏幕共享场景调控策略,sdk不会根据网络调整分辨率

◆ NIMVChatVideoFrameRate

视频通话帧率,实际帧率因画面采集频率和机器性能限制可能达不到期望值

枚举值
kNIMVChatVideoFrameRateNormal 

视频通话帧率默认值,最大取每秒15帧

kNIMVChatVideoFrameRate5 

视频通话帧率 最大取每秒5帧

kNIMVChatVideoFrameRate10 

视频通话帧率 最大取每秒10帧

kNIMVChatVideoFrameRate15 

视频通话帧率 最大取每秒15帧

kNIMVChatVideoFrameRate20 

视频通话帧率 最大取每秒20帧

kNIMVChatVideoFrameRate25 

视频通话帧率 最大取每秒25帧

◆ NIMVChatVideoFrameScaleType

视频画面长宽比,裁剪时不改变横竖屏,如4:3,代表宽高横屏4:3或者竖屏3:4

枚举值
kNIMVChatVideoFrameScaleNone 

默认,不裁剪

kNIMVChatVideoFrameScale1x1 

裁剪成1:1的形状

kNIMVChatVideoFrameScale4x3 

裁剪成4:3的形状,如果是

kNIMVChatVideoFrameScale16x9 

裁剪成16:9的形状

◆ NIMVChatVideoQuality

视频通话分辨率,最终长宽比不保证

枚举值
kNIMVChatVideoQualityNormal 

视频默认分辨率 480x360

kNIMVChatVideoQualityLow 

视频低分辨率 256x144

kNIMVChatVideoQualityMedium 

视频中分辨率 352x288

kNIMVChatVideoQualityHigh 

视频高分辨率 480x360

kNIMVChatVideoQualitySuper 

视频超高分辨率 640x480

kNIMVChatVideoQuality540p 

介于720P与480P之间的类型,默认 960*540

kNIMVChatVideoQuality720p 

用于桌面分享级别的分辨率1280x720,需要使用高清摄像头并指定对应的分辨率,或者自定义通道传输

◆ NIMVChatVideoSplitMode

主播设置的直播分屏模式

枚举值
kNIMVChatSplitBottomHorFloating 

底部横排浮窗

kNIMVChatSplitTopHorFloating 

顶部横排浮窗

kNIMVChatSplitLatticeTile 

平铺

kNIMVChatSplitLatticeCuttingTile 

裁剪平铺

kNIMVChatSplitCustomLayout 

自定义布局

kNIMVChatSplitAudioLayout 

纯音频布局

◆ NIMVideoChatMode

音视频通话类型

枚举值
kNIMVideoChatModeAudio 

语音通话模式

kNIMVideoChatModeVideo 

视频通话模式

◆ NIMVideoChatSessionNetStat

音视频通话网络变化类型

枚举值
kNIMVChatNetStatusVideoClose 

网络状态极差,视频强制关闭

kNIMVideoChatSessionNetStatGood 

网络状态较好

kNIMVideoChatSessionNetStatPoor 

网络状态较差

kNIMVideoChatSessionNetStatBad 

网络状态很差

◆ NIMVideoChatSessionStatus

音视频通话成员变化类型

枚举值
kNIMVideoChatSessionStatusJoined 

成员进入

kNIMVideoChatSessionStatusLeaved 

成员退出

◆ NIMVideoChatSessionType

音视频通话状态通知类型

枚举值
kNIMVideoChatSessionTypeStartRes 

创建通话结果

kNIMVideoChatSessionTypeInviteNotify 

通话邀请

kNIMVideoChatSessionTypeCalleeAckRes 

确认通话,接受拒绝结果

kNIMVideoChatSessionTypeCalleeAckNotify 

确认通话,接受拒绝通知

kNIMVideoChatSessionTypeControlRes 

NIMVChatControlType 结果

kNIMVideoChatSessionTypeControlNotify 

NIMVChatControlType 通知

kNIMVideoChatSessionTypeConnect 

通话中链接状态通知

kNIMVideoChatSessionTypePeopleStatus 

通话中成员状态

kNIMVideoChatSessionTypeNetStatus 

通话中网络状态

kNIMVideoChatSessionTypeHangupRes 

通话挂断结果

kNIMVideoChatSessionTypeHangupNotify 

通话被挂断通知

kNIMVideoChatSessionTypeSyncAckNotify 

通话接听挂断同步通知

kNIMVideoChatSessionTypeMp4Notify 

通知MP4录制状态,包括开始录制和结束录制

kNIMVideoChatSessionTypeInfoNotify 

通知实时音视频数据状态

kNIMVideoChatSessionTypeVolumeNotify 

通知实时音频发送和混音的音量状态

kNIMVideoChatSessionTypeAuRecordNotify 

通知音频录制状态,包括开始录制和结束录制

kNIMVideoChatSessionTypeLiveState 

通知直播推流的服务器状态

kNIMVideoChatSessionTypePubSubNotify 

通知订阅相关通知

◆ NIMVideoChatUserLeftType

成员退出类型

枚举值
kNIMVChatUserLeftTimeout 

成员超时掉线

kNIMVChatUserLeftNormal 

成员离开

变量说明

◆ kNIMNetDetectAppKey

const char* kNIMNetDetectAppKey = "app_key"
static

string 用户的app key

◆ kNIMNetDetectDetail

const char* kNIMNetDetectDetail = "detailinfo"
static

string 扩展信息

◆ kNIMNetDetectLoss

const char* kNIMNetDetectLoss = "loss"
static

int 丢包率百分比

◆ kNIMNetDetectQualityType

const char* kNIMNetDetectQualityType = "quality_type"
static

int32 kNIMNetDetectTypeVideo时有效,默认为0,视频探测类型NIMNetDetectVideoQuality

◆ kNIMNetDetectRttavg

const char* kNIMNetDetectRttavg = "rttavg"
static

int rtt 平均值

◆ kNIMNetDetectRttmax

const char* kNIMNetDetectRttmax = "rttmax"
static

int rtt 最大值

◆ kNIMNetDetectRttmdev

const char* kNIMNetDetectRttmdev = "rttmdev"
static

int rtt 偏差值 mdev

◆ kNIMNetDetectRttmin

const char* kNIMNetDetectRttmin = "rttmin"
static

int rtt 最小值

◆ kNIMNetDetectTaskId

const char* kNIMNetDetectTaskId = "task_id"
static

uint64 任务id

◆ kNIMNetDetectTimeLimit

const char* kNIMNetDetectTimeLimit = "time"
static

int32 毫秒级的探测时长限制

◆ kNIMNetDetectType

const char* kNIMNetDetectType = "type"
static

int32 探测类型NIMNetDetectType

◆ kNIMVChatAccept

const char* kNIMVChatAccept = "accept"
static

int 是否接受 >0表示接受

◆ kNIMVChatAccount

const char* kNIMVChatAccount = "account"
static

用户账号 string

◆ kNIMVChatApnsPayload

const char* kNIMVChatApnsPayload = "payload"
static

string JSON格式,推送payload

◆ kNIMVChatAudio

const char* kNIMVChatAudio = "audio"
static

key 音频

◆ kNIMVChatAudioMode

const char* kNIMVChatAudioMode = "audio_mode"
static

int 音频模式选择 NIMVChatAudioMode

◆ kNIMVChatAudioVolume

const char* kNIMVChatAudioVolume = "audio_volume"
static

key 音频实时音量通知,包含发送的音量kNIMVChatSelf和接收音量kNIMVChatReceiver,kNIMVChatStatus的音量值是pcm的平均值最大为int16_max

◆ kNIMVChatAuRecordClose

const char* kNIMVChatAuRecordClose = "audio_record_close"
static

key 结束音频录制,返回时长及原因 kNIMVChatStatus(NIMVChatAudioRecordCode) kNIMVChatTime kNIMVChatFile

◆ kNIMVChatAuRecordStart

const char* kNIMVChatAuRecordStart = "audio_record_start"
static

key 音频录制写入数据开始 kNIMVChatFile kNIMVChatTime

◆ kNIMVChatBypassRtmp

const char* kNIMVChatBypassRtmp = "bypass_rtmp"
static

int 是否旁路推流(如果rtmpurl为空是连麦观众,非空是主播的推流控制), >0表示是

◆ kNIMVChatClient

const char* kNIMVChatClient = "client"
static

int 客户端类型 NIMClientType见nim_client_def.h

◆ kNIMVChatCustomAudio

const char* kNIMVChatCustomAudio = "custom_audio"
static

int 是否用自主的音频数据 >0表示是

◆ kNIMVChatCustomInfo

const char* kNIMVChatCustomInfo = "custom_info"
static

string 自定义数据

◆ kNIMVChatCustomLayout

const char* kNIMVChatCustomLayout = "custom_layout"
static

string 自定义布局,当主播选择kNIMVChatSplitCustomLayout或kNIMVChatSplitAudioLayout模式时生效

◆ kNIMVChatCustomVideo

const char* kNIMVChatCustomVideo = "custom_video"
static

int 是否用自主的视频数据 >0表示是

◆ kNIMVChatFile

const char* kNIMVChatFile = "file"
static

string 文件地址

◆ kNIMVChatFPS

const char* kNIMVChatFPS = "fps"
static

int 每秒帧率或者每秒发包数

◆ kNIMVChatKBPS

const char* kNIMVChatKBPS = "KBps"
static

int 每秒流量,单位为“千字节”

◆ kNIMVChatKeepCalling

const char* kNIMVChatKeepCalling = "keepcalling"
static

int, 是否强制持续呼叫(对方离线也会呼叫),1表示是,0表示否。默认是

◆ kNIMVChatLiveState

const char* kNIMVChatLiveState = "live_state"
static

◆ kNIMVChatLostRate

const char* kNIMVChatLostRate = "lost_rate"
static

int 丢包率,单位是百分比

◆ kNIMVChatMaxVideoRate

const char* kNIMVChatMaxVideoRate = "max_video_rate"
static

int 视频发送编码码率 >=100000 <=5000000有效

◆ kNIMVChatMp4AudioType

const char* kNIMVChatMp4AudioType = "mp4_audio"
static

int mp4录制时音频情况,0标识只录制当前成员,1标识录制通话全部混音(等同音频文件录制的声音)

◆ kNIMVChatMp4Close

const char* kNIMVChatMp4Close = "mp4_close"
static

key 结束Mp4录制,返回时长及原因 kNIMVChatStatus(NIMVChatMp4RecordCode) kNIMVChatTime(时长) kNIMVChatMp4File

◆ kNIMVChatMp4File

const char* kNIMVChatMp4File = "mp4_file"
static

string mp4录制地址

◆ kNIMVChatMp4Height

const char* kNIMVChatMp4Height = "mp4_height"
static

int 录制的mp4的高度,默认为0,小于16无效,无效时取视频默认大小

◆ kNIMVChatMp4Recode

const char* kNIMVChatMp4Recode = "mp4_recode"
static

bool mp4录制时重新编码开关

◆ kNIMVChatMp4Start

const char* kNIMVChatMp4Start = "mp4_start"
static

key Mp4写入数据开始 kNIMVChatMp4File kNIMVChatTime(本地时间点)

◆ kNIMVChatMp4Width

const char* kNIMVChatMp4Width = "mp4_width"
static

int 录制的mp4的宽度,默认为0,小于16无效,无效时取视频默认大小

◆ kNIMVChatNeedBadge

const char* kNIMVChatNeedBadge = "need_badge"
static

int 是否需要角标计数 >0表示是 默认是

◆ kNIMVChatNeedFromNick

const char* kNIMVChatNeedFromNick = "need_nick"
static

int 是否需要推送昵称 >0表示是 默认是

◆ kNIMVChatPushEnable

const char* kNIMVChatPushEnable = "push_enable"
static

int 是否需要推送 >0表示是 默认是

◆ kNIMVChatReceiver

const char* kNIMVChatReceiver = "receiver"
static

key 接收信息

◆ kNIMVChatRecord

const char* kNIMVChatRecord = "record"
static

int 是否需要录制音频数据 >0表示是 (需要服务器配置支持,本地录制直接调用接口函数)

◆ kNIMVChatRecordAddr

const char* kNIMVChatRecordAddr = "record_addr"
static

string 录制地址(服务器开启录制时有效)

◆ kNIMVChatRecordFile

const char* kNIMVChatRecordFile = "record_file"
static

string 服务器音频录制文件名(服务器开启录制时有效)

◆ kNIMVChatRecordType

const char* kNIMVChatRecordType = "record_type"
static

int 服务器录制模式NIMVChatServRecordType,默认为0 (需要服务器配置支持,并且开kNIMVChatRecord,kNIMVChatVideoRecord其中一个)

◆ kNIMVChatRHostSpeaker

const char* kNIMVChatRHostSpeaker = "r_host_speaker"
static

int 服务器混录时指定本人主画面,默认为0, 非0表示打开(需要服务器配置支持,及录制模式打开混录,并且为多人中的第一个主画面配置)

◆ kNIMVChatRoomConfig

const char* kNIMVChatRoomConfig = "room_config"
static

key 房间配置

◆ kNIMVChatRTMPLayoutMode

const char* kNIMVChatRTMPLayoutMode = "layoutMode"
static

必填 int 连麦方式

◆ kNIMVChatRTMPLayoutPara

const char* kNIMVChatRTMPLayoutPara = "layoutPara"
static

选填 string 自定义布局参数,仅对kNIMVChatSplitCustomLayout,kNIMVChatSplitAudioLayout模式有效

◆ kNIMVChatRTMPMainScreenAccid

const char* kNIMVChatRTMPMainScreenAccid = "accid"
static

选填 string 指定主屏显示的帐号

◆ kNIMVChatRtmpRecord

const char* kNIMVChatRtmpRecord = "rtmp_record"
static

int 是否开启服务器对直播推流录制(需要开启服务器能力), >0表示是

◆ kNIMVChatRTMPRecord

const char* kNIMVChatRTMPRecord = "record"
static

选填 bool 推流参数配置

◆ kNIMVChatRTMPTaskID

const char* kNIMVChatRTMPTaskID = "taskId"
static

必填 string 推流任务ID

◆ kNIMVChatRTMPTasks

const char* kNIMVChatRTMPTasks = "rtmpTasks"
static

array 推流参数配置,可以配置多个

◆ kNIMVChatRtmpUrl

const char* kNIMVChatRtmpUrl = "rtmp_url"
static

string 直播推流地址(加入多人时有效),非空代表主播旁路直播, kNIMVChatBypassRtmp决定是否开始推流

◆ kNIMVChatRTMPURL

const char* kNIMVChatRTMPURL = "streamUrl"
static

必填 string 推流地址

◆ kNIMVChatRtt

const char* kNIMVChatRtt = "rtt"
static

int rtt 网络延迟

◆ kNIMVChatSelf

const char* kNIMVChatSelf = "self"
static

key 本人信息

◆ kNIMVChatServerSettingPath

const char* kNIMVChatServerSettingPath = "server_setting_path"
static

string 服务器配置文件路径

◆ kNIMVChatServerSubscribeFallbackStrategy

const char* kNIMVChatServerSubscribeFallbackStrategy = "server_sub_fb_stategy"
static

int,服务器在下行弱网的时候切流策略NIMVChatServerSubscribeFallbackStrategy, 默认kNIMVChatSteamFallbackStrategyAudioOnly

◆ kNIMVChatSessionId

const char* kNIMVChatSessionId = "session_id"
static

string 发起会话的标识id,将在创建通话及结束通话时有效,帮助针对无channelid的情况下进行映射

◆ kNIMVChatSound

const char* kNIMVChatSound = "sound"
static

string 推送声音

◆ kNIMVChatSplitMode

const char* kNIMVChatSplitMode = "split_mode"
static

int 主播控制的直播推流时的分屏模式,见NIMVChatVideoSplitMode

◆ kNIMVChatStaticInfo

const char* kNIMVChatStaticInfo = "static_info"
static

key 音视频实时状态

◆ kNIMVChatStatus

const char* kNIMVChatStatus = "status"
static

int 状态

◆ kNIMVChatTime

const char* kNIMVChatTime = "time"
static

int64 时间 单位毫秒

◆ kNIMVChatTimeout

const char* kNIMVChatTimeout = "time_out"
static

bool 是呼叫超时 true 是,false 否

◆ kNIMVChatTrafficStatRX

const char* kNIMVChatTrafficStatRX = "trafficstat_rx"
static

uint64 下行流量(字节)

◆ kNIMVChatTrafficStatTX

const char* kNIMVChatTrafficStatTX = "trafficstat_tx"
static

uint64 上行流量(字节)

◆ kNIMVChatType

const char* kNIMVChatType = "type"
static

int 状态

◆ kNIMVChatUid

const char* kNIMVChatUid = "uid"
static

string 帐号

◆ kNIMVChatUids

const char* kNIMVChatUids = "uids"
static

StrArray 帐号, ack无效

◆ kNIMVChatVEncodeMode

const char* kNIMVChatVEncodeMode = "v_encode_mode"
static

int, 使用的视频编码策略NIMVChatVideoEncodeMode, 默认kNIMVChatVEModeNormal

◆ kNIMVChatVideo

const char* kNIMVChatVideo = "video"
static

key 视频

◆ kNIMVChatVideoFrameRate

const char* kNIMVChatVideoFrameRate = "frame_rate"
static

int 视频画面帧率 NIMVChatVideoFrameRate

◆ kNIMVChatVideoQuality

const char* kNIMVChatVideoQuality = "video_quality"
static

int 视频聊天分辨率选择 NIMVChatVideoQuality

◆ kNIMVChatVideoRecord

const char* kNIMVChatVideoRecord = "video_record"
static

int 是否需要录制视频数据 >0表示是 (需要服务器配置支持,本地录制直接调用接口函数)

◆ kNIMVChatVideoRecordFile

const char* kNIMVChatVideoRecordFile = "video_record_file"
static

string 服务器视频录制文件名(服务器开启录制时有效)

◆ kNIMVChatVideoSimulcastResList

const char* kNIMVChatVideoSimulcastResList = "video_simulcast_res_list"
static

json array 订阅发布视频分辨率类型列表