Skip to content

Commit

Permalink
Bug 1728357: Implement framesDropped. r=ng,webidl,smaug
Browse files Browse the repository at this point in the history
  • Loading branch information
docfaraday committed Feb 3, 2023
1 parent 70a42c8 commit 00a342a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions dom/media/webrtc/WebrtcGlobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ struct ParamTraits<mozilla::dom::RTCInboundRtpStreamStats> {
WriteParam(aWriter, aParam.mTrackIdentifier);
WriteParam(aWriter, aParam.mRemoteId);
WriteParam(aWriter, aParam.mFramesDecoded);
WriteParam(aWriter, aParam.mFramesDropped);
WriteParam(aWriter, aParam.mFrameWidth);
WriteParam(aWriter, aParam.mFrameHeight);
WriteParam(aWriter, aParam.mFramesPerSecond);
Expand Down Expand Up @@ -336,6 +337,7 @@ struct ParamTraits<mozilla::dom::RTCInboundRtpStreamStats> {
return ReadParam(aReader, &(aResult->mTrackIdentifier)) &&
ReadParam(aReader, &(aResult->mRemoteId)) &&
ReadParam(aReader, &(aResult->mFramesDecoded)) &&
ReadParam(aReader, &(aResult->mFramesDropped)) &&
ReadParam(aReader, &(aResult->mFrameWidth)) &&
ReadParam(aReader, &(aResult->mFrameHeight)) &&
ReadParam(aReader, &(aResult->mFramesPerSecond)) &&
Expand Down
5 changes: 1 addition & 4 deletions dom/media/webrtc/jsapi/RTCRtpReceiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,13 +482,10 @@ nsTArray<RefPtr<RTCStatsPromise>> RTCRtpReceiver::GetStatsInternal(
webrtc::Timestamp::Millis(
*videoStats->estimated_playout_ntp_timestamp_ms)));
}
local.mFramesReceived.Construct(
videoStats->frame_counts.key_frames +
videoStats->frame_counts.delta_frames);
*/
// Not including frames dropped in the rendering pipe, which
// is not of webrtc's concern anyway?!
local.mFramesDropped.Construct(videoStats->frames_dropped);
*/
if (!report->mInboundRtpStreamStats.AppendElement(
std::move(local), fallible)) {
mozalloc_handle_oom(0);
Expand Down
1 change: 1 addition & 0 deletions dom/webidl/RTCStatsReport.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ dictionary RTCInboundRtpStreamStats : RTCReceivedRtpStreamStats {
required DOMString trackIdentifier;
DOMString remoteId;
unsigned long framesDecoded;
unsigned long framesDropped;
unsigned long frameWidth;
unsigned long frameHeight;
double framesPerSecond;
Expand Down

0 comments on commit 00a342a

Please sign in to comment.