Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 | 10 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 125 EXPECT_NE(interval_ms, default_interval_ms); | 125 EXPECT_NE(interval_ms, default_interval_ms); |
| 126 } | 126 } |
| 127 | 127 |
| 128 TEST_F(DelayBasedBweTest, InitialBehavior) { | 128 TEST_F(DelayBasedBweTest, InitialBehavior) { |
| 129 InitialBehaviorTestHelper(674840); | 129 InitialBehaviorTestHelper(674840); |
| 130 } | 130 } |
| 131 | 131 |
| 132 TEST_F(DelayBasedBweTest, RateIncreaseReordering) { | 132 TEST_F(DelayBasedBweTest, RateIncreaseReordering) { |
| 133 RateIncreaseReorderingTestHelper(674840); | 133 RateIncreaseReorderingTestHelper(674840); |
| 134 } | 134 } |
| 135 | |
| 136 TEST_F(DelayBasedBweTest, RateIncreaseRtpTimestamps) { | 135 TEST_F(DelayBasedBweTest, RateIncreaseRtpTimestamps) { |
| 137 RateIncreaseRtpTimestampsTestHelper(1240); | 136 RateIncreaseRtpTimestampsTestHelper(1240); |
| 138 } | 137 } |
| 139 | 138 |
| 140 TEST_F(DelayBasedBweTest, CapacityDropOneStream) { | 139 TEST_F(DelayBasedBweTest, CapacityDropOneStream) { |
| 141 CapacityDropTestHelper(1, false, 567, 0); | 140 CapacityDropTestHelper(1, false, 600, 0); |
| 142 } | 141 } |
| 143 | 142 |
| 144 TEST_F(DelayBasedBweTest, CapacityDropPosOffsetChange) { | 143 TEST_F(DelayBasedBweTest, CapacityDropPosOffsetChange) { |
| 145 CapacityDropTestHelper(1, false, 200, 30000); | 144 CapacityDropTestHelper(1, false, 767, 30000); |
|
terelius
2017/03/28 12:18:21
Are you happy with the new values?
stefan-webrtc
2017/03/30 08:30:47
I think they are fine. They will change again once
| |
| 146 } | 145 } |
| 147 | 146 |
| 148 TEST_F(DelayBasedBweTest, CapacityDropNegOffsetChange) { | 147 TEST_F(DelayBasedBweTest, CapacityDropNegOffsetChange) { |
| 149 CapacityDropTestHelper(1, false, 733, -30000); | 148 CapacityDropTestHelper(1, false, 1400, -30000); |
| 150 } | 149 } |
| 151 | 150 |
| 152 TEST_F(DelayBasedBweTest, CapacityDropOneStreamWrap) { | 151 TEST_F(DelayBasedBweTest, CapacityDropOneStreamWrap) { |
| 153 CapacityDropTestHelper(1, true, 567, 0); | 152 CapacityDropTestHelper(1, true, 600, 0); |
| 154 } | 153 } |
| 155 | |
| 156 TEST_F(DelayBasedBweTest, TestTimestampGrouping) { | 154 TEST_F(DelayBasedBweTest, TestTimestampGrouping) { |
| 157 TestTimestampGroupingTestHelper(); | 155 TestTimestampGroupingTestHelper(); |
| 158 } | 156 } |
| 159 | 157 |
| 160 TEST_F(DelayBasedBweTest, TestShortTimeoutAndWrap) { | 158 TEST_F(DelayBasedBweTest, TestShortTimeoutAndWrap) { |
| 161 // Simulate a client leaving and rejoining the call after 35 seconds. This | 159 // Simulate a client leaving and rejoining the call after 35 seconds. This |
| 162 // will make abs send time wrap, so if streams aren't timed out properly | 160 // will make abs send time wrap, so if streams aren't timed out properly |
| 163 // the next 30 seconds of packets will be out of order. | 161 // the next 30 seconds of packets will be out of order. |
| 164 TestWrappingHelper(35); | 162 TestWrappingHelper(35); |
| 165 } | 163 } |
| 166 | 164 |
| 167 TEST_F(DelayBasedBweTest, TestLongTimeoutAndWrap) { | 165 TEST_F(DelayBasedBweTest, TestLongTimeoutAndWrap) { |
| 168 // Simulate a client leaving and rejoining the call after some multiple of | 166 // Simulate a client leaving and rejoining the call after some multiple of |
| 169 // 64 seconds later. This will cause a zero difference in abs send times due | 167 // 64 seconds later. This will cause a zero difference in abs send times due |
| 170 // to the wrap, but a big difference in arrival time, if streams aren't | 168 // to the wrap, but a big difference in arrival time, if streams aren't |
| 171 // properly timed out. | 169 // properly timed out. |
| 172 TestWrappingHelper(10 * 64); | 170 TestWrappingHelper(10 * 64); |
| 173 } | 171 } |
| 174 | 172 |
| 175 class DelayBasedBweExperimentTest : public DelayBasedBweTest { | 173 class DelayBasedBweExperimentTest : public DelayBasedBweTest { |
|
terelius
2017/03/28 12:18:21
Shouldn't this be removed and ImprovedBitrateEstim
stefan-webrtc
2017/03/30 08:30:47
That ended up being a separate CL, but yes, both w
| |
| 176 public: | 174 public: |
| 177 DelayBasedBweExperimentTest() | 175 DelayBasedBweExperimentTest() |
| 178 : override_field_trials_("WebRTC-ImprovedBitrateEstimate/Enabled/") { | 176 : override_field_trials_("WebRTC-ImprovedBitrateEstimate/Enabled/") { |
| 179 bitrate_estimator_.reset(new DelayBasedBwe(nullptr, &clock_)); | 177 bitrate_estimator_.reset(new DelayBasedBwe(nullptr, &clock_)); |
| 180 } | 178 } |
| 181 | 179 |
| 182 private: | 180 private: |
| 183 test::ScopedFieldTrials override_field_trials_; | 181 test::ScopedFieldTrials override_field_trials_; |
| 184 }; | 182 }; |
| 185 | 183 |
| 186 TEST_F(DelayBasedBweExperimentTest, RateIncreaseRtpTimestamps) { | 184 TEST_F(DelayBasedBweExperimentTest, RateIncreaseRtpTimestamps) { |
| 187 RateIncreaseRtpTimestampsTestHelper(1288); | 185 RateIncreaseRtpTimestampsTestHelper(1288); |
| 188 } | 186 } |
| 189 | 187 |
| 190 TEST_F(DelayBasedBweExperimentTest, CapacityDropOneStream) { | 188 TEST_F(DelayBasedBweExperimentTest, CapacityDropOneStream) { |
| 191 CapacityDropTestHelper(1, false, 333, 0); | 189 CapacityDropTestHelper(1, false, 333, 0); |
| 192 } | 190 } |
| 193 | 191 |
| 194 TEST_F(DelayBasedBweExperimentTest, CapacityDropPosOffsetChange) { | 192 TEST_F(DelayBasedBweExperimentTest, CapacityDropPosOffsetChange) { |
| 195 CapacityDropTestHelper(1, false, 300, 30000); | 193 CapacityDropTestHelper(1, false, 867, 30000); |
| 196 } | 194 } |
| 197 | 195 |
| 198 TEST_F(DelayBasedBweExperimentTest, CapacityDropNegOffsetChange) { | 196 TEST_F(DelayBasedBweExperimentTest, CapacityDropNegOffsetChange) { |
| 199 CapacityDropTestHelper(1, false, 300, -30000); | 197 CapacityDropTestHelper(1, false, 867, -30000); |
| 200 } | 198 } |
| 201 | 199 |
| 202 TEST_F(DelayBasedBweExperimentTest, CapacityDropOneStreamWrap) { | 200 TEST_F(DelayBasedBweExperimentTest, CapacityDropOneStreamWrap) { |
| 203 CapacityDropTestHelper(1, true, 333, 0); | 201 CapacityDropTestHelper(1, true, 333, 0); |
| 204 } | 202 } |
| 205 | 203 |
| 206 class DelayBasedBweTrendlineExperimentTest : public DelayBasedBweTest { | |
| 207 public: | |
| 208 DelayBasedBweTrendlineExperimentTest() | |
| 209 : override_field_trials_("WebRTC-BweTrendlineFilter/Enabled-15,0.9,4/") { | |
| 210 bitrate_estimator_.reset(new DelayBasedBwe(nullptr, &clock_)); | |
| 211 } | |
| 212 | |
| 213 private: | |
| 214 test::ScopedFieldTrials override_field_trials_; | |
| 215 }; | |
| 216 | |
| 217 TEST_F(DelayBasedBweTrendlineExperimentTest, RateIncreaseRtpTimestamps) { | |
| 218 RateIncreaseRtpTimestampsTestHelper(1240); | |
| 219 } | |
| 220 | |
| 221 TEST_F(DelayBasedBweTrendlineExperimentTest, CapacityDropOneStream) { | |
| 222 CapacityDropTestHelper(1, false, 600, 0); | |
| 223 } | |
| 224 | |
| 225 TEST_F(DelayBasedBweTrendlineExperimentTest, CapacityDropPosOffsetChange) { | |
| 226 CapacityDropTestHelper(1, false, 600, 30000); | |
| 227 } | |
| 228 | |
| 229 TEST_F(DelayBasedBweTrendlineExperimentTest, CapacityDropNegOffsetChange) { | |
| 230 CapacityDropTestHelper(1, false, 1267, -30000); | |
| 231 } | |
| 232 | |
| 233 TEST_F(DelayBasedBweTrendlineExperimentTest, CapacityDropOneStreamWrap) { | |
| 234 CapacityDropTestHelper(1, true, 600, 0); | |
| 235 } | |
| 236 | |
| 237 class DelayBasedBweMedianSlopeExperimentTest : public DelayBasedBweTest { | 204 class DelayBasedBweMedianSlopeExperimentTest : public DelayBasedBweTest { |
| 238 public: | 205 public: |
| 239 DelayBasedBweMedianSlopeExperimentTest() | 206 DelayBasedBweMedianSlopeExperimentTest() |
| 240 : override_field_trials_("WebRTC-BweMedianSlopeFilter/Enabled-20,4/") { | 207 : override_field_trials_("WebRTC-BweMedianSlopeFilter/Enabled-20,4/") { |
| 241 bitrate_estimator_.reset(new DelayBasedBwe(nullptr, &clock_)); | 208 bitrate_estimator_.reset(new DelayBasedBwe(nullptr, &clock_)); |
| 242 } | 209 } |
| 243 | 210 |
| 244 private: | 211 private: |
| 245 test::ScopedFieldTrials override_field_trials_; | 212 test::ScopedFieldTrials override_field_trials_; |
| 246 }; | 213 }; |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 259 | 226 |
| 260 TEST_F(DelayBasedBweMedianSlopeExperimentTest, CapacityDropNegOffsetChange) { | 227 TEST_F(DelayBasedBweMedianSlopeExperimentTest, CapacityDropNegOffsetChange) { |
| 261 CapacityDropTestHelper(1, false, 1267, -30000); | 228 CapacityDropTestHelper(1, false, 1267, -30000); |
| 262 } | 229 } |
| 263 | 230 |
| 264 TEST_F(DelayBasedBweMedianSlopeExperimentTest, CapacityDropOneStreamWrap) { | 231 TEST_F(DelayBasedBweMedianSlopeExperimentTest, CapacityDropOneStreamWrap) { |
| 265 CapacityDropTestHelper(1, true, 600, 0); | 232 CapacityDropTestHelper(1, true, 600, 0); |
| 266 } | 233 } |
| 267 | 234 |
| 268 } // namespace webrtc | 235 } // namespace webrtc |
| OLD | NEW |