| 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 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1294 | 1294 |
| 1295 video_send_config_.rtp.extensions.clear(); | 1295 video_send_config_.rtp.extensions.clear(); |
| 1296 if (params_.call.send_side_bwe) { | 1296 if (params_.call.send_side_bwe) { |
| 1297 video_send_config_.rtp.extensions.push_back( | 1297 video_send_config_.rtp.extensions.push_back( |
| 1298 RtpExtension(RtpExtension::kTransportSequenceNumberUri, | 1298 RtpExtension(RtpExtension::kTransportSequenceNumberUri, |
| 1299 test::kTransportSequenceNumberExtensionId)); | 1299 test::kTransportSequenceNumberExtensionId)); |
| 1300 } else { | 1300 } else { |
| 1301 video_send_config_.rtp.extensions.push_back(RtpExtension( | 1301 video_send_config_.rtp.extensions.push_back(RtpExtension( |
| 1302 RtpExtension::kAbsSendTimeUri, test::kAbsSendTimeExtensionId)); | 1302 RtpExtension::kAbsSendTimeUri, test::kAbsSendTimeExtensionId)); |
| 1303 } | 1303 } |
| 1304 video_send_config_.rtp.extensions.push_back(RtpExtension( |
| 1305 RtpExtension::kVideoContentTypeUri, test::kVideoContentTypeExtensionId)); |
| 1304 | 1306 |
| 1305 video_encoder_config_.min_transmit_bitrate_bps = | 1307 video_encoder_config_.min_transmit_bitrate_bps = |
| 1306 params_.video.min_transmit_bps; | 1308 params_.video.min_transmit_bps; |
| 1307 | 1309 |
| 1308 video_send_config_.suspend_below_min_bitrate = | 1310 video_send_config_.suspend_below_min_bitrate = |
| 1309 params_.video.suspend_below_min_bitrate; | 1311 params_.video.suspend_below_min_bitrate; |
| 1310 | 1312 |
| 1311 video_encoder_config_.number_of_streams = params_.ss.streams.size(); | 1313 video_encoder_config_.number_of_streams = params_.ss.streams.size(); |
| 1312 video_encoder_config_.max_bitrate_bps = 0; | 1314 video_encoder_config_.max_bitrate_bps = 0; |
| 1313 for (size_t i = 0; i < params_.ss.streams.size(); ++i) { | 1315 for (size_t i = 0; i < params_.ss.streams.size(); ++i) { |
| 1314 video_encoder_config_.max_bitrate_bps += | 1316 video_encoder_config_.max_bitrate_bps += |
| 1315 params_.ss.streams[i].max_bitrate_bps; | 1317 params_.ss.streams[i].max_bitrate_bps; |
| 1316 } | 1318 } |
| 1317 video_encoder_config_.video_stream_factory = | 1319 video_encoder_config_.video_stream_factory = |
| 1318 new rtc::RefCountedObject<VideoStreamFactory>(params_.ss.streams); | 1320 new rtc::RefCountedObject<VideoStreamFactory>(params_.ss.streams); |
| 1319 | 1321 |
| 1320 video_encoder_config_.spatial_layers = params_.ss.spatial_layers; | 1322 video_encoder_config_.spatial_layers = params_.ss.spatial_layers; |
| 1321 | 1323 |
| 1322 CreateMatchingReceiveConfigs(recv_transport); | 1324 CreateMatchingReceiveConfigs(recv_transport); |
| 1323 | 1325 |
| 1324 for (size_t i = 0; i < num_video_streams; ++i) { | 1326 for (size_t i = 0; i < num_video_streams; ++i) { |
| 1325 video_receive_configs_[i].rtp.nack.rtp_history_ms = kNackRtpHistoryMs; | 1327 video_receive_configs_[i].rtp.nack.rtp_history_ms = kNackRtpHistoryMs; |
| 1326 video_receive_configs_[i].rtp.rtx_ssrc = kSendRtxSsrcs[i]; | 1328 video_receive_configs_[i].rtp.rtx_ssrc = kSendRtxSsrcs[i]; |
| 1327 video_receive_configs_[i].rtp.rtx_payload_types[payload_type] = | 1329 video_receive_configs_[i].rtp.rtx_payload_types[payload_type] = |
| 1328 kSendRtxPayloadType; | 1330 kSendRtxPayloadType; |
| 1329 video_receive_configs_[i].rtp.transport_cc = params_.call.send_side_bwe; | 1331 video_receive_configs_[i].rtp.transport_cc = params_.call.send_side_bwe; |
| 1330 video_receive_configs_[i].rtp.remb = !params_.call.send_side_bwe; | 1332 video_receive_configs_[i].rtp.remb = !params_.call.send_side_bwe; |
| 1333 // Enable RTT calculation so NTP time estimator will work. |
| 1334 video_receive_configs_[i].rtp.rtcp_xr.receiver_reference_time_report = true; |
| 1331 // Force fake decoders on non-selected simulcast streams. | 1335 // Force fake decoders on non-selected simulcast streams. |
| 1332 if (i != params_.ss.selected_stream) { | 1336 if (i != params_.ss.selected_stream) { |
| 1333 VideoReceiveStream::Decoder decoder; | 1337 VideoReceiveStream::Decoder decoder; |
| 1334 decoder.decoder = new test::FakeDecoder(); | 1338 decoder.decoder = new test::FakeDecoder(); |
| 1335 decoder.payload_type = video_send_config_.encoder_settings.payload_type; | 1339 decoder.payload_type = video_send_config_.encoder_settings.payload_type; |
| 1336 decoder.payload_name = video_send_config_.encoder_settings.payload_name; | 1340 decoder.payload_name = video_send_config_.encoder_settings.payload_name; |
| 1337 video_receive_configs_[i].decoders.clear(); | 1341 video_receive_configs_[i].decoders.clear(); |
| 1338 allocated_decoders_.emplace_back(decoder.decoder); | 1342 allocated_decoders_.emplace_back(decoder.decoder); |
| 1339 video_receive_configs_[i].decoders.push_back(decoder); | 1343 video_receive_configs_[i].decoders.push_back(decoder); |
| 1340 } | 1344 } |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1897 if (!params_.video.encoded_frame_base_path.empty()) { | 1901 if (!params_.video.encoded_frame_base_path.empty()) { |
| 1898 std::ostringstream str; | 1902 std::ostringstream str; |
| 1899 str << receive_logs_++; | 1903 str << receive_logs_++; |
| 1900 std::string path = | 1904 std::string path = |
| 1901 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; | 1905 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; |
| 1902 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), | 1906 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), |
| 1903 10000000); | 1907 10000000); |
| 1904 } | 1908 } |
| 1905 } | 1909 } |
| 1906 } // namespace webrtc | 1910 } // namespace webrtc |
| OLD | NEW |