Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: webrtc/call/rampup_tests.cc

Issue 1984983002: Remove use of RtpHeaderExtension and clean up (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed nit Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 10
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 expected_bitrate_bps_ = encoder_config->streams.back().min_bitrate_bps; 114 expected_bitrate_bps_ = encoder_config->streams.back().min_bitrate_bps;
115 for (size_t i = 0; i < encoder_config->streams.size() - 1; ++i) { 115 for (size_t i = 0; i < encoder_config->streams.size() - 1; ++i) {
116 expected_bitrate_bps_ += encoder_config->streams[i].target_bitrate_bps; 116 expected_bitrate_bps_ += encoder_config->streams[i].target_bitrate_bps;
117 } 117 }
118 } 118 }
119 119
120 send_config->rtp.extensions.clear(); 120 send_config->rtp.extensions.clear();
121 121
122 bool remb; 122 bool remb;
123 bool transport_cc; 123 bool transport_cc;
124 if (extension_type_ == RtpExtension::kAbsSendTime) { 124 if (extension_type_ == RtpExtension::kAbsSendTimeUri) {
125 remb = true; 125 remb = true;
126 transport_cc = false; 126 transport_cc = false;
127 send_config->rtp.extensions.push_back( 127 send_config->rtp.extensions.push_back(
128 RtpExtension(extension_type_.c_str(), kAbsSendTimeExtensionId)); 128 RtpExtension(extension_type_.c_str(), kAbsSendTimeExtensionId));
129 } else if (extension_type_ == RtpExtension::kTransportSequenceNumber) { 129 } else if (extension_type_ == RtpExtension::kTransportSequenceNumberUri) {
130 remb = false; 130 remb = false;
131 transport_cc = true; 131 transport_cc = true;
132 send_config->rtp.extensions.push_back(RtpExtension( 132 send_config->rtp.extensions.push_back(RtpExtension(
133 extension_type_.c_str(), kTransportSequenceNumberExtensionId)); 133 extension_type_.c_str(), kTransportSequenceNumberExtensionId));
134 } else { 134 } else {
135 remb = true; 135 remb = true;
136 transport_cc = false; 136 transport_cc = false;
137 send_config->rtp.extensions.push_back(RtpExtension( 137 send_config->rtp.extensions.push_back(RtpExtension(
138 extension_type_.c_str(), kTransmissionTimeOffsetExtensionId)); 138 extension_type_.c_str(), kTransmissionTimeOffsetExtensionId));
139 } 139 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 ++i; 175 ++i;
176 } 176 }
177 } 177 }
178 178
179 void RampUpTester::ModifyAudioConfigs( 179 void RampUpTester::ModifyAudioConfigs(
180 AudioSendStream::Config* send_config, 180 AudioSendStream::Config* send_config,
181 std::vector<AudioReceiveStream::Config>* receive_configs) { 181 std::vector<AudioReceiveStream::Config>* receive_configs) {
182 if (num_audio_streams_ == 0) 182 if (num_audio_streams_ == 0)
183 return; 183 return;
184 184
185 EXPECT_NE(RtpExtension::kTOffset, extension_type_) 185 EXPECT_NE(RtpExtension::kTimestampOffsetUri, extension_type_)
186 << "Audio BWE not supported with toffset."; 186 << "Audio BWE not supported with toffset.";
187 187
188 send_config->rtp.ssrc = audio_ssrcs_[0]; 188 send_config->rtp.ssrc = audio_ssrcs_[0];
189 send_config->rtp.extensions.clear(); 189 send_config->rtp.extensions.clear();
190 190
191 bool transport_cc = false; 191 bool transport_cc = false;
192 if (extension_type_ == RtpExtension::kAbsSendTime) { 192 if (extension_type_ == RtpExtension::kAbsSendTimeUri) {
193 transport_cc = false; 193 transport_cc = false;
194 send_config->rtp.extensions.push_back( 194 send_config->rtp.extensions.push_back(
195 RtpExtension(extension_type_.c_str(), kAbsSendTimeExtensionId)); 195 RtpExtension(extension_type_.c_str(), kAbsSendTimeExtensionId));
196 } else if (extension_type_ == RtpExtension::kTransportSequenceNumber) { 196 } else if (extension_type_ == RtpExtension::kTransportSequenceNumberUri) {
197 transport_cc = true; 197 transport_cc = true;
198 send_config->rtp.extensions.push_back(RtpExtension( 198 send_config->rtp.extensions.push_back(RtpExtension(
199 extension_type_.c_str(), kTransportSequenceNumberExtensionId)); 199 extension_type_.c_str(), kTransportSequenceNumberExtensionId));
200 } 200 }
201 201
202 for (AudioReceiveStream::Config& recv_config : *receive_configs) { 202 for (AudioReceiveStream::Config& recv_config : *receive_configs) {
203 recv_config.rtp.transport_cc = transport_cc; 203 recv_config.rtp.transport_cc = transport_cc;
204 recv_config.rtp.extensions = send_config->rtp.extensions; 204 recv_config.rtp.extensions = send_config->rtp.extensions;
205 recv_config.rtp.remote_ssrc = send_config->rtp.ssrc; 205 recv_config.rtp.remote_ssrc = send_config->rtp.ssrc;
206 } 206 }
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 public: 432 public:
433 RampUpTest() {} 433 RampUpTest() {}
434 434
435 virtual ~RampUpTest() { 435 virtual ~RampUpTest() {
436 EXPECT_EQ(nullptr, video_send_stream_); 436 EXPECT_EQ(nullptr, video_send_stream_);
437 EXPECT_TRUE(video_receive_streams_.empty()); 437 EXPECT_TRUE(video_receive_streams_.empty());
438 } 438 }
439 }; 439 };
440 440
441 TEST_F(RampUpTest, SingleStream) { 441 TEST_F(RampUpTest, SingleStream) {
442 RampUpTester test(1, 0, 0, RtpExtension::kTOffset, false, false); 442 RampUpTester test(1, 0, 0, RtpExtension::kTimestampOffsetUri, false, false);
443 RunBaseTest(&test); 443 RunBaseTest(&test);
444 } 444 }
445 445
446 TEST_F(RampUpTest, Simulcast) { 446 TEST_F(RampUpTest, Simulcast) {
447 RampUpTester test(3, 0, 0, RtpExtension::kTOffset, false, false); 447 RampUpTester test(3, 0, 0, RtpExtension::kTimestampOffsetUri, false, false);
448 RunBaseTest(&test); 448 RunBaseTest(&test);
449 } 449 }
450 450
451 TEST_F(RampUpTest, SimulcastWithRtx) { 451 TEST_F(RampUpTest, SimulcastWithRtx) {
452 RampUpTester test(3, 0, 0, RtpExtension::kTOffset, true, false); 452 RampUpTester test(3, 0, 0, RtpExtension::kTimestampOffsetUri, true, false);
453 RunBaseTest(&test); 453 RunBaseTest(&test);
454 } 454 }
455 455
456 TEST_F(RampUpTest, SimulcastByRedWithRtx) { 456 TEST_F(RampUpTest, SimulcastByRedWithRtx) {
457 RampUpTester test(3, 0, 0, RtpExtension::kTOffset, true, true); 457 RampUpTester test(3, 0, 0, RtpExtension::kTimestampOffsetUri, true, true);
458 RunBaseTest(&test); 458 RunBaseTest(&test);
459 } 459 }
460 460
461 TEST_F(RampUpTest, SingleStreamWithHighStartBitrate) { 461 TEST_F(RampUpTest, SingleStreamWithHighStartBitrate) {
462 RampUpTester test(1, 0, 0.9 * kSingleStreamTargetBps, RtpExtension::kTOffset, 462 RampUpTester test(1, 0, 0.9 * kSingleStreamTargetBps,
463 false, false); 463 RtpExtension::kTimestampOffsetUri, false, false);
464 RunBaseTest(&test); 464 RunBaseTest(&test);
465 } 465 }
466 466
467 // Disabled on Mac due to flakiness, see 467 // Disabled on Mac due to flakiness, see
468 // https://bugs.chromium.org/p/webrtc/issues/detail?id=5407 468 // https://bugs.chromium.org/p/webrtc/issues/detail?id=5407
469 #ifndef WEBRTC_MAC 469 #ifndef WEBRTC_MAC
470 470
471 static const uint32_t kStartBitrateBps = 60000; 471 static const uint32_t kStartBitrateBps = 60000;
472 472
473 // Disabled: https://bugs.chromium.org/p/webrtc/issues/detail?id=5576 473 // Disabled: https://bugs.chromium.org/p/webrtc/issues/detail?id=5576
474 TEST_F(RampUpTest, DISABLED_UpDownUpOneStream) { 474 TEST_F(RampUpTest, DISABLED_UpDownUpOneStream) {
475 RampUpDownUpTester test(1, 0, kStartBitrateBps, RtpExtension::kAbsSendTime, 475 RampUpDownUpTester test(1, 0, kStartBitrateBps, RtpExtension::kAbsSendTimeUri,
476 false, false); 476 false, false);
477 RunBaseTest(&test); 477 RunBaseTest(&test);
478 } 478 }
479 479
480 TEST_F(RampUpTest, UpDownUpThreeStreams) { 480 TEST_F(RampUpTest, UpDownUpThreeStreams) {
481 RampUpDownUpTester test(3, 0, kStartBitrateBps, RtpExtension::kAbsSendTime, 481 RampUpDownUpTester test(3, 0, kStartBitrateBps, RtpExtension::kAbsSendTimeUri,
482 false, false); 482 false, false);
483 RunBaseTest(&test); 483 RunBaseTest(&test);
484 } 484 }
485 485
486 // Disabled: https://bugs.chromium.org/p/webrtc/issues/detail?id=5576 486 // Disabled: https://bugs.chromium.org/p/webrtc/issues/detail?id=5576
487 TEST_F(RampUpTest, DISABLED_UpDownUpOneStreamRtx) { 487 TEST_F(RampUpTest, DISABLED_UpDownUpOneStreamRtx) {
488 RampUpDownUpTester test(1, 0, kStartBitrateBps, RtpExtension::kAbsSendTime, 488 RampUpDownUpTester test(1, 0, kStartBitrateBps, RtpExtension::kAbsSendTimeUri,
489 true, false); 489 true, false);
490 RunBaseTest(&test); 490 RunBaseTest(&test);
491 } 491 }
492 492
493 TEST_F(RampUpTest, UpDownUpThreeStreamsRtx) { 493 TEST_F(RampUpTest, UpDownUpThreeStreamsRtx) {
494 RampUpDownUpTester test(3, 0, kStartBitrateBps, RtpExtension::kAbsSendTime, 494 RampUpDownUpTester test(3, 0, kStartBitrateBps, RtpExtension::kAbsSendTimeUri,
495 true, false); 495 true, false);
496 RunBaseTest(&test); 496 RunBaseTest(&test);
497 } 497 }
498 498
499 // Disabled: https://bugs.chromium.org/p/webrtc/issues/detail?id=5576 499 // Disabled: https://bugs.chromium.org/p/webrtc/issues/detail?id=5576
500 TEST_F(RampUpTest, DISABLED_UpDownUpOneStreamByRedRtx) { 500 TEST_F(RampUpTest, DISABLED_UpDownUpOneStreamByRedRtx) {
501 RampUpDownUpTester test(1, 0, kStartBitrateBps, RtpExtension::kAbsSendTime, 501 RampUpDownUpTester test(1, 0, kStartBitrateBps, RtpExtension::kAbsSendTimeUri,
502 true, true); 502 true, true);
503 RunBaseTest(&test); 503 RunBaseTest(&test);
504 } 504 }
505 505
506 TEST_F(RampUpTest, UpDownUpThreeStreamsByRedRtx) { 506 TEST_F(RampUpTest, UpDownUpThreeStreamsByRedRtx) {
507 RampUpDownUpTester test(3, 0, kStartBitrateBps, RtpExtension::kAbsSendTime, 507 RampUpDownUpTester test(3, 0, kStartBitrateBps, RtpExtension::kAbsSendTimeUri,
508 true, true); 508 true, true);
509 RunBaseTest(&test); 509 RunBaseTest(&test);
510 } 510 }
511 511
512 TEST_F(RampUpTest, SendSideVideoUpDownUpRtx) { 512 TEST_F(RampUpTest, SendSideVideoUpDownUpRtx) {
513 RampUpDownUpTester test(3, 0, kStartBitrateBps, 513 RampUpDownUpTester test(3, 0, kStartBitrateBps,
514 RtpExtension::kTransportSequenceNumber, true, false); 514 RtpExtension::kTransportSequenceNumberUri, true,
515 false);
515 RunBaseTest(&test); 516 RunBaseTest(&test);
516 } 517 }
517 518
518 // TODO(holmer): Enable when audio bitrates are included in the bitrate 519 // TODO(holmer): Enable when audio bitrates are included in the bitrate
519 // allocation. 520 // allocation.
520 TEST_F(RampUpTest, DISABLED_SendSideAudioVideoUpDownUpRtx) { 521 TEST_F(RampUpTest, DISABLED_SendSideAudioVideoUpDownUpRtx) {
521 RampUpDownUpTester test(3, 1, kStartBitrateBps, 522 RampUpDownUpTester test(3, 1, kStartBitrateBps,
522 RtpExtension::kTransportSequenceNumber, true, false); 523 RtpExtension::kTransportSequenceNumberUri, true,
524 false);
523 RunBaseTest(&test); 525 RunBaseTest(&test);
524 } 526 }
525 527
526 #endif 528 #endif
527 529
528 TEST_F(RampUpTest, AbsSendTimeSingleStream) { 530 TEST_F(RampUpTest, AbsSendTimeSingleStream) {
529 RampUpTester test(1, 0, 0, RtpExtension::kAbsSendTime, false, false); 531 RampUpTester test(1, 0, 0, RtpExtension::kAbsSendTimeUri, false, false);
530 RunBaseTest(&test); 532 RunBaseTest(&test);
531 } 533 }
532 534
533 TEST_F(RampUpTest, AbsSendTimeSimulcast) { 535 TEST_F(RampUpTest, AbsSendTimeSimulcast) {
534 RampUpTester test(3, 0, 0, RtpExtension::kAbsSendTime, false, false); 536 RampUpTester test(3, 0, 0, RtpExtension::kAbsSendTimeUri, false, false);
535 RunBaseTest(&test); 537 RunBaseTest(&test);
536 } 538 }
537 539
538 TEST_F(RampUpTest, AbsSendTimeSimulcastWithRtx) { 540 TEST_F(RampUpTest, AbsSendTimeSimulcastWithRtx) {
539 RampUpTester test(3, 0, 0, RtpExtension::kAbsSendTime, true, false); 541 RampUpTester test(3, 0, 0, RtpExtension::kAbsSendTimeUri, true, false);
540 RunBaseTest(&test); 542 RunBaseTest(&test);
541 } 543 }
542 544
543 TEST_F(RampUpTest, AbsSendTimeSimulcastByRedWithRtx) { 545 TEST_F(RampUpTest, AbsSendTimeSimulcastByRedWithRtx) {
544 RampUpTester test(3, 0, 0, RtpExtension::kAbsSendTime, true, true); 546 RampUpTester test(3, 0, 0, RtpExtension::kAbsSendTimeUri, true, true);
545 RunBaseTest(&test); 547 RunBaseTest(&test);
546 } 548 }
547 549
548 TEST_F(RampUpTest, AbsSendTimeSingleStreamWithHighStartBitrate) { 550 TEST_F(RampUpTest, AbsSendTimeSingleStreamWithHighStartBitrate) {
549 RampUpTester test(1, 0, 0.9 * kSingleStreamTargetBps, 551 RampUpTester test(1, 0, 0.9 * kSingleStreamTargetBps,
550 RtpExtension::kAbsSendTime, false, false); 552 RtpExtension::kAbsSendTimeUri, false, false);
551 RunBaseTest(&test); 553 RunBaseTest(&test);
552 } 554 }
553 555
554 TEST_F(RampUpTest, TransportSequenceNumberSingleStream) { 556 TEST_F(RampUpTest, TransportSequenceNumberSingleStream) {
555 RampUpTester test(1, 0, 0, RtpExtension::kTransportSequenceNumber, false, 557 RampUpTester test(1, 0, 0, RtpExtension::kTransportSequenceNumberUri, false,
556 false); 558 false);
557 RunBaseTest(&test); 559 RunBaseTest(&test);
558 } 560 }
559 561
560 TEST_F(RampUpTest, TransportSequenceNumberSimulcast) { 562 TEST_F(RampUpTest, TransportSequenceNumberSimulcast) {
561 RampUpTester test(3, 0, 0, RtpExtension::kTransportSequenceNumber, false, 563 RampUpTester test(3, 0, 0, RtpExtension::kTransportSequenceNumberUri, false,
562 false); 564 false);
563 RunBaseTest(&test); 565 RunBaseTest(&test);
564 } 566 }
565 567
566 TEST_F(RampUpTest, TransportSequenceNumberSimulcastWithRtx) { 568 TEST_F(RampUpTest, TransportSequenceNumberSimulcastWithRtx) {
567 RampUpTester test(3, 0, 0, RtpExtension::kTransportSequenceNumber, true, 569 RampUpTester test(3, 0, 0, RtpExtension::kTransportSequenceNumberUri, true,
568 false); 570 false);
569 RunBaseTest(&test); 571 RunBaseTest(&test);
570 } 572 }
571 573
572 TEST_F(RampUpTest, AudioVideoTransportSequenceNumberSimulcastWithRtx) { 574 TEST_F(RampUpTest, AudioVideoTransportSequenceNumberSimulcastWithRtx) {
573 RampUpTester test(3, 1, 0, RtpExtension::kTransportSequenceNumber, true, 575 RampUpTester test(3, 1, 0, RtpExtension::kTransportSequenceNumberUri, true,
574 false); 576 false);
575 RunBaseTest(&test); 577 RunBaseTest(&test);
576 } 578 }
577 579
578 TEST_F(RampUpTest, TransportSequenceNumberSimulcastByRedWithRtx) { 580 TEST_F(RampUpTest, TransportSequenceNumberSimulcastByRedWithRtx) {
579 RampUpTester test(3, 0, 0, RtpExtension::kTransportSequenceNumber, true, 581 RampUpTester test(3, 0, 0, RtpExtension::kTransportSequenceNumberUri, true,
580 true); 582 true);
581 RunBaseTest(&test); 583 RunBaseTest(&test);
582 } 584 }
583 585
584 TEST_F(RampUpTest, TransportSequenceNumberSingleStreamWithHighStartBitrate) { 586 TEST_F(RampUpTest, TransportSequenceNumberSingleStreamWithHighStartBitrate) {
585 RampUpTester test(1, 0, 0.9 * kSingleStreamTargetBps, 587 RampUpTester test(1, 0, 0.9 * kSingleStreamTargetBps,
586 RtpExtension::kTransportSequenceNumber, false, false); 588 RtpExtension::kTransportSequenceNumberUri, false, false);
587 RunBaseTest(&test); 589 RunBaseTest(&test);
588 } 590 }
589 } // namespace webrtc 591 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698