华为云用户手册

  • HRTCDstMultiRoomMediaInfo 表95 HRTCDstMultiRoomMediaInfo 属性 类型 描述 authorization const char* 目标跨房的鉴权信息 userId const char* 目标跨房的虚拟用户名 roomId const char* 目标跨房房间号 userRole HRTCRoleType 跨房角色 ctime long long 鉴权时间信息
  • HRTCMultiRoomMediaRelayStateCode 表97 HRTCMultiRoomMediaRelayStateCode 属性 描述 HRTC_MULTI_ROOM_MEDIA_RELAY_OK 正常状态 HRTC_MULTI_ROOM_MEDIA_RELAY_ERROR_SERVER_NO_RESPONSE 服务端无响应 HRTC_MULTI_ROOM_MEDIA_RELAY_ERROR_INTERNAL_ERROR 服务器内部出错 HRTC_MULTI_ROOM_MEDIA_RELAY_ERROR_USER_OVER_LIMIT 用户跨房超出限制数 HRTC_MULTI_ROOM_MEDIA_RELAY_ERROR_ROOM_OVER_LIMIT 房间跨房用户超出限制数 HRTC_MULTI_ROOM_MEDIA_RELAY_ERROR_ROOM_REQ_EMPTY 跨房请求消息体为空 HRTC_MULTI_ROOM_MEDIA_RELAY_ERROR_ROOM_OPERATION_CONFLICT 跨房请求,加入和退出存在冲突 HRTC_MULTI_ROOM_MEDIA_RELAY_ERROR_ROOM_SRC_USERINFO_INVALID 跨房请求原用户信息无效 HRTC_MULTI_ROOM_MEDIA_RELAY_ERROR_ROOM_WITH_ORI 跨房房间与原用户房间相同 HRTC_MULTI_ROOM_MEDIA_RELAY_ERROR_ROOM_REPEAT 跨房请求房间重复 HRTC_MULTI_ROOM_MEDIA_RELAY_ERROR_ROOM_USER_EXISTED 跨房用户已存在 HRTC_MULTI_ROOM_MEDIA_RELAY_ERROR_INVALID_REQUEST 无效请求 HRTC_MULTI_ROOM_MEDIA_RELAY_ERROR_ROOM_IS_NOT_EXIST 房间不存在 HRTC_MULTI_ROOM_MEDIA_RELAY_ERROR_F RAM E_TYPE_NOT_EQUAL 跨房源房间和目的房间加密模式不一致 HRTC_MULTI_ROOM_MEDIA_RELAY_ERROR_AUTHENTICATION_FAILURE 鉴权失败 HRTC_MULTI_ROOM_MEDIA_RELAY_ERROR_REMOVE_INFO_NOT_EXIST 退出跨房信息不存在 HRTC_MULTI_ROOM_MEDIA_RELAY_ERROR_EXCEPTION_STOP 异常退出跨房
  • HWRtcRemoteVideoStats 表62 远端视频统计回调 枚举值 描述 @(strong, nonatomic) NSString *userId; 用户ID(本地视频信息为空) @ (assign, nonatomic) NSUInteger width; 视频宽 @ (assign, nonatomic) NSUInteger height; 视频高 @ (assign, nonatomic) NSUInteger bitRate; 视频码率 @ (assign, nonatomic) NSUInteger frameRate; 视频帧率 @ (assign, nonatomic) NSUInteger packetLoss; 视频丢包率 @ (assign, nonatomic) NSUInteger delay; 视频时延 @ (assign, nonatomic) NSUInteger jitter; 视频抖动 @ (assign, nonatomic) long long bytes; 字节数 @ (assign, nonatomic) NSUInteger sendFrameRate; 实际发送帧率,单位:fps @ (assign, nonatomic) NSUInteger rendererOutputFrameRate; 渲染帧率,单位:fps @ (assign, nonatomic) NSUInteger totalFrozenTime; 远端用户在加入房间后到离开房间前,发生视频卡顿的累计时长,单位:ms @ (assign, nonatomic) NSUInteger frozenRate; 远端用户在加入房间后到离开房间前,发生视频卡顿的累计时长占视频总有效时长的百分比,单位:%
  • HWRtcLocalAudioStats 表63 本端音频统计回调 属性 描述 @(strong, nonatomic) NSString *userId; 用户ID(本地音频信息为空) @ (assign, nonatomic) NSUInteger sampleRate; 音频采样率 @ (assign, nonatomic) NSUInteger channels; 音频声道数 @ (assign, nonatomic) NSUInteger bitRate; 音频码率 @ (assign, nonatomic) NSUInteger packetLoss; 音频丢包率 @ (assign, nonatomic) NSUInteger delay; 音频时延 @ (assign, nonatomic) NSUInteger jitter; 音频抖动
  • HWRtcRemoteAudioStats 表64 远端音频统计回调 属性 描述 @(strong, nonatomic) NSString *userId; 用户ID(本地音频信息为空) @ (assign, nonatomic) NSUInteger sampleRate; 音频采样率 @ (assign, nonatomic) NSUInteger channels; 音频声道数 @ (assign, nonatomic) NSUInteger bitRate; 音频码率 @ (assign, nonatomic) NSUInteger packetLoss; 音频丢包率 @ (assign, nonatomic) NSUInteger delay; 音频时延 @ (assign, nonatomic) NSUInteger jitter; 音频抖动 @ (assign, nonatomic) NSUInteger totalFrozenTime; 远端用户在加入房间后到离开房间前,发生音频卡顿的累计时长,单位:ms 说明:仅onRemoteAudioStatsNotify回调中携带此数据 @ (assign, nonatomic) NSUInteger frozenRate; 远端用户在加入房间后到离开房间前,发生音频卡顿的累计时长占音频总有效时长的百分比,单位:% 说明:仅onRemoteAudioStatsNotify回调中携带此数据
  • HWRTCEncryptionConfig 表68 加密配置 函数&属性 描述 @(strong, nonatomic) HWRTCCryptionMode cryptionMode; HWRTCCryptionMode加密模式 @(assign, nonatomic) HWR TCS uiteType suitType; HWRT CS uiteType加密算法,仅模式HWRTCCryptionModeAuthenticationSdk需要 @ (assign, nonatomic) NSString *cryptionSec; 加密秘钥,仅模式HWRTCCryptionModeAuthenticationSdk需要设置 @ (assign, nonatomic) HWRTCCryptionSecFormat cryptionSecFormat HWRTCCryptionSecFormat ,秘钥格式,当前只支持16进制字符串
  • RtmpConfigModel 表77 RTMP推流设置参数模型 属性 类型 描述 width int 旁路推流的输出视频流的总宽度,单位为px。360为默认值,取值范围为[64-1920] height int 旁路推流的输出视频流的总高度,单位为px。640为默认值,取值范围为[64-1920] videoBitrate int 旁路推流的输出视频的码率,单位为Kbps。默认值为400Kbps,取值范围[32-2760], videoFramerate int 旁路推流的输出视频的帧率,单位为fps。默认值为15,取值范围为 [10,30] videoGop int 用于旁路直播的输出视频的GOP,单位为帧。默认值为30帧,取值范围为[1-300] audioSampleRate int 用于旁路直播的输出音频的采样率,默认16000,取值范围为[16000-96000] audioBitrate int 旁路直播的输出音频的码率。单位为Kbps,默认值为48,最大值为128,取值范围为[1-128] audioChannels int 旁路直播的输出音频的声道数,默认1,取值范围为[1-5] tmplate int 0表示悬浮,1表示九宫格,2表示屏幕分享,默认为0
  • HWRtcStartAudioFileParam 表80 音频文件参数 属性 类型 描述 fullFilePath NSString 音频文件路径 playMode HWRtcAudioFilePlayMode 播放模式 cycle NSUInteger 音频播放次数,0表示无限循环 replace NSUInteger 是否用音频文件替换麦克风采集的声音。1表示只使用音频文件发送到远端,0表示将本地麦克风采集并和音频文件混音后发送到远端
  • HWRTCCryptionMode 表69 加密模式 枚举值 描述 HWRTCCryptionModeDefault 不开启端到端加密,此时srtp认证(包校验)+加密 HWRTCCryptionModeAuthenticationSdk 开启端到端加密,srtp只认证(包校验),sdk内部加密, 必现配置key HWRTCCryptionModeAuthenticationApp 开启端到端加密,srtp只认证(包校验),应用层加密,需注册回调
  • HWRtcVideoAuxiliarEncParam 表85 辅流编码能力 属性 类型 描述 frameRate NSInteger 编码帧率,推荐帧率15帧 width NSInteger 编码辅流宽。(iOS下根据宽,根据高按比例缩放) height NSInteger 编码辅流高。(iOS下如果屏幕宽度不超过1080,则视频源宽为720,否则为1080) bitrate NSInteger 码率,具体设置参考表56和表57。
  • HWRtcLocalVideoStats 表61 本端视频统计回调 枚举值 描述 @(strong, nonatomic) NSString *userId; 用户ID(本地视频信息为空) @ (assign, nonatomic) NSUInteger width; 视频宽 @ (assign, nonatomic) NSUInteger height; 视频高 @ (assign, nonatomic) NSUInteger bitRate; 视频码率 @ (assign, nonatomic) NSUInteger frameRate; 视频帧率 @ (assign, nonatomic) NSUInteger packetLoss; 视频丢包率 @ (assign, nonatomic) NSUInteger delay; 视频时延 @ (assign, nonatomic) NSUInteger jitter; 视频抖动 @ (assign, nonatomic) long long bytes; 字节数 @ (assign, nonatomic) NSUInteger sendFrameRate; 实际发送帧率,单位:fps
  • HRTCOnStats 表58 引擎创建相关参数 属性 类型 描述 cpuAppUsage double app的cpu利用率,单位(%) cpuTotalUsage double cpu总利用率,单位(%) memoryAppUsageInKbytes int app占用内存,单位KB memoryAppUsageRatio double app占用的内存率,单位(%) memoryTotalUsageRatio double 总的内存利用率,单位(%) gatewayRtt int 到本地网关的延迟,单位ms sendBytes long 总的发送字节数,单位bytes sendVideoBytes long 视频的发送字节数,单位bytes sendAudioBytes long 音频的发送字节数,单位bytes receiveBytes long 总的接收字节数,单位bytes receiveVideoBytes long 视频的接收字节数,单位bytes receiveAudioBytes long 音频的接收字节数,单位bytes sendBitRate int 总的发送比特率,单位Kbps sendVideoBitRate int 视频的发送比特率,单位Kbps sendAudioBitRate int 音频的发送比特率,单位Kbps receiveBitRate int 总的接收比特率,单位Kbps receiveVideoBitRate int 视频的接收比特率,单位Kbps receiveAudioBitRate int 音频的接收比特率,单位Kbps sendLossRate int 发送丢包率,单位(%) receiveLossRate int 接收丢包率,单位(%) lastmileDelay int 到服务器的延迟,单位ms
  • HWRtcAudioFileReason 表60 音频播放状态变化原因 枚举值 描述 HWRtcAudioFileReasonNone 没有错误 HWRtcAudioFileReasonUrlNotFound 未找到URL HWRtcAudioFileReasonCodecNotSupported 解码器不支持该编码 HWRtcAudioFileReasonInvalidArguments 非法参数 HWRtcAudioFileReasonSrcBufferUnderflow 播放缓冲区数据不足 HWRtcAudioFileReasonInterval 内部错误 HWRtcAudioFileReasonInvalidState 播放器内部状态错误 HWRtcAudioFileReasonNoResource 没有该资源 HWRtcAudioFileReasonObjNotInitialized 对象未初始化 HWRtcAudioFileReasonInvalidConnectionState 播放器与服务器连接无效 HWRtcAudioFileReasonUnknowdStreamType 未知的媒体流类型 HWRtcAudioFileReasonVideoRenderFailed 渲染失败 HWRtcAudioFileReasonInvalidMediaSource 无效的媒体资源 HWRtcAudioFileReasonUnknown 状态未知
  • HWRtcAudioFileState 表59 音频文件播放状态 属性 描述 HWRtcAudioFileOpenCompleted 成功打开音频文件 HWRtcAudioFileOpening 正在打开音频文件 HWRtcAudioFileIdle 音频文件播放就绪 HWRtcAudioFilePlaying 音频文件播放中 HWRtcAudioFilePlayCompleted 音频文件播放完成 HWRtcAudioFilePaused 音频文件暂停播放 HWRtcAudioFileStopped 音频文件停止播放 HWRtcAudioFileFailed 音频文件播放失败 HWRtcAudioFilePositionUpdate 音频文件播放进度更新 HWRtcAudioFileStateUnknown 音频文件播放状态未知
  • HWRtcRemoteAudioMode 表55 远端音频流收流模式 枚举值 描述 HWRtcRemoteAudioSubscribe= 0 订阅模式(自主订阅) HWRtcRemoteAudioTopThre= 1 TopN模式(收音量最大的三路流) HRTC_REMOTE_AUDIO_P2P= 2 P2P模式 HRTC_REMOTE_AUDIO_RTSA_CMD =3 RTSA-CMD模式 表56 不同分辨率下帧率和码率的推荐值 分辨率 分辨率类型 比例 最小帧率(fps) 最大帧率(fps) 最小码率 最大码率 160 X 90 LD 16:9 10 30 64 270 320 X 180 SD 16:9 10 30 80 600 480 X 270 HD 16:9 10 30 160 1050 640 X 360 HD 16:9 10 30 200 1700 800 X 450 FHD 16:9 10 30 300 2100 960 X 540 FHD 16:9 10 30 400 2400 1120 X 630 FHD 16:9 10 30 450 2800 1280 X 720 FHD 16:9 10 30 500 4000 120 X 90 LD 4:3 10 30 64 240 160 X 120 SD 4:3 10 30 64 270 240 X 180 SD 4:3 10 30 80 450 320 X 240 HD 4:3 10 30 100 600 400 X 300 HD 4:3 10 30 200 900 480 X 360 HD 4:3 10 30 200 1000 640 X 480 FHD 4:3 10 30 250 1800 960 X 720 FHD 4:3 10 30 450 3000 表57 不同场景下帧率和码率的推荐值 分辨率 推荐帧率 通信场景推荐码率 直播场景推荐码率 160 X 90 15 90 180 320 X 180 15 200 400 480 X 270 15 350 700 640 X 360 15 450 900 640 X 360 30 850 1700 800 X 450 15 700 1400 800 X 450 30 1050 2100 960 X 540 15 850 1700 960 X 540 30 1200 2400 1120 X 630 15 950 1900 1120 X 630 30 1400 2800 1280 X 720 15 1200 2400 1280 X 720 30 2000 4000 120 X 90 15 80 160 160 X 120 15 90 180 240 X 180 15 150 300 320 X 240 15 200 400 400 X 300 15 300 600 480 X 360 15 350 700 480 X 360 30 500 1000 640 X 480 15 600 1200 640 X 480 30 900 1800 960 X 720 15 1000 2000 960 X 720 30 1500 3000
  • HWRtcNetworkQualityLevel 表54 网络质量等级 属性 描述 HWRtcNetworkQualityUnknown 网络质量未知 HWRtcNetworkQualityExcellent 网络质量非常好 HWRtcNetworkQualityGood 网络质量好 HWRtcNetworkQualityPoor 网络质量一般 HWRtcNetworkQualityBad 网络质量差 HWRtcNetworkQualityVbad 网络质量非常差
  • HWRtcNetworkTestResultParam 表42 检测网络回调信息 属性 描述 @property (nonatomic, assign) NSInteger bitRate 码率 @property (nonatomic, assign) NSInteger packetLoss 丢包 @property (nonatomic, assign) NSInteger delay 延时 @property (nonatomic, assign) NSInteger jitter 抖动
  • HWRtcVideoStatsInfo 表43 视频信息 属性 描述 @(strong, nonatomic) NSString *userId; 用户ID(本地视频信息为空) @ (assign, nonatomic) NSUInteger width; 视频宽 @ (assign, nonatomic) NSUInteger height; 视频高 @ (assign, nonatomic) NSUInteger bitRate; 视频码率 @ (assign, nonatomic) NSUInteger frameRate; 视频帧率 @ (assign, nonatomic) NSUInteger packetLoss; 视频丢包率 @ (assign, nonatomic) NSUInteger delay; 视频时延 @ (assign, nonatomic) NSUInteger jitter; 视频抖动
  • HWRtcNetworkQualityLevel 表45 检测网络质量等级 属性 描述 HWRtcNetworkQualityUnknown 网络质量未知 HWRtcNetworkQualityExcellent 网络质量非常好 HWRtcNetworkQualityGood 网络质量好 HWRtcNetworkQualityPoor 网络质量一般 HWRtcNetworkQualityBad 网络质量差 HWRtcNetworkQualityVbad 网络质量非常差
  • HWRtcNetworkTestConfig 表39 入会前网络检测配置 属性 描述 @property (strong, nonatomic) NSString * _Nonnull userId 用户id @property (strong, nonatomic) NSString * _Nonnull roomId 房间ID,roomid建议由userid+随机数组成 @property (strong, nonatomic) NSString *signature 必选,签名信息 @property (nonatomic, assign) long long ctime 必选,系统时间 @property (assign, nonatomic) BOOL enableUplinkTest 启动上行网络检测开关 @property (assign, nonatomic) BOOL enableDownlinkTest 启动下行网络检测开关 @property (nonatomic, assign) NSUInteger expectedUplinkBitrate 用户期望的最高发送码率,单位为bps,范围为0以及[100000, 5000000],设为0表示由SDK指定最高码率 @property (nonatomic, assign) NSUInteger expectedDownlinkBitrate 用户期望的最高接收码率,单位为bps,范围为0以及[100000, 5000000],设为0表示由SDK指定最高码率
  • HWRtcLocalAudioStateReason 表50 本地音频流状态变化原因 属性 描述 HWRtcLocalAudioReasonErrorOk 本地音频流状态正常 HWRtcLocalAudioReasonErrorFailure 本地音频流出错原因不明确 HWRtcLocalAudioReasonErrorRecordFailure 本地音频流录制失败,建议您检查录制设备是否正常工作 HWRtcLocalAudioReasonErrorStopFailure 关闭采集失败 HWRtcLocalAudioReasonErrorAccessDenied 音频设备API无法访问,可能是设备隐私权限设置问题 HWRtcLocalAudioReasonErrorOnExclusiveMode 音频设备处于独占模式,且被其他应用独占 HWRtcLocalAudioReasonErrorMmsyserrInvalparam 音频设备API非法参数(仅适用于windows) HWRtcLocalAudioReasonErrorMmsyserrNodriver 音频设备API返回无驱动,需要用户升级驱动(仅适用于windows) HWRtcLocalAudioReasonErrorAudioServerNotRunning 用户windows audio服务未启动,或者启动失败(仅适用于windows) HWRtcLocalAudioReasonErrorNoDevice 没有设备(仅适用于windows) HWRtcLocalAudioReasonErrorRestartFailed 扬声器播放无数据,重启失败
  • HWRtcQualityInfo 表53 网络质量信息 属性 描述 @property (strong, nonatomic) NSString *userId; 用户ID @property (assign, nonatomic) HWRtcNetworkQualityLevel level; 网络质量等级 @property (assign, nonatomic) NSUInteger width; 宽度 @property (assign, nonatomic) NSUInteger height; 高度
  • HWRtcNetworkTestResult 表40 属性 描述 @property (assign, nonatomic) HWRtcNetworkTestState state 检测网络状态,具体请参见HWRtcNetworkTestState @property (nonatomic, strong) HWRtcNetworkTestResultParam *uplinkResult 上行网络检测状态,具体请参见HWRtcNetworkTestResultParam @property (nonatomic, strong) HWRtcNetworkTestResultParam * downlinkResult 下行网络检测状态,具体请参见HWRtcNetworkTestResultParam
  • HWRtcAudioStatsInfo 表44 音频信息 属性 描述 @(strong, nonatomic) NSString *userId; 用户ID(本地音频信息为空) @ (assign, nonatomic) NSUInteger sampleRate; 音频采样率 @ (assign, nonatomic) NSUInteger channels; 音频声道数 @ (assign, nonatomic) NSUInteger bitRate; 音频码率 @ (assign, nonatomic) NSUInteger packetLoss; 音频丢包率 @ (assign, nonatomic) NSUInteger delay; 音频时延 @ (assign, nonatomic) NSUInteger jitter; 音频抖动
  • HWRtcLocalVideoStateReason 表52 本地视频流状态变化原因 属性 描述 HWRtcLocalVideoReasonErrorOk 本地视频流状态正常 HWRtcLocalVideoReasonErrorFailure 本地视频流出错原因不明确 HWRtcLocalVideoReasonErrorCaptureFailure 本地视频流录制失败,建议您检查录制设备是否正常工作 HWRtcLocalVideoReasonErrorStopFailure 关闭采集失败 HWRtcLocalVideoReasonErrorCaptureDeviceNoPermission 没有摄像头权限 HWRtcLocalVideoReasonErrorCaptureDeviceBusy 摄像头设备已占用 HWRtcLocalVideoReasonErrorCaptureAppInBackground 应用处于后台 HWRtcLocalVideoReasonErrorCaptureOpenCameraFailed 打开摄像头设备失败(仅支持iOS) HWRtcLocalVideoReasonErrorCaptureMultipleForegroundApp 应用窗口处于侧拉、分屏、画中画模式(仅支持iOS) HWRtcLocalVideoReasonErrorCaptureMultipleDeviceDisconnected 本地视频采集设备未连接(仅支持macOS)
  • HWRtcStatsInfo 表22 卡顿统计信息 属性 描述 @property (strong, nonatomic) NSString *roomId; 房间ID @property (strong, nonatomic) NSString *userId; 用户ID @property (assign, nonatomic) long long mildlyFrozenCounts; 400ms卡顿次数 @property (assign, nonatomic) long long severelyFrozenCounts; 超过1s卡顿次数 @property (assign, nonatomic) long long totalMildlyFrozenTime; 400ms卡顿总时长 @property (assign, nonatomic) long long totalSeverelyFrozenTime; 1s卡顿总时长 @property (assign, nonatomic) long long totalActiveTime; 总时间,包括每一路选看时间总和
  • HWRtcRemoteAudioStateReason 表25 远端音频状态变化原因 枚举 描述 HWRtcRemoteAudioStateReasonRemoteOffline 远端用户离线 HWRtcRemoteAudioStateReasonRemoteMuted 远端用户停止音频流发送 HWRtcRemoteAudioStateReasonRemoteUnmuted 远端用户开启音频流发送 HWRtcRemoteAudioStateReasonRemoteFirstDecoded 远端用户音频首包解码
  • HWRtcVideoFrame 表37 视频帧信息 属性 描述 @property (assign, nonatomic) HWRtcVideoImageFormat format; 图像格式 ,具体请参见HWRtcVideoImageFormat @property (assign, nonatomic) NSUInteger width; 图像宽度,作为输入时,范围为[90,1920],必须是4的整数倍 @property (assign, nonatomic) NSUInteger height; 图像高度,作为输入时,范围为[90,1200],必须是2的整数倍 @property (strong, nonatomic) NSData * _Nullable data; 存储视频数据的buf地址 @property (assign, nonatomic) NSUInteger dataLen; 视频数据的长度,单位为Byte @property (strong, nonatomic) NSString *userId; 被选看的远端用户本地推流不需要赋值
  • HWRtcStartAudioFileParam 表38 音频文件信息 属性 描述 @property (nonatomic, strong) NSString * _Nonnull fullFilePath; 文件路径 @property (nonatomic, assign) HWRtcAudioFilePlayMode playMode; 播放类型,具体请参见HWRtcAudioFilePlayMode @property (nonatomic, assign) NSUInteger cycle; 循环次数 @property (nonatomic, assign) NSUInteger replace; 远端模式下面是否需要和麦克风做混音
  • HWRtcLeaveReason 表28 离开房间原因 枚举值 描述 HWRtcLeaveReasonUserLeaveRoom 用户主动离开 HWRtcLeaveReasonServerError 服务器异常 HWRtcLeaveReasonBreakdown sfu服务故障 HWRtcLeaveReasonServiceUnreachable 服务不可达 HWRtcLeaveReasonInternalError 内部错误 HWRtcLeaveReasonKickedOff 被踢 HWRtcLeaveReasonAuthorizationExpired 签名过期 HWRtcLeaveReasonReconnectFailed 重连超时
共100000条