| 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" |
| (...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1210 for (auto& config : video_receive_configs_) | 1210 for (auto& config : video_receive_configs_) |
| 1211 config.pre_decode_callback = &analyzer; | 1211 config.pre_decode_callback = &analyzer; |
| 1212 RTC_DCHECK(!video_send_config_.post_encode_callback); | 1212 RTC_DCHECK(!video_send_config_.post_encode_callback); |
| 1213 video_send_config_.post_encode_callback = analyzer.encode_timing_proxy(); | 1213 video_send_config_.post_encode_callback = analyzer.encode_timing_proxy(); |
| 1214 | 1214 |
| 1215 if (params_.screenshare.enabled) | 1215 if (params_.screenshare.enabled) |
| 1216 SetupScreenshare(); | 1216 SetupScreenshare(); |
| 1217 | 1217 |
| 1218 CreateVideoStreams(); | 1218 CreateVideoStreams(); |
| 1219 analyzer.SetSendStream(video_send_stream_); | 1219 analyzer.SetSendStream(video_send_stream_); |
| 1220 video_send_stream_->SetSource(analyzer.OutputInterface()); | 1220 video_send_stream_->SetSource( |
| 1221 analyzer.OutputInterface(), |
| 1222 VideoSendStream::DegradationPreference::kBalanced); |
| 1221 | 1223 |
| 1222 CreateCapturer(); | 1224 CreateCapturer(); |
| 1223 rtc::VideoSinkWants wants; | 1225 rtc::VideoSinkWants wants; |
| 1224 video_capturer_->AddOrUpdateSink(analyzer.InputInterface(), wants); | 1226 video_capturer_->AddOrUpdateSink(analyzer.InputInterface(), wants); |
| 1225 | 1227 |
| 1226 StartEncodedFrameLogs(video_send_stream_); | 1228 StartEncodedFrameLogs(video_send_stream_); |
| 1227 StartEncodedFrameLogs(video_receive_streams_[0]); | 1229 StartEncodedFrameLogs(video_receive_streams_[0]); |
| 1228 video_send_stream_->Start(); | 1230 video_send_stream_->Start(); |
| 1229 for (VideoReceiveStream* receive_stream : video_receive_streams_) | 1231 for (VideoReceiveStream* receive_stream : video_receive_streams_) |
| 1230 receive_stream->Start(); | 1232 receive_stream->Start(); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1358 } | 1360 } |
| 1359 | 1361 |
| 1360 if (params_.screenshare.enabled) | 1362 if (params_.screenshare.enabled) |
| 1361 SetupScreenshare(); | 1363 SetupScreenshare(); |
| 1362 | 1364 |
| 1363 video_send_stream_ = call->CreateVideoSendStream( | 1365 video_send_stream_ = call->CreateVideoSendStream( |
| 1364 video_send_config_.Copy(), video_encoder_config_.Copy()); | 1366 video_send_config_.Copy(), video_encoder_config_.Copy()); |
| 1365 video_receive_stream = call->CreateVideoReceiveStream( | 1367 video_receive_stream = call->CreateVideoReceiveStream( |
| 1366 video_receive_configs_[stream_id].Copy()); | 1368 video_receive_configs_[stream_id].Copy()); |
| 1367 CreateCapturer(); | 1369 CreateCapturer(); |
| 1368 video_send_stream_->SetSource(video_capturer_.get()); | 1370 video_send_stream_->SetSource( |
| 1371 video_capturer_.get(), |
| 1372 VideoSendStream::DegradationPreference::kBalanced); |
| 1369 } | 1373 } |
| 1370 | 1374 |
| 1371 AudioReceiveStream* audio_receive_stream = nullptr; | 1375 AudioReceiveStream* audio_receive_stream = nullptr; |
| 1372 if (params_.audio.enabled) { | 1376 if (params_.audio.enabled) { |
| 1373 SetupAudio(voe.send_channel_id, voe.receive_channel_id, call.get(), | 1377 SetupAudio(voe.send_channel_id, voe.receive_channel_id, call.get(), |
| 1374 &transport, &audio_receive_stream); | 1378 &transport, &audio_receive_stream); |
| 1375 } | 1379 } |
| 1376 | 1380 |
| 1377 StartEncodedFrameLogs(video_receive_stream); | 1381 StartEncodedFrameLogs(video_receive_stream); |
| 1378 StartEncodedFrameLogs(video_send_stream_); | 1382 StartEncodedFrameLogs(video_send_stream_); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1441 std::ostringstream str; | 1445 std::ostringstream str; |
| 1442 str << receive_logs_++; | 1446 str << receive_logs_++; |
| 1443 std::string path = | 1447 std::string path = |
| 1444 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; | 1448 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; |
| 1445 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), | 1449 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), |
| 1446 10000000); | 1450 10000000); |
| 1447 } | 1451 } |
| 1448 } | 1452 } |
| 1449 | 1453 |
| 1450 } // namespace webrtc | 1454 } // namespace webrtc |
| OLD | NEW |