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

Side by Side Diff: webrtc/call/call_perf_tests.cc

Issue 2806723002: Event log cleanup in tests. (Closed)
Patch Set: . Created 3 years, 8 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
« no previous file with comments | « webrtc/call/bitrate_estimator_tests.cc ('k') | webrtc/test/call_test.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 FakeAudioDevice::CreateDiscardRenderer(48000), audio_rtp_speed); 151 FakeAudioDevice::CreateDiscardRenderer(48000), audio_rtp_speed);
152 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_));
153 VoEBase::ChannelConfig config; 153 VoEBase::ChannelConfig config;
154 config.enable_voice_pacing = true; 154 config.enable_voice_pacing = true;
155 int send_channel_id = voe_base->CreateChannel(config); 155 int send_channel_id = voe_base->CreateChannel(config);
156 int recv_channel_id = voe_base->CreateChannel(); 156 int recv_channel_id = voe_base->CreateChannel();
157 157
158 AudioState::Config send_audio_state_config; 158 AudioState::Config send_audio_state_config;
159 send_audio_state_config.voice_engine = voice_engine; 159 send_audio_state_config.voice_engine = voice_engine;
160 send_audio_state_config.audio_mixer = AudioMixerImpl::Create(); 160 send_audio_state_config.audio_mixer = AudioMixerImpl::Create();
161 Call::Config sender_config(&event_log_); 161 Call::Config sender_config(event_log_.get());
162 sender_config.audio_state = AudioState::Create(send_audio_state_config); 162 sender_config.audio_state = AudioState::Create(send_audio_state_config);
163 Call::Config receiver_config(&event_log_); 163 Call::Config receiver_config(event_log_.get());
164 receiver_config.audio_state = sender_config.audio_state; 164 receiver_config.audio_state = sender_config.audio_state;
165 CreateCalls(sender_config, receiver_config); 165 CreateCalls(sender_config, receiver_config);
166 166
167 167
168 VideoRtcpAndSyncObserver observer(Clock::GetRealTimeClock()); 168 VideoRtcpAndSyncObserver observer(Clock::GetRealTimeClock());
169 169
170 // Helper class to ensure we deliver correct media_type to the receiving call. 170 // Helper class to ensure we deliver correct media_type to the receiving call.
171 class MediaTypePacketReceiver : public PacketReceiver { 171 class MediaTypePacketReceiver : public PacketReceiver {
172 public: 172 public:
173 MediaTypePacketReceiver(PacketReceiver* packet_receiver, 173 MediaTypePacketReceiver(PacketReceiver* packet_receiver,
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 last_set_bitrate_kbps_ = rate_allocation.get_sum_kbps(); 712 last_set_bitrate_kbps_ = rate_allocation.get_sum_kbps();
713 if (encoder_inits_ == 1 && 713 if (encoder_inits_ == 1 &&
714 rate_allocation.get_sum_kbps() > kReconfigureThresholdKbps) { 714 rate_allocation.get_sum_kbps() > kReconfigureThresholdKbps) {
715 time_to_reconfigure_.Set(); 715 time_to_reconfigure_.Set();
716 } 716 }
717 return FakeEncoder::SetRateAllocation(rate_allocation, framerate); 717 return FakeEncoder::SetRateAllocation(rate_allocation, framerate);
718 } 718 }
719 719
720 Call::Config GetSenderCallConfig() override { 720 Call::Config GetSenderCallConfig() override {
721 Call::Config config = EndToEndTest::GetSenderCallConfig(); 721 Call::Config config = EndToEndTest::GetSenderCallConfig();
722 config.event_log = &event_log_; 722 config.event_log = event_log_.get();
723 config.bitrate_config.start_bitrate_bps = kInitialBitrateKbps * 1000; 723 config.bitrate_config.start_bitrate_bps = kInitialBitrateKbps * 1000;
724 return config; 724 return config;
725 } 725 }
726 726
727 void ModifyVideoConfigs( 727 void ModifyVideoConfigs(
728 VideoSendStream::Config* send_config, 728 VideoSendStream::Config* send_config,
729 std::vector<VideoReceiveStream::Config>* receive_configs, 729 std::vector<VideoReceiveStream::Config>* receive_configs,
730 VideoEncoderConfig* encoder_config) override { 730 VideoEncoderConfig* encoder_config) override {
731 send_config->encoder_settings.encoder = this; 731 send_config->encoder_settings.encoder = this;
732 encoder_config->max_bitrate_bps = 2 * kReconfigureThresholdKbps * 1000; 732 encoder_config->max_bitrate_bps = 2 * kReconfigureThresholdKbps * 1000;
(...skipping 30 matching lines...) Expand all
763 uint32_t last_set_bitrate_kbps_; 763 uint32_t last_set_bitrate_kbps_;
764 VideoSendStream* send_stream_; 764 VideoSendStream* send_stream_;
765 test::FrameGeneratorCapturer* frame_generator_; 765 test::FrameGeneratorCapturer* frame_generator_;
766 VideoEncoderConfig encoder_config_; 766 VideoEncoderConfig encoder_config_;
767 } test; 767 } test;
768 768
769 RunBaseTest(&test); 769 RunBaseTest(&test);
770 } 770 }
771 771
772 } // namespace webrtc 772 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/call/bitrate_estimator_tests.cc ('k') | webrtc/test/call_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698