W3C home > Mailing lists > Public > public-webrtc@w3.org > February 2013

Summary of stats discussion in Boston

From: Justin Uberti <juberti@google.com>
Date: Thu, 7 Feb 2013 09:07:10 -0800
Message-ID: <CAOJ7v-0vucr_4v3VjaYf5TrOgwVysjdSi20Ge97yJTef9RyFTw@mail.gmail.com>
To: "public-webrtc@w3.org" <public-webrtc@w3.org>
Here is a summary of what I *think* we decided to do in WEBRTC regarding
stats this morning.

*Proposal:*

getStats(selector, cb) gives you back (in the callback) a RTCStatsReport
(unchanged from previous proposal).

RTCStatsReport now becomes a map<id, RTCStatsObject>; you can look up a
report by id, or iterate over them all.

The RTCStatsObject has properties
- timestamp (units are DOMHiResTimestamp, http://www.w3.org/TR/hr-time/)
- type (name of stats child class, e.g. "OutgoingRTPStream")
- id (opaque string)

And there are various descendant classes of RTCStatsObject, e.g

*interface RTCRTPStreamStats : RTCStatsObject {
  int ssrc;
 StatsObjectID? otherEndStats; // Reference to the stats signalled from our
partner.
};

interface RTCOutgoingRTPStreamStats : RTCRTPStreamStats {
 int packetsSent;
  long bytesSent;
};*
*
*
*interface RTCIncomingRTPStreamStats : RTCRTPStreamStats {
  int packetsReceived;
 long bytesReceived;*
* int packetsLost;
};*
*
*
*(Names are subject to change)*
*
*
*Sample Usage:*
*
*
getStats(null, onStats);
onStats = function(report) {
 for (var id in report) {
var obj = report[id];
 if (obj.type == "RTCIncomingRTPStreamStats") {
// print out the number of bytes received on each RTP stream
 console.log(obj.timestamp + ": ssrc:" + obj.ssrc + " bytes:" +
obj.bytesReceived);
 }
}
Received on Thursday, 7 February 2013 17:07:58 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:32 UTC