webrtc_m130/modules/rtp_rtcp/source/nack_rtx_unittest.cc

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

296 lines
11 KiB
C++
Raw Normal View History

/*
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <iterator>
#include <list>
#include <memory>
#include <set>
#include "absl/algorithm/container.h"
#include "api/call/transport.h"
#include "api/transport/field_trial_based_config.h"
#include "call/rtp_stream_receiver_controller.h"
#include "call/rtx_receive_stream.h"
#include "modules/rtp_rtcp/include/receive_statistics.h"
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "modules/rtp_rtcp/source/rtp_packet_received.h"
#include "modules/rtp_rtcp/source/rtp_rtcp_impl2.h"
#include "modules/rtp_rtcp/source/rtp_sender_video.h"
#include "rtc_base/rate_limiter.h"
#include "test/gtest.h"
namespace webrtc {
const int kVideoNackListSize = 30;
const uint32_t kTestSsrc = 3456;
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
const uint32_t kTestRtxSsrc = kTestSsrc + 1;
const uint16_t kTestSequenceNumber = 2345;
const uint32_t kTestNumberOfPackets = 1350;
const int kTestNumberOfRtxPackets = 149;
const int kNumFrames = 30;
const int kPayloadType = 123;
const int kRtxPayloadType = 98;
const int64_t kMaxRttMs = 1000;
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
class VerifyingMediaStream : public RtpPacketSinkInterface {
public:
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
VerifyingMediaStream() {}
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
void OnRtpPacket(const RtpPacketReceived& packet) override {
if (!sequence_numbers_.empty())
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
EXPECT_EQ(kTestSsrc, packet.Ssrc());
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
sequence_numbers_.push_back(packet.SequenceNumber());
}
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
std::list<uint16_t> sequence_numbers_;
};
class RtxLoopBackTransport : public webrtc::Transport {
public:
explicit RtxLoopBackTransport(uint32_t rtx_ssrc)
: count_(0),
packet_loss_(0),
consecutive_drop_start_(0),
consecutive_drop_end_(0),
rtx_ssrc_(rtx_ssrc),
count_rtx_ssrc_(0),
module_(NULL) {}
void SetSendModule(RtpRtcpInterface* rtpRtcpModule) {
module_ = rtpRtcpModule;
}
void DropEveryNthPacket(int n) { packet_loss_ = n; }
void DropConsecutivePackets(int start, int total) {
consecutive_drop_start_ = start;
consecutive_drop_end_ = start + total;
packet_loss_ = 0;
}
bool SendRtp(const uint8_t* data,
size_t len,
const PacketOptions& options) override {
count_++;
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
RtpPacketReceived packet;
if (!packet.Parse(data, len))
return false;
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
if (packet.Ssrc() == rtx_ssrc_) {
count_rtx_ssrc_++;
} else {
// For non-RTX packets only.
Changed loopback transport in RtxNackTest to not store sequence numbers for retransmitted packets. The unit test currently works as follows: RtxLoopBackTransport logs the sequence numbers for all sent packets in expected_sequence_numbers_. Since the transport is configured to drop some of the packets there will be requests for retransmissions and the RTX sequence numbers will also be stored in the same list. The (non-rtx) packets are received by VerifyingRtxReceiver which also stores the sequence numbers in a list sequence_numbers_. Both lists are then sorted and sequence_numbers_ is compared to whatever is in the start of expected_sequence_numbers_. This works assuming that the RTX sequence numbers are greater than the regular RTP sequence numbers. In the RTP sender, both RTP and RTX are set to start at "random" 15-bit sequence numbers. The RTP sequence number is then changed to 2345 in the unit test, which would imply that the RTX sequence number is lower than the ones for RTP with probability ~1%. The reason why the test works anyway is that the test sets up a fake clock, which is used to initialize the random number generator in RTPSender, and the fixed starting point for the clock happens to result in RTX sequence numbers greater than 2345. However, any change to the initialization of the sequence numbers, the seeding of the PRNG or the fake clock causes a test failure with probability ~1%. The new code omits the RTX sequence numbers from expected_sequence_numbers_, thus avoiding the problem with low RTX sequence numbers. The initialization of the sequence numbers in RTPSender is also bad, but I'll fix that in another CL. Review URL: https://codereview.webrtc.org/1263383002 Cr-Commit-Position: refs/heads/master@{#9967}
2015-09-17 03:19:45 -07:00
expected_sequence_numbers_.insert(expected_sequence_numbers_.end(),
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
packet.SequenceNumber());
Changed loopback transport in RtxNackTest to not store sequence numbers for retransmitted packets. The unit test currently works as follows: RtxLoopBackTransport logs the sequence numbers for all sent packets in expected_sequence_numbers_. Since the transport is configured to drop some of the packets there will be requests for retransmissions and the RTX sequence numbers will also be stored in the same list. The (non-rtx) packets are received by VerifyingRtxReceiver which also stores the sequence numbers in a list sequence_numbers_. Both lists are then sorted and sequence_numbers_ is compared to whatever is in the start of expected_sequence_numbers_. This works assuming that the RTX sequence numbers are greater than the regular RTP sequence numbers. In the RTP sender, both RTP and RTX are set to start at "random" 15-bit sequence numbers. The RTP sequence number is then changed to 2345 in the unit test, which would imply that the RTX sequence number is lower than the ones for RTP with probability ~1%. The reason why the test works anyway is that the test sets up a fake clock, which is used to initialize the random number generator in RTPSender, and the fixed starting point for the clock happens to result in RTX sequence numbers greater than 2345. However, any change to the initialization of the sequence numbers, the seeding of the PRNG or the fake clock causes a test failure with probability ~1%. The new code omits the RTX sequence numbers from expected_sequence_numbers_, thus avoiding the problem with low RTX sequence numbers. The initialization of the sequence numbers in RTPSender is also bad, but I'll fix that in another CL. Review URL: https://codereview.webrtc.org/1263383002 Cr-Commit-Position: refs/heads/master@{#9967}
2015-09-17 03:19:45 -07:00
}
if (packet_loss_ > 0) {
if ((count_ % packet_loss_) == 0) {
return true;
Changed loopback transport in RtxNackTest to not store sequence numbers for retransmitted packets. The unit test currently works as follows: RtxLoopBackTransport logs the sequence numbers for all sent packets in expected_sequence_numbers_. Since the transport is configured to drop some of the packets there will be requests for retransmissions and the RTX sequence numbers will also be stored in the same list. The (non-rtx) packets are received by VerifyingRtxReceiver which also stores the sequence numbers in a list sequence_numbers_. Both lists are then sorted and sequence_numbers_ is compared to whatever is in the start of expected_sequence_numbers_. This works assuming that the RTX sequence numbers are greater than the regular RTP sequence numbers. In the RTP sender, both RTP and RTX are set to start at "random" 15-bit sequence numbers. The RTP sequence number is then changed to 2345 in the unit test, which would imply that the RTX sequence number is lower than the ones for RTP with probability ~1%. The reason why the test works anyway is that the test sets up a fake clock, which is used to initialize the random number generator in RTPSender, and the fixed starting point for the clock happens to result in RTX sequence numbers greater than 2345. However, any change to the initialization of the sequence numbers, the seeding of the PRNG or the fake clock causes a test failure with probability ~1%. The new code omits the RTX sequence numbers from expected_sequence_numbers_, thus avoiding the problem with low RTX sequence numbers. The initialization of the sequence numbers in RTPSender is also bad, but I'll fix that in another CL. Review URL: https://codereview.webrtc.org/1263383002 Cr-Commit-Position: refs/heads/master@{#9967}
2015-09-17 03:19:45 -07:00
}
} else if (count_ >= consecutive_drop_start_ &&
count_ < consecutive_drop_end_) {
return true;
Changed loopback transport in RtxNackTest to not store sequence numbers for retransmitted packets. The unit test currently works as follows: RtxLoopBackTransport logs the sequence numbers for all sent packets in expected_sequence_numbers_. Since the transport is configured to drop some of the packets there will be requests for retransmissions and the RTX sequence numbers will also be stored in the same list. The (non-rtx) packets are received by VerifyingRtxReceiver which also stores the sequence numbers in a list sequence_numbers_. Both lists are then sorted and sequence_numbers_ is compared to whatever is in the start of expected_sequence_numbers_. This works assuming that the RTX sequence numbers are greater than the regular RTP sequence numbers. In the RTP sender, both RTP and RTX are set to start at "random" 15-bit sequence numbers. The RTP sequence number is then changed to 2345 in the unit test, which would imply that the RTX sequence number is lower than the ones for RTP with probability ~1%. The reason why the test works anyway is that the test sets up a fake clock, which is used to initialize the random number generator in RTPSender, and the fixed starting point for the clock happens to result in RTX sequence numbers greater than 2345. However, any change to the initialization of the sequence numbers, the seeding of the PRNG or the fake clock causes a test failure with probability ~1%. The new code omits the RTX sequence numbers from expected_sequence_numbers_, thus avoiding the problem with low RTX sequence numbers. The initialization of the sequence numbers in RTPSender is also bad, but I'll fix that in another CL. Review URL: https://codereview.webrtc.org/1263383002 Cr-Commit-Position: refs/heads/master@{#9967}
2015-09-17 03:19:45 -07:00
}
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
EXPECT_TRUE(stream_receiver_controller_.OnRtpPacket(packet));
return true;
}
bool SendRtcp(const uint8_t* data, size_t len) override {
module_->IncomingRtcpPacket((const uint8_t*)data, len);
return true;
}
int count_;
int packet_loss_;
int consecutive_drop_start_;
int consecutive_drop_end_;
uint32_t rtx_ssrc_;
int count_rtx_ssrc_;
RtpRtcpInterface* module_;
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
RtpStreamReceiverController stream_receiver_controller_;
std::set<uint16_t> expected_sequence_numbers_;
};
class RtpRtcpRtxNackTest : public ::testing::Test {
protected:
RtpRtcpRtxNackTest()
Reland of move RTPPayloadStrategy and simplify RTPPayloadRegistry (patchset #1 id:1 of https://codereview.webrtc.org/2528993002/ ) Reason for revert: Downstream code has been updated. Original issue's description: > Revert of Remove RTPPayloadStrategy and simplify RTPPayloadRegistry (patchset #7 id:240001 of https://codereview.webrtc.org/2524923002/ ) > > Reason for revert: > Breaks downstream projects. > > Original issue's description: > > Remove RTPPayloadStrategy and simplify RTPPayloadRegistry > > > > This CL removes RTPPayloadStrategy that is currently used to handle > > audio/video specific aspects of payload handling. Instead, the audio and > > video specific aspects will now have different functions, with linear > > code flow. > > > > This CL does not contain any functional changes, and is just a > > preparation for future CL:s. > > > > The main purpose with this CL is to add this function: > > bool PayloadIsCompatible(const RtpUtility::Payload& payload, > > const webrtc::VideoCodec& video_codec); > > that can easily be extended in a future CL to look at video codec > > specific information. > > > > BUG=webrtc:6743 > > > > Committed: https://crrev.com/b881254dc86d2cc80a52e08155433458be002166 > > Cr-Commit-Position: refs/heads/master@{#15232} > > TBR=danilchap@webrtc.org,solenberg@webrtc.org,mflodman@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:6743 > > Committed: https://crrev.com/33c81d05613f45f65ee17224ed381c6cdd1c6c6f > Cr-Commit-Position: refs/heads/master@{#15234} TBR=danilchap@webrtc.org,solenberg@webrtc.org,mflodman@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=webrtc:6743 Review-Url: https://codereview.webrtc.org/2531043002 Cr-Commit-Position: refs/heads/master@{#15245}
2016-11-25 06:40:25 -08:00
: rtp_rtcp_module_(nullptr),
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
transport_(kTestRtxSsrc),
rtx_stream_(&media_stream_, rtx_associated_payload_types_, kTestSsrc),
fake_clock(123456),
retransmission_rate_limiter_(&fake_clock, kMaxRttMs) {}
Reland "Enable and fix chromium clang warnings in rtp_rtcp test targets" This reverts commit 01aa210fad68f1006528d32d388b307c22990734. Reason for revert: downstream project adjusted Original change's description: > Revert "Enable and fix chromium clang warnings in rtp_rtcp test targets" > > This reverts commit 9486b117daac09c9f7ac8450ccda835938cf3150. > > Reason for revert: Breaks downstream project > > Original change's description: > > Enable and fix chromium clang warnings in rtp_rtcp test targets > > > > Bug: webrtc:163 > > Change-Id: I4ed3e63296d8bf06536a83196d597c7a906ba11c > > Reviewed-on: https://webrtc-review.googlesource.com/60802 > > Reviewed-by: Björn Terelius <terelius@webrtc.org> > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > > Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#22357} > > TBR=danilchap@webrtc.org,phoglund@webrtc.org,terelius@webrtc.org > > Change-Id: I2c3777ea9f26813bdb395e7fd68f6b49443586ea > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: webrtc:163 > Reviewed-on: https://webrtc-review.googlesource.com/61060 > Reviewed-by: Oleh Prypin <oprypin@webrtc.org> > Commit-Queue: Oleh Prypin <oprypin@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#22365} TBR=danilchap@webrtc.org,phoglund@webrtc.org,oprypin@webrtc.org,terelius@webrtc.org Change-Id: I0b4cb6d05b37caeb52cca9abf95417ad3ad6f76b No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:163 Reviewed-on: https://webrtc-review.googlesource.com/61080 Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22368}
2018-03-09 15:37:03 +00:00
~RtpRtcpRtxNackTest() override {}
void SetUp() override {
RtpRtcpInterface::Configuration configuration;
configuration.audio = false;
configuration.clock = &fake_clock;
receive_statistics_ = ReceiveStatistics::Create(&fake_clock);
configuration.receive_statistics = receive_statistics_.get();
configuration.outgoing_transport = &transport_;
configuration.retransmission_rate_limiter = &retransmission_rate_limiter_;
configuration.local_media_ssrc = kTestSsrc;
configuration.rtx_send_ssrc = kTestRtxSsrc;
Revert "Add task queue to RtpRtcpInterface::Configuration." This reverts commit f23e2144e86400e2d68097345d4b3dc7a4b7f8a4. Reason for revert: Need further discussion on appropriate thread/tq requirements. Original change's description: > Add task queue to RtpRtcpInterface::Configuration. > > Let ModuleRtpRtcpImpl2 use the configured value instead of > TaskQueueBase::Current(). > > Intention is to allow construction of RtpRtcpImpl2 on any thread. > If a task queue is provided (required for periodic rtt updates), the > destruction of the object must be done on that same task queue. > > Also, delete ModuleRtpRtcpImpl2::Create, callers updated to use std::make_unique. > > Bug: None > Change-Id: I412b7b1e1ce24722ffd23d16aa6c48a7214c9bcd > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/199968 > Reviewed-by: Sebastian Jansson <srte@webrtc.org> > Reviewed-by: Sam Zackrisson <saza@webrtc.org> > Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> > Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> > Commit-Queue: Niels Moller <nisse@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#32949} TBR=danilchap@webrtc.org,ilnik@webrtc.org,saza@webrtc.org,nisse@webrtc.org,srte@webrtc.org Change-Id: I7e5007f524a39a6552973ec9744cd04c13162432 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: None Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201420 Reviewed-by: Niels Moller <nisse@webrtc.org> Reviewed-by: Sam Zackrisson <saza@webrtc.org> Reviewed-by: Tommi <tommi@webrtc.org> Commit-Queue: Tommi <tommi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32953}
2021-01-12 15:54:16 +00:00
rtp_rtcp_module_ = ModuleRtpRtcpImpl2::Create(configuration);
FieldTrialBasedConfig field_trials;
RTPSenderVideo::Config video_config;
video_config.clock = &fake_clock;
video_config.rtp_sender = rtp_rtcp_module_->RtpSender();
video_config.field_trials = &field_trials;
rtp_sender_video_ = std::make_unique<RTPSenderVideo>(video_config);
rtp_rtcp_module_->SetRTCPStatus(RtcpMode::kCompound);
rtp_rtcp_module_->SetStorePacketsStatus(true, 600);
EXPECT_EQ(0, rtp_rtcp_module_->SetSendingStatus(true));
rtp_rtcp_module_->SetSequenceNumber(kTestSequenceNumber);
rtp_rtcp_module_->SetStartTimestamp(111111);
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
// Used for NACK processing.
// TODO(nisse): Unclear on which side? It's confusing to use a
// single rtp_rtcp module for both send and receive side.
rtp_rtcp_module_->SetRemoteSSRC(kTestSsrc);
rtp_rtcp_module_->SetRtxSendPayloadType(kRtxPayloadType, kPayloadType);
transport_.SetSendModule(rtp_rtcp_module_.get());
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
media_receiver_ = transport_.stream_receiver_controller_.CreateReceiver(
kTestSsrc, &media_stream_);
for (size_t n = 0; n < sizeof(payload_data); n++) {
payload_data[n] = n % 10;
}
}
int BuildNackList(uint16_t* nack_list) {
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
media_stream_.sequence_numbers_.sort();
std::list<uint16_t> missing_sequence_numbers;
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
std::list<uint16_t>::iterator it = media_stream_.sequence_numbers_.begin();
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
while (it != media_stream_.sequence_numbers_.end()) {
uint16_t sequence_number_1 = *it;
++it;
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
if (it != media_stream_.sequence_numbers_.end()) {
uint16_t sequence_number_2 = *it;
// Add all missing sequence numbers to list
for (uint16_t i = sequence_number_1 + 1; i < sequence_number_2; ++i) {
missing_sequence_numbers.push_back(i);
}
}
}
int n = 0;
for (it = missing_sequence_numbers.begin();
it != missing_sequence_numbers.end(); ++it) {
nack_list[n++] = (*it);
}
return n;
}
bool ExpectedPacketsReceived() {
std::list<uint16_t> received_sorted;
absl::c_copy(media_stream_.sequence_numbers_,
std::back_inserter(received_sorted));
received_sorted.sort();
return absl::c_equal(received_sorted,
transport_.expected_sequence_numbers_);
}
void RunRtxTest(RtxMode rtx_method, int loss) {
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
rtx_receiver_ = transport_.stream_receiver_controller_.CreateReceiver(
kTestRtxSsrc, &rtx_stream_);
rtp_rtcp_module_->SetRtxSendStatus(rtx_method);
transport_.DropEveryNthPacket(loss);
uint32_t timestamp = 3000;
uint16_t nack_list[kVideoNackListSize];
for (int frame = 0; frame < kNumFrames; ++frame) {
RTPVideoHeader video_header;
EXPECT_TRUE(rtp_rtcp_module_->OnSendingRtpFrame(timestamp, timestamp / 90,
kPayloadType, false));
video_header.frame_type = VideoFrameType::kVideoFrameDelta;
EXPECT_TRUE(rtp_sender_video_->SendVideo(
kPayloadType, VideoCodecType::kVideoCodecGeneric, timestamp,
timestamp / 90, payload_data, video_header, 0));
// Min required delay until retransmit = 5 + RTT ms (RTT = 0).
fake_clock.AdvanceTimeMilliseconds(5);
int length = BuildNackList(nack_list);
if (length > 0)
rtp_rtcp_module_->SendNACK(nack_list, length);
fake_clock.AdvanceTimeMilliseconds(28); // 33ms - 5ms delay.
rtp_rtcp_module_->Process();
// Prepare next frame.
timestamp += 3000;
}
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
media_stream_.sequence_numbers_.sort();
}
std::unique_ptr<ReceiveStatistics> receive_statistics_;
std::unique_ptr<ModuleRtpRtcpImpl2> rtp_rtcp_module_;
std::unique_ptr<RTPSenderVideo> rtp_sender_video_;
RtxLoopBackTransport transport_;
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
const std::map<int, int> rtx_associated_payload_types_ = {
{kRtxPayloadType, kPayloadType}};
VerifyingMediaStream media_stream_;
RtxReceiveStream rtx_stream_;
uint8_t payload_data[65000];
SimulatedClock fake_clock;
RateLimiter retransmission_rate_limiter_;
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
std::unique_ptr<RtpStreamReceiverInterface> media_receiver_;
std::unique_ptr<RtpStreamReceiverInterface> rtx_receiver_;
};
TEST_F(RtpRtcpRtxNackTest, LongNackList) {
const int kNumPacketsToDrop = 900;
const int kNumRequiredRtcp = 4;
uint32_t timestamp = 3000;
uint16_t nack_list[kNumPacketsToDrop];
// Disable StorePackets to be able to set a larger packet history.
rtp_rtcp_module_->SetStorePacketsStatus(false, 0);
// Enable StorePackets with a packet history of 2000 packets.
rtp_rtcp_module_->SetStorePacketsStatus(true, 2000);
// Drop 900 packets from the second one so that we get a NACK list which is
// big enough to require 4 RTCP packets to be fully transmitted to the sender.
transport_.DropConsecutivePackets(2, kNumPacketsToDrop);
// Send 30 frames which at the default size is roughly what we need to get
// enough packets.
for (int frame = 0; frame < kNumFrames; ++frame) {
RTPVideoHeader video_header;
EXPECT_TRUE(rtp_rtcp_module_->OnSendingRtpFrame(timestamp, timestamp / 90,
kPayloadType, false));
video_header.frame_type = VideoFrameType::kVideoFrameDelta;
EXPECT_TRUE(rtp_sender_video_->SendVideo(
kPayloadType, VideoCodecType::kVideoCodecGeneric, timestamp,
timestamp / 90, payload_data, video_header, 0));
// Prepare next frame.
timestamp += 3000;
fake_clock.AdvanceTimeMilliseconds(33);
rtp_rtcp_module_->Process();
}
EXPECT_FALSE(transport_.expected_sequence_numbers_.empty());
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
EXPECT_FALSE(media_stream_.sequence_numbers_.empty());
size_t last_receive_count = media_stream_.sequence_numbers_.size();
int length = BuildNackList(nack_list);
for (int i = 0; i < kNumRequiredRtcp - 1; ++i) {
rtp_rtcp_module_->SendNACK(nack_list, length);
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
EXPECT_GT(media_stream_.sequence_numbers_.size(), last_receive_count);
last_receive_count = media_stream_.sequence_numbers_.size();
EXPECT_FALSE(ExpectedPacketsReceived());
}
rtp_rtcp_module_->SendNACK(nack_list, length);
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
EXPECT_GT(media_stream_.sequence_numbers_.size(), last_receive_count);
EXPECT_TRUE(ExpectedPacketsReceived());
}
TEST_F(RtpRtcpRtxNackTest, RtxNack) {
RunRtxTest(kRtxRetransmitted, 10);
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
EXPECT_EQ(kTestSequenceNumber, *(media_stream_.sequence_numbers_.begin()));
EXPECT_EQ(kTestSequenceNumber + kTestNumberOfPackets - 1,
Reland of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #1 id:1 of https://codereview.webrtc.org/3011093002/ ) Reason for revert: The cl this change depended on has now been successfully relanded. Original issue's description: > Revert of Delete Rtx-related methods from RTPPayloadRegistry. (patchset #3 id:40001 of https://codereview.webrtc.org/3006993002/ ) > > Reason for revert: > This has to be reverted to enable reverting cl https://codereview.webrtc.org/3006063002/, which seems to have broken ulpfec. > > Original issue's description: > > Delete Rtx-related methods from RTPPayloadRegistry. > > > > Delete methods IsRtx, IsEncapsulated and RestoreOriginalPacket. > > > > BUG=webrtc:7135 > > > > Review-Url: https://codereview.webrtc.org/3006993002 > > Cr-Commit-Position: refs/heads/master@{#19739} > > Committed: https://chromium.googlesource.com/external/webrtc/+/5b4b52264132eefba10bc6880871715f9692da90 > > TBR=stefan@webrtc.org,danilchap@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7135 > > Review-Url: https://codereview.webrtc.org/3011093002 > Cr-Commit-Position: refs/heads/master@{#19742} > Committed: https://chromium.googlesource.com/external/webrtc/+/a64685325c2f8f51873b67ae8a91f94ffb19d70b TBR=stefan@webrtc.org,danilchap@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:7135 Review-Url: https://codereview.webrtc.org/3012253002 Cr-Commit-Position: refs/heads/master@{#19821}
2017-09-13 07:13:57 -07:00
*(media_stream_.sequence_numbers_.rbegin()));
EXPECT_EQ(kTestNumberOfPackets, media_stream_.sequence_numbers_.size());
EXPECT_EQ(kTestNumberOfRtxPackets, transport_.count_rtx_ssrc_);
EXPECT_TRUE(ExpectedPacketsReceived());
}
} // namespace webrtc