MillicastSDK 2.0.0
Loading...
Searching...
No Matches
stats.h
Go to the documentation of this file.
1#import <Foundation/Foundation.h>
3#import <MillicastSDK/exports.h>
4
6typedef NS_CLOSED_ENUM(NSInteger, MCStatsType)
7{
8 MCStatsTypeCodec,
9 MCStatsTypeOutboundRTP,
10 MCStatsTypeInboundRTP,
11 MCStatsTypeRemoteInboundRTP,
12 MCStatsTypeRemoteOutboundRTP,
13 MCStatsTypeMediaTrack,
14 MCStatsTypeAudioTrack,
15 MCStatsTypeVideoTrack,
16 MCStatsTypeMediaSource,
17 MCStatsTypeIceCandidatePair
18};
19
21typedef NS_CLOSED_ENUM(NSInteger, MCCodecStatsType) {
22 MCCodecStatsTypeEncode,
23 MCCodecStatsTypeDecode
24};
25
27MILLICAST_API @interface MCStats : NSObject
28
30@property long long timestamp;
31
33@property (nonatomic, strong, nullable) NSString* sid; // stats id, id is a reserved keywork in objc
34
36@property MCStatsType type;
37
38@end
39
42
45+ (MCStatsType) get_type;
46
48@property unsigned long payload_type;
49
51@property (nonatomic, strong, nullable) NSString * transport_id;
52
54@property (nonatomic, strong, nullable) NSString * mime_type;
55
57@property MCCodecStatsType codec_type;
58
60@property unsigned long clock_rate;
61
63@property unsigned long channels;
64
66@property (nonatomic, strong, nullable) NSString * sdp_fmtp_line;
67@end
68
71
73@property unsigned long ssrc;
74
76@property (nonatomic, strong, nullable) NSString * kind;
77
79@property (nonatomic, strong, nullable) NSString * transport_id;
80
82@property (nonatomic, strong, nullable) NSString * codec_id;
83@end
84
87
89+ (MCStatsType) get_type;
90
92@property unsigned long long packets_received;
93
95@property double jitter;
96
98@property long long packets_lost;
99
101@property unsigned long long frames_dropped;
102
103@end
104
107
109+ (MCStatsType) get_type;
110
112@property (nonatomic, strong, nullable) NSString * remote_id;
113
115@property (nonatomic, strong, nullable) NSString * track_identifier;
116
118@property (nonatomic, strong, nullable) NSString * mid;
119
121@property unsigned long bytes_received;
122
124@property unsigned long header_bytes_received;
125
128
130@property double jitter_buffer_delay;
131
134
137
139@property unsigned long jitter_buffer_emitted_count;
140
143
145@property unsigned long fec_packets_received;
146
148@property unsigned long fec_packets_discarded;
149
151@property unsigned long total_samples_received;
152
154@property unsigned long concealed_samples;
155
157@property unsigned long silent_concealed_samples;
158
160@property unsigned long concealment_events;
161
163@property unsigned long inserted_samples_for_deceleration;
164
166@property unsigned long removed_samples_for_acceleration;
167
169@property double audio_level;
170
172@property double total_audio_energy;
173
175@property double total_samples_duration;
176
178@property unsigned long frames_received;
179
181@property unsigned long frame_width;
182
184@property unsigned long frame_height;
185
187@property double frames_per_second;
188
190@property unsigned long frames_decoded;
191
193@property unsigned long key_frames_decoded;
194
196@property double total_decode_time;
197
199@property double total_processing_delay;
200
202@property double total_assembly_time;
203
206
208@property double total_inter_frame_delay;
209
212
214@property (nonatomic, strong, nullable) NSString * decoder_implementation;
215
217@property unsigned long fir_count;
218
220@property unsigned long pli_count;
221
223@property unsigned long nack_count;
224
226@property unsigned long freeze_count;
227
229@property unsigned long pause_count;
230
232@property double total_freezes_duration;
233
235@property double total_pauses_duration;
236
238@property double min_playout_delay;
239
241@property unsigned long retransmitted_packets_received;
242
244@property unsigned long retransmitted_bytes_received;
245
246@end
247
250
252+ (MCStatsType) get_type;
253
255@property unsigned long packets_sent;
256
258@property unsigned long long bytes_sent;
259@end
260
263
265+ (MCStatsType) get_type;
266
268@property (nonatomic, strong, nullable) NSString * sender_id;
269
271@property (nonatomic, strong, nullable) NSString * remote_id;
272
274@property unsigned long long retransmitted_packets_sent;
275
277@property unsigned long long header_bytes_sent;
278
280@property unsigned long long retransmitted_bytes_sent;
281
283@property double target_bitrate;
284
286@property double total_packet_send_delay;
287
289@property unsigned long frames_encoded;
290
292@property unsigned long key_frames_encoded;
293
295@property unsigned long long total_encoded_bytes_target;
296
298@property unsigned long frame_width;
299
301@property unsigned long frame_height;
302
304@property double frames_per_second;
305
307@property unsigned long frames_sent;
308
310@property unsigned long huge_frames_sent;
311
313@property (nonatomic, strong, nullable) NSString * quality_limitation_reason;
314
316@property (nonatomic, strong, nullable) NSString * quality_limitation_durations;
317
320
322@property (nonatomic, strong, nullable) NSString * encoder_implementation;
323
325@property unsigned long fir_count;
326
328@property unsigned long pli_count;
329
331@property unsigned long nack_count;
332
334@property unsigned long long qp_sum;
335
336
337@end
338
341
343+ (MCStatsType) get_type;
344
346@property (nonatomic, strong, nullable) NSString * media_source_id;
347
349@property (nonatomic, strong, nullable) NSString * remote_id;
350
352@property (nonatomic, strong, nullable) NSString * local_id;
353
355@property long long remote_timestamp;
356
358@property unsigned long long reports_sent;
359
361@property unsigned long long round_trip_time_measurements;
362
364@property double round_trip_time;
365
367@property double total_round_trip_time;
368
369@end
370
373
375+ (MCStatsType) get_type;
376
378@property (nonatomic, strong, nullable) NSString * local_id;
379
381@property double round_trip_time;
382
384@property double total_round_trip_time;
385
388
390@property double fraction_lost; // fraction packet loss
391@end
392
395
397+ (MCStatsType) get_type;
398
400@property (nonatomic, strong, nullable) NSString * track_identifier;
401
403@property (nonatomic, strong, nullable) NSString * kind;
404@end
405
408
410+ (MCStatsType) get_type;
411
413@property unsigned long width;
414
416@property unsigned long height;
417
419@property unsigned long frames;
420
422@property double frames_per_second;
423@end
424
427
429+ (MCStatsType) get_type;
430
432@property double audio_level;
433
435@property double total_audio_energy;
436
438@property double total_samples_duration;
439
441@property double echo_return_loss;
442
445@end
446
449
451+ (MCStatsType) get_type;
452
454@property double total_round_trip_time;
455
457@property double current_round_trip_time;
458
461
464
465@end
466
468MILLICAST_API @interface MCStatsReport : NSObject
469
474- (nullable MCStats*) get:(nonnull NSString*)statsId;
475
480- (nullable NSArray<MCStats*>*) getStatsOfType:(MCStatsType)type;
481
484- (int) size;
485
491- (nonnull MCStreamDetails*) getStreamDetails;
492
493@end
#define MILLICAST_API
Definition exports.h:51
Stastistics representing an audio track that is attached to one or more senders.
Definition stats.h:427
double total_samples_duration
The total duration of audio samples processed. See totalSamplesDuration
Definition stats.h:438
double total_audio_energy
The cumulative energy of the audio signal over a period. See totalAudioEnergy
Definition stats.h:435
double audio_level
The current audio level. See audioLevel
Definition stats.h:432
double echo_return_loss
The amount of echo signal lost in transmission or processing. See echoReturnLoss
Definition stats.h:441
double echo_return_loss_enhancement
The improvement in echo cancellation performance. See echoReturnLossEnhancement
Definition stats.h:444
Gathers audio/video codec statistics.
Definition stats.h:42
MCCodecStatsType codec_type
Whether these stastics are for the encoder or the decoder.
Definition stats.h:57
unsigned long clock_rate
The clock rate of the codec, indicating the frequency at which samples are generated or processed....
Definition stats.h:60
unsigned long payload_type
The unique identifier for the codec payload type. See payloadType
Definition stats.h:48
unsigned long channels
When present, indicates the number of channels (mono=1, stereo=2). See channels
Definition stats.h:63
Stastistics representing an ice candidate pair.
Definition stats.h:449
double available_outgoing_bitrate
It is calculated by the underlying congestion control by combining the available bitrate for all the ...
Definition stats.h:460
double available_incoming_bitrate
It is calculated by the underlying congestion control by combining the available bitrate for all the ...
Definition stats.h:463
double current_round_trip_time
Represents the latest round trip time measured in seconds. See currentroundtriptime
Definition stats.h:457
double total_round_trip_time
Represents the sum of all round trip time measurements in seconds since the beginning of the session....
Definition stats.h:454
Statistics for an inbound RTP stream.
Definition stats.h:107
unsigned long fec_packets_discarded
The number of discarded Forward Error Correction (FEC) packets received during audio transmission....
Definition stats.h:148
unsigned long retransmitted_packets_received
The total number of retransmitted packets that were received for this SSRC. This is a subset of packe...
Definition stats.h:241
unsigned long frames_assembled_from_multiple_packets
The number of video frames assembled from multiple packets. See framesAssembledFromMultiplePackets
Definition stats.h:205
unsigned long inserted_samples_for_deceleration
The number of inserted audio samples for deceleration. See insertedSamplesForDeceleration
Definition stats.h:163
unsigned long key_frames_decoded
The number of decoded key frames. See keyFramesDecoded
Definition stats.h:193
double total_samples_duration
The total duration of audio samples received. See totalSamplesDuration
Definition stats.h:175
unsigned long fec_packets_received
The number of Forward Error Correction (FEC) packets received during audio transmission....
Definition stats.h:145
double jitter_buffer_target_delay
The target delay set for the jitter buffer. See jitterBufferTargetDelay
Definition stats.h:133
unsigned long header_bytes_received
The number of header bytes received. See headerBytesReceived
Definition stats.h:124
unsigned long frame_height
The height of video frames. See frameHeight
Definition stats.h:184
unsigned long frames_decoded
The number of decoded video frames. See framesDecoded
Definition stats.h:190
double total_pauses_duration
Total duration of pauses. See totalPausesDuration
Definition stats.h:235
unsigned long concealment_events
The number of concealment events. See concealmentEvents
Definition stats.h:160
unsigned long total_samples_received
The total number of audio samples received. See totalSamplesReceived
Definition stats.h:151
double audio_level
The audio level of the stream. See audioLevel
Definition stats.h:169
double min_playout_delay
The minimum playout delay during video transmission.
Definition stats.h:238
unsigned long pause_count
The total number of video pauses. See pauseCount
Definition stats.h:229
double last_packet_received_timestamp
The timestamp of the last received packet. See lastPacketReceivedTimestamp
Definition stats.h:127
unsigned long frame_width
The width of video frames. See frameWidth
Definition stats.h:181
double total_inter_frame_delay
The total inter-frame delay during video transmission. See totalInterFrameDelay
Definition stats.h:208
unsigned long silent_concealed_samples
The number of silent concealed audio samples. See silentConcealedSamples
Definition stats.h:157
double total_freezes_duration
Total duration of rendered frames which are considered as frozen. See totalFreezesCount
Definition stats.h:232
double total_decode_time
The total time spent on decoding. See totalDecodeTime
Definition stats.h:196
unsigned long nack_count
The number of Negative Acknowledgment (NACK) packets. See nackCount
Definition stats.h:223
unsigned long jitter_buffer_emitted_count
The number of packets emitted from the jitter buffer. See jitterBufferEmittedCount
Definition stats.h:139
double total_assembly_time
The total time spent on video frame assembly. See totalAssemblyTime
Definition stats.h:202
unsigned long frames_received
The number of video frames received. See framesReceived
Definition stats.h:178
double jitter_buffer_delay
The current delay in the jitter buffer. See jitterBufferDelay
Definition stats.h:130
double jitter_buffer_minimum_delay
The minimum delay configured for the jitter buffer. See jitterBufferMinimumDelay
Definition stats.h:136
double total_audio_energy
The total energy of the audio stream. See totalAudioEnergy
Definition stats.h:172
unsigned long removed_samples_for_acceleration
The number of removed audio samples for acceleration. See removedSamplesForAcceleration
Definition stats.h:166
unsigned long pli_count
The number of Picture Loss Indication (PLI) packets. See pliCount
Definition stats.h:220
unsigned long fir_count
The number of Full Intra Request (FIR) packets. See firCount
Definition stats.h:217
double total_squared_inter_frame_delay
The total squared inter-frame delay during video transmission. See totalSquaredInterFrameDelay
Definition stats.h:211
double estimated_playout_timestamp
The estimated playout timestamp. See estimatedPlayoutTimestamp
Definition stats.h:142
unsigned long concealed_samples
The number of concealed audio samples. See concealedSamples
Definition stats.h:154
double frames_per_second
The frame rate. See framesPerSecond
Definition stats.h:187
unsigned long bytes_received
The number of bytes received. See bytesReceived
Definition stats.h:121
double total_processing_delay
The total video processing delay. See totalProcessingDelay
Definition stats.h:199
unsigned long freeze_count
The total number of video freezes experienced by this receiver. See freezeCount
Definition stats.h:226
The MCMediaSourceStats class gathers statistics details.
Definition stats.h:395
Statistics about the outbound RTP streams.
Definition stats.h:263
double frames_per_second
The frame rate of the video stream. See framesPerSecond
Definition stats.h:304
unsigned long pli_count
The number of Picture Loss Indication (PLI) messages sent. See pliCount
Definition stats.h:328
unsigned long fir_count
The number of Full Intra Request (FIR) messages sent. See firCount
Definition stats.h:325
unsigned long long total_encoded_bytes_target
The number of bytes encoded to meet video target bitrate. See totalEncodedBytesTarget
Definition stats.h:295
unsigned long long header_bytes_sent
The number of bytes sent for headers. See headerBytesSent
Definition stats.h:277
unsigned long long retransmitted_packets_sent
The number of retransmitted packets. See retransmittedPacketsSent
Definition stats.h:274
unsigned long huge_frames_sent
The number of huge video frames successfully sent. See hugeFramesSent
Definition stats.h:310
double total_packet_send_delay
The cumulative delay during sending packets. See totalPacketSendDelay
Definition stats.h:286
unsigned long quality_limitation_resolution_changes
The number of resolution changes due to quality limitations. See qualityLimitationResolutionChanges
Definition stats.h:319
unsigned long nack_count
The number of Negative Acknowledgment (NACK) messages sent. See nackCount
Definition stats.h:331
unsigned long frames_sent
The number of video frames successfully sent. See framesSent
Definition stats.h:307
double target_bitrate
The target bitrate. See targetBitrate
Definition stats.h:283
unsigned long frames_encoded
The number of encoded video frames. See framesEncoded
Definition stats.h:289
unsigned long key_frames_encoded
The number of encoded key frames. See keyFramesEncoded
Definition stats.h:292
unsigned long frame_height
The height of video frames. See frameHeight
Definition stats.h:301
unsigned long frame_width
The width of video frames. See frameWidth
Definition stats.h:298
unsigned long long retransmitted_bytes_sent
The amount of retransmitted data. See retransmittedBytesSent
Definition stats.h:280
Statistical information about an incoming RTP (Real-time Transport Protocol) stream.
Definition stats.h:87
unsigned long long packets_received
The number of RTP packets received since the start of streaming. See packetsReceived
Definition stats.h:92
double jitter
The variation in packet arrival times, indicating network congestion and latency issues....
Definition stats.h:95
unsigned long long frames_dropped
The number of frames dropped during playback or processing. See framesDropped
Definition stats.h:101
long long packets_lost
The number of RTP packets lost during transmission or due to network issues. See packetsLost
Definition stats.h:98
Statistics about an incoming remote RTP stream.
Definition stats.h:373
long long round_trip_time_measurements
The number of round-trip time measurements. See roundTripTimeMeasurements
Definition stats.h:387
double fraction_lost
The fraction of RTP packets lost during transmission or due to network issues. See fractionLost
Definition stats.h:390
double total_round_trip_time
The sum of round-trip times for packets sent between endpoints. See totalRoundTripTime
Definition stats.h:384
double round_trip_time
The round-trip time for packets sent between the local and remote endpoints. See roundTripTime
Definition stats.h:381
Statistics related to an outgoing remote RTP stream.
Definition stats.h:341
unsigned long long reports_sent
The number of reports sent for monitoring the outbound stream. See reportsSent
Definition stats.h:358
unsigned long long round_trip_time_measurements
The number of round-trip time measurements taken. See roundTripTimeMeasurements
Definition stats.h:361
double round_trip_time
The round-trip time for packets sent between the local and remote endpoints. See roundTripTime
Definition stats.h:364
long long remote_timestamp
The timestamp of the remote endpoint related to the stream. See remoteTimestamp
Definition stats.h:355
Statistics for an RTP stream.
Definition stats.h:71
unsigned long ssrc
The synchronization source identifier for the stream. See ssrc
Definition stats.h:73
Statistics related to an outgoing RTP stream.
Definition stats.h:250
unsigned long packets_sent
The number of RTP packets successfully sent over the network. See packetsSent
Definition stats.h:255
unsigned long long bytes_sent
The number of bytes sent in RTP packets over the network. See bytesSent
Definition stats.h:258
A container of various different stats. To make sense of such statistics, please refer to the WebRTC ...
Definition stats.h:28
long long timestamp
The timestamp in milliseconds since Unix epoch (Jan 1, 1970 00:00:00 UTC) at which the statistical da...
Definition stats.h:30
MCStatsType type
The type of statistics.
Definition stats.h:36
NSString * sid
The unique identifier.
Definition stats.h:33
Interface is a container for various different statistics.
Definition stats.h:469
Definition diagnostics.h:32
Statistics representing a video track that is attached to one or more senders.
Definition stats.h:408
unsigned long height
The height of the video source. See height
Definition stats.h:416
unsigned long width
The width of the video source. See width
Definition stats.h:413
unsigned long frames
The number of frames. See frames
Definition stats.h:419
double frames_per_second
The frame rate of the video source. See framesPerSecond
Definition stats.h:422
typedef NS_CLOSED_ENUM(NSInteger, MCStatsType)
Different types of statistics.
Definition stats.h:6