Bug 1330318: Fix droppedFrames statistic in webrtc, and improve debugs r=pehrsons
authorRandell Jesup <rjesup@jesup.org>
Wed, 18 Jan 2017 08:47:39 -0500
changeset 377225 ac80b556e979b8d0ed5d664801c7d5f692be36f0
parent 377224 f94d334ae5a926a7eb28755f0619b902fd7801b0
child 377226 706512864869a1652db3538f82f037e7da782b18
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspehrsons
bugs1330318
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1330318: Fix droppedFrames statistic in webrtc, and improve debugs r=pehrsons
media/webrtc/signaling/src/media-conduit/VideoConduit.cpp
--- a/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp
+++ b/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp
@@ -115,22 +115,24 @@ WebrtcVideoConduit::SendStreamStatistics
 {
       aOutDroppedFrames = mDroppedFrames;
 };
 
 void
 WebrtcVideoConduit::SendStreamStatistics::Update(
   const webrtc::VideoSendStream::Stats& aStats)
 {
-  CSFLogVerbose(logTag, "SendStreamStatistics::Update %s", __FUNCTION__);
   StreamStatistics::Update(aStats.encode_frame_rate, aStats.media_bitrate_bps);
   if (!aStats.substreams.empty()) {
     const webrtc::FrameCounts& fc =
       aStats.substreams.begin()->second.frame_counts;
-    mDroppedFrames = mSentFrames - fc.key_frames + fc.delta_frames;
+    CSFLogVerbose(logTag, "%s: framerate: %u, bitrate: %u, dropped frames delta: %u",
+                  __FUNCTION__, aStats.encode_frame_rate, aStats.media_bitrate_bps,
+                  (mSentFrames - (fc.key_frames + fc.delta_frames)) - mDroppedFrames);
+    mDroppedFrames = mSentFrames - (fc.key_frames + fc.delta_frames);
   } else {
     CSFLogVerbose(logTag, "%s aStats.substreams is empty", __FUNCTION__);
   }
 };
 
 void
 WebrtcVideoConduit::ReceiveStreamStatistics::DiscardedPackets(
   uint32_t& aOutDiscPackets) const