NERtc iOS SDK
NERtcEngineStatistics.h
浏览该文件的文档.
1 /*
2  * Copyright (c) 2021 NetEase, Inc. All rights reserved.
3  */
4 
5 #import <Foundation/Foundation.h>
6 #import "NERtcEngineEnum.h"
7 
8 NS_ASSUME_NONNULL_BEGIN
9 
13 @interface NERtcStats : NSObject
14 
18 @property (nonatomic, assign) int64_t txBytes;
19 
23 @property (nonatomic, assign) int64_t rxBytes;
24 
28 @property (nonatomic, assign) uint32_t cpuAppUsage;
29 
33 @property (nonatomic, assign) uint32_t cpuTotalUsage;
34 
38 @property (nonatomic, assign) uint32_t memoryAppUsageRatio;
39 
43 @property (nonatomic, assign) uint32_t memoryTotalUsageRatio;
44 
48 @property (nonatomic, assign) uint32_t memoryAppUsageInKBytes;
49 
53 @property (nonatomic, assign) uint64_t totalDuration;
54 
58 @property (nonatomic, assign) uint64_t txAudioBytes;
59 
63 @property (nonatomic, assign) uint64_t txVideoBytes;
64 
65 
69 @property (nonatomic, assign) uint64_t rxAudioBytes;
70 
71 
75 @property (nonatomic, assign) uint64_t rxVideoBytes;
76 
80 @property (nonatomic, assign) uint64_t rxAudioKBitRate;
81 
85 @property (nonatomic, assign) uint64_t rxVideoKBitRate;
86 
90 @property (nonatomic, assign) uint64_t txAudioKBitRate;
91 
95 @property (nonatomic, assign) uint64_t txVideoKBitRate;
96 
100 @property (nonatomic, assign) uint64_t upRtt;
101 
105 @property (nonatomic, assign) uint64_t downRtt;
106 
110 @property (nonatomic, assign) uint32_t txAudioPacketLossRate;
111 
115 @property (nonatomic, assign) uint32_t txVideoPacketLossRate;
116 
120 @property (nonatomic, assign) uint32_t txAudioPacketLossSum;
121 
125 @property (nonatomic, assign) uint32_t txVideoPacketLossSum;
126 
130 @property (nonatomic, assign) uint32_t txAudioJitter;
131 
135 @property (nonatomic, assign) uint32_t txVideoJitter;
136 
140 @property (nonatomic, assign) uint32_t rxAudioPacketLossRate;
141 
145 @property (nonatomic, assign) uint32_t rxVideoPacketLossRate;
146 
150 @property (nonatomic, assign) uint64_t rxAudioPacketLossSum;
151 
155 @property (nonatomic, assign) uint32_t rxVideoPacketLossSum;
156 
160 @property (nonatomic, assign) uint32_t rxAudioJitter;
161 
165 @property (nonatomic, assign) uint32_t rxVideoJitter;
166 @end
167 
171 @interface NERtcVideoLayerSendStats : NSObject
172 
176 @property (nonatomic, assign) int32_t layerType;
177 
181 @property (nonatomic, assign) int32_t width;
182 
186 @property (nonatomic, assign) int32_t height;
187 
191 @property (nonatomic, assign) int64_t sendBitrate;
192 
196 @property (nonatomic, assign) int32_t encoderOutputFrameRate;
197 
201 @property (nonatomic, assign) int32_t captureFrameRate;
202 
206 @property (nonatomic, assign) int32_t targetBitrate;
207 
211 @property (nonatomic, assign) int32_t encoderBitrate;
212 
216 @property (nonatomic, assign) int32_t sentFrameRate;
217 
221 @property (nonatomic, assign) int32_t renderFrameRate;
222 
226 @property (nonatomic, copy) NSString *encoderName;
227 
228 @end
229 
233 @interface NERtcVideoSendStats : NSObject
234 
238 @property (nonatomic, strong)NSArray<NERtcVideoLayerSendStats *> *videoLayers;
239 
240 @end
241 
245 @interface NERtcVideoLayerRecvStats : NSObject
246 
250 @property (nonatomic, assign) int32_t layerType;
251 
255 @property (nonatomic, assign) int32_t width;
256 
260 @property (nonatomic, assign) int32_t height;
261 
265 @property (nonatomic, assign) int64_t receivedBitrate;
266 
270 @property (nonatomic, assign) int32_t fps;
271 
275 @property (nonatomic, assign) int32_t packetLossRate;
276 
280 @property (nonatomic, assign) int32_t decoderOutputFrameRate;
281 
285 @property (nonatomic, assign) int32_t rendererOutputFrameRate;
286 
290 @property (nonatomic, assign) int64_t totalFrozenTime;
291 
295 @property (nonatomic, assign) int32_t frozenRate;
296 
300 @property (nonatomic, copy) NSString *decoderName;
301 
302 @end
303 
304 
308 @interface NERtcVideoRecvStats : NSObject
309 
313 @property (nonatomic, assign) uint64_t uid;
314 
318 @property (nonatomic, strong) NSArray<NERtcVideoLayerRecvStats *> *videoLayers;
319 
320 @end
321 
322 
326 @interface NERtcAudioSendStats : NSObject
327 
331 @property (nonatomic, assign) int64_t sentBitrate;
332 
336 @property (nonatomic, assign) int16_t lossRate;
337 
338 
339 @property (nonatomic, assign) int64_t rtt;
340 
344 @property (nonatomic, assign) int volume;
345 
349 @property (nonatomic, assign) int16_t numChannels;
350 
354 @property (nonatomic, assign) int32_t sentSampleRate;
355 @end
356 
360 @interface NERtcAudioRecvStats : NSObject
361 
365 @property (nonatomic, assign) uint64_t uid;
366 
370 @property (nonatomic, assign) int64_t receivedBitrate;
371 
372 
376 @property (nonatomic, assign) int16_t audioLossRate;
377 
381 @property (nonatomic, assign) int volume;
382 
386 @property (nonatomic, assign) int64_t totalFrozenTime;
387 
391 @property (nonatomic, assign) int32_t frozenRate;
392 @end
393 
397 @interface NERtcNetworkQualityStats : NSObject
398 
402 @property (nonatomic, assign) uint64_t userId;
403 
407 @property (nonatomic, assign) NERtcNetworkQuality txQuality;
408 
412 @property (nonatomic, assign) NERtcNetworkQuality rxQuality;
413 
414 @end
415 
419 @protocol NERtcEngineMediaStatsObserver<NSObject>
420 
421 @optional
422 
429 -(void)onRtcStats:(NERtcStats *)stat;
430 
437 - (void)onLocalAudioStat:(NERtcAudioSendStats *)stat;
438 
445 - (void)onRemoteAudioStats:(NSArray<NERtcAudioRecvStats*> *)stats;
446 
454 -(void)onLocalVideoStat:(NERtcVideoSendStats *)stat;
455 
463 - (void)onRemoteVideoStats:(NSArray<NERtcVideoRecvStats*> *)stats;
464 
471 - (void)onNetworkQuality:(NSArray<NERtcNetworkQualityStats *> *)stats;
472 
473 @end
474 
475 
476 
477 NS_ASSUME_NONNULL_END
NERtcNetworkQuality
网络质量状态
Definition: NERtcEngineEnum.h:783
远端用户的音频统计
Definition: NERtcEngineStatistics.h:361
本地音频流上传统计信息
Definition: NERtcEngineStatistics.h:327
用户的网络质量
Definition: NERtcEngineStatistics.h:398
通话相关的统计信息
Definition: NERtcEngineStatistics.h:14
uint32_t txAudioJitter
本地上行音频抖动 (ms)
Definition: NERtcEngineStatistics.h:130
uint32_t rxVideoPacketLossSum
本地下行视频丢包数
Definition: NERtcEngineStatistics.h:155
uint32_t txAudioPacketLossSum
本地上行音频丢包数
Definition: NERtcEngineStatistics.h:120
uint32_t memoryAppUsageRatio
当前 App 的内存占比 (%) , 占最大可用内存
Definition: NERtcEngineStatistics.h:38
uint32_t rxVideoJitter
本地下行视频抖动 (ms)
Definition: NERtcEngineStatistics.h:165
uint64_t txAudioKBitRate
音频发送码率(kbps)
Definition: NERtcEngineStatistics.h:90
uint32_t txVideoPacketLossRate
本地上行视频实际丢包率(%)
Definition: NERtcEngineStatistics.h:115
uint64_t rxVideoBytes
自加入房间后累计的接收的视频字节数(Byte)
Definition: NERtcEngineStatistics.h:75
int64_t rxBytes
接收字节数(bytes),累计值
Definition: NERtcEngineStatistics.h:23
uint32_t txAudioPacketLossRate
本地上行音频丢包率(%)
Definition: NERtcEngineStatistics.h:110
uint32_t rxVideoPacketLossRate
本地下行视频丢包率(%)
Definition: NERtcEngineStatistics.h:145
uint64_t txVideoBytes
自加入房间后累计的发送的视频字节数(Byte)
Definition: NERtcEngineStatistics.h:63
uint32_t cpuAppUsage
当前 App 的 CPU 使用率 (%)
Definition: NERtcEngineStatistics.h:28
uint32_t txVideoPacketLossSum
本地上行视频丢包数
Definition: NERtcEngineStatistics.h:125
uint32_t memoryAppUsageInKBytes
当前 App 的内存大小 (KB)
Definition: NERtcEngineStatistics.h:48
uint32_t cpuTotalUsage
当前系统的 CPU 使用率 (%)
Definition: NERtcEngineStatistics.h:33
int64_t txBytes
发送字节数(bytes),累计值
Definition: NERtcEngineStatistics.h:18
uint64_t rxAudioBytes
自加入房间后累计的接收的音频字节数(Byte)
Definition: NERtcEngineStatistics.h:69
uint64_t rxAudioPacketLossSum
本地下行音频丢包数
Definition: NERtcEngineStatistics.h:150
uint64_t downRtt
下行平均往返时延(ms)
Definition: NERtcEngineStatistics.h:105
uint64_t totalDuration
自加入房间的通话时长 , 退出后再加入重新计时 ( 单位:S)
Definition: NERtcEngineStatistics.h:53
uint64_t rxAudioKBitRate
音频接收码率(kbps)
Definition: NERtcEngineStatistics.h:80
uint64_t txAudioBytes
自加入房间后累计的发送的音频字节数(Byte)
Definition: NERtcEngineStatistics.h:58
uint64_t txVideoKBitRate
视频发送码率(kbps)
Definition: NERtcEngineStatistics.h:95
uint32_t rxAudioJitter
本地下行音频抖动 (ms)
Definition: NERtcEngineStatistics.h:160
uint64_t upRtt
上行平均往返时延(ms)
Definition: NERtcEngineStatistics.h:100
uint64_t rxVideoKBitRate
视频接收码率(kbps)
Definition: NERtcEngineStatistics.h:85
uint32_t txVideoJitter
本地上行视频抖动 (ms)
Definition: NERtcEngineStatistics.h:135
uint32_t rxAudioPacketLossRate
本地下行音频丢包率(%)
Definition: NERtcEngineStatistics.h:140
uint32_t memoryTotalUsageRatio
当前系统的内存占比 (%)
Definition: NERtcEngineStatistics.h:43
每条流的接收下行统计信息
Definition: NERtcEngineStatistics.h:246
本地视频单条流统计信息
Definition: NERtcEngineStatistics.h:172
远端视频流的统计信息
Definition: NERtcEngineStatistics.h:309
本地视频流上传统计信息
Definition: NERtcEngineStatistics.h:234
统计信息回调
Definition: NERtcEngineStatistics.h:419