iOS 底层打印的摘要信息
- (NSString *)description {
return [NSString stringWithFormat:@"RTCLegacyStatsReport:\n%@\n%@\n%f\n%@",
_reportId,
_type,
_timestamp,
_values];
}
详细说明
Name | Desc |
---|---|
reportId | 报告 ID |
type | 报告类型 |
timestamp | 报告产生事件戳 |
values | 报告详细 key value 信息 |
1、type = googTrack,表示简单例举了本报告包含的 track 信息
2、type = googLibjingleSession,会话简单描述,包含会话由谁发起,一般不用
3、type = VideoBwe,视频带宽预估相关
googActualEncBitrate = 530824; 实际编码比特率
googAvailableReceiveBandwidth = 0; 可用接收带宽
googAvailableSendBandwidth = 565916; 可用发送带宽
googBucketDelay = 0; 谷歌漏桶算法统计数据,很小才对(预防数据大量输入输出)
googRetransmitBitrate = 0; 重传码率
googTargetEncBitrate = 564932; 目标编码码率(最优编码码率)
googTransmitBitrate = 554128; 重传码率
4、type = googCertificate 和 googComponent 协商和证书相关
5、type = localcandidate 本地候选相关
candidateType = host; 候选类型,一般为 host、srflx
ipAddress = "10.12.8.89"; 候选 IP 地址
networkType = wlan; 网络类型,wifi 和 4G,3G 等
portNumber = 59909; 本地使用端口号
priority = 2122260223; 优先级
stunKeepaliveRequestsSent = 1; keepalive 连接请求 ping 发送的数量
stunKeepaliveResponsesReceived = 0; keepalive ping 接收到响应的数量
stunKeepaliveRttSquaredTotal = 0; 总 RTT 平方和
stunKeepaliveRttTotal = 0; 总 RTT 之和
transport = udp; 传输层类型
6、type = ssrc ,同步信源 SSRC 相关信息,注意下面包含音频和视频
audioInputLevel = 619; 声音输入音量
bytesSent = 43392; 发送的字节数
googCodecName = opus; 编解码名称
googJitterReceived = 3; jitter 抖动缓冲接收到的数据
googRtt = 77; RTT 往返时常
googTrackId = "dream_audio_88060000"; trackId
googTypingNoiseState = false; 键盘噪音状态,手机一般没有
mediaType = audio; 媒体类型
packetsLost = 0; 丢包数量
packetsSent = 449; 发包数量
ssrc = 1162317377; ssrc
totalAudioEnergy = "0.00531194"; 总声音能量
totalSamplesDuration = "8.98"; 总采样数据时长
transportId = "Channel-audio-1"; 通道 ID
codecImplementationName = VideoToolbox; 编解码实现名称
framesEncoded = 135; 编码的帧数量
googAdaptationChanges = 0; 是否自适应码率改变
googAvgEncodeMs = 4; 平均编码时长
googBandwidthLimitedResolution = false; 带宽限制分辨率是否打开
googCodecName = H264; 编解码名称
googContentType = realtime; 内容类型
googCpuLimitedResolution = false; CPU 限制分辨率是否打开
googEncodeUsagePercent = 175;
googFirsReceived = 1; 第一个关键帧是否正常收到
googFrameHeightInput = 480; 输入帧高度
googFrameHeightSent = 480; 发送帧高度
googFrameRateInput = 15; 输入帧帧率
googFrameRateSent = 15; 发送帧帧率
googFrameWidthInput = 640; 输入帧宽度
googFrameWidthSent = 640; 发送帧宽度
googHasEnteredLowResolution = false; 是否遇到低分辨率
googNacksReceived = 0; nack 数量
googPlisReceived = 3; (Picture Loss Indication) 接收到的 PLI 请求
googRtt = 20; 往返时长
hugeFramesSent = 0; 大视频帧发送数量
qpSum = 3672; 该值越大表示发送的视频流压缩比越高
7、type = googCandidatePair, 已经配对的 candidate 信息
bytesReceived = 3171; 总接收的字节数
bytesSent = 484599; 总发送字节数
consentRequestsSent = 1; 赞同请求是否发送过
googActiveConnection = true; connection 是否活跃
googChannelId = "Channel-audio-1"; 通道 ID
googLocalAddress = "111.200.55.10:62909"; 本端 IP 地址
googLocalCandidateType = prflx; candidate 类型
googReadable = true; 通道是否可读
googRemoteAddress = "39.106.109.29:24285"; 远端地址
googRemoteCandidateType = stun; candidate 类型
googRtt = 24; 往返时长
googTransportType = udp; 传输层类型
googWritable = true; 通道是否可写
localCandidateId = "Cand-RgQD9RSf"; candidate id
packetsDiscardedOnSend = 0; 发送端丢包数
packetsSent = 895; 发送包数量
remoteCandidateId = "Cand-ksmrSDf+"; 远端 candidate id
requestsReceived = 1; Receive Ping Request 的数量
requestsSent = 7; Sent Ping 连接请求发送的数量
responsesReceived = 7; Receive Ping Response 的数量
responsesSent = 1; Sent Ping 响应数量
8、 type = remotecandidate 和 type = localcandidate 相似