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 相似