| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 EXPECT_CALL(call.mock_cc(), SetBweBitrates(1, 2, 3)).Times(1); | 425 EXPECT_CALL(call.mock_cc(), SetBweBitrates(1, 2, 3)).Times(1); |
| 426 call->SetBitrateConfig(bitrate_config); | 426 call->SetBitrateConfig(bitrate_config); |
| 427 | 427 |
| 428 bitrate_config.start_bitrate_bps = -1; | 428 bitrate_config.start_bitrate_bps = -1; |
| 429 call->SetBitrateConfig(bitrate_config); | 429 call->SetBitrateConfig(bitrate_config); |
| 430 } | 430 } |
| 431 | 431 |
| 432 TEST(CallTest, RecreatingAudioStreamWithSameSsrcReusesRtpState) { | 432 TEST(CallTest, RecreatingAudioStreamWithSameSsrcReusesRtpState) { |
| 433 constexpr uint32_t kSSRC = 12345; | 433 constexpr uint32_t kSSRC = 12345; |
| 434 testing::NiceMock<test::MockAudioDeviceModule> mock_adm; | 434 testing::NiceMock<test::MockAudioDeviceModule> mock_adm; |
| 435 // Reply with a 10ms timer every time TimeUntilNextProcess is called to | |
| 436 // avoid entering a tight loop on the process thread. | |
| 437 EXPECT_CALL(mock_adm, TimeUntilNextProcess()) | |
| 438 .WillRepeatedly(testing::Return(10)); | |
| 439 rtc::scoped_refptr<test::MockAudioMixer> mock_mixer( | 435 rtc::scoped_refptr<test::MockAudioMixer> mock_mixer( |
| 440 new rtc::RefCountedObject<test::MockAudioMixer>); | 436 new rtc::RefCountedObject<test::MockAudioMixer>); |
| 441 | 437 |
| 442 // There's similar functionality in cricket::VoEWrapper but it's not reachable | 438 // There's similar functionality in cricket::VoEWrapper but it's not reachable |
| 443 // from here. Since we're working on removing VoE interfaces, I doubt it's | 439 // from here. Since we're working on removing VoE interfaces, I doubt it's |
| 444 // worth making VoEWrapper more easily available. | 440 // worth making VoEWrapper more easily available. |
| 445 struct ScopedVoiceEngine { | 441 struct ScopedVoiceEngine { |
| 446 ScopedVoiceEngine() | 442 ScopedVoiceEngine() |
| 447 : voe(VoiceEngine::Create()), | 443 : voe(VoiceEngine::Create()), |
| 448 base(VoEBase::GetInterface(voe)) {} | 444 base(VoEBase::GetInterface(voe)) {} |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 709 mask.min_bitrate_bps = rtc::Optional<int>(2000); | 705 mask.min_bitrate_bps = rtc::Optional<int>(2000); |
| 710 EXPECT_CALL(call.mock_cc(), SetBweBitrates(1000, -1, 1000)); | 706 EXPECT_CALL(call.mock_cc(), SetBweBitrates(1000, -1, 1000)); |
| 711 call->SetBitrateConfigMask(mask); | 707 call->SetBitrateConfigMask(mask); |
| 712 | 708 |
| 713 // Set min to 3000; the clamped value stays the same so nothing happens. | 709 // Set min to 3000; the clamped value stays the same so nothing happens. |
| 714 mask.min_bitrate_bps = rtc::Optional<int>(3000); | 710 mask.min_bitrate_bps = rtc::Optional<int>(3000); |
| 715 call->SetBitrateConfigMask(mask); | 711 call->SetBitrateConfigMask(mask); |
| 716 } | 712 } |
| 717 | 713 |
| 718 } // namespace webrtc | 714 } // namespace webrtc |
| OLD | NEW |