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 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1025 video_receive_configs_[i].rtp.transport_cc = params_.common.send_side_bwe; | 1025 video_receive_configs_[i].rtp.transport_cc = params_.common.send_side_bwe; |
1026 } | 1026 } |
1027 } | 1027 } |
1028 | 1028 |
1029 void VideoQualityTest::SetupScreenshare() { | 1029 void VideoQualityTest::SetupScreenshare() { |
1030 RTC_CHECK(params_.screenshare.enabled); | 1030 RTC_CHECK(params_.screenshare.enabled); |
1031 | 1031 |
1032 // Fill out codec settings. | 1032 // Fill out codec settings. |
1033 video_encoder_config_.content_type = VideoEncoderConfig::ContentType::kScreen; | 1033 video_encoder_config_.content_type = VideoEncoderConfig::ContentType::kScreen; |
1034 if (params_.common.codec == "VP8") { | 1034 if (params_.common.codec == "VP8") { |
1035 codec_settings_.VP8 = VideoEncoder::GetDefaultVp8Settings(); | 1035 VideoCodecVP8 vp8_settings = VideoEncoder::GetDefaultVp8Settings(); |
1036 codec_settings_.VP8.denoisingOn = false; | 1036 vp8_settings.denoisingOn = false; |
1037 codec_settings_.VP8.frameDroppingOn = false; | 1037 vp8_settings.frameDroppingOn = false; |
1038 codec_settings_.VP8.numberOfTemporalLayers = | 1038 vp8_settings.numberOfTemporalLayers = |
1039 static_cast<unsigned char>(params_.common.num_temporal_layers); | 1039 static_cast<unsigned char>(params_.common.num_temporal_layers); |
1040 video_encoder_config_.encoder_specific_settings = &codec_settings_.VP8; | 1040 video_encoder_config_.encoder_specific_settings = new rtc::RefCountedObject< |
| 1041 VideoEncoderConfig::Vp8EncoderSpecificSettings>(vp8_settings); |
1041 } else if (params_.common.codec == "VP9") { | 1042 } else if (params_.common.codec == "VP9") { |
1042 codec_settings_.VP9 = VideoEncoder::GetDefaultVp9Settings(); | 1043 VideoCodecVP9 vp9_settings = VideoEncoder::GetDefaultVp9Settings(); |
1043 codec_settings_.VP9.denoisingOn = false; | 1044 vp9_settings.denoisingOn = false; |
1044 codec_settings_.VP9.frameDroppingOn = false; | 1045 vp9_settings.frameDroppingOn = false; |
1045 codec_settings_.VP9.numberOfTemporalLayers = | 1046 vp9_settings.numberOfTemporalLayers = |
1046 static_cast<unsigned char>(params_.common.num_temporal_layers); | 1047 static_cast<unsigned char>(params_.common.num_temporal_layers); |
1047 video_encoder_config_.encoder_specific_settings = &codec_settings_.VP9; | 1048 vp9_settings.numberOfSpatialLayers = |
1048 codec_settings_.VP9.numberOfSpatialLayers = | |
1049 static_cast<unsigned char>(params_.ss.num_spatial_layers); | 1049 static_cast<unsigned char>(params_.ss.num_spatial_layers); |
| 1050 video_encoder_config_.encoder_specific_settings = new rtc::RefCountedObject< |
| 1051 VideoEncoderConfig::Vp9EncoderSpecificSettings>(vp9_settings); |
1050 } | 1052 } |
1051 | 1053 |
1052 // Setup frame generator. | 1054 // Setup frame generator. |
1053 const size_t kWidth = 1850; | 1055 const size_t kWidth = 1850; |
1054 const size_t kHeight = 1110; | 1056 const size_t kHeight = 1110; |
1055 std::vector<std::string> slides; | 1057 std::vector<std::string> slides; |
1056 slides.push_back(test::ResourcePath("web_screenshot_1850_1110", "yuv")); | 1058 slides.push_back(test::ResourcePath("web_screenshot_1850_1110", "yuv")); |
1057 slides.push_back(test::ResourcePath("presentation_1850_1110", "yuv")); | 1059 slides.push_back(test::ResourcePath("presentation_1850_1110", "yuv")); |
1058 slides.push_back(test::ResourcePath("photo_1850_1110", "yuv")); | 1060 slides.push_back(test::ResourcePath("photo_1850_1110", "yuv")); |
1059 slides.push_back(test::ResourcePath("difficult_photo_1850_1110", "yuv")); | 1061 slides.push_back(test::ResourcePath("difficult_photo_1850_1110", "yuv")); |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1356 call->DestroyAudioSendStream(audio_send_stream_); | 1358 call->DestroyAudioSendStream(audio_send_stream_); |
1357 call->DestroyAudioReceiveStream(audio_receive_stream); | 1359 call->DestroyAudioReceiveStream(audio_receive_stream); |
1358 } | 1360 } |
1359 | 1361 |
1360 transport.StopSending(); | 1362 transport.StopSending(); |
1361 if (params_.audio) | 1363 if (params_.audio) |
1362 DestroyVoiceEngine(&voe); | 1364 DestroyVoiceEngine(&voe); |
1363 } | 1365 } |
1364 | 1366 |
1365 } // namespace webrtc | 1367 } // namespace webrtc |
OLD | NEW |