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

Side by Side Diff: webrtc/video/video_quality_test.cc

Issue 2353033005: Refactoring: move ownership of RtcEventLog from Call to PeerConnection (Closed)
Patch Set: Moved the constructor Created 4 years, 2 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/video/end_to_end_tests.cc ('k') | webrtc/video/video_send_stream_tests.cc » ('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) 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 #include "webrtc/video/video_quality_test.h" 10 #include "webrtc/video/video_quality_test.h"
11 11
12 #include <stdio.h> 12 #include <stdio.h>
13 #include <algorithm> 13 #include <algorithm>
14 #include <deque> 14 #include <deque>
15 #include <map> 15 #include <map>
16 #include <sstream> 16 #include <sstream>
17 #include <string> 17 #include <string>
18 #include <vector> 18 #include <vector>
19 19
20 #include "webrtc/base/checks.h" 20 #include "webrtc/base/checks.h"
21 #include "webrtc/base/event.h" 21 #include "webrtc/base/event.h"
22 #include "webrtc/base/format_macros.h" 22 #include "webrtc/base/format_macros.h"
23 #include "webrtc/base/optional.h" 23 #include "webrtc/base/optional.h"
24 #include "webrtc/base/platform_file.h" 24 #include "webrtc/base/platform_file.h"
25 #include "webrtc/base/timeutils.h" 25 #include "webrtc/base/timeutils.h"
26 #include "webrtc/call.h" 26 #include "webrtc/call.h"
27 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" 27 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
28 #include "webrtc/logging/rtc_event_log/rtc_event_log.h"
28 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" 29 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
29 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" 30 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
30 #include "webrtc/system_wrappers/include/cpu_info.h" 31 #include "webrtc/system_wrappers/include/cpu_info.h"
31 #include "webrtc/test/gtest.h" 32 #include "webrtc/test/gtest.h"
32 #include "webrtc/test/layer_filtering_transport.h" 33 #include "webrtc/test/layer_filtering_transport.h"
33 #include "webrtc/test/run_loop.h" 34 #include "webrtc/test/run_loop.h"
34 #include "webrtc/test/statistics.h" 35 #include "webrtc/test/statistics.h"
35 #include "webrtc/test/testsupport/fileutils.h" 36 #include "webrtc/test/testsupport/fileutils.h"
36 #include "webrtc/test/vcm_capturer.h" 37 #include "webrtc/test/vcm_capturer.h"
37 #include "webrtc/test/video_renderer.h" 38 #include "webrtc/test/video_renderer.h"
(...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1144 1145
1145 FILE* graph_data_output_file = nullptr; 1146 FILE* graph_data_output_file = nullptr;
1146 if (!params_.analyzer.graph_data_output_filename.empty()) { 1147 if (!params_.analyzer.graph_data_output_filename.empty()) {
1147 graph_data_output_file = 1148 graph_data_output_file =
1148 fopen(params_.analyzer.graph_data_output_filename.c_str(), "w"); 1149 fopen(params_.analyzer.graph_data_output_filename.c_str(), "w");
1149 RTC_CHECK(graph_data_output_file) 1150 RTC_CHECK(graph_data_output_file)
1150 << "Can't open the file " << params_.analyzer.graph_data_output_filename 1151 << "Can't open the file " << params_.analyzer.graph_data_output_filename
1151 << "!"; 1152 << "!";
1152 } 1153 }
1153 1154
1154 Call::Config call_config; 1155 webrtc::RtcEventLogNullImpl event_log;
1156 Call::Config call_config(&event_log_);
1155 call_config.bitrate_config = params.common.call_bitrate_config; 1157 call_config.bitrate_config = params.common.call_bitrate_config;
1156 CreateCalls(call_config, call_config); 1158 CreateCalls(call_config, call_config);
1157 1159
1158 test::LayerFilteringTransport send_transport( 1160 test::LayerFilteringTransport send_transport(
1159 params.pipe, sender_call_.get(), kPayloadTypeVP8, kPayloadTypeVP9, 1161 params.pipe, sender_call_.get(), kPayloadTypeVP8, kPayloadTypeVP9,
1160 params.common.selected_tl, params_.ss.selected_sl); 1162 params.common.selected_tl, params_.ss.selected_sl);
1161 test::DirectTransport recv_transport(params.pipe, receiver_call_.get()); 1163 test::DirectTransport recv_transport(params.pipe, receiver_call_.get());
1162 1164
1163 std::string graph_title = params_.analyzer.graph_title; 1165 std::string graph_title = params_.analyzer.graph_title;
1164 if (graph_title.empty()) 1166 if (graph_title.empty())
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 title += " - Stream #" + s.str(); 1256 title += " - Stream #" + s.str();
1255 } 1257 }
1256 1258
1257 std::unique_ptr<test::VideoRenderer> loopback_video( 1259 std::unique_ptr<test::VideoRenderer> loopback_video(
1258 test::VideoRenderer::Create(title.c_str(), 1260 test::VideoRenderer::Create(title.c_str(),
1259 params_.ss.streams[stream_id].width, 1261 params_.ss.streams[stream_id].width,
1260 params_.ss.streams[stream_id].height)); 1262 params_.ss.streams[stream_id].height));
1261 1263
1262 // TODO(ivica): Remove bitrate_config and use the default Call::Config(), to 1264 // TODO(ivica): Remove bitrate_config and use the default Call::Config(), to
1263 // match the full stack tests. 1265 // match the full stack tests.
1264 Call::Config call_config; 1266 webrtc::RtcEventLogNullImpl event_log;
1267 Call::Config call_config(&event_log_);
1265 call_config.bitrate_config = params_.common.call_bitrate_config; 1268 call_config.bitrate_config = params_.common.call_bitrate_config;
1266 1269
1267 ::VoiceEngineState voe; 1270 ::VoiceEngineState voe;
1268 if (params_.audio) { 1271 if (params_.audio) {
1269 CreateVoiceEngine(&voe, decoder_factory_); 1272 CreateVoiceEngine(&voe, decoder_factory_);
1270 AudioState::Config audio_state_config; 1273 AudioState::Config audio_state_config;
1271 audio_state_config.voice_engine = voe.voice_engine; 1274 audio_state_config.voice_engine = voe.voice_engine;
1272 call_config.audio_state = AudioState::Create(audio_state_config); 1275 call_config.audio_state = AudioState::Create(audio_state_config);
1273 } 1276 }
1274 1277
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1416 std::ostringstream str; 1419 std::ostringstream str;
1417 str << receive_logs_++; 1420 str << receive_logs_++;
1418 std::string path = 1421 std::string path =
1419 params_.common.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; 1422 params_.common.encoded_frame_base_path + "." + str.str() + ".recv.ivf";
1420 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), 1423 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path),
1421 10000000); 1424 10000000);
1422 } 1425 }
1423 } 1426 }
1424 1427
1425 } // namespace webrtc 1428 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/end_to_end_tests.cc ('k') | webrtc/video/video_send_stream_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698