Bug 1515379 - Initialize frames delivered stat and add test. r=dminor, a=RyanVM
authorNico Grunbaum <na-g@nostrum.com>
Wed, 19 Dec 2018 17:57:15 +0000
changeset 509171 a1a1e110ab05397bcd68a405a37d9574fec28aaf
parent 509170 31a65adfc1f7e4c2df30b6f94804b852147e374c
child 509172 6e7f4acecc9fa24166718c3bcbd942711569dee9
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdminor, RyanVM
bugs1515379
milestone65.0
Bug 1515379 - Initialize frames delivered stat and add test. r=dminor, a=RyanVM This initializes a one of the stats that lost its default initialization when it was changed from an Atomic to a plain old int. Differential Revision: https://phabricator.services.mozilla.com/D14978
dom/media/tests/mochitest/test_peerConnection_stats.html
media/webrtc/signaling/src/media-conduit/VideoConduit.h
--- a/dom/media/tests/mochitest/test_peerConnection_stats.html
+++ b/dom/media/tests/mochitest/test_peerConnection_stats.html
@@ -389,18 +389,18 @@ var pedanticChecks = report => {
         if (stat.framerateStdDev !== undefined) {
           // TODO: uncomment when Bug 1341533 lands
           // ok(stat.framerateStdDev >= 0 && stat.framerateStdDev < 120,
           //   stat.type + ".framerateStdDev is sane. value="
           //   + stat.framerateStdDev);
         }
 
         // droppedFrames
-        ok(stat.droppedFrames >= 0,
-          stat.type + ".droppedFrames is not negative. value="
+        ok(stat.droppedFrames >= 0 && stat.droppedFrames < 100000,
+          stat.type + ".droppedFrames is a sane number. value="
           + stat.droppedFrames);
 
         // framesEncoded
         ok(stat.framesEncoded >= 0 && stat.framesEncoded < 100000, stat.type
           + ".framesEncoded is a sane number for a short test. value="
           + stat.framesEncoded);
       }
     } else if (stat.type == "candidate-pair") {
--- a/media/webrtc/signaling/src/media-conduit/VideoConduit.h
+++ b/media/webrtc/signaling/src/media-conduit/VideoConduit.h
@@ -361,17 +361,17 @@ class WebrtcVideoConduit
     uint32_t JitterMs() const;
     uint32_t PacketsLost() const;
     uint64_t BytesReceived() const;
     uint32_t PacketsReceived() const;
 
    private:
     uint32_t mDroppedFrames = 0;
     uint32_t mFramesEncoded = 0;
-    int32_t mFramesDeliveredToEncoder;
+    int32_t mFramesDeliveredToEncoder = 0;
 
     bool mSsrcFound = false;
     uint32_t mJitterMs = 0;
     uint32_t mPacketsLost = 0;
     uint64_t mBytesReceived = 0;
     uint32_t mPacketsReceived = 0;
   };