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 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1205 for (auto& config : video_receive_configs_) | 1205 for (auto& config : video_receive_configs_) |
1206 config.pre_decode_callback = &analyzer; | 1206 config.pre_decode_callback = &analyzer; |
1207 RTC_DCHECK(!video_send_config_.post_encode_callback); | 1207 RTC_DCHECK(!video_send_config_.post_encode_callback); |
1208 video_send_config_.post_encode_callback = analyzer.encode_timing_proxy(); | 1208 video_send_config_.post_encode_callback = analyzer.encode_timing_proxy(); |
1209 | 1209 |
1210 if (params_.screenshare.enabled) | 1210 if (params_.screenshare.enabled) |
1211 SetupScreenshare(); | 1211 SetupScreenshare(); |
1212 | 1212 |
1213 CreateVideoStreams(); | 1213 CreateVideoStreams(); |
1214 analyzer.SetSendStream(video_send_stream_); | 1214 analyzer.SetSendStream(video_send_stream_); |
1215 video_send_stream_->SetSource(analyzer.OutputInterface()); | 1215 video_send_stream_->SetSource(analyzer.OutputInterface(), false); |
1216 | 1216 |
1217 CreateCapturer(); | 1217 CreateCapturer(); |
1218 rtc::VideoSinkWants wants; | 1218 rtc::VideoSinkWants wants; |
1219 capturer_->AddOrUpdateSink(analyzer.InputInterface(), wants); | 1219 capturer_->AddOrUpdateSink(analyzer.InputInterface(), wants); |
1220 | 1220 |
1221 StartEncodedFrameLogs(video_send_stream_); | 1221 StartEncodedFrameLogs(video_send_stream_); |
1222 StartEncodedFrameLogs(video_receive_streams_[0]); | 1222 StartEncodedFrameLogs(video_receive_streams_[0]); |
1223 video_send_stream_->Start(); | 1223 video_send_stream_->Start(); |
1224 for (VideoReceiveStream* receive_stream : video_receive_streams_) | 1224 for (VideoReceiveStream* receive_stream : video_receive_streams_) |
1225 receive_stream->Start(); | 1225 receive_stream->Start(); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1305 } | 1305 } |
1306 | 1306 |
1307 if (params_.screenshare.enabled) | 1307 if (params_.screenshare.enabled) |
1308 SetupScreenshare(); | 1308 SetupScreenshare(); |
1309 | 1309 |
1310 video_send_stream_ = call->CreateVideoSendStream( | 1310 video_send_stream_ = call->CreateVideoSendStream( |
1311 video_send_config_.Copy(), video_encoder_config_.Copy()); | 1311 video_send_config_.Copy(), video_encoder_config_.Copy()); |
1312 VideoReceiveStream* video_receive_stream = | 1312 VideoReceiveStream* video_receive_stream = |
1313 call->CreateVideoReceiveStream(video_receive_configs_[stream_id].Copy()); | 1313 call->CreateVideoReceiveStream(video_receive_configs_[stream_id].Copy()); |
1314 CreateCapturer(); | 1314 CreateCapturer(); |
1315 video_send_stream_->SetSource(capturer_.get()); | 1315 video_send_stream_->SetSource(capturer_.get(), false); |
1316 | 1316 |
1317 AudioReceiveStream* audio_receive_stream = nullptr; | 1317 AudioReceiveStream* audio_receive_stream = nullptr; |
1318 if (params_.audio) { | 1318 if (params_.audio) { |
1319 audio_send_config_ = AudioSendStream::Config(&transport); | 1319 audio_send_config_ = AudioSendStream::Config(&transport); |
1320 audio_send_config_.voe_channel_id = voe.send_channel_id; | 1320 audio_send_config_.voe_channel_id = voe.send_channel_id; |
1321 audio_send_config_.rtp.ssrc = kAudioSendSsrc; | 1321 audio_send_config_.rtp.ssrc = kAudioSendSsrc; |
1322 | 1322 |
1323 // Add extension to enable audio send side BWE, and allow audio bit rate | 1323 // Add extension to enable audio send side BWE, and allow audio bit rate |
1324 // adaptation. | 1324 // adaptation. |
1325 audio_send_config_.rtp.extensions.clear(); | 1325 audio_send_config_.rtp.extensions.clear(); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1419 std::ostringstream str; | 1419 std::ostringstream str; |
1420 str << receive_logs_++; | 1420 str << receive_logs_++; |
1421 std::string path = | 1421 std::string path = |
1422 params_.common.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; | 1422 params_.common.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; |
1423 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), | 1423 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), |
1424 10000000); | 1424 10000000); |
1425 } | 1425 } |
1426 } | 1426 } |
1427 | 1427 |
1428 } // namespace webrtc | 1428 } // namespace webrtc |
OLD | NEW |