Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 float video_ntp_speed, | 139 float video_ntp_speed, |
| 140 float video_rtp_speed, | 140 float video_rtp_speed, |
| 141 float audio_rtp_speed) { | 141 float audio_rtp_speed) { |
| 142 const char* kSyncGroup = "av_sync"; | 142 const char* kSyncGroup = "av_sync"; |
| 143 const uint32_t kAudioSendSsrc = 1234; | 143 const uint32_t kAudioSendSsrc = 1234; |
| 144 const uint32_t kAudioRecvSsrc = 5678; | 144 const uint32_t kAudioRecvSsrc = 5678; |
| 145 | 145 |
| 146 metrics::Reset(); | 146 metrics::Reset(); |
| 147 VoiceEngine* voice_engine = VoiceEngine::Create(); | 147 VoiceEngine* voice_engine = VoiceEngine::Create(); |
| 148 VoEBase* voe_base = VoEBase::GetInterface(voice_engine); | 148 VoEBase* voe_base = VoEBase::GetInterface(voice_engine); |
| 149 FakeAudioDevice fake_audio_device(audio_rtp_speed, 48000, 256); | 149 FakeAudioDevice fake_audio_device( |
| 150 FakeAudioDevice::CreatePulsedNoiseCapturer(256, 48000), | |
| 151 FakeAudioDevice::CreateDiscarder(48000), audio_rtp_speed); | |
|
kwiberg-webrtc
2017/03/13 10:18:21
This looks very nice!
Hmm. You don't have to, but
oprypin_webrtc
2017/03/13 13:55:14
Changed to CreateDiscardRenderer, but it's hard to
kwiberg-webrtc
2017/03/13 14:22:26
Fair point.
| |
| 150 EXPECT_EQ(0, voe_base->Init(&fake_audio_device, nullptr, decoder_factory_)); | 152 EXPECT_EQ(0, voe_base->Init(&fake_audio_device, nullptr, decoder_factory_)); |
| 151 VoEBase::ChannelConfig config; | 153 VoEBase::ChannelConfig config; |
| 152 config.enable_voice_pacing = true; | 154 config.enable_voice_pacing = true; |
| 153 int send_channel_id = voe_base->CreateChannel(config); | 155 int send_channel_id = voe_base->CreateChannel(config); |
| 154 int recv_channel_id = voe_base->CreateChannel(); | 156 int recv_channel_id = voe_base->CreateChannel(); |
| 155 | 157 |
| 156 AudioState::Config send_audio_state_config; | 158 AudioState::Config send_audio_state_config; |
| 157 send_audio_state_config.voice_engine = voice_engine; | 159 send_audio_state_config.voice_engine = voice_engine; |
| 158 send_audio_state_config.audio_mixer = AudioMixerImpl::Create(); | 160 send_audio_state_config.audio_mixer = AudioMixerImpl::Create(); |
| 159 Call::Config sender_config(&event_log_); | 161 Call::Config sender_config(&event_log_); |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 736 uint32_t last_set_bitrate_kbps_; | 738 uint32_t last_set_bitrate_kbps_; |
| 737 VideoSendStream* send_stream_; | 739 VideoSendStream* send_stream_; |
| 738 test::FrameGeneratorCapturer* frame_generator_; | 740 test::FrameGeneratorCapturer* frame_generator_; |
| 739 VideoEncoderConfig encoder_config_; | 741 VideoEncoderConfig encoder_config_; |
| 740 } test; | 742 } test; |
| 741 | 743 |
| 742 RunBaseTest(&test); | 744 RunBaseTest(&test); |
| 743 } | 745 } |
| 744 | 746 |
| 745 } // namespace webrtc | 747 } // namespace webrtc |
| OLD | NEW |