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 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1160 // Static. | 1160 // Static. |
1161 VideoStream VideoQualityTest::DefaultVideoStream(const Params& params) { | 1161 VideoStream VideoQualityTest::DefaultVideoStream(const Params& params) { |
1162 VideoStream stream; | 1162 VideoStream stream; |
1163 stream.width = params.video.width; | 1163 stream.width = params.video.width; |
1164 stream.height = params.video.height; | 1164 stream.height = params.video.height; |
1165 stream.max_framerate = params.video.fps; | 1165 stream.max_framerate = params.video.fps; |
1166 stream.min_bitrate_bps = params.video.min_bitrate_bps; | 1166 stream.min_bitrate_bps = params.video.min_bitrate_bps; |
1167 stream.target_bitrate_bps = params.video.target_bitrate_bps; | 1167 stream.target_bitrate_bps = params.video.target_bitrate_bps; |
1168 stream.max_bitrate_bps = params.video.max_bitrate_bps; | 1168 stream.max_bitrate_bps = params.video.max_bitrate_bps; |
1169 stream.max_qp = 52; | 1169 stream.max_qp = 52; |
1170 if (params.video.num_temporal_layers > 1) { | 1170 // TODO(sprang): Can we make this less of a hack? |
1171 RTC_CHECK_LE(params.video.num_temporal_layers, kMaxTemporalStreams); | 1171 if (params.screenshare.enabled && params.video.codec == "VP8" && |
1172 if (params.video.codec == "VP8") { | 1172 params.video.num_temporal_layers == 2) { |
1173 for (int i = 0; i < params.video.num_temporal_layers - 1; ++i) { | 1173 // Hack for VP8 screenshare_layers. |
ilnik
2017/03/10 13:43:39
We have a VP8 simulcast tests with 3 temporal laye
sprang_webrtc
2017/03/10 15:50:54
Dammit. These settings are dcheck'd but not honore
| |
1174 stream.temporal_layer_thresholds_bps.push_back(static_cast<int>( | 1174 stream.temporal_layer_thresholds_bps.push_back(stream.target_bitrate_bps); |
1175 stream.target_bitrate_bps * | 1175 } else if (params.video.num_temporal_layers == 3) { |
1176 kVp8LayerRateAlloction[params.video.num_temporal_layers][i])); | 1176 stream.temporal_layer_thresholds_bps.push_back(stream.max_bitrate_bps / 4); |
1177 } | 1177 stream.temporal_layer_thresholds_bps.push_back(stream.target_bitrate_bps); |
1178 } | |
1179 } | 1178 } |
1180 return stream; | 1179 return stream; |
1181 } | 1180 } |
1182 | 1181 |
1183 // Static. | 1182 // Static. |
1184 VideoStream VideoQualityTest::DefaultThumbnailStream() { | 1183 VideoStream VideoQualityTest::DefaultThumbnailStream() { |
1185 VideoStream stream; | 1184 VideoStream stream; |
1186 stream.width = 320; | 1185 stream.width = 320; |
1187 stream.height = 180; | 1186 stream.height = 180; |
1188 stream.max_framerate = 7; | 1187 stream.max_framerate = 7; |
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1896 if (!params_.video.encoded_frame_base_path.empty()) { | 1895 if (!params_.video.encoded_frame_base_path.empty()) { |
1897 std::ostringstream str; | 1896 std::ostringstream str; |
1898 str << receive_logs_++; | 1897 str << receive_logs_++; |
1899 std::string path = | 1898 std::string path = |
1900 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; | 1899 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; |
1901 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), | 1900 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), |
1902 10000000); | 1901 10000000); |
1903 } | 1902 } |
1904 } | 1903 } |
1905 } // namespace webrtc | 1904 } // namespace webrtc |
OLD | NEW |