Revert "Remove stopped transceivers at both local and remote SetDescription"

This reverts commit 6f4de80ddddcc05beaced31146ffb753258bc7be.

Reason for revert: Causes breakage in WebRTC roll (WPT tests)

Original change's description:
> Remove stopped transceivers at both local and remote SetDescription
> 
> This should ensure that the correct number of senders and receivers
> are shown.
> 
> Bug: webtc:11840
> Change-Id: Id57f8f9b1ceb8900abb3f92bcae79e5f0341de15
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184606
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32158}

TBR=hbos@webrtc.org,hta@webrtc.org

Change-Id: Ib91d59f506087dd96c5678262bac7c1580736dcf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webtc:11840
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185053
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32166}
This commit is contained in:
Harald Alvestrand
2020-09-22 21:06:05 +00:00
committed by Commit Bot
parent 10f6eadd48
commit c253cb84aa
5 changed files with 51 additions and 82 deletions

View File

@ -1555,24 +1555,6 @@ TEST_F(PeerConnectionRtpTestUnifiedPlan,
ASSERT_TRUE(caller->ExchangeOfferAnswerWith(callee.get()));
}
TEST_F(PeerConnectionRtpTestUnifiedPlan,
StopAndNegotiateCausesTransceiverToDisappear) {
auto caller = CreatePeerConnection();
auto callee = CreatePeerConnection();
auto transceiver = caller->AddTransceiver(cricket::MEDIA_TYPE_AUDIO);
ASSERT_TRUE(caller->ExchangeOfferAnswerWith(callee.get()));
callee->pc()->GetTransceivers()[0]->StopStandard();
ASSERT_TRUE(callee->ExchangeOfferAnswerWith(caller.get()));
EXPECT_EQ(RtpTransceiverDirection::kStopped,
transceiver->current_direction());
EXPECT_EQ(0U, caller->pc()->GetTransceivers().size());
EXPECT_EQ(0U, callee->pc()->GetTransceivers().size());
EXPECT_EQ(0U, caller->pc()->GetSenders().size());
EXPECT_EQ(0U, callee->pc()->GetSenders().size());
EXPECT_EQ(0U, caller->pc()->GetReceivers().size());
EXPECT_EQ(0U, callee->pc()->GetReceivers().size());
}
// Test that AddTransceiver fails if trying to use unimplemented RTP encoding
// parameters with the send_encodings parameters.
TEST_F(PeerConnectionRtpTestUnifiedPlan,