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

Side by Side Diff: webrtc/voice_engine/test/auto_test/standard/rtp_rtcp_test.cc

Issue 2644303002: Delete class SSRCDatabase, and its global ssrc registry. (Closed)
Patch Set: DCHECK that ssrc is set in SendOutgoingData. Created 3 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 int second_channel_; 84 int second_channel_;
85 LoopBackTransport* transport_; 85 LoopBackTransport* transport_;
86 }; 86 };
87 87
88 TEST_F(RtpRtcpTest, RemoteRtcpCnameHasPropagatedToRemoteSide) { 88 TEST_F(RtpRtcpTest, RemoteRtcpCnameHasPropagatedToRemoteSide) {
89 if (!FLAGS_include_timing_dependent_tests) { 89 if (!FLAGS_include_timing_dependent_tests) {
90 TEST_LOG("Skipping test - running in slow execution environment...\n"); 90 TEST_LOG("Skipping test - running in slow execution environment...\n");
91 return; 91 return;
92 } 92 }
93 93
94 // We need to sleep a bit here for the name to propagate. For instance, 94 // We need to sleep a bit here for the name to propagate. For
95 // 200 milliseconds is not enough, so we'll go with one second here. 95 // instance, 200 milliseconds is not enough, 1 second still flaky,
96 Sleep(1000); 96 // so we'll go with five seconds here.
97 Sleep(5000);
97 98
98 char char_buffer[256]; 99 char char_buffer[256];
99 voe_rtp_rtcp_->GetRemoteRTCP_CNAME(channel_, char_buffer); 100 voe_rtp_rtcp_->GetRemoteRTCP_CNAME(channel_, char_buffer);
100 EXPECT_STREQ(RTCP_CNAME, char_buffer); 101 EXPECT_STREQ(RTCP_CNAME, char_buffer);
101 } 102 }
102 103
103 TEST_F(RtpRtcpTest, SSRCPropagatesCorrectly) { 104 TEST_F(RtpRtcpTest, SSRCPropagatesCorrectly) {
104 unsigned int local_ssrc = 1234; 105 unsigned int local_ssrc = 1234;
105 EXPECT_EQ(0, voe_base_->StopSend(channel_)); 106 EXPECT_EQ(0, voe_base_->StopSend(channel_));
106 EXPECT_EQ(0, voe_rtp_rtcp_->SetLocalSSRC(channel_, local_ssrc)); 107 EXPECT_EQ(0, voe_rtp_rtcp_->SetLocalSSRC(channel_, local_ssrc));
107 EXPECT_EQ(0, voe_base_->StartSend(channel_)); 108 EXPECT_EQ(0, voe_base_->StartSend(channel_));
108 109
109 Sleep(1000); 110 Sleep(1000);
110 111
111 unsigned int ssrc; 112 unsigned int ssrc;
112 EXPECT_EQ(0, voe_rtp_rtcp_->GetLocalSSRC(channel_, ssrc)); 113 EXPECT_EQ(0, voe_rtp_rtcp_->GetLocalSSRC(channel_, ssrc));
113 EXPECT_EQ(local_ssrc, ssrc); 114 EXPECT_EQ(local_ssrc, ssrc);
114 115
115 EXPECT_EQ(0, voe_rtp_rtcp_->GetRemoteSSRC(channel_, ssrc)); 116 EXPECT_EQ(0, voe_rtp_rtcp_->GetRemoteSSRC(channel_, ssrc));
116 EXPECT_EQ(local_ssrc, ssrc); 117 EXPECT_EQ(local_ssrc, ssrc);
117 } 118 }
OLDNEW
« webrtc/voice_engine/channel.cc ('K') | « webrtc/voice_engine/channel.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698