File: RTCStatsReport.idl

package info (click to toggle)
webkit2gtk 2.42.2-1~deb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 362,432 kB
  • sloc: cpp: 2,881,947; javascript: 282,447; ansic: 134,088; python: 43,789; ruby: 18,308; perl: 15,872; asm: 14,389; xml: 4,395; yacc: 2,350; sh: 2,074; java: 1,734; lex: 1,323; makefile: 296; pascal: 60
file content (318 lines) | stat: -rw-r--r-- 9,752 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
/*
 * Copyright (C) 2012 Google Inc. All rights reserved.
 * Copyright (C) 2017 Apple Inc. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1.  Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 * 2.  Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

[
    Conditional=WEB_RTC,
    EnabledBySetting=PeerConnectionEnabled,
    Exposed=Window
] interface RTCStatsReport {
    readonly maplike<DOMString, object>;
};

enum RTCStatsType {
    "candidate-pair",
    "certificate",
    "codec",
    "data-channel",
    "inbound-rtp",
    "local-candidate",
    "media-source",
    "outbound-rtp",
    "peer-connection",
    "remote-candidate",
    "remote-inbound-rtp",
    "track",
    "transport"
};

typedef double DOMHighResTimeStamp;

dictionary RTCStats {
    DOMHighResTimeStamp timestamp;
    RTCStatsType type;
    DOMString id;

};

[ JSGenerateToJSObject ]
dictionary RTCRtpStreamStats : RTCStats {
    required unsigned long ssrc;
    required DOMString kind;
    DOMString transportId;
    DOMString codecId;
};

[ JSGenerateToJSObject ]
dictionary RTCReceivedRtpStreamStats : RTCRtpStreamStats {
    unsigned long long packetsReceived;
    long long packetsLost;
    double jitter;
    unsigned long long packetsRepaired;
    unsigned long long burstPacketsLost;
    unsigned long long burstPacketsDiscarded;
    unsigned long burstLossCount;
    unsigned long burstDiscardCount;
    double burstLossRate;
    double burstDiscardRate;
    double gapLossRate;
    double gapDiscardRate;
    unsigned long partialFramesLost;
    unsigned long fullFramesLost;
};

[ JSGenerateToJSObject ]
dictionary RTCInboundRtpStreamStats : RTCReceivedRtpStreamStats {
    required DOMString trackIdentifier;
    DOMString mid;
    DOMString remoteId;
    unsigned long framesDecoded;
    unsigned long keyFramesDecoded;
    unsigned long framesDropped;
    unsigned long frameWidth;
    unsigned long frameHeight;
    double framesPerSecond;
    unsigned long long qpSum;
    double totalDecodeTime;
    double totalInterFrameDelay;
    double totalSquaredInterFrameDelay;
    DOMHighResTimeStamp lastPacketReceivedTimestamp;
    unsigned long long headerBytesReceived;
    unsigned long long packetsDiscarded;
    unsigned long long fecPacketsReceived;
    unsigned long long fecPacketsDiscarded;
    unsigned long long bytesReceived;
    unsigned long nackCount;
    unsigned long firCount;
    unsigned long pliCount;
    double totalProcessingDelay;
    DOMHighResTimeStamp estimatedPlayoutTimestamp;
    double jitterBufferDelay;
    unsigned long long jitterBufferEmittedCount;
    unsigned long long totalSamplesReceived;
    unsigned long long concealedSamples;
    unsigned long long silentConcealedSamples;
    unsigned long long concealmentEvents;
    unsigned long long insertedSamplesForDeceleration;
    unsigned long long removedSamplesForAcceleration;
    double audioLevel;
    double totalAudioEnergy;
    double totalSamplesDuration;
    unsigned long framesReceived;
};

[ JSGenerateToJSObject ]
dictionary RTCRemoteInboundRtpStreamStats : RTCReceivedRtpStreamStats {
    DOMString localId;
    double roundTripTime;
    double totalRoundTripTime;
    double fractionLost;
    unsigned long long reportsReceived;
    unsigned long long roundTripTimeMeasurements;
};

[ JSGenerateToJSObject ]
dictionary RTCSentRtpStreamStats : RTCRtpStreamStats {
    unsigned long packetsSent;
    unsigned long long bytesSent;
};

[ JSGenerateToJSObject ]
dictionary RTCOutboundRtpStreamStats : RTCSentRtpStreamStats {
    unsigned long rtxSsrc;
    DOMString mediaSourceId;
    DOMString senderId;
    DOMString remoteId;
    DOMString rid;
    DOMHighResTimeStamp lastPacketSentTimestamp;
    unsigned long long headerBytesSent;
    unsigned long packetsDiscardedOnSend;
    unsigned long long bytesDiscardedOnSend;
    unsigned long fecPacketsSent;
    unsigned long long retransmittedPacketsSent;
    unsigned long long retransmittedBytesSent;
    double targetBitrate;
    unsigned long long totalEncodedBytesTarget;
    unsigned long frameWidth;
    unsigned long frameHeight;
    unsigned long frameBitDepth;
    double framesPerSecond;
    unsigned long framesSent;
    unsigned long hugeFramesSent;
    unsigned long framesEncoded;
    unsigned long keyFramesEncoded;
    unsigned long framesDiscardedOnSend;
    unsigned long long qpSum;
    unsigned long long totalSamplesSent;
    unsigned long long samplesEncodedWithSilk;
    unsigned long long samplesEncodedWithCelt;
    boolean voiceActivityFlag;
    double totalEncodeTime;
    double totalPacketSendDelay;
    double averageRtcpInterval;
    // RTCQualityLimitationReason qualityLimitationReason;
    // record<DOMString, double> qualityLimitationDurations;
    unsigned long qualityLimitationResolutionChanges;
    // record<USVString, unsigned long long> perDscpPacketsSent;
    unsigned long nackCount;
    unsigned long firCount;
    unsigned long pliCount;
    unsigned long sliCount;
    // DOMString encoderImplementation;
};

[ JSGenerateToJSObject ]
dictionary RTCDataChannelStats : RTCStats {
    DOMString label;
    DOMString protocol;
    long datachannelid;
    // FIXME: Switch state to RTCDataChannelState
    DOMString state;
    unsigned long messagesSent;
    unsigned long long bytesSent;
    unsigned long messagesReceived;
    unsigned long long bytesReceived;
};

enum RTCStatsIceCandidatePairState {
    "frozen",
    "waiting",
    "inprogress",
    "failed",
    "succeeded",
    "cancelled"
};

[ JSGenerateToJSObject ]
dictionary RTCIceCandidatePairStats : RTCStats {
    DOMString transportId;
    DOMString localCandidateId;
    DOMString remoteCandidateId;
    RTCStatsIceCandidatePairState state;
    boolean nominated;
    boolean writable;
    boolean readable;
    unsigned long long bytesSent;
    unsigned long long bytesReceived;
    double totalRoundTripTime;
    double currentRoundTripTime;
    double availableOutgoingBitrate;
    double availableIncomingBitrate;
    unsigned long long requestsReceived;
    unsigned long long requestsSent;
    unsigned long long responsesReceived;
    unsigned long long responsesSent;
    // FIXME: Expose other fields once libwebrtc support them.
};

[ JSGenerateToJSObject ]
dictionary RTCIceCandidateStats : RTCStats {
    DOMString transportId;
    // FIXME: decide whether to expose networkType
    // FIXME: Expose relayProtocol
    DOMString address;
    long port;
    DOMString protocol;
    RTCIceCandidateType candidateType;
    long priority;
    DOMString url;
};

[ JSGenerateToJSObject ]
dictionary RTCCertificateStats : RTCStats {
    DOMString fingerprint;
    DOMString fingerprintAlgorithm;
    DOMString base64Certificate;
    DOMString issuerCertificateId;
};

enum RTCCodecType {
    "encode",
    "decode"
};

[ JSGenerateToJSObject ]
dictionary RTCCodecStats : RTCStats {
    unsigned long payloadType;
    RTCCodecType codecType;
    DOMString transportId;
    DOMString mimeType;
    unsigned long clockRate;
    unsigned long channels;
    DOMString sdpFmtpLine;
};

[ JSGenerateToJSObject ]
dictionary RTCTransportStats : RTCStats {
    // FIXME 169662: Support more fields.
    // unsigned long packetsSent;
    // unsigned long packetsReceived;
    unsigned long long bytesSent;
    unsigned long long bytesReceived;
    DOMString rtcpTransportStatsId;
    // RTCIceRole iceRole;
    // DOMString iceLocalUsernameFragment;
    required DOMString dtlsState;
    // RTCIceTransportState iceState;
    DOMString selectedCandidatePairId;
    DOMString localCertificateId;
    DOMString remoteCertificateId;
    DOMString tlsVersion;
    DOMString dtlsCipher;
    DOMString srtpCipher;
    // DOMString tlsGroup;
    // unsigned long selectedCandidatePairChanges;
};

[ JSGenerateToJSObject ]
dictionary RTCPeerConnectionStats : RTCStats {
    // FIXME 169662: Support more fields.
    unsigned long dataChannelsOpened;
    unsigned long dataChannelsClosed;
    // unsigned long dataChannelsRequested;
    // unsigned long dataChannelsAccepted;
};

[ JSGenerateToJSObject ]
dictionary RTCMediaSourceStats : RTCStats {
    required DOMString  trackIdentifier;
    required DOMString  kind;
    boolean relayedSource;
};

dictionary RTCAudioSourceStats : RTCMediaSourceStats {
    double audioLevel;
    double totalAudioEnergy;
    double totalSamplesDuration;
    double echoReturnLoss;
    double echoReturnLossEnhancement;
};

dictionary RTCVideoSourceStats : RTCMediaSourceStats {
    unsigned long width;
    unsigned long height;
    unsigned long bitDepth;
    unsigned long frames;
    double framesPerSecond;
};