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

Replace RTCVideo{Sender,Receiver}Stats::keyFrames{Sent,Received} with RTC{Out,In}boundRtpStreamStats::keyFrames{En,De}coded #447

Merged
merged 3 commits into from
Jun 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 63 additions & 33 deletions webrtc-stats.html
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,7 @@ <h3>
DOMString receiverId;
DOMString remoteId;
unsigned long framesDecoded;
unsigned long keyFramesDecoded;
unsigned long long qpSum;
DOMHighResTimeStamp lastPacketReceivedTimestamp;
double averageRtcpInterval;
Expand Down Expand Up @@ -1204,6 +1205,18 @@ <h2>
for this SSRC, i.e., frames that would be displayed if no frames are dropped.
</p>
</dd>
<dt>
<dfn><code>keyFramesDecoded</code></dfn> of type <span class=
"idlMemberType">unsigned long</span>
</dt>
<dd>
<p>
Only valid for video. It represents the total number of key frames, such as
key frames in VP8 [[RFC6386]] or IDR-frames in H.264 [[RFC6184]], successfully decoded for this RTP media stream.
This is a subset of <code>framesDecoded</code>. <code>framesDecoded - keyFramesDecoded</code> gives
you the number of delta frames decoded.
</p>
</dd>
<dt>
<dfn><code>qpSum</code></dfn> of type <span class="idlMemberType">unsigned long
long</span>
Expand Down Expand Up @@ -1520,6 +1533,7 @@ <h3>
double targetBitrate;
unsigned long long totalEncodedBytesTarget;
unsigned long framesEncoded;
unsigned long keyFramesEncoded;
unsigned long long qpSum;
double totalEncodeTime;
double totalPacketSendDelay;
Expand Down Expand Up @@ -1641,6 +1655,18 @@ <h2>
encoded for this RTP media stream.
</p>
</dd>
<dt>
<dfn><code>keyFramesEncoded</code></dfn> of type <span class=
"idlMemberType">unsigned long</span>
</dt>
<dd>
<p>
Only valid for video. It represents the total number of key frames, such as
key frames in VP8 [[RFC6386]] or IDR-frames in H.264 [[RFC6184]], successfully encoded for this RTP media stream.
This is a subset of <code>framesEncoded</code>. <code>framesEncoded - keyFramesEncoded</code> gives
you the number of delta frames encoded.
</p>
</dd>
<dt>
<dfn><code>qpSum</code></dfn> of type <span class="idlMemberType">unsigned long
long</span>
Expand Down Expand Up @@ -2392,7 +2418,6 @@ <h3>
unsigned long framesCaptured;
unsigned long framesSent;
unsigned long hugeFramesSent;
unsigned long keyFramesSent;
};</pre>
<section>
<h2>
Expand Down Expand Up @@ -2447,9 +2472,7 @@ <h2>
size of the frames. The average size of the frames is defined as the target
bitrate per second divided by the target fps at the time the frame was encoded.
These are usually complex to encode frames with a lot of changes in the picture.
This can be used to estimate, e.g slide changes in the streamed presentation. If
a huge frame is also a key frame, then both counters hugeFramesSent and
keyFramesSent are incremented.
This can be used to estimate, e.g slide changes in the streamed presentation.
</p>
<p>
The multiplier of 2.5 is choosen from analyzing encoded frame sizes for a sample
Expand All @@ -2459,19 +2482,6 @@ <h2>
which is deemed reasonable.
</p>
</dd>
<dt>
<dfn><code>keyFramesSent</code></dfn> of type <span class=
"idlMemberType">unsigned long</span>
</dt>
<dd>
<p>
Represents the total number of key frames sent by this RTCRtpSender (or for this
MediaStreamTrack, if <code>type</code> is <code>"track"</code>), such as
Infra-frames in VP8 [[RFC6386]] or I-frames in H.264 [[RFC6184]]. This is a
subset of <code>framesSent</code>. <code>framesSent - keyFramesSent</code> gives
you the number of delta frames sent.
</p>
</dd>
</dl>
</section>
</div>
Expand Down Expand Up @@ -2527,7 +2537,6 @@ <h3>
double jitterBufferDelay;
unsigned long long jitterBufferEmittedCount;
unsigned long framesReceived;
unsigned long keyFramesReceived;
unsigned long framesDecoded;
unsigned long framesDropped;
unsigned long partialFramesLost;
Expand Down Expand Up @@ -2593,21 +2602,6 @@ <h2>
metric is incremented when the complete frame is received.
</p>
</dd>
<dt>
<dfn><code>keyFramesReceived</code></dfn> of type <span class=
"idlMemberType">unsigned long</span>
</dt>
<dd>
<p>
Represents the total number of complete key frames received for this
MediaStreamTrack, such as Infra-frames in VP8 [[RFC6386]] or I-frames in H.264
[[RFC6184]]. This is a subset of <code>framesReceived</code>.
<code>framesReceived - keyFramesReceived</code> gives you the number of delta
frames received. This metric is incremented when the complete key frame is
received. It is not incremented if a partial key frames is received and sent for
decoding, i.e., the frame could not be recovered via retransmission or FEC.
</p>
</dd>
<dt>
<dfn><code>framesDecoded</code></dfn> of type <span class=
"idlMemberType">unsigned long</span>
Expand Down Expand Up @@ -4249,6 +4243,42 @@ <h2>Obsolete RTCInboundRtpStreamStats members</h2>
</dd>
</dl>
</section>

<pre class="idl">partial dictionary RTCVideoSenderStats {
unsigned long keyFramesSent;
};</pre>
<section>
<h2>Obsolete RTCVideoSenderStats members</h2>
<dl data-dfn-for="RTCVideoSenderStats">
<dt>
<dfn><code>keyFramesSent</code></dfn> of
type <span class="idlMemberType">unsigned long</span>
</dt>
<dd>
<p>
This field was replaced by keyFramesEncoded in RTCOutboundRtpStreamStats in June 2019. There were no known implementations supporting the old field at the time of the change.
</p>
</dd>
</dl>
</section>

<pre class="idl">partial dictionary RTCVideoReceiverStats {
unsigned long keyFramesReceived;
};</pre>
<section>
<h2>Obsolete RTCVideoReceiverStats members</h2>
<dl data-dfn-for="RTCVideoReceiverStats">
<dt>
<dfn><code>keyFramesReceived</code></dfn> of
type <span class="idlMemberType">unsigned long</span>
</dt>
<dd>
<p>
This field was replaced by keyFramesDecoded in RTCInboundRtpStreamStats in June 2019. There were no known implementations supporting the old field at the time of the change.
rasmusbrandt marked this conversation as resolved.
Show resolved Hide resolved
</p>
</dd>
</dl>
</section>
</div>
</section>
<section>
Expand Down