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 #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/logging/rtc_event_log/rtc_event_log.h" |
| 29 #include "webrtc/modules/audio_mixer/audio_mixer_impl.h" |
29 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" | 30 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" |
30 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" | 31 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" |
31 #include "webrtc/system_wrappers/include/cpu_info.h" | 32 #include "webrtc/system_wrappers/include/cpu_info.h" |
32 #include "webrtc/test/gtest.h" | 33 #include "webrtc/test/gtest.h" |
33 #include "webrtc/test/layer_filtering_transport.h" | 34 #include "webrtc/test/layer_filtering_transport.h" |
34 #include "webrtc/test/run_loop.h" | 35 #include "webrtc/test/run_loop.h" |
35 #include "webrtc/test/statistics.h" | 36 #include "webrtc/test/statistics.h" |
36 #include "webrtc/test/testsupport/fileutils.h" | 37 #include "webrtc/test/testsupport/fileutils.h" |
37 #include "webrtc/test/vcm_capturer.h" | 38 #include "webrtc/test/vcm_capturer.h" |
38 #include "webrtc/test/video_renderer.h" | 39 #include "webrtc/test/video_renderer.h" |
(...skipping 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1294 // match the full stack tests. | 1295 // match the full stack tests. |
1295 webrtc::RtcEventLogNullImpl event_log; | 1296 webrtc::RtcEventLogNullImpl event_log; |
1296 Call::Config call_config(&event_log_); | 1297 Call::Config call_config(&event_log_); |
1297 call_config.bitrate_config = params_.call.call_bitrate_config; | 1298 call_config.bitrate_config = params_.call.call_bitrate_config; |
1298 | 1299 |
1299 ::VoiceEngineState voe; | 1300 ::VoiceEngineState voe; |
1300 if (params_.audio.enabled) { | 1301 if (params_.audio.enabled) { |
1301 CreateVoiceEngine(&voe, decoder_factory_); | 1302 CreateVoiceEngine(&voe, decoder_factory_); |
1302 AudioState::Config audio_state_config; | 1303 AudioState::Config audio_state_config; |
1303 audio_state_config.voice_engine = voe.voice_engine; | 1304 audio_state_config.voice_engine = voe.voice_engine; |
| 1305 audio_state_config.audio_mixer = AudioMixerImpl::Create(); |
1304 call_config.audio_state = AudioState::Create(audio_state_config); | 1306 call_config.audio_state = AudioState::Create(audio_state_config); |
1305 } | 1307 } |
1306 | 1308 |
1307 std::unique_ptr<Call> call(Call::Create(call_config)); | 1309 std::unique_ptr<Call> call(Call::Create(call_config)); |
1308 | 1310 |
1309 // TODO(minyue): consider if this is a good transport even for audio only | 1311 // TODO(minyue): consider if this is a good transport even for audio only |
1310 // calls. | 1312 // calls. |
1311 test::LayerFilteringTransport transport( | 1313 test::LayerFilteringTransport transport( |
1312 params.pipe, call.get(), kPayloadTypeVP8, kPayloadTypeVP9, | 1314 params.pipe, call.get(), kPayloadTypeVP8, kPayloadTypeVP9, |
1313 params.video.selected_tl, params_.ss.selected_sl); | 1315 params.video.selected_tl, params_.ss.selected_sl); |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1448 std::ostringstream str; | 1450 std::ostringstream str; |
1449 str << receive_logs_++; | 1451 str << receive_logs_++; |
1450 std::string path = | 1452 std::string path = |
1451 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; | 1453 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; |
1452 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), | 1454 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), |
1453 10000000); | 1455 10000000); |
1454 } | 1456 } |
1455 } | 1457 } |
1456 | 1458 |
1457 } // namespace webrtc | 1459 } // namespace webrtc |
OLD | NEW |