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

Unified Diff: webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc

Issue 2112643005: Remove audio/video distinction for probe packets. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@52
Patch Set: rebase errors 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc
index f04d9e68c09a53527085cc6ef0f32ac769bad704..4530053a869447eb17253e6d23b8daa02a0a287f 100644
--- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc
+++ b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc
@@ -221,8 +221,7 @@ void RemoteBitrateEstimatorTest::IncomingPacket(uint32_t ssrc,
size_t payload_size,
int64_t arrival_time,
uint32_t rtp_timestamp,
- uint32_t absolute_send_time,
- bool was_paced) {
+ uint32_t absolute_send_time) {
RTPHeader header;
memset(&header, 0, sizeof(header));
header.ssrc = ssrc;
@@ -230,7 +229,7 @@ void RemoteBitrateEstimatorTest::IncomingPacket(uint32_t ssrc,
header.extension.hasAbsoluteSendTime = true;
header.extension.absoluteSendTime = absolute_send_time;
bitrate_estimator_->IncomingPacket(arrival_time + kArrivalTimeClockOffsetMs,
- payload_size, header, was_paced);
+ payload_size, header);
}
// Generates a frame of packets belonging to a stream at a given bitrate and
@@ -255,7 +254,7 @@ bool RemoteBitrateEstimatorTest::GenerateAndProcessFrame(uint32_t ssrc,
clock_.TimeInMicroseconds());
IncomingPacket(packet->ssrc, packet->size,
(packet->arrival_time + 500) / 1000, packet->rtp_timestamp,
- AbsSendTime(packet->send_time, 1000000), true);
+ AbsSendTime(packet->send_time, 1000000));
if (bitrate_observer_->updated()) {
if (bitrate_observer_->latest_bitrate() < bitrate_bps)
overuse = true;
@@ -319,7 +318,7 @@ void RemoteBitrateEstimatorTest::InitialBehaviorTestHelper(
clock_.AdvanceTimeMilliseconds(1000);
// Inserting a packet. Still no valid estimate. We need to wait 5 seconds.
IncomingPacket(kDefaultSsrc, kMtu, clock_.TimeInMilliseconds(), timestamp,
- absolute_send_time, true);
+ absolute_send_time);
bitrate_estimator_->Process();
EXPECT_FALSE(bitrate_estimator_->LatestEstimate(&ssrcs, &bitrate_bps));
EXPECT_EQ(0u, ssrcs.size());
@@ -328,7 +327,7 @@ void RemoteBitrateEstimatorTest::InitialBehaviorTestHelper(
// Inserting packets for 5 seconds to get a valid estimate.
for (int i = 0; i < 5 * kFramerate + 1; ++i) {
IncomingPacket(kDefaultSsrc, kMtu, clock_.TimeInMilliseconds(), timestamp,
- absolute_send_time, true);
+ absolute_send_time);
clock_.AdvanceTimeMilliseconds(1000 / kFramerate);
timestamp += 90 * kFrameIntervalMs;
absolute_send_time = AddAbsSendTime(absolute_send_time,
@@ -356,13 +355,13 @@ void RemoteBitrateEstimatorTest::RateIncreaseReorderingTestHelper(
uint32_t timestamp = 0;
uint32_t absolute_send_time = 0;
IncomingPacket(kDefaultSsrc, 1000, clock_.TimeInMilliseconds(), timestamp,
- absolute_send_time, true);
+ absolute_send_time);
bitrate_estimator_->Process();
EXPECT_FALSE(bitrate_observer_->updated()); // No valid estimate.
// Inserting packets for one second to get a valid estimate.
for (int i = 0; i < 5 * kFramerate + 1; ++i) {
IncomingPacket(kDefaultSsrc, kMtu, clock_.TimeInMilliseconds(), timestamp,
- absolute_send_time, true);
+ absolute_send_time);
clock_.AdvanceTimeMilliseconds(kFrameIntervalMs);
timestamp += 90 * kFrameIntervalMs;
absolute_send_time = AddAbsSendTime(absolute_send_time,
@@ -379,12 +378,12 @@ void RemoteBitrateEstimatorTest::RateIncreaseReorderingTestHelper(
absolute_send_time = AddAbsSendTime(absolute_send_time,
2 * kFrameIntervalAbsSendTime);
IncomingPacket(kDefaultSsrc, 1000, clock_.TimeInMilliseconds(), timestamp,
- absolute_send_time, true);
- IncomingPacket(kDefaultSsrc, 1000, clock_.TimeInMilliseconds(),
- timestamp - 90 * kFrameIntervalMs,
- AddAbsSendTime(absolute_send_time,
- -static_cast<int>(kFrameIntervalAbsSendTime)),
- true);
+ absolute_send_time);
+ IncomingPacket(
+ kDefaultSsrc, 1000, clock_.TimeInMilliseconds(),
+ timestamp - 90 * kFrameIntervalMs,
+ AddAbsSendTime(absolute_send_time,
+ -static_cast<int>(kFrameIntervalAbsSendTime)));
}
bitrate_estimator_->Process();
EXPECT_TRUE(bitrate_observer_->updated());
@@ -517,7 +516,7 @@ void RemoteBitrateEstimatorTest::TestTimestampGroupingTestHelper() {
// time for the first estimate to be generated and for Process() to be called.
for (int i = 0; i <= 6 * kFramerate; ++i) {
IncomingPacket(kDefaultSsrc, 1000, clock_.TimeInMilliseconds(), timestamp,
- absolute_send_time, true);
+ absolute_send_time);
bitrate_estimator_->Process();
clock_.AdvanceTimeMilliseconds(kFrameIntervalMs);
timestamp += 90 * kFrameIntervalMs;
@@ -538,7 +537,7 @@ void RemoteBitrateEstimatorTest::TestTimestampGroupingTestHelper() {
// Insert |kTimestampGroupLength| frames with just 1 timestamp ticks in
// between. Should be treated as part of the same group by the estimator.
IncomingPacket(kDefaultSsrc, 100, clock_.TimeInMilliseconds(), timestamp,
- absolute_send_time, true);
+ absolute_send_time);
clock_.AdvanceTimeMilliseconds(kFrameIntervalMs / kTimestampGroupLength);
timestamp += 1;
absolute_send_time = AddAbsSendTime(absolute_send_time,
@@ -568,7 +567,7 @@ void RemoteBitrateEstimatorTest::TestWrappingHelper(
for (size_t i = 0; i < 3000; ++i) {
IncomingPacket(kDefaultSsrc, 1000, clock_.TimeInMilliseconds(), timestamp,
- absolute_send_time, true);
+ absolute_send_time);
timestamp += kFrameIntervalMs;
clock_.AdvanceTimeMilliseconds(kFrameIntervalMs);
absolute_send_time = AddAbsSendTime(absolute_send_time,
@@ -585,7 +584,7 @@ void RemoteBitrateEstimatorTest::TestWrappingHelper(
bitrate_estimator_->Process();
for (size_t i = 0; i < 21; ++i) {
IncomingPacket(kDefaultSsrc, 1000, clock_.TimeInMilliseconds(), timestamp,
- absolute_send_time, true);
+ absolute_send_time);
timestamp += kFrameIntervalMs;
clock_.AdvanceTimeMilliseconds(2 * kFrameIntervalMs);
absolute_send_time = AddAbsSendTime(absolute_send_time,

Powered by Google App Engine
This is Rietveld 408576698