Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: webrtc/pc/channel_unittest.cc

Issue 2890263003: Move RTP/RTCP demuxing logic from BaseChannel to RtpTransport. (Closed)
Patch Set: Disconnect transport channels in method called from Deinit to prevent races during object destructi… Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/pc/channel.cc ('k') | webrtc/pc/rtcpmuxfilter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2009 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2009 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after
1553 if (rtcp_mux) { 1553 if (rtcp_mux) {
1554 flags |= RTCP_MUX; 1554 flags |= RTCP_MUX;
1555 } 1555 }
1556 CreateChannels(flags, flags); 1556 CreateChannels(flags, flags);
1557 EXPECT_TRUE(SendInitiate()); 1557 EXPECT_TRUE(SendInitiate());
1558 EXPECT_TRUE(channel1_->NeedsRtcpTransport()); 1558 EXPECT_TRUE(channel1_->NeedsRtcpTransport());
1559 EXPECT_EQ(rtcp_mux, !channel2_->NeedsRtcpTransport()); 1559 EXPECT_EQ(rtcp_mux, !channel2_->NeedsRtcpTransport());
1560 EXPECT_TRUE(SendAccept()); 1560 EXPECT_TRUE(SendAccept());
1561 EXPECT_EQ(rtcp_mux, !channel1_->NeedsRtcpTransport()); 1561 EXPECT_EQ(rtcp_mux, !channel1_->NeedsRtcpTransport());
1562 EXPECT_EQ(rtcp_mux, !channel2_->NeedsRtcpTransport()); 1562 EXPECT_EQ(rtcp_mux, !channel2_->NeedsRtcpTransport());
1563 EXPECT_TRUE(channel1_->bundle_filter()->FindPayloadType(pl_type1)); 1563 EXPECT_TRUE(channel1_->HandlesPayloadType(pl_type1));
1564 EXPECT_TRUE(channel2_->bundle_filter()->FindPayloadType(pl_type1)); 1564 EXPECT_TRUE(channel2_->HandlesPayloadType(pl_type1));
1565 EXPECT_FALSE(channel1_->bundle_filter()->FindPayloadType(pl_type2)); 1565 EXPECT_FALSE(channel1_->HandlesPayloadType(pl_type2));
1566 EXPECT_FALSE(channel2_->bundle_filter()->FindPayloadType(pl_type2)); 1566 EXPECT_FALSE(channel2_->HandlesPayloadType(pl_type2));
1567 1567
1568 // Both channels can receive pl_type1 only. 1568 // Both channels can receive pl_type1 only.
1569 SendCustomRtp1(kSsrc1, ++sequence_number1_1, pl_type1); 1569 SendCustomRtp1(kSsrc1, ++sequence_number1_1, pl_type1);
1570 SendCustomRtp2(kSsrc2, ++sequence_number2_2, pl_type1); 1570 SendCustomRtp2(kSsrc2, ++sequence_number2_2, pl_type1);
1571 WaitForThreads(); 1571 WaitForThreads();
1572 EXPECT_TRUE(CheckCustomRtp2(kSsrc1, sequence_number1_1, pl_type1)); 1572 EXPECT_TRUE(CheckCustomRtp2(kSsrc1, sequence_number1_1, pl_type1));
1573 EXPECT_TRUE(CheckCustomRtp1(kSsrc2, sequence_number2_2, pl_type1)); 1573 EXPECT_TRUE(CheckCustomRtp1(kSsrc2, sequence_number2_2, pl_type1));
1574 EXPECT_TRUE(CheckNoRtp1()); 1574 EXPECT_TRUE(CheckNoRtp1());
1575 EXPECT_TRUE(CheckNoRtp2()); 1575 EXPECT_TRUE(CheckNoRtp2());
1576 1576
(...skipping 2113 matching lines...) Expand 10 before | Expand all | Expand 10 after
3690 ASSERT_TRUE(voice_channel_.Init_w(nullptr, nullptr, &fake_rtp_dtls_transport_, 3690 ASSERT_TRUE(voice_channel_.Init_w(nullptr, nullptr, &fake_rtp_dtls_transport_,
3691 &fake_rtcp_dtls_transport_)); 3691 &fake_rtcp_dtls_transport_));
3692 EXPECT_DEATH(voice_channel_.SetTransports(&fake_rtp_dtls_transport_, 3692 EXPECT_DEATH(voice_channel_.SetTransports(&fake_rtp_dtls_transport_,
3693 &fake_rtp_dtls_transport_), 3693 &fake_rtp_dtls_transport_),
3694 ""); 3694 "");
3695 } 3695 }
3696 3696
3697 #endif // RTC_DCHECK_IS_ON && GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID) 3697 #endif // RTC_DCHECK_IS_ON && GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID)
3698 3698
3699 // TODO(pthatcher): TestSetReceiver? 3699 // TODO(pthatcher): TestSetReceiver?
OLDNEW
« no previous file with comments | « webrtc/pc/channel.cc ('k') | webrtc/pc/rtcpmuxfilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698