Bug 1527526 - AudioConduit is reporting send instead of recv RTP stats r=dminor
authorNico Grunbaum <na-g@nostrum.com>
Wed, 13 Feb 2019 12:35:11 +0000
changeset 458917 c0004cf7d1d188519e14cb9ee4d4e7744a337bc7
parent 458916 6540e3aba359d2bac8b53aaf2e84045a3d3f949a
child 458918 5e40a4baa30b6d2623c9a4186c52c791a58d0fbf
push id78102
push userna-g@nostrum.com
push dateWed, 13 Feb 2019 15:32:15 +0000
treeherderautoland@c0004cf7d1d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdminor
bugs1527526
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 1527526 - AudioConduit is reporting send instead of recv RTP stats r=dminor AudioConduit is reporting send instead of recv RTP stats Differential Revision: https://phabricator.services.mozilla.com/D19607
media/webrtc/signaling/src/media-conduit/AudioConduit.cpp
--- a/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp
+++ b/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp
@@ -174,17 +174,23 @@ bool WebrtcAudioConduit::GetRecvPacketTy
   return mRecvChannelProxy->GetRTCPPacketTypeCounters(*aPacketCounts);
 }
 
 bool WebrtcAudioConduit::GetRTPStats(unsigned int* jitterMs,
                                      unsigned int* cumulativeLost) {
   ASSERT_ON_THREAD(mStsThread);
   *jitterMs = 0;
   *cumulativeLost = 0;
-  return !mSendChannelProxy->GetRTPStatistics(*jitterMs, *cumulativeLost);
+  if (!mRecvStream) {
+    return false;
+  }
+  auto stats = mRecvStream->GetStats();
+  *jitterMs = stats.jitter_ms;
+  *cumulativeLost = stats.packets_lost;
+  return true;
 }
 
 bool WebrtcAudioConduit::GetRTCPReceiverReport(uint32_t* jitterMs,
                                                uint32_t* packetsReceived,
                                                uint64_t* bytesReceived,
                                                uint32_t* cumulativeLost,
                                                int32_t* rttMs) {
   ASSERT_ON_THREAD(mStsThread);