OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 <functional> | 10 #include <functional> |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 receiver_log_.PushExpectedLogLine(kSingleStreamLog); | 270 receiver_log_.PushExpectedLogLine(kSingleStreamLog); |
271 streams_.push_back(new Stream(this, false)); | 271 streams_.push_back(new Stream(this, false)); |
272 EXPECT_TRUE(receiver_log_.Wait()); | 272 EXPECT_TRUE(receiver_log_.Wait()); |
273 } | 273 } |
274 | 274 |
275 TEST_F(BitrateEstimatorTest, ImmediatelySwitchToASTForVideo) { | 275 TEST_F(BitrateEstimatorTest, ImmediatelySwitchToASTForVideo) { |
276 video_send_config_.rtp.extensions.push_back( | 276 video_send_config_.rtp.extensions.push_back( |
277 RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId)); | 277 RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId)); |
278 receiver_log_.PushExpectedLogLine(kSingleStreamLog); | 278 receiver_log_.PushExpectedLogLine(kSingleStreamLog); |
279 receiver_log_.PushExpectedLogLine(kSingleStreamLog); | 279 receiver_log_.PushExpectedLogLine(kSingleStreamLog); |
| 280 receiver_log_.PushExpectedLogLine(kAbsSendTimeLog); |
280 receiver_log_.PushExpectedLogLine("Switching to absolute send time RBE."); | 281 receiver_log_.PushExpectedLogLine("Switching to absolute send time RBE."); |
281 receiver_log_.PushExpectedLogLine(kAbsSendTimeLog); | |
282 streams_.push_back(new Stream(this, false)); | 282 streams_.push_back(new Stream(this, false)); |
283 EXPECT_TRUE(receiver_log_.Wait()); | 283 EXPECT_TRUE(receiver_log_.Wait()); |
284 } | 284 } |
285 | 285 |
286 TEST_F(BitrateEstimatorTest, SwitchesToASTForVideo) { | 286 TEST_F(BitrateEstimatorTest, SwitchesToASTForVideo) { |
287 video_send_config_.rtp.extensions.push_back( | 287 video_send_config_.rtp.extensions.push_back( |
288 RtpExtension(RtpExtension::kTOffset, kTOFExtensionId)); | 288 RtpExtension(RtpExtension::kTOffset, kTOFExtensionId)); |
289 receiver_log_.PushExpectedLogLine(kSingleStreamLog); | 289 receiver_log_.PushExpectedLogLine(kSingleStreamLog); |
290 receiver_log_.PushExpectedLogLine(kSingleStreamLog); | 290 receiver_log_.PushExpectedLogLine(kSingleStreamLog); |
291 streams_.push_back(new Stream(this, false)); | 291 streams_.push_back(new Stream(this, false)); |
292 EXPECT_TRUE(receiver_log_.Wait()); | 292 EXPECT_TRUE(receiver_log_.Wait()); |
293 | 293 |
294 video_send_config_.rtp.extensions[0] = | 294 video_send_config_.rtp.extensions[0] = |
295 RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId); | 295 RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId); |
| 296 receiver_log_.PushExpectedLogLine(kAbsSendTimeLog); |
296 receiver_log_.PushExpectedLogLine("Switching to absolute send time RBE."); | 297 receiver_log_.PushExpectedLogLine("Switching to absolute send time RBE."); |
297 receiver_log_.PushExpectedLogLine(kAbsSendTimeLog); | |
298 streams_.push_back(new Stream(this, false)); | 298 streams_.push_back(new Stream(this, false)); |
299 EXPECT_TRUE(receiver_log_.Wait()); | 299 EXPECT_TRUE(receiver_log_.Wait()); |
300 } | 300 } |
301 | 301 |
302 TEST_F(BitrateEstimatorTest, SwitchesToASTThenBackToTOFForVideo) { | 302 TEST_F(BitrateEstimatorTest, SwitchesToASTThenBackToTOFForVideo) { |
303 video_send_config_.rtp.extensions.push_back( | 303 video_send_config_.rtp.extensions.push_back( |
304 RtpExtension(RtpExtension::kTOffset, kTOFExtensionId)); | 304 RtpExtension(RtpExtension::kTOffset, kTOFExtensionId)); |
305 receiver_log_.PushExpectedLogLine(kSingleStreamLog); | 305 receiver_log_.PushExpectedLogLine(kSingleStreamLog); |
306 receiver_log_.PushExpectedLogLine(kSingleStreamLog); | 306 receiver_log_.PushExpectedLogLine(kSingleStreamLog); |
307 streams_.push_back(new Stream(this, false)); | 307 streams_.push_back(new Stream(this, false)); |
308 EXPECT_TRUE(receiver_log_.Wait()); | 308 EXPECT_TRUE(receiver_log_.Wait()); |
309 | 309 |
310 video_send_config_.rtp.extensions[0] = | 310 video_send_config_.rtp.extensions[0] = |
311 RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId); | 311 RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId); |
| 312 receiver_log_.PushExpectedLogLine(kAbsSendTimeLog); |
312 receiver_log_.PushExpectedLogLine("Switching to absolute send time RBE."); | 313 receiver_log_.PushExpectedLogLine("Switching to absolute send time RBE."); |
313 receiver_log_.PushExpectedLogLine(kAbsSendTimeLog); | |
314 streams_.push_back(new Stream(this, false)); | 314 streams_.push_back(new Stream(this, false)); |
315 EXPECT_TRUE(receiver_log_.Wait()); | 315 EXPECT_TRUE(receiver_log_.Wait()); |
316 | 316 |
317 video_send_config_.rtp.extensions[0] = | 317 video_send_config_.rtp.extensions[0] = |
318 RtpExtension(RtpExtension::kTOffset, kTOFExtensionId); | 318 RtpExtension(RtpExtension::kTOffset, kTOFExtensionId); |
| 319 receiver_log_.PushExpectedLogLine(kAbsSendTimeLog); |
319 receiver_log_.PushExpectedLogLine( | 320 receiver_log_.PushExpectedLogLine( |
320 "WrappingBitrateEstimator: Switching to transmission time offset RBE."); | 321 "WrappingBitrateEstimator: Switching to transmission time offset RBE."); |
321 receiver_log_.PushExpectedLogLine(kSingleStreamLog); | |
322 streams_.push_back(new Stream(this, false)); | 322 streams_.push_back(new Stream(this, false)); |
323 streams_[0]->StopSending(); | 323 streams_[0]->StopSending(); |
324 streams_[1]->StopSending(); | 324 streams_[1]->StopSending(); |
325 EXPECT_TRUE(receiver_log_.Wait()); | 325 EXPECT_TRUE(receiver_log_.Wait()); |
326 } | 326 } |
327 } // namespace webrtc | 327 } // namespace webrtc |
OLD | NEW |