2013-10-18 02:00:05 +04:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* 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-08 01:27:26 +04:00
|
|
|
* http://www.w3.org/2011/04/webrtc/wiki/Stats
|
2013-10-18 02:00:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
enum RTCStatsType {
|
2016-12-16 12:27:40 +03:00
|
|
|
"inbound-rtp",
|
|
|
|
"outbound-rtp",
|
2013-10-29 03:02:00 +04:00
|
|
|
"session",
|
|
|
|
"track",
|
|
|
|
"transport",
|
2016-12-16 12:27:40 +03:00
|
|
|
"candidate-pair",
|
|
|
|
"local-candidate",
|
|
|
|
"remote-candidate"
|
2013-10-18 02:00:05 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
dictionary RTCStats {
|
|
|
|
DOMHighResTimeStamp timestamp;
|
|
|
|
RTCStatsType type;
|
|
|
|
DOMString id;
|
|
|
|
};
|
|
|
|
|
|
|
|
dictionary RTCRTPStreamStats : RTCStats {
|
|
|
|
DOMString ssrc;
|
2014-08-22 01:14:12 +04:00
|
|
|
DOMString mediaType;
|
2013-10-18 02:00:05 +04:00
|
|
|
DOMString remoteId;
|
2013-12-08 05:31:56 +04:00
|
|
|
boolean isRemote = false;
|
2013-10-18 02:00:05 +04:00
|
|
|
DOMString mediaTrackId;
|
|
|
|
DOMString transportId;
|
|
|
|
DOMString codecId;
|
2014-06-08 01:27:26 +04:00
|
|
|
|
|
|
|
// Video encoder/decoder measurements (absent for rtcp)
|
|
|
|
double bitrateMean;
|
|
|
|
double bitrateStdDev;
|
|
|
|
double framerateMean;
|
|
|
|
double framerateStdDev;
|
2013-10-18 02:00:05 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
dictionary RTCInboundRTPStreamStats : RTCRTPStreamStats {
|
|
|
|
unsigned long packetsReceived;
|
2013-10-24 22:07:20 +04:00
|
|
|
unsigned long long bytesReceived;
|
|
|
|
double jitter;
|
2014-02-14 10:35:13 +04:00
|
|
|
unsigned long packetsLost;
|
2014-03-13 01:13:20 +04:00
|
|
|
long mozAvSyncDelay;
|
|
|
|
long mozJitterBufferDelay;
|
2014-03-14 22:34:02 +04:00
|
|
|
long mozRtt;
|
2014-06-08 01:27:26 +04:00
|
|
|
|
|
|
|
// Video decoder measurement (absent in rtcp case)
|
|
|
|
unsigned long discardedPackets;
|
2013-10-18 02:00:05 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
dictionary RTCOutboundRTPStreamStats : RTCRTPStreamStats {
|
|
|
|
unsigned long packetsSent;
|
2013-10-24 22:07:20 +04:00
|
|
|
unsigned long long bytesSent;
|
2014-06-08 01:27:26 +04:00
|
|
|
double targetBitrate; // config encoder bitrate target of this SSRC in bits/s
|
|
|
|
|
|
|
|
// Video encoder measurement (absent in rtcp case)
|
|
|
|
unsigned long droppedFrames;
|
2013-10-18 02:00:05 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
dictionary RTCMediaStreamTrackStats : RTCStats {
|
|
|
|
DOMString trackIdentifier; // track.id property
|
|
|
|
boolean remoteSource;
|
|
|
|
sequence<DOMString> ssrcIds;
|
2014-06-08 01:27:26 +04:00
|
|
|
// Stuff that makes sense for video
|
2013-10-18 02:00:05 +04:00
|
|
|
unsigned long frameWidth;
|
|
|
|
unsigned long frameHeight;
|
2014-06-08 01:27:26 +04:00
|
|
|
double framesPerSecond; // The nominal FPS value
|
2013-10-18 02:00:05 +04:00
|
|
|
unsigned long framesSent;
|
2014-06-08 01:27:26 +04:00
|
|
|
unsigned long framesReceived; // Only for remoteSource=true
|
2013-10-18 02:00:05 +04:00
|
|
|
unsigned long framesDecoded;
|
2014-06-08 01:27:26 +04: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-18 02:00:05 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
dictionary RTCMediaStreamStats : RTCStats {
|
|
|
|
DOMString streamIdentifier; // stream.id property
|
|
|
|
sequence<DOMString> trackIds; // Note: stats object ids, not track.id
|
|
|
|
};
|
|
|
|
|
|
|
|
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-29 03:02:00 +04:00
|
|
|
enum RTCStatsIceCandidatePairState {
|
|
|
|
"frozen",
|
|
|
|
"waiting",
|
|
|
|
"inprogress",
|
|
|
|
"failed",
|
|
|
|
"succeeded",
|
|
|
|
"cancelled"
|
|
|
|
};
|
|
|
|
|
|
|
|
dictionary RTCIceCandidatePairStats : RTCStats {
|
|
|
|
DOMString componentId;
|
|
|
|
DOMString localCandidateId;
|
|
|
|
DOMString remoteCandidateId;
|
|
|
|
RTCStatsIceCandidatePairState state;
|
2015-07-16 05:43:37 +03:00
|
|
|
unsigned long long priority;
|
2013-10-29 03:02:00 +04:00
|
|
|
boolean readable;
|
|
|
|
boolean nominated;
|
|
|
|
boolean selected;
|
|
|
|
};
|
|
|
|
|
2013-10-18 02:00:05 +04:00
|
|
|
enum RTCStatsIceCandidateType {
|
|
|
|
"host",
|
2013-10-24 22:07:20 +04:00
|
|
|
"serverreflexive",
|
|
|
|
"peerreflexive",
|
2013-10-18 02:00:05 +04:00
|
|
|
"relayed"
|
|
|
|
};
|
|
|
|
|
|
|
|
dictionary RTCIceCandidateStats : RTCStats {
|
2014-01-14 20:48:27 +04:00
|
|
|
DOMString componentId;
|
2013-10-18 02:00:05 +04:00
|
|
|
DOMString candidateId;
|
|
|
|
DOMString ipAddress;
|
2014-02-26 23:12:37 +04:00
|
|
|
DOMString transport;
|
|
|
|
DOMString mozLocalTransport; // needs standardization
|
2013-10-18 02:00:05 +04:00
|
|
|
long portNumber;
|
|
|
|
RTCStatsIceCandidateType candidateType;
|
|
|
|
};
|
|
|
|
|
|
|
|
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 {
|
2013-12-08 05:31:56 +04:00
|
|
|
DOMString pcid = "";
|
2013-10-18 02:00:05 +04:00
|
|
|
sequence<RTCInboundRTPStreamStats> inboundRTPStreamStats;
|
|
|
|
sequence<RTCOutboundRTPStreamStats> outboundRTPStreamStats;
|
|
|
|
sequence<RTCMediaStreamTrackStats> mediaStreamTrackStats;
|
|
|
|
sequence<RTCMediaStreamStats> mediaStreamStats;
|
|
|
|
sequence<RTCTransportStats> transportStats;
|
|
|
|
sequence<RTCIceComponentStats> iceComponentStats;
|
2013-10-29 03:02:00 +04:00
|
|
|
sequence<RTCIceCandidatePairStats> iceCandidatePairStats;
|
2013-10-18 02:00:05 +04:00
|
|
|
sequence<RTCIceCandidateStats> iceCandidateStats;
|
|
|
|
sequence<RTCCodecStats> codecStats;
|
2014-05-05 22:13:24 +04:00
|
|
|
DOMString localSdp;
|
|
|
|
DOMString remoteSdp;
|
2014-05-05 20:35:57 +04:00
|
|
|
DOMHighResTimeStamp timestamp;
|
2016-11-23 20:48:04 +03:00
|
|
|
unsigned long iceRestarts;
|
|
|
|
unsigned long iceRollbacks;
|
2014-05-05 20:35:57 +04:00
|
|
|
boolean closed; // Is the PC now closed
|
2013-10-18 02:00:05 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
[Pref="media.peerconnection.enabled",
|
|
|
|
// TODO: Use MapClass here once it's available (Bug 928114)
|
|
|
|
// MapClass(DOMString, object)
|
|
|
|
JSImplementation="@mozilla.org/dom/rtcstatsreport;1"]
|
|
|
|
interface RTCStatsReport {
|
2016-04-07 17:40:37 +03:00
|
|
|
readonly maplike<DOMString, object>;
|
2013-11-25 23:01:03 +04:00
|
|
|
[ChromeOnly]
|
|
|
|
readonly attribute DOMString mozPcid;
|
2013-10-18 02:00:05 +04:00
|
|
|
};
|