Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify how RTX works and adds the rtxSsrc stat #554

Merged
merged 1 commit into from Mar 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 32 additions & 9 deletions webrtc-stats.html
Expand Up @@ -446,13 +446,17 @@ <h3>
{{RTCOutboundRtpStreamStats}}.
</p>
<p>
When there are multiple <a>RTP stream</a>s connected to the same sender, such as when using
simulcast or RTX, there will be one {{RTCOutboundRtpStreamStats}} per <a>RTP stream</a>,
When there are multiple <a>RTP stream</a>s connected to the same sender due to using
simulcast, there will be one {{RTCOutboundRtpStreamStats}} per <a>RTP stream</a>,
with distinct values of the {{RTCRtpStreamStats/ssrc}} member, and all these senders will have a
reference to the same {{RTCStatsType/"sender"}} object (of type {{RTCAudioSenderStats}} or
{{RTCVideoSenderStats}}) and {{RTCStatsType/"track"}} object (of type
{{RTCSenderAudioTrackAttachmentStats}} or
{{RTCSenderVideoTrackAttachmentStats}}).
{{RTCSenderVideoTrackAttachmentStats}}). RTX streams do not show up as separate
{{RTCOutboundRtpStreamStats}} objects but affect the {{RTCSentRtpStreamStats/packetsSent}},
{{RTCSentRtpStreamStats/bytesSent}}, {{RTCOutboundRtpStreamStats/retransmittedPacketsSent}}
and {{RTCOutboundRtpStreamStats/retransmittedBytesSent}} counters of the relevant
{{RTCOutboundRtpStreamStats}} objects.
</p>
</dd>
<dt>
Expand Down Expand Up @@ -1891,8 +1895,8 @@ <h2>
</dt>
<dd>
<p>
Total number of RTP packets sent for this <a>SSRC</a>. Calculated as defined in
[[!RFC3550]] section 6.4.1.
Total number of RTP packets sent for this <a>SSRC</a>. This includes retransmissions.
Calculated as defined in [[!RFC3550]] section 6.4.1.
</p>
</dd>
<dt>
Expand All @@ -1901,8 +1905,8 @@ <h2>
</dt>
<dd>
<p>
Total number of bytes sent for this <a>SSRC</a>. Calculated as defined in [[!RFC3550]]
section 6.4.1.
Total number of bytes sent for this <a>SSRC</a>. This includes retransmissions.
Calculated as defined in [[!RFC3550]] section 6.4.1.
</p>
</dd>
</dl>
Expand All @@ -1920,6 +1924,7 @@ <h3>
</p>
<div>
<pre class="idl">dictionary RTCOutboundRtpStreamStats : RTCSentRtpStreamStats {
unsigned long rtxSsrc;
DOMString trackId;
DOMString mediaSourceId;
DOMString senderId;
Expand Down Expand Up @@ -1967,6 +1972,19 @@ <h2>
</h2>
<dl data-link-for="RTCOutboundRtpStreamStats" data-dfn-for="RTCOutboundRtpStreamStats"
class="dictionary-members">
<dt>
<dfn>rtxSsrc</dfn> of type <span class="idlMemberType">unsigned long</span>
</dt>
<dd>
<p>
If RTX is negotiated as a separate stream, this is the <a>SSRC</a> of the
RTX stream that is associated with this stream's {{RTCRtpStreamStats/ssrc}}.
If RTX is not negotiated, this value is not present. Whether or not RTX is
negotiated, retransmissions are accounted for in the
{{RTCSentRtpStreamStats/bytesSent}} and
{{RTCOutboundRtpStreamStats/retransmittedBytesSent}} stats of this object.
</p>
</dd>
<dt>
<dfn>trackId</dfn> of type <span class=
"idlMemberType">DOMString</span>
Expand Down Expand Up @@ -2080,7 +2098,9 @@ <h2>
<dd>
<p>
The total number of packets that were retransmitted for this <a>SSRC</a>. This is a
subset of {{RTCSentRtpStreamStats/packetsSent}}.
subset of {{RTCSentRtpStreamStats/packetsSent}}. If RTX is not negotiated, retransmitted
packets are sent over this {{RTCRtpStreamStats/ssrc}}. If RTX was negotiated,
retransmitted packets are sent over a separate {{RTCOutboundRtpStreamStats/rtxSsrc}}.
</p>
</dd>
<dt>
Expand All @@ -2090,7 +2110,10 @@ <h2>
<dd>
<p>
The total number of bytes that were retransmitted for this <a>SSRC</a>, only including
payload bytes. This is a subset of {{RTCSentRtpStreamStats/bytesSent}}.
payload bytes. This is a subset of {{RTCSentRtpStreamStats/bytesSent}}. If RTX is not
negotiated, retransmitted bytes are sent over this {{RTCRtpStreamStats/ssrc}}. If RTX
was negotiated, retransmitted bytes are sent over a separate
{{RTCOutboundRtpStreamStats/rtxSsrc}}.
</p>
</dd>
<dt>
Expand Down