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 458900 c0004cf7d1d1
parent 458899 6540e3aba359
child 458901 5e40a4baa30b
push id35551
push usershindli@mozilla.com
push dateWed, 13 Feb 2019 21:34:09 +0000
treeherdermozilla-central@08f794a4928e [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);