Bug 1521879 - Part 5: Update IPC serialize/deserialize code for RTP stream stats to match what is in the dictionaries. r=ng
authorByron Campen [:bwc] <docfaraday@gmail.com>
Mon, 25 Feb 2019 21:51:48 +0000
changeset 518885 5c091f2ad086fbe0baf1a8cb6e13754ced45e387
parent 518884 9ab737c1a29a9fd4f043069c22413fc4f7c977e8
child 518886 259d00c5c42b830a5983ee65acfa9cc9c04fe6c5
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersng
bugs1521879
milestone67.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 1521879 - Part 5: Update IPC serialize/deserialize code for RTP stream stats to match what is in the dictionaries. r=ng Differential Revision: https://phabricator.services.mozilla.com/D17278
dom/media/webrtc/WebrtcGlobal.h
--- a/dom/media/webrtc/WebrtcGlobal.h
+++ b/dom/media/webrtc/WebrtcGlobal.h
@@ -296,39 +296,47 @@ struct ParamTraits<mozilla::dom::RTCIceC
   }
 };
 
 static void WriteRTCRtpStreamStats(
     Message* aMsg, const mozilla::dom::RTCRtpStreamStats& aParam) {
   WriteParam(aMsg, aParam.mBitrateMean);
   WriteParam(aMsg, aParam.mBitrateStdDev);
   WriteParam(aMsg, aParam.mCodecId);
+  WriteParam(aMsg, aParam.mFirCount);
   WriteParam(aMsg, aParam.mFramerateMean);
   WriteParam(aMsg, aParam.mFramerateStdDev);
+  WriteParam(aMsg, aParam.mKind);
+  WriteParam(aMsg, aParam.mLocalId);
   WriteParam(aMsg, aParam.mMediaTrackId);
   WriteParam(aMsg, aParam.mMediaType);
-  WriteParam(aMsg, aParam.mKind);
+  WriteParam(aMsg, aParam.mNackCount);
+  WriteParam(aMsg, aParam.mPliCount);
+  WriteParam(aMsg, aParam.mQpSum);
   WriteParam(aMsg, aParam.mRemoteId);
-  WriteParam(aMsg, aParam.mLocalId);
   WriteParam(aMsg, aParam.mSsrc);
   WriteParam(aMsg, aParam.mTransportId);
 }
 
 static bool ReadRTCRtpStreamStats(const Message* aMsg, PickleIterator* aIter,
                                   mozilla::dom::RTCRtpStreamStats* aResult) {
   if (!ReadParam(aMsg, aIter, &(aResult->mBitrateMean)) ||
       !ReadParam(aMsg, aIter, &(aResult->mBitrateStdDev)) ||
       !ReadParam(aMsg, aIter, &(aResult->mCodecId)) ||
+      !ReadParam(aMsg, aIter, &(aResult->mFirCount)) ||
       !ReadParam(aMsg, aIter, &(aResult->mFramerateMean)) ||
       !ReadParam(aMsg, aIter, &(aResult->mFramerateStdDev)) ||
+      !ReadParam(aMsg, aIter, &(aResult->mKind)) ||
+      !ReadParam(aMsg, aIter, &(aResult->mLocalId)) ||
       !ReadParam(aMsg, aIter, &(aResult->mMediaTrackId)) ||
       !ReadParam(aMsg, aIter, &(aResult->mMediaType)) ||
-      !ReadParam(aMsg, aIter, &(aResult->mKind)) ||
+      !ReadParam(aMsg, aIter, &(aResult->mNackCount)) ||
+      !ReadParam(aMsg, aIter, &(aResult->mPliCount)) ||
+      !ReadParam(aMsg, aIter, &(aResult->mQpSum)) ||
       !ReadParam(aMsg, aIter, &(aResult->mRemoteId)) ||
-      !ReadParam(aMsg, aIter, &(aResult->mLocalId)) ||
       !ReadParam(aMsg, aIter, &(aResult->mSsrc)) ||
       !ReadParam(aMsg, aIter, &(aResult->mTransportId))) {
     return false;
   }
 
   return true;
 }
 
@@ -336,68 +344,62 @@ template <>
 struct ParamTraits<mozilla::dom::RTCInboundRTPStreamStats> {
   typedef mozilla::dom::RTCInboundRTPStreamStats paramType;
 
   static void Write(Message* aMsg, const paramType& aParam) {
     WriteParam(aMsg, aParam.mBytesReceived);
     WriteParam(aMsg, aParam.mDiscardedPackets);
     WriteParam(aMsg, aParam.mFramesDecoded);
     WriteParam(aMsg, aParam.mJitter);
-    WriteParam(aMsg, aParam.mRoundTripTime);
     WriteParam(aMsg, aParam.mPacketsLost);
     WriteParam(aMsg, aParam.mPacketsReceived);
+    WriteParam(aMsg, aParam.mRoundTripTime);
     WriteRTCRtpStreamStats(aMsg, aParam);
     WriteRTCStats(aMsg, aParam);
   }
 
   static bool Read(const Message* aMsg, PickleIterator* aIter,
                    paramType* aResult) {
     if (!ReadParam(aMsg, aIter, &(aResult->mBytesReceived)) ||
         !ReadParam(aMsg, aIter, &(aResult->mDiscardedPackets)) ||
         !ReadParam(aMsg, aIter, &(aResult->mFramesDecoded)) ||
         !ReadParam(aMsg, aIter, &(aResult->mJitter)) ||
-        !ReadParam(aMsg, aIter, &(aResult->mRoundTripTime)) ||
         !ReadParam(aMsg, aIter, &(aResult->mPacketsLost)) ||
         !ReadParam(aMsg, aIter, &(aResult->mPacketsReceived)) ||
+        !ReadParam(aMsg, aIter, &(aResult->mRoundTripTime)) ||
         !ReadRTCRtpStreamStats(aMsg, aIter, aResult) ||
         !ReadRTCStats(aMsg, aIter, aResult)) {
       return false;
     }
 
     return true;
   }
 };
 
 template <>
 struct ParamTraits<mozilla::dom::RTCOutboundRTPStreamStats> {
   typedef mozilla::dom::RTCOutboundRTPStreamStats paramType;
 
   static void Write(Message* aMsg, const paramType& aParam) {
     WriteParam(aMsg, aParam.mBytesSent);
     WriteParam(aMsg, aParam.mDroppedFrames);
+    WriteParam(aMsg, aParam.mFramesEncoded);
     WriteParam(aMsg, aParam.mPacketsSent);
     WriteParam(aMsg, aParam.mTargetBitrate);
-    WriteParam(aMsg, aParam.mFramesEncoded);
-    WriteParam(aMsg, aParam.mFirCount);
-    WriteParam(aMsg, aParam.mNackCount);
-    WriteParam(aMsg, aParam.mPliCount);
     WriteRTCRtpStreamStats(aMsg, aParam);
     WriteRTCStats(aMsg, aParam);
   }
 
   static bool Read(const Message* aMsg, PickleIterator* aIter,
                    paramType* aResult) {
     if (!ReadParam(aMsg, aIter, &(aResult->mBytesSent)) ||
         !ReadParam(aMsg, aIter, &(aResult->mDroppedFrames)) ||
+        !ReadParam(aMsg, aIter, &(aResult->mFramesEncoded)) ||
         !ReadParam(aMsg, aIter, &(aResult->mPacketsSent)) ||
         !ReadParam(aMsg, aIter, &(aResult->mTargetBitrate)) ||
-        !ReadParam(aMsg, aIter, &(aResult->mFramesEncoded)) ||
-        !ReadParam(aMsg, aIter, &(aResult->mFirCount)) ||
-        !ReadParam(aMsg, aIter, &(aResult->mNackCount)) ||
-        !ReadParam(aMsg, aIter, &(aResult->mPliCount)) ||
         !ReadRTCRtpStreamStats(aMsg, aIter, aResult) ||
         !ReadRTCStats(aMsg, aIter, aResult)) {
       return false;
     }
 
     return true;
   }
 };