Lines Matching refs:pacer_

217     pacer_ = std::make_unique<PacingController>(&clock_, &callback_, nullptr,  in SetUp()
227 pacer_->CreateProbeCluster(kFirstClusterRate, /*cluster_id=*/0); in Init()
228 pacer_->CreateProbeCluster(kSecondClusterRate, /*cluster_id=*/1); in Init()
232 pacer_->SetProbingEnabled(false); in Init()
233 pacer_->SetPacingRates(kTargetRate * kPaceMultiplier, DataRate::Zero()); in Init()
243 pacer_->EnqueuePacket( in Send()
284 return std::max(pacer_->NextSendTime() - now, TimeDelta::Zero()); in TimeUntilNextProcess()
289 Timestamp next_send_time = pacer_->NextSendTime(); in AdvanceTimeAndProcess()
291 pacer_->ProcessPackets(); in AdvanceTimeAndProcess()
300 EXPECT_EQ(TimeDelta::Zero(), pacer_->OldestPacketWaitTime()); in ConsumeInitialBudget()
312 while (pacer_->QueueSizePackets() > 0) { in ConsumeInitialBudget()
315 pacer_->ProcessPackets(); in ConsumeInitialBudget()
324 std::unique_ptr<PacingController> pacer_; member in webrtc::test::PacingControllerTest
498 EXPECT_FALSE(pacer_->FirstSentPacketTime().has_value()); in TEST_P()
504 pacer_->ProcessPackets(); in TEST_P()
506 EXPECT_EQ(kStartTime, pacer_->FirstSentPacketTime()); in TEST_P()
532 EXPECT_EQ(kPacketsToSend + 1, pacer_->QueueSizePackets()); in TEST_P()
536 pacer_->ProcessPackets(); in TEST_P()
537 EXPECT_EQ(1u, pacer_->QueueSizePackets()); in TEST_P()
544 pacer_->ProcessPackets(); in TEST_P()
546 EXPECT_EQ(0u, pacer_->QueueSizePackets()); in TEST_P()
556 EXPECT_EQ(kPacketsToSend, pacer_->QueueSizePackets()); in TEST_P()
557 pacer_->ProcessPackets(); in TEST_P()
558 EXPECT_EQ(1u, pacer_->QueueSizePackets()); in TEST_P()
587 EXPECT_EQ(kPacketsToSend + 1, pacer_->QueueSizePackets()); in TEST_P()
591 while (pacer_->QueueSizePackets() > 1) { in TEST_P()
602 EXPECT_EQ(pacer_->QueueSizePackets(), 0u); in TEST_P()
625 pacer_->QueueSizePackets()); in TEST_P()
627 pacer_->ProcessPackets(); in TEST_P()
629 while (pacer_->QueueSizePackets() > packets_to_send_per_interval * 10) { in TEST_P()
633 EXPECT_EQ(pacer_->QueueSizePackets(), packets_to_send_per_interval * 10); in TEST_P()
637 .Times(pacer_->QueueSizePackets()); in TEST_P()
639 DataSize::Bytes(pacer_->QueueSizePackets() * kPacketSize) / in TEST_P()
642 while (pacer_->QueueSizePackets() > 0) { in TEST_P()
645 pacer_->ProcessPackets(); in TEST_P()
655 EXPECT_EQ(0u, pacer_->QueueSizePackets()); in TEST_P()
657 EXPECT_EQ(0u, pacer_->QueueSizePackets()); in TEST_P()
658 pacer_->ProcessPackets(); in TEST_P()
665 EXPECT_EQ(packets_to_send_per_interval, pacer_->QueueSizePackets()); in TEST_P()
667 pacer_->ProcessPackets(); in TEST_P()
673 EXPECT_EQ(0u, pacer_->QueueSizePackets()); in TEST_P()
690 pacer_->ProcessPackets(); in TEST_P()
692 while (pacer_->QueueSizePackets() > 0) { in TEST_P()
712 pacer_->ProcessPackets(); in TEST_P()
714 while (pacer_->QueueSizePackets() > 0) { in TEST_P()
725 pacer_->SetPacingRates(kTargetRate * kPaceMultiplier, kTargetRate); in TEST_P()
734 pacer_->ProcessPackets(); in TEST_P()
740 pacer_->ProcessPackets(); in TEST_P()
748 DataSize::Bytes(pacer_->QueueSizePackets() * kPacketSize) / in TEST_P()
753 while (pacer_->QueueSizePackets() > 0) { in TEST_P()
767 pacer_->ProcessPackets(); in TEST_P()
808 pacer_->SetPacingRates(kTargetRate * kPaceMultiplier, kTargetRate); in TEST_P()
812 pacer_->ProcessPackets(); in TEST_P()
815 pacer_->ProcessPackets(); in TEST_P()
831 pacer_->ProcessPackets(); in TEST_P()
850 pacer_->SetPacingRates(kTargetRate * kPaceMultiplier, kTargetRate); in TEST_P()
858 pacer_->ProcessPackets(); in TEST_P()
870 pacer_ = std::make_unique<PacingController>(&clock_, &callback, nullptr, in TEST_P()
872 pacer_->SetProbingEnabled(false); in TEST_P()
873 pacer_->SetPacingRates(kTargetRate * kPaceMultiplier, kTargetRate); in TEST_P()
891 pacer_->ProcessPackets(); in TEST_P()
933 pacer_->ProcessPackets(); in TEST_P()
935 while (pacer_->QueueSizePackets() > 1) { in TEST_P()
940 EXPECT_EQ(1u, pacer_->QueueSizePackets()); in TEST_P()
947 pacer_->ProcessPackets(); in TEST_P()
964 pacer_->ProcessPackets(); in TEST_P()
965 EXPECT_EQ(0u, pacer_->QueueSizePackets()); in TEST_P()
974 EXPECT_EQ(2 * packets_to_send_per_interval, pacer_->QueueSizePackets()); in TEST_P()
986 pacer_->ProcessPackets(); in TEST_P()
988 while (pacer_->QueueSizePackets() > packets_to_send_per_interval) { in TEST_P()
992 EXPECT_EQ(packets_to_send_per_interval, pacer_->QueueSizePackets()); in TEST_P()
1002 pacer_->ProcessPackets(); in TEST_P()
1004 while (pacer_->QueueSizePackets() > 0) { in TEST_P()
1009 EXPECT_EQ(0u, pacer_->QueueSizePackets()); in TEST_P()
1025 pacer_->ProcessPackets(); in TEST_P()
1039 while (pacer_->QueueSizePackets() > 0) { in TEST_P()
1042 pacer_->ProcessPackets(); in TEST_P()
1064 pacer_->UpdateOutstandingData(DataSize::Zero()); in TEST_P()
1065 pacer_->SetCongestionWindow(DataSize::Bytes(kCongestionWindow)); in TEST_P()
1084 pacer_->ProcessPackets(); in TEST_P()
1091 pacer_->ProcessPackets(); in TEST_P()
1092 EXPECT_EQ(blocked_packets, pacer_->QueueSizePackets()); in TEST_P()
1103 pacer_->SetPacingRates(DataRate::BitsPerSec(400 * 8 * 1000 / 5), in TEST_P()
1106 pacer_->SetCongestionWindow(DataSize::Bytes(800)); in TEST_P()
1107 pacer_->UpdateOutstandingData(DataSize::Zero()); in TEST_P()
1112 pacer_->ProcessPackets(); in TEST_P()
1117 pacer_->ProcessPackets(); in TEST_P()
1122 pacer_->ProcessPackets(); in TEST_P()
1127 pacer_->UpdateOutstandingData(DataSize::Zero()); in TEST_P()
1128 pacer_->ProcessPackets(); in TEST_P()
1133 pacer_->ProcessPackets(); in TEST_P()
1144 pacer_->UpdateOutstandingData(DataSize::Zero()); in TEST_P()
1145 pacer_->SetCongestionWindow(DataSize::Bytes(kCongestionWindow)); in TEST_P()
1152 pacer_->ProcessPackets(); in TEST_P()
1162 pacer_->ProcessPackets(); in TEST_P()
1170 pacer_->UpdateOutstandingData( in TEST_P()
1175 pacer_->ProcessPackets(); in TEST_P()
1185 pacer_->UpdateOutstandingData(DataSize::Zero()); in TEST_P()
1187 pacer_->ProcessPackets(); in TEST_P()
1197 EXPECT_EQ(TimeDelta::Zero(), pacer_->OldestPacketWaitTime()); in TEST_P()
1201 pacer_->Pause(); in TEST_P()
1227 pacer_->OldestPacketWaitTime()); in TEST_P()
1234 pacer_->ProcessPackets(); in TEST_P()
1241 pacer_->ProcessPackets(); in TEST_P()
1253 pacer_->ProcessPackets(); in TEST_P()
1286 pacer_->Resume(); in TEST_P()
1294 pacer_->ProcessPackets(); in TEST_P()
1298 while (pacer_->QueueSizePackets() > 0) { in TEST_P()
1303 EXPECT_EQ(TimeDelta::Zero(), pacer_->OldestPacketWaitTime()); in TEST_P()
1308 pacer_ = std::make_unique<PacingController>(&clock_, &callback_, nullptr, in TEST_P()
1310 pacer_->SetProbingEnabled(false); in TEST_P()
1311 pacer_->SetPacingRates(kTargetRate * kPaceMultiplier, kTargetRate); in TEST_P()
1316 pacer_->Pause(); in TEST_P()
1322 pacer_->ProcessPackets(); in TEST_P()
1334 EXPECT_EQ(pacer_->NextSendTime() - start_time, in TEST_P()
1337 pacer_->ProcessPackets(); in TEST_P()
1338 EXPECT_EQ(pacer_->NextSendTime() - start_time, in TEST_P()
1342 pacer_->ProcessPackets(); in TEST_P()
1343 EXPECT_EQ(pacer_->NextSendTime() - start_time, in TEST_P()
1353 EXPECT_EQ(TimeDelta::Zero(), pacer_->OldestPacketWaitTime()); in TEST_P()
1355 pacer_->SetPacingRates(DataRate::BitsPerSec(30000 * kPaceMultiplier), in TEST_P()
1365 EXPECT_EQ(queue_time, pacer_->ExpectedQueueTime()); in TEST_P()
1368 while (pacer_->QueueSizePackets() > 0) { in TEST_P()
1370 pacer_->ProcessPackets(); in TEST_P()
1374 EXPECT_EQ(TimeDelta::Zero(), pacer_->ExpectedQueueTime()); in TEST_P()
1386 EXPECT_EQ(TimeDelta::Zero(), pacer_->OldestPacketWaitTime()); in TEST_P()
1388 pacer_->SetPacingRates(DataRate::BitsPerSec(30000 * kPaceMultiplier), in TEST_P()
1394 EXPECT_EQ(TimeDelta::Millis(500), pacer_->OldestPacketWaitTime()); in TEST_P()
1395 pacer_->ProcessPackets(); in TEST_P()
1396 EXPECT_EQ(TimeDelta::Zero(), pacer_->OldestPacketWaitTime()); in TEST_P()
1406 pacer_ = std::make_unique<PacingController>(&clock_, &packet_sender, nullptr, in TEST_P()
1408 pacer_->CreateProbeCluster(kFirstClusterRate, in TEST_P()
1410 pacer_->CreateProbeCluster(kSecondClusterRate, in TEST_P()
1412 pacer_->SetPacingRates( in TEST_P()
1424 pacer_->ProcessPackets(); in TEST_P()
1438 pacer_->ProcessPackets(); in TEST_P()
1465 pacer_ = std::make_unique<PacingController>(&clock_, &packet_sender, in TEST_P()
1467 pacer_->SetPacingRates( in TEST_P()
1475 while (pacer_->QueueSizePackets() > 0) { in TEST_P()
1477 pacer_->ProcessPackets(); in TEST_P()
1481 pacer_->CreateProbeCluster(DataRate::KilobitsPerSec(10000), // 10 Mbps. in TEST_P()
1488 pacer_->ProcessPackets(); in TEST_P()
1501 pacer_->ProcessPackets(); in TEST_P()
1508 EXPECT_EQ(pacer_->NextSendTime(), clock_.CurrentTime()); in TEST_P()
1514 EXPECT_EQ(pacer_->NextSendTime(), probe_time); in TEST_P()
1523 EXPECT_EQ(pacer_->NextSendTime(), probe_time); in TEST_P()
1524 pacer_->ProcessPackets(); in TEST_P()
1544 EXPECT_GT(pacer_->NextSendTime(), probe_time); in TEST_P()
1572 pacer_ = std::make_unique<PacingController>(&clock_, &packet_sender, nullptr, in TEST_P()
1574 pacer_->CreateProbeCluster(kFirstClusterRate, in TEST_P()
1576 pacer_->SetPacingRates( in TEST_P()
1589 pacer_->ProcessPackets(); in TEST_P()
1609 pacer_->ProcessPackets(); in TEST_P()
1610 pacer_->SetPacingRates(DataRate::BitsPerSec(60000 * kPaceMultiplier), in TEST_P()
1615 pacer_->ProcessPackets(); in TEST_P()
1620 pacer_->SetPacingRates(DataRate::BitsPerSec(60000 * kPaceMultiplier), in TEST_P()
1625 EXPECT_LT(TimeDelta::Millis(5), pacer_->ExpectedQueueTime()); in TEST_P()
1629 pacer_->ProcessPackets(); in TEST_P()
1638 pacer_ = std::make_unique<PacingController>(&clock_, &callback, nullptr, in TEST_P()
1646 pacer_->SetPacingRates(kTargetRate * kPaceMultiplier, kTargetRate); in TEST_P()
1647 pacer_->SetProbingEnabled(true); in TEST_P()
1695 pacer_ = std::make_unique<PacingController>(&clock_, &callback, nullptr, in TEST_P()
1706 pacer_->EnqueuePacket(BuildRtpPacket(type)); in TEST_P()
1730 while (pacer_->QueueSizePackets() > 0) { in TEST_P()
1733 pacer_->ProcessPackets(); in TEST_P()
1743 pacer_ = std::make_unique<PacingController>(&clock_, &callback, nullptr, in TEST_P()
1745 pacer_->CreateProbeCluster(kFirstClusterRate, /*cluster_id=*/0); in TEST_P()
1746 pacer_->SetPacingRates(kTargetRate * kPaceMultiplier, DataRate::Zero()); in TEST_P()
1749 pacer_->EnqueuePacket(BuildRtpPacket(RtpPacketMediaType::kAudio)); in TEST_P()
1777 pacer_->ProcessPackets(); in TEST_P()
1790 pacer_->SetPacingRates(kSendRate, DataRate::Zero()); in TEST_P()
1793 pacer_->EnqueuePacket(BuildRtpPacket(RtpPacketMediaType::kVideo)); in TEST_P()
1794 pacer_->EnqueuePacket(BuildRtpPacket(RtpPacketMediaType::kVideo)); in TEST_P()
1795 pacer_->EnqueuePacket(BuildRtpPacket(RtpPacketMediaType::kVideo)); in TEST_P()
1796 pacer_->EnqueuePacket(BuildRtpPacket(RtpPacketMediaType::kVideo)); in TEST_P()
1800 pacer_->ProcessPackets(); in TEST_P()
1802 Timestamp next_send_time = pacer_->NextSendTime(); in TEST_P()
1812 pacer_->ProcessPackets(); in TEST_P()
1815 next_send_time = pacer_->NextSendTime(); in TEST_P()
1821 pacer_->ProcessPackets(); in TEST_P()
1828 pacer_->SetProbingEnabled(true); in TEST_P()
1833 while (pacer_->QueueSizePackets() > 0) { in TEST_P()
1838 pacer_->CreateProbeCluster(DataRate::KilobitsPerSec(10000), // 10 Mbps. in TEST_P()
1842 EXPECT_LT(pacer_->NextSendTime() - clock_.CurrentTime(), in TEST_P()
1847 pacer_->Pause(); in TEST_P()
1849 EXPECT_EQ(pacer_->NextSendTime() - clock_.CurrentTime(), in TEST_P()
1862 pacer_->SetAccountForAudioPackets(true); in TEST_P()
1865 pacer_->SetPacingRates(DataSize::Bytes(kPacketSize) / TimeDelta::Seconds(1), in TEST_P()
1871 pacer_->ProcessPackets(); in TEST_P()
1878 pacer_->ProcessPackets(); in TEST_P()
1902 pacer_ = std::make_unique<PacingController>(&clock_, &callback, nullptr, in TEST_P()
1904 pacer_->SetAccountForAudioPackets(account_for_audio); in TEST_P()
1907 pacer_->SetPacingRates(kPacingDataRate, kPaddingDataRate); in TEST_P()
1916 pacer_->EnqueuePacket( in TEST_P()
1921 while (pacer_->QueueSizePackets() > 0) { in TEST_P()
1928 pacer_->SetPacingRates(kPacingDataRate, kPaddingDataRate); in TEST_P()
1943 Timestamp next_send_time = pacer_->NextSendTime(); in TEST_P()
1949 pacer_->EnqueuePacket( in TEST_P()
1954 pacer_->ProcessPackets(); in TEST_P()
1985 pacer_->SetAccountForAudioPackets(true); in TEST_P()
1986 pacer_->SetPacingRates(kPacingDataRate, kPaddingDataRate); in TEST_P()
1997 pacer_->ProcessPackets(); in TEST_P()
2004 EXPECT_EQ(pacer_->NextSendTime() - clock_.CurrentTime(), kPacketPacingTime); in TEST_P()
2021 pacer_->SetPacingRates(kPacingDataRate, DataRate::Zero()); in TEST_P()
2026 pacer_->ProcessPackets(); in TEST_P()
2030 EXPECT_EQ(pacer_->NextSendTime() - clock_.CurrentTime(), in TEST_P()
2037 EXPECT_EQ(pacer_->NextSendTime() - clock_.CurrentTime(), kPacketPacingTime); in TEST_P()
2039 pacer_->ProcessPackets(); in TEST_P()
2043 EXPECT_EQ(pacer_->NextSendTime() - clock_.CurrentTime(), in TEST_P()
2049 pacer_->SetPacingRates(kPacingDataRate, kPacingDataRate / 2); in TEST_P()
2050 EXPECT_EQ(pacer_->NextSendTime() - clock_.CurrentTime(), kPacketPacingTime); in TEST_P()
2055 pacer_->ProcessPackets(); in TEST_P()
2060 EXPECT_EQ(pacer_->NextSendTime() - clock_.CurrentTime(), in TEST_P()
2066 EXPECT_EQ(pacer_->NextSendTime() - clock_.CurrentTime(), kPacketPacingTime); in TEST_P()
2088 pacer_->SetPacingRates(kPacingDataRate, kPacingDataRate); in TEST_P()
2103 pacer_->SetPacingRates(kPacingDataRate, kPacingDataRate / 2); in TEST_P()
2120 pacer_->SetPacingRates( in TEST_P()