NERtc iOS SDK  V4.4.301
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
Network quality
Definition: NERtcEngineEnum.h:792
The stats of the audio stream from a remote user.
Definition: NERtcEngineStatistics.h:361
The uplink stats of the local audio stream
Definition: NERtcEngineStatistics.h:327
The stats of network quality
Definition: NERtcEngineStatistics.h:398
Collects stats related to calls.
Definition: NERtcEngineStatistics.h:14
uint32_t txAudioJitter
Local uplink audio jitter (ms)
Definition: NERtcEngineStatistics.h:130
uint32_t rxVideoPacketLossSum
The number of packets not received in the local downlink video stream.
Definition: NERtcEngineStatistics.h:155
uint32_t txAudioPacketLossSum
The number of packets not received in the local uplink audio stream.
Definition: NERtcEngineStatistics.h:120
uint32_t memoryAppUsageRatio
The ratio of current memory usage by the app (%) with respect to the maximum available memory.
Definition: NERtcEngineStatistics.h:38
uint32_t rxVideoJitter
Local downlink video jitter (ms).
Definition: NERtcEngineStatistics.h:165
uint64_t txAudioKBitRate
The bitrate of the audio stream sent (kbps).
Definition: NERtcEngineStatistics.h:90
uint32_t txVideoPacketLossRate
Actual packet loss rate of the local uplink video stream (%).
Definition: NERtcEngineStatistics.h:115
uint64_t rxVideoBytes
The number of cumulative bytes of video data received since a user joins the room (bytes).
Definition: NERtcEngineStatistics.h:75
int64_t rxBytes
The number of cumulative bytes received (bytes).
Definition: NERtcEngineStatistics.h:23
uint32_t txAudioPacketLossRate
Packet loss rate of the local uplink audio stream (%).
Definition: NERtcEngineStatistics.h:110
uint32_t rxVideoPacketLossRate
Packet loss rate of the local downlink video stream (%).
Definition: NERtcEngineStatistics.h:145
uint64_t txVideoBytes
The number of cumulative bytes of video data sent since a user joins the room (bytes).
Definition: NERtcEngineStatistics.h:63
uint32_t cpuAppUsage
The CPU usage of the current app (%).
Definition: NERtcEngineStatistics.h:28
uint32_t txVideoPacketLossSum
The number of packets not received in the local uplink video stream.
Definition: NERtcEngineStatistics.h:125
uint32_t memoryAppUsageInKBytes
The memory size used by the current app (KB).
Definition: NERtcEngineStatistics.h:48
uint32_t cpuTotalUsage
The CPU usage of the current system (%).
Definition: NERtcEngineStatistics.h:33
int64_t txBytes
The number of cumulative bytes sent (bytes).
Definition: NERtcEngineStatistics.h:18
uint64_t rxAudioBytes
The number of cumulative bytes of audio data received since a user joins the room (bytes).
Definition: NERtcEngineStatistics.h:69
uint64_t rxAudioPacketLossSum
The number of packets not received in the local downlink audio stream
Definition: NERtcEngineStatistics.h:150
uint64_t downRtt
Average downlink round-trip latency (ms).
Definition: NERtcEngineStatistics.h:105
uint64_t totalDuration
The duration of the call that starts from joining the room.
Definition: NERtcEngineStatistics.h:53
uint64_t rxAudioKBitRate
The bitrate of the audio stream received (kbps).
Definition: NERtcEngineStatistics.h:80
uint64_t txAudioBytes
The number of cumulative bytes of audio data sent since a user joins the room (bytes).
Definition: NERtcEngineStatistics.h:58
uint64_t txVideoKBitRate
The bitrate of the video stream sent (kbps).
Definition: NERtcEngineStatistics.h:95
uint32_t rxAudioJitter
Local downlink audio jitter (ms).
Definition: NERtcEngineStatistics.h:160
uint64_t upRtt
Average uplink round-trip latency (ms).
Definition: NERtcEngineStatistics.h:100
uint64_t rxVideoKBitRate
The bitrate of the video stream received (kbps).
Definition: NERtcEngineStatistics.h:85
uint32_t txVideoJitter
Local uplink video jitter (ms)
Definition: NERtcEngineStatistics.h:135
uint32_t rxAudioPacketLossRate
Packet loss rate of the local downlink audio (%).
Definition: NERtcEngineStatistics.h:140
uint32_t memoryTotalUsageRatio
Percentage of the memory used by the current system (%).
Definition: NERtcEngineStatistics.h:43
Stats of each downlink stream received.
Definition: NERtcEngineStatistics.h:246
Stats of an individual local video stream.
Definition: NERtcEngineStatistics.h:172
The stats of the remote video stream
Definition: NERtcEngineStatistics.h:309
The uplink stats of the local video stream.
Definition: NERtcEngineStatistics.h:234
Occurs when the stats are collected.
Definition: NERtcEngineStatistics.h:419