| 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 capturer_->AddOrUpdateSink(analyzer.InputInterface(), wants); | 1226 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1310 } | 1312 } |
| 1311 | 1313 |
| 1312 if (params_.screenshare.enabled) | 1314 if (params_.screenshare.enabled) |
| 1313 SetupScreenshare(); | 1315 SetupScreenshare(); |
| 1314 | 1316 |
| 1315 video_send_stream_ = call->CreateVideoSendStream( | 1317 video_send_stream_ = call->CreateVideoSendStream( |
| 1316 video_send_config_.Copy(), video_encoder_config_.Copy()); | 1318 video_send_config_.Copy(), video_encoder_config_.Copy()); |
| 1317 VideoReceiveStream* video_receive_stream = | 1319 VideoReceiveStream* video_receive_stream = |
| 1318 call->CreateVideoReceiveStream(video_receive_configs_[stream_id].Copy()); | 1320 call->CreateVideoReceiveStream(video_receive_configs_[stream_id].Copy()); |
| 1319 CreateCapturer(); | 1321 CreateCapturer(); |
| 1320 video_send_stream_->SetSource(capturer_.get()); | 1322 video_send_stream_->SetSource( |
| 1323 capturer_.get(), VideoSendStream::DegradationPreference::kBalanced); |
| 1321 | 1324 |
| 1322 AudioReceiveStream* audio_receive_stream = nullptr; | 1325 AudioReceiveStream* audio_receive_stream = nullptr; |
| 1323 if (params_.audio.enabled) { | 1326 if (params_.audio.enabled) { |
| 1324 audio_send_config_ = AudioSendStream::Config(&transport); | 1327 audio_send_config_ = AudioSendStream::Config(&transport); |
| 1325 audio_send_config_.voe_channel_id = voe.send_channel_id; | 1328 audio_send_config_.voe_channel_id = voe.send_channel_id; |
| 1326 audio_send_config_.rtp.ssrc = kAudioSendSsrc; | 1329 audio_send_config_.rtp.ssrc = kAudioSendSsrc; |
| 1327 | 1330 |
| 1328 // Add extension to enable audio send side BWE, and allow audio bit rate | 1331 // Add extension to enable audio send side BWE, and allow audio bit rate |
| 1329 // adaptation. | 1332 // adaptation. |
| 1330 audio_send_config_.rtp.extensions.clear(); | 1333 audio_send_config_.rtp.extensions.clear(); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1423 std::ostringstream str; | 1426 std::ostringstream str; |
| 1424 str << receive_logs_++; | 1427 str << receive_logs_++; |
| 1425 std::string path = | 1428 std::string path = |
| 1426 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; | 1429 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; |
| 1427 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), | 1430 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), |
| 1428 10000000); | 1431 10000000); |
| 1429 } | 1432 } |
| 1430 } | 1433 } |
| 1431 | 1434 |
| 1432 } // namespace webrtc | 1435 } // namespace webrtc |
| OLD | NEW |