2013-10-17 15:00:05 -07: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
|
|
|
|
*/
|
|
|
|
|
|
|
|
enum RTCStatsType {
|
2013-10-24 11:07:20 -07:00
|
|
|
"inboundrtp",
|
2013-10-28 16:02:00 -07:00
|
|
|
"outboundrtp",
|
|
|
|
"session",
|
|
|
|
"track",
|
|
|
|
"transport",
|
|
|
|
"candidatepair",
|
|
|
|
"localcandidate",
|
|
|
|
"remotecandidate"
|
2013-10-17 15:00:05 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
dictionary RTCStats {
|
|
|
|
DOMHighResTimeStamp timestamp;
|
|
|
|
RTCStatsType type;
|
|
|
|
DOMString id;
|
|
|
|
};
|
|
|
|
|
|
|
|
dictionary RTCRTPStreamStats : RTCStats {
|
|
|
|
DOMString ssrc;
|
|
|
|
DOMString remoteId;
|
2013-12-07 17:31:56 -08:00
|
|
|
boolean isRemote = false;
|
2013-10-17 15:00:05 -07:00
|
|
|
DOMString mediaTrackId;
|
|
|
|
DOMString transportId;
|
|
|
|
DOMString codecId;
|
|
|
|
};
|
|
|
|
|
|
|
|
dictionary RTCInboundRTPStreamStats : RTCRTPStreamStats {
|
|
|
|
unsigned long packetsReceived;
|
2013-10-24 11:07:20 -07:00
|
|
|
unsigned long long bytesReceived;
|
|
|
|
double jitter;
|
2014-02-13 22:35:13 -08:00
|
|
|
unsigned long packetsLost;
|
2014-03-12 14:13:20 -07:00
|
|
|
long mozAvSyncDelay;
|
|
|
|
long mozJitterBufferDelay;
|
2014-03-14 11:34:02 -07:00
|
|
|
long mozRtt;
|
2013-10-17 15:00:05 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
dictionary RTCOutboundRTPStreamStats : RTCRTPStreamStats {
|
|
|
|
unsigned long packetsSent;
|
2013-10-24 11:07:20 -07:00
|
|
|
unsigned long long bytesSent;
|
2013-10-17 15:00:05 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
dictionary RTCMediaStreamTrackStats : RTCStats {
|
|
|
|
DOMString trackIdentifier; // track.id property
|
|
|
|
boolean remoteSource;
|
|
|
|
sequence<DOMString> ssrcIds;
|
|
|
|
unsigned long audioLevel; // Only for audio, the rest are only for video
|
|
|
|
unsigned long frameWidth;
|
|
|
|
unsigned long frameHeight;
|
2013-10-24 11:07:20 -07:00
|
|
|
double framesPerSecond; // The nominal FPS value
|
2013-10-17 15:00:05 -07:00
|
|
|
unsigned long framesSent;
|
|
|
|
unsigned long framesReceived; // Only for remoteSource=true
|
|
|
|
unsigned long framesDecoded;
|
|
|
|
};
|
|
|
|
|
|
|
|
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-28 16:02:00 -07:00
|
|
|
enum RTCStatsIceCandidatePairState {
|
|
|
|
"frozen",
|
|
|
|
"waiting",
|
|
|
|
"inprogress",
|
|
|
|
"failed",
|
|
|
|
"succeeded",
|
|
|
|
"cancelled"
|
|
|
|
};
|
|
|
|
|
|
|
|
dictionary RTCIceCandidatePairStats : RTCStats {
|
|
|
|
DOMString componentId;
|
|
|
|
DOMString localCandidateId;
|
|
|
|
DOMString remoteCandidateId;
|
|
|
|
RTCStatsIceCandidatePairState state;
|
|
|
|
unsigned long long mozPriority;
|
|
|
|
boolean readable;
|
|
|
|
boolean nominated;
|
|
|
|
boolean selected;
|
|
|
|
};
|
|
|
|
|
2013-10-17 15:00:05 -07:00
|
|
|
enum RTCStatsIceCandidateType {
|
|
|
|
"host",
|
2013-10-24 11:07:20 -07:00
|
|
|
"serverreflexive",
|
|
|
|
"peerreflexive",
|
2013-10-17 15:00:05 -07:00
|
|
|
"relayed"
|
|
|
|
};
|
|
|
|
|
|
|
|
dictionary RTCIceCandidateStats : RTCStats {
|
2014-01-14 08:48:27 -08:00
|
|
|
DOMString componentId;
|
2013-10-17 15:00:05 -07:00
|
|
|
DOMString candidateId;
|
|
|
|
DOMString ipAddress;
|
2014-02-26 11:12:37 -08:00
|
|
|
DOMString transport;
|
|
|
|
DOMString mozLocalTransport; // needs standardization
|
2013-10-17 15:00:05 -07: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
|
|
|
|
};
|
|
|
|
|
2013-10-24 11:07:20 -07:00
|
|
|
callback RTCStatsReportCallback = void (RTCStatsReport obj);
|
2013-10-17 15:00:05 -07:00
|
|
|
|
|
|
|
// This is the internal representation of the report in this implementation
|
|
|
|
// to be received from c++
|
|
|
|
|
|
|
|
dictionary RTCStatsReportInternal {
|
2013-12-07 17:31:56 -08:00
|
|
|
DOMString pcid = "";
|
2013-10-17 15:00:05 -07:00
|
|
|
sequence<RTCRTPStreamStats> rtpStreamStats;
|
|
|
|
sequence<RTCInboundRTPStreamStats> inboundRTPStreamStats;
|
|
|
|
sequence<RTCOutboundRTPStreamStats> outboundRTPStreamStats;
|
|
|
|
sequence<RTCMediaStreamTrackStats> mediaStreamTrackStats;
|
|
|
|
sequence<RTCMediaStreamStats> mediaStreamStats;
|
|
|
|
sequence<RTCTransportStats> transportStats;
|
|
|
|
sequence<RTCIceComponentStats> iceComponentStats;
|
2013-10-28 16:02:00 -07:00
|
|
|
sequence<RTCIceCandidatePairStats> iceCandidatePairStats;
|
2013-10-17 15:00:05 -07:00
|
|
|
sequence<RTCIceCandidateStats> iceCandidateStats;
|
|
|
|
sequence<RTCCodecStats> codecStats;
|
|
|
|
};
|
|
|
|
|
|
|
|
[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 {
|
2013-11-25 11:01:03 -08:00
|
|
|
[ChromeOnly]
|
|
|
|
readonly attribute DOMString mozPcid;
|
2014-02-19 07:13:38 -08:00
|
|
|
void forEach(RTCStatsReportCallback callbackFn, any thisArg);
|
2013-10-17 15:00:05 -07:00
|
|
|
object get(DOMString key);
|
|
|
|
boolean has(DOMString key);
|
|
|
|
};
|