2018-09-13 20:04:55 +00:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2013-10-17 22:00:05 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* The origin of this IDL file is
|
|
|
|
* http://dev.w3.org/2011/webrtc/editor/webrtc.html#rtcstatsreport-object
|
2014-06-07 21:27:26 +00:00
|
|
|
* http://www.w3.org/2011/04/webrtc/wiki/Stats
|
2013-10-17 22:00:05 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
enum RTCStatsType {
|
2016-12-16 09:27:40 +00:00
|
|
|
"inbound-rtp",
|
|
|
|
"outbound-rtp",
|
2018-12-21 02:35:58 +00:00
|
|
|
"remote-inbound-rtp",
|
|
|
|
"remote-outbound-rtp",
|
2017-04-26 11:27:13 +00:00
|
|
|
"csrc",
|
2013-10-28 23:02:00 +00:00
|
|
|
"session",
|
|
|
|
"track",
|
|
|
|
"transport",
|
2016-12-16 09:27:40 +00:00
|
|
|
"candidate-pair",
|
|
|
|
"local-candidate",
|
|
|
|
"remote-candidate"
|
2013-10-17 22:00:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dictionary RTCStats {
|
|
|
|
DOMHighResTimeStamp timestamp;
|
|
|
|
RTCStatsType type;
|
|
|
|
DOMString id;
|
|
|
|
};
|
|
|
|
|
2018-08-02 20:50:24 +00:00
|
|
|
dictionary RTCRtpStreamStats : RTCStats {
|
2018-07-12 20:48:05 +00:00
|
|
|
unsigned long ssrc;
|
2014-08-21 21:14:12 +00:00
|
|
|
DOMString mediaType;
|
2018-08-08 15:30:40 +00:00
|
|
|
DOMString kind;
|
2019-01-15 21:26:05 +00:00
|
|
|
DOMString transportId;
|
2019-03-06 10:13:46 +00:00
|
|
|
DOMString codecId;
|
|
|
|
// Local only measurements, RTCP related but not communicated via RTCP. Not
|
|
|
|
// present in RTCP case. See Bug 1367562
|
|
|
|
unsigned long firCount;
|
|
|
|
unsigned long pliCount;
|
|
|
|
unsigned long nackCount;
|
|
|
|
unsigned long long qpSum;
|
|
|
|
|
|
|
|
DOMString remoteId; // See Bug 1515716
|
|
|
|
DOMString localId; // See Bug 1515716
|
|
|
|
DOMString mediaTrackId;
|
|
|
|
|
|
|
|
// Video encoder/decoder measurements, not present in RTCP case
|
|
|
|
double bitrateMean;
|
|
|
|
double bitrateStdDev;
|
|
|
|
double framerateMean;
|
|
|
|
double framerateStdDev;
|
2013-10-17 22:00:05 +00:00
|
|
|
};
|
|
|
|
|
2019-03-06 10:13:46 +00:00
|
|
|
dictionary RTCInboundRTPStreamStats : RTCRtpStreamStats {
|
2013-10-17 22:00:05 +00:00
|
|
|
unsigned long packetsReceived;
|
2019-03-06 10:13:46 +00:00
|
|
|
unsigned long long bytesReceived;
|
2019-03-06 01:50:20 +00:00
|
|
|
double jitter;
|
2019-03-06 10:13:46 +00:00
|
|
|
unsigned long packetsLost;
|
|
|
|
double roundTripTime;
|
2014-06-07 21:27:26 +00:00
|
|
|
|
2019-03-06 10:13:46 +00:00
|
|
|
// Video decoder measurement, not present in RTCP case
|
|
|
|
unsigned long discardedPackets;
|
2017-07-03 21:17:40 +00:00
|
|
|
unsigned long framesDecoded;
|
2013-10-17 22:00:05 +00:00
|
|
|
};
|
|
|
|
|
2018-12-21 02:35:58 +00:00
|
|
|
|
2019-03-06 10:13:46 +00:00
|
|
|
dictionary RTCOutboundRTPStreamStats : RTCRtpStreamStats {
|
2013-10-17 22:00:05 +00:00
|
|
|
unsigned long packetsSent;
|
2013-10-24 18:07:20 +00:00
|
|
|
unsigned long long bytesSent;
|
2019-03-06 10:13:46 +00:00
|
|
|
double targetBitrate; // config encoder bitrate target of this SSRC in bits/s
|
2014-06-07 21:27:26 +00:00
|
|
|
|
2019-03-06 10:13:46 +00:00
|
|
|
// Video encoder measurements, not present in RTCP case
|
|
|
|
unsigned long droppedFrames;
|
2017-03-22 04:52:06 +00:00
|
|
|
unsigned long framesEncoded;
|
2013-10-17 22:00:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dictionary RTCMediaStreamTrackStats : RTCStats {
|
|
|
|
DOMString trackIdentifier; // track.id property
|
|
|
|
boolean remoteSource;
|
|
|
|
sequence<DOMString> ssrcIds;
|
2014-06-07 21:27:26 +00:00
|
|
|
// Stuff that makes sense for video
|
2013-10-17 22:00:05 +00:00
|
|
|
unsigned long frameWidth;
|
|
|
|
unsigned long frameHeight;
|
2014-06-07 21:27:26 +00:00
|
|
|
double framesPerSecond; // The nominal FPS value
|
2013-10-17 22:00:05 +00:00
|
|
|
unsigned long framesSent;
|
2014-06-07 21:27:26 +00:00
|
|
|
unsigned long framesReceived; // Only for remoteSource=true
|
2013-10-17 22:00:05 +00:00
|
|
|
unsigned long framesDecoded;
|
2014-06-07 21:27:26 +00:00
|
|
|
unsigned long framesDropped; // See VideoPlaybackQuality.droppedVideoFrames
|
|
|
|
unsigned long framesCorrupted; // as above.
|
|
|
|
// Stuff that makes sense for audio
|
|
|
|
double audioLevel; // linear, 1.0 = 0 dBov (from RFC 6464).
|
|
|
|
// AEC stuff on audio tracks sourced from a microphone where AEC is applied
|
|
|
|
double echoReturnLoss; // in decibels from G.168 (2012) section 3.14
|
|
|
|
double echoReturnLossEnhancement; // as above, section 3.15
|
2013-10-17 22:00:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dictionary RTCMediaStreamStats : RTCStats {
|
|
|
|
DOMString streamIdentifier; // stream.id property
|
|
|
|
sequence<DOMString> trackIds; // Note: stats object ids, not track.id
|
|
|
|
};
|
|
|
|
|
2017-04-26 11:27:13 +00:00
|
|
|
dictionary RTCRTPContributingSourceStats : RTCStats {
|
|
|
|
unsigned long contributorSsrc;
|
|
|
|
DOMString inboundRtpStreamId;
|
|
|
|
};
|
|
|
|
|
2013-10-17 22:00:05 +00:00
|
|
|
dictionary RTCTransportStats: RTCStats {
|
|
|
|
unsigned long bytesSent;
|
|
|
|
unsigned long bytesReceived;
|
|
|
|
};
|
|
|
|
|
|
|
|
dictionary RTCIceComponentStats : RTCStats {
|
|
|
|
DOMString transportId;
|
|
|
|
long component;
|
|
|
|
unsigned long bytesSent;
|
|
|
|
unsigned long bytesReceived;
|
|
|
|
boolean activeConnection;
|
|
|
|
};
|
|
|
|
|
2013-10-28 23:02:00 +00:00
|
|
|
enum RTCStatsIceCandidatePairState {
|
|
|
|
"frozen",
|
|
|
|
"waiting",
|
|
|
|
"inprogress",
|
|
|
|
"failed",
|
|
|
|
"succeeded",
|
|
|
|
"cancelled"
|
|
|
|
};
|
|
|
|
|
|
|
|
dictionary RTCIceCandidatePairStats : RTCStats {
|
2017-06-06 21:59:18 +00:00
|
|
|
DOMString transportId;
|
2013-10-28 23:02:00 +00:00
|
|
|
DOMString localCandidateId;
|
|
|
|
DOMString remoteCandidateId;
|
|
|
|
RTCStatsIceCandidatePairState state;
|
2015-07-16 02:43:37 +00:00
|
|
|
unsigned long long priority;
|
2013-10-28 23:02:00 +00:00
|
|
|
boolean nominated;
|
2017-06-06 22:33:02 +00:00
|
|
|
boolean writable;
|
|
|
|
boolean readable;
|
2017-06-06 21:30:56 +00:00
|
|
|
unsigned long long bytesSent;
|
|
|
|
unsigned long long bytesReceived;
|
2017-06-06 22:36:40 +00:00
|
|
|
DOMHighResTimeStamp lastPacketSentTimestamp;
|
|
|
|
DOMHighResTimeStamp lastPacketReceivedTimestamp;
|
2013-10-28 23:02:00 +00:00
|
|
|
boolean selected;
|
2018-01-31 16:34:37 +00:00
|
|
|
[ChromeOnly]
|
|
|
|
unsigned long componentId; // moz
|
2013-10-28 23:02:00 +00:00
|
|
|
};
|
|
|
|
|
2018-11-28 20:30:07 +00:00
|
|
|
enum RTCIceCandidateType {
|
2013-10-17 22:00:05 +00:00
|
|
|
"host",
|
2018-11-28 20:30:07 +00:00
|
|
|
"srflx",
|
|
|
|
"prflx",
|
|
|
|
"relay"
|
2013-10-17 22:00:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dictionary RTCIceCandidateStats : RTCStats {
|
2018-11-22 00:14:36 +00:00
|
|
|
DOMString address;
|
2018-11-28 20:30:07 +00:00
|
|
|
long port;
|
|
|
|
DOMString protocol;
|
|
|
|
RTCIceCandidateType candidateType;
|
|
|
|
long priority;
|
2018-10-07 07:42:48 +00:00
|
|
|
DOMString relayProtocol;
|
2018-11-28 20:30:07 +00:00
|
|
|
// Because we use this internally but don't support RTCIceCandidateStats,
|
|
|
|
// we need to keep the field as ChromeOnly. Bug 1225723
|
|
|
|
[ChromeOnly]
|
|
|
|
DOMString transportId;
|
2013-10-17 22:00:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dictionary RTCCodecStats : RTCStats {
|
|
|
|
unsigned long payloadType; // As used in RTP encoding.
|
|
|
|
DOMString codec; // video/vp8 or equivalent
|
|
|
|
unsigned long clockRate;
|
|
|
|
unsigned long channels; // 2=stereo, missing for most other cases.
|
|
|
|
DOMString parameters; // From SDP description line
|
|
|
|
};
|
|
|
|
|
|
|
|
// This is the internal representation of the report in this implementation
|
|
|
|
// to be received from c++
|
|
|
|
|
|
|
|
dictionary RTCStatsReportInternal {
|
2019-03-06 10:13:46 +00:00
|
|
|
DOMString pcid = "";
|
|
|
|
sequence<RTCInboundRTPStreamStats> inboundRTPStreamStats;
|
|
|
|
sequence<RTCOutboundRTPStreamStats> outboundRTPStreamStats;
|
|
|
|
sequence<RTCRTPContributingSourceStats> rtpContributingSourceStats;
|
|
|
|
sequence<RTCMediaStreamTrackStats> mediaStreamTrackStats;
|
|
|
|
sequence<RTCMediaStreamStats> mediaStreamStats;
|
|
|
|
sequence<RTCTransportStats> transportStats;
|
|
|
|
sequence<RTCIceComponentStats> iceComponentStats;
|
|
|
|
sequence<RTCIceCandidatePairStats> iceCandidatePairStats;
|
|
|
|
sequence<RTCIceCandidateStats> iceCandidateStats;
|
|
|
|
sequence<RTCCodecStats> codecStats;
|
|
|
|
DOMString localSdp;
|
|
|
|
DOMString remoteSdp;
|
|
|
|
DOMHighResTimeStamp timestamp;
|
|
|
|
unsigned long iceRestarts;
|
|
|
|
unsigned long iceRollbacks;
|
|
|
|
boolean offerer; // Is the PC the offerer
|
|
|
|
boolean closed; // Is the PC now closed
|
|
|
|
sequence<RTCIceCandidateStats> trickledIceCandidateStats;
|
|
|
|
sequence<DOMString> rawLocalCandidates;
|
|
|
|
sequence<DOMString> rawRemoteCandidates;
|
2013-10-17 22:00:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
[Pref="media.peerconnection.enabled",
|
|
|
|
JSImplementation="@mozilla.org/dom/rtcstatsreport;1"]
|
|
|
|
interface RTCStatsReport {
|
2016-04-07 14:40:37 +00:00
|
|
|
readonly maplike<DOMString, object>;
|
2013-11-25 19:01:03 +00:00
|
|
|
[ChromeOnly]
|
|
|
|
readonly attribute DOMString mozPcid;
|
2013-10-17 22:00:05 +00:00
|
|
|
};
|