Skip to content

Commit

Permalink
Changed 'associateStatsId' back to 'remoteId'; added 'localId' for sy…
Browse files Browse the repository at this point in the history
…mmetry.
  • Loading branch information
jan-ivar committed Apr 6, 2017
1 parent e127400 commit 92756ca
Showing 1 changed file with 54 additions and 17 deletions.
71 changes: 54 additions & 17 deletions webrtc-stats.html
Expand Up @@ -73,8 +73,8 @@ <h2>
<li>It MUST support generating statistics for the type RTCOutboundRTPStreamStats, with
attributes packetsSent, bytesSent.
</li>
<li>For all subclasses of RTCRTPStreamStats, it MUST include ssrc, associateStatsId,
mediaType.
<li>For all subclasses of RTCRTPStreamStats, it MUST include ssrc, remoteId,
localId, mediaType.
</li>
<li>It MAY support generating other stats.
</li>
Expand Down Expand Up @@ -521,7 +521,6 @@ <h3>
<div>
<pre class="idl">dictionary RTCRTPStreamStats : RTCStats {
unsigned long ssrc;
DOMString associateStatsId;
DOMString mediaType;
DOMString trackId;
DOMString transportId;
Expand All @@ -548,16 +547,6 @@ <h2>
the stream of RTP packets that this stats object concerns.
</p>
</dd>
<dt>
<dfn><code>associateStatsId</code></dfn> of type <span class=
"idlMemberType"><a>DOMString</a></span>
</dt>
<dd>
<p>
The <code>associateStatsId</code> is used for looking up the corresponding
(local/remote) <code><a>RTCStats</a></code> object for a given SSRC.
</p>
</dd>
<dt>
<dfn><code>mediaType</code></dfn> of type <span class=
"idlMemberType"><a>DOMString</a></span>
Expand Down Expand Up @@ -957,6 +946,7 @@ <h3>
</p>
<div>
<pre class="idl">dictionary RTCInboundRTPStreamStats : RTCReceivedRTPStreamStats {
DOMString remoteId;
unsigned long framesDecoded;
};</pre>
<section>
Expand All @@ -965,6 +955,17 @@ <h2>
</h2>
<dl data-link-for="RTCInboundRTPStreamStats" data-dfn-for="RTCInboundRTPStreamStats"
class="dictionary-members">
<dt>
<dfn><code>remoteId</code></dfn> of type <span class=
"idlMemberType"><a>DOMString</a></span>
</dt>
<dd>
<p>
The <code>remoteId</code> is used for looking up the remote
<code><a>RTCRemoteOutboundRTPStreamStats</a></code> object for
a given SSRC.
</p>
</dd>
<dt>
<dfn><code>framesDecoded</code></dfn>
</dt>
Expand All @@ -990,6 +991,7 @@ <h3>
</p>
<div>
<pre class="idl">dictionary RTCRemoteInboundRTPStreamStats : RTCReceivedRTPStreamStats {
DOMString localId;
double roundTripTime;
};</pre>
<section>
Expand All @@ -998,6 +1000,17 @@ <h2>
</h2>
<dl data-link-for="RTCRemoteInboundRTPStreamStats" data-dfn-for="RTCRemoteInboundRTPStreamStats"
class="dictionary-members">
<dt>
<dfn><code>localId</code></dfn> of type <span class=
"idlMemberType"><a>DOMString</a></span>
</dt>
<dd>
<p>
The <code>localId</code> is used for looking up the local
<code><a>RTCOutboundRTPStreamStats</a></code> object for a
given SSRC.
</p>
</dd>
<dt>
<dfn><code>roundTripTime</code></dfn> of type <span class=
"idlMemberType"><a>double</a></span>
Expand Down Expand Up @@ -1063,6 +1076,7 @@ <h3>
</p>
<div>
<pre class="idl">dictionary RTCOutboundRTPStreamStats : RTCSentRTPStreamStats {
DOMString remoteId;
double targetBitrate;
unsigned long framesEncoded;
double totalEncodeTime;
Expand All @@ -1073,6 +1087,17 @@ <h2>
</h2>
<dl data-link-for="RTCOutboundRTPStreamStats" data-dfn-for="RTCOutboundRTPStreamStats"
class="dictionary-members">
<dt>
<dfn><code>remoteId</code></dfn> of type <span class=
"idlMemberType"><a>DOMString</a></span>
</dt>
<dd>
<p>
The <code>remoteId</code> is used for looking up the remote
<code><a>RTCRemoteInboundRTPStreamStats</a></code> object for
a given SSRC.
</p>
</dd>
<dt>
<dfn><code>targetBitrate</code></dfn> of type <span class=
"idlMemberType"><a>double</a></span>
Expand Down Expand Up @@ -1126,6 +1151,7 @@ <h3>
</p>
<div>
<pre class="idl">dictionary RTCRemoteOutboundRTPStreamStats : RTCSentRTPStreamStats {
DOMString localId;
DOMHighResTimeStamp remoteTimestamp;
};</pre>
<section>
Expand All @@ -1134,6 +1160,17 @@ <h2>
</h2>
<dl data-link-for="RTCRemoteOutboundRTPStreamStats" data-dfn-for="RTCRemoteOutboundRTPStreamStats"
class="dictionary-members">
<dt>
<dfn><code>localId</code></dfn> of type <span class=
"idlMemberType"><a>DOMString</a></span>
</dt>
<dd>
<p>
The <code>localId</code> is used for looking up the local
<code><a>RTCInboundRTPStreamStats</a></code> object for a
given SSRC.
</p>
</dd>
<dt>
<dfn><code>remoteTimestamp</code></dfn> of type <span class=
"idlMemberType"><a>DOMHighResTimeStamp</a></span>
Expand Down Expand Up @@ -2335,13 +2372,13 @@ <h4>
ssrc=1234
id=foobar
type="outbound-rtp"
associateStatsId=barfoo
remoteId=barfoo
},
dictionary (of type RTCRemoteInboundRTPStreamStats) {
ssrc=1234
id=barfoo
type="remote-inbound-rtp"
associateStatsId=foobar
localId=foobar
}
]
</pre>
Expand Down Expand Up @@ -2386,8 +2423,8 @@ <h3>
let base = baselineReport.get(now.id);

if (base) {
remoteNow = currentReport.get(now.associateStatsId);
remoteBase = baselineReport.get(base.associateStatsId);
remoteNow = currentReport[now.remoteId];
remoteBase = baselineReport[base.remoteId];

var packetsSent = now.packetsSent - base.packetsSent;
var packetsReceived = remoteNow.packetsReceived - remoteBase.packetsReceived;
Expand Down

0 comments on commit 92756ca

Please sign in to comment.