From 729ec22dc552ec13b9b3aebd4f128e1c56d3fd2e Mon Sep 17 00:00:00 2001 From: Randell Jesup Date: Thu, 16 Feb 2017 15:37:03 -0500 Subject: [PATCH] Bug 1301286: At least in the webrtc49 update, 100Kbps isn't enough for simulcast tests r=abr MozReview-Commit-ID: kQHNnr7rAg --- .../tests/mochitest/test_peerConnection_simulcastOffer.html | 5 ++++- media/webrtc/signaling/src/media-conduit/VideoConduit.cpp | 6 ++++++ .../trunk/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dom/media/tests/mochitest/test_peerConnection_simulcastOffer.html b/dom/media/tests/mochitest/test_peerConnection_simulcastOffer.html index 1f9c4335ee6a..1c00cba0121c 100644 --- a/dom/media/tests/mochitest/test_peerConnection_simulcastOffer.html +++ b/dom/media/tests/mochitest/test_peerConnection_simulcastOffer.html @@ -26,7 +26,10 @@ runNetworkTest(() => pushPrefs(['media.peerconnection.simulcast', true], - ['media.peerconnection.video.min_bitrate_estimate', 100*1000]).then(() => { + // 180Kbps was determined empirically, set well-higher than + // the 80Kbps+overhead needed for the two simulcast streams. + // 100Kbps was apparently too low. + ['media.peerconnection.video.min_bitrate_estimate', 180*1000]).then(() => { SimpleTest.requestCompleteLog(); var helper; diff --git a/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp b/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp index 5d2e9e9c4049..2b9b70ee7881 100755 --- a/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp +++ b/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp @@ -1858,6 +1858,12 @@ WebrtcVideoConduit::SendRtp(const uint8_t* packet, size_t length, // extension for TransportSequenceNumber is being used, which we don't. CSFLogDebug(logTag, "%s : len %lu", __FUNCTION__, (unsigned long)length); + { static int x = 0; + if (++x % 150 == 0) { + CSFLogDebug(logTag, "%s Faking packet loss, seq %d ", __FUNCTION__, + ntohs(*((uint16_t*)&packet[2]))); + return true; + } ReentrantMonitorAutoEnter enter(mTransportMonitor); if (!mTransmitterTransport || NS_FAILED(mTransmitterTransport->SendRtpPacket(packet, length))) diff --git a/media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc b/media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc index 8684a429aff2..c98321bfc98c 100644 --- a/media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc +++ b/media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc @@ -727,6 +727,8 @@ rtc::scoped_ptr RTCPSender::BuildNACK( packet_type_counter_.nack_requests = nack_stats_.requests(); packet_type_counter_.unique_nack_requests = nack_stats_.unique_requests(); + LOG(LS_ERROR) << "RTPSender: Sending Nack: " << stringBuilder.GetResult().c_str(); + TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"), "RTCPSender::NACK", "nacks", TRACE_STR_COPY(stringBuilder.GetResult().c_str()));