OLD | NEW |
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 139 |
140 EXPECT_EQ(0, module1->SetSendingStatus(true)); | 140 EXPECT_EQ(0, module1->SetSendingStatus(true)); |
141 | 141 |
142 CodecInst voice_codec; | 142 CodecInst voice_codec; |
143 voice_codec.pltype = 96; | 143 voice_codec.pltype = 96; |
144 voice_codec.plfreq = 8000; | 144 voice_codec.plfreq = 8000; |
145 voice_codec.rate = 64000; | 145 voice_codec.rate = 64000; |
146 memcpy(voice_codec.plname, "PCMU", 5); | 146 memcpy(voice_codec.plname, "PCMU", 5); |
147 | 147 |
148 EXPECT_EQ(0, module1->RegisterSendPayload(voice_codec)); | 148 EXPECT_EQ(0, module1->RegisterSendPayload(voice_codec)); |
149 EXPECT_EQ(0, rtp_receiver1_->RegisterReceivePayload( | 149 EXPECT_EQ(0, rtp_receiver1_->RegisterReceivePayload(voice_codec)); |
150 voice_codec.plname, | |
151 voice_codec.pltype, | |
152 voice_codec.plfreq, | |
153 voice_codec.channels, | |
154 (voice_codec.rate < 0) ? 0 : voice_codec.rate)); | |
155 EXPECT_EQ(0, module2->RegisterSendPayload(voice_codec)); | 150 EXPECT_EQ(0, module2->RegisterSendPayload(voice_codec)); |
156 EXPECT_EQ(0, rtp_receiver2_->RegisterReceivePayload( | 151 EXPECT_EQ(0, rtp_receiver2_->RegisterReceivePayload(voice_codec)); |
157 voice_codec.plname, | |
158 voice_codec.pltype, | |
159 voice_codec.plfreq, | |
160 voice_codec.channels, | |
161 (voice_codec.rate < 0) ? 0 : voice_codec.rate)); | |
162 | 152 |
163 // We need to send one RTP packet to get the RTCP packet to be accepted by | 153 // We need to send one RTP packet to get the RTCP packet to be accepted by |
164 // the receiving module. | 154 // the receiving module. |
165 // send RTP packet with the data "testtest" | 155 // send RTP packet with the data "testtest" |
166 const uint8_t test[9] = "testtest"; | 156 const uint8_t test[9] = "testtest"; |
167 EXPECT_EQ(true, | 157 EXPECT_EQ(true, |
168 module1->SendOutgoingData(webrtc::kAudioFrameSpeech, 96, 0, -1, | 158 module1->SendOutgoingData(webrtc::kAudioFrameSpeech, 96, 0, -1, |
169 test, 8, nullptr, nullptr, nullptr)); | 159 test, 8, nullptr, nullptr, nullptr)); |
170 } | 160 } |
171 | 161 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 EXPECT_EQ(test_ssrc, report_blocks[0].sourceSSRC); | 257 EXPECT_EQ(test_ssrc, report_blocks[0].sourceSSRC); |
268 | 258 |
269 EXPECT_EQ(0u, report_blocks[0].cumulativeLost); | 259 EXPECT_EQ(0u, report_blocks[0].cumulativeLost); |
270 EXPECT_LT(0u, report_blocks[0].delaySinceLastSR); | 260 EXPECT_LT(0u, report_blocks[0].delaySinceLastSR); |
271 EXPECT_EQ(test_sequence_number, report_blocks[0].extendedHighSeqNum); | 261 EXPECT_EQ(test_sequence_number, report_blocks[0].extendedHighSeqNum); |
272 EXPECT_EQ(0u, report_blocks[0].fractionLost); | 262 EXPECT_EQ(0u, report_blocks[0].fractionLost); |
273 } | 263 } |
274 | 264 |
275 } // namespace | 265 } // namespace |
276 } // namespace webrtc | 266 } // namespace webrtc |
OLD | NEW |