OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2008 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2008 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 1284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1295 TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecEnableNackAsCallee) { | 1295 TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecEnableNackAsCallee) { |
1296 EXPECT_TRUE(SetupRecvStream()); | 1296 EXPECT_TRUE(SetupRecvStream()); |
1297 int channel_num = voe_.GetLastChannel(); | 1297 int channel_num = voe_.GetLastChannel(); |
1298 cricket::AudioSendParameters parameters; | 1298 cricket::AudioSendParameters parameters; |
1299 parameters.codecs.push_back(kOpusCodec); | 1299 parameters.codecs.push_back(kOpusCodec); |
1300 parameters.codecs[0].AddFeedbackParam( | 1300 parameters.codecs[0].AddFeedbackParam( |
1301 cricket::FeedbackParam(cricket::kRtcpFbParamNack, | 1301 cricket::FeedbackParam(cricket::kRtcpFbParamNack, |
1302 cricket::kParamValueEmpty)); | 1302 cricket::kParamValueEmpty)); |
1303 EXPECT_FALSE(voe_.GetNACK(channel_num)); | 1303 EXPECT_FALSE(voe_.GetNACK(channel_num)); |
1304 EXPECT_TRUE(channel_->SetSendParameters(parameters)); | 1304 EXPECT_TRUE(channel_->SetSendParameters(parameters)); |
1305 EXPECT_FALSE(voe_.GetNACK(channel_num)); | 1305 // NACK should be enabled even with no send stream. |
| 1306 EXPECT_TRUE(voe_.GetNACK(channel_num)); |
1306 | 1307 |
1307 EXPECT_TRUE(channel_->AddSendStream( | 1308 EXPECT_TRUE(channel_->AddSendStream( |
1308 cricket::StreamParams::CreateLegacy(kSsrc1))); | 1309 cricket::StreamParams::CreateLegacy(kSsrc1))); |
1309 EXPECT_TRUE(voe_.GetNACK(voe_.GetLastChannel())); | 1310 EXPECT_TRUE(voe_.GetNACK(voe_.GetLastChannel())); |
1310 } | 1311 } |
1311 | 1312 |
1312 // Test that we can enable NACK on receive streams. | 1313 // Test that we can enable NACK on receive streams. |
1313 TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecEnableNackRecvStreams) { | 1314 TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecEnableNackRecvStreams) { |
1314 EXPECT_TRUE(SetupSendStream()); | 1315 EXPECT_TRUE(SetupSendStream()); |
1315 int channel_num1 = voe_.GetLastChannel(); | 1316 int channel_num1 = voe_.GetLastChannel(); |
(...skipping 2280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3596 TEST(WebRtcVoiceEngineTest, SetRecvCodecs) { | 3597 TEST(WebRtcVoiceEngineTest, SetRecvCodecs) { |
3597 cricket::WebRtcVoiceEngine engine(nullptr); | 3598 cricket::WebRtcVoiceEngine engine(nullptr); |
3598 std::unique_ptr<webrtc::Call> call( | 3599 std::unique_ptr<webrtc::Call> call( |
3599 webrtc::Call::Create(webrtc::Call::Config())); | 3600 webrtc::Call::Create(webrtc::Call::Config())); |
3600 cricket::WebRtcVoiceMediaChannel channel(&engine, cricket::MediaConfig(), | 3601 cricket::WebRtcVoiceMediaChannel channel(&engine, cricket::MediaConfig(), |
3601 cricket::AudioOptions(), call.get()); | 3602 cricket::AudioOptions(), call.get()); |
3602 cricket::AudioRecvParameters parameters; | 3603 cricket::AudioRecvParameters parameters; |
3603 parameters.codecs = engine.codecs(); | 3604 parameters.codecs = engine.codecs(); |
3604 EXPECT_TRUE(channel.SetRecvParameters(parameters)); | 3605 EXPECT_TRUE(channel.SetRecvParameters(parameters)); |
3605 } | 3606 } |
OLD | NEW |