Replaces redundant congestion controller components

This CL replaces components in the congestion controller module
that are identical to equivalent components in the rtp and goog_cc
subfolder. Some redundant components are left as they were not
trivial to replace.

Bug: webrtc:8415
Change-Id: I86a1f164d7b100b8ec8ba7dbc1c9bda2128a4f37
Reviewed-on: https://webrtc-review.googlesource.com/78521
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23384}
This commit is contained in:
Sebastian Jansson
2018-05-24 14:17:06 +02:00
committed by Commit Bot
parent ec2eb2218f
commit 172fd8536e
51 changed files with 22 additions and 2037 deletions

View File

@ -17,7 +17,6 @@
#include "rtc_base/ptr_util.h"
namespace webrtc {
namespace webrtc_cc {
namespace {
bool IsInSendTimeHistory(const PacketFeedback& packet) {
@ -65,5 +64,4 @@ void AcknowledgedBitrateEstimator::MaybeExpectFastRateChange(
}
}
} // namespace webrtc_cc
} // namespace webrtc

View File

@ -21,8 +21,6 @@ namespace webrtc {
struct PacketFeedback;
namespace webrtc_cc {
class AcknowledgedBitrateEstimator {
public:
explicit AcknowledgedBitrateEstimator(
@ -42,7 +40,6 @@ class AcknowledgedBitrateEstimator {
std::unique_ptr<BitrateEstimator> bitrate_estimator_;
};
} // namespace webrtc_cc
} // namespace webrtc
#endif // MODULES_CONGESTION_CONTROLLER_GOOG_CC_ACKNOWLEDGED_BITRATE_ESTIMATOR_H_

View File

@ -24,7 +24,6 @@ using testing::InSequence;
using testing::Return;
namespace webrtc {
namespace webrtc_cc {
namespace {
@ -132,5 +131,4 @@ TEST(TestAcknowledgedBitrateEstimator, ReturnBitrate) {
EXPECT_EQ(return_value, states.acknowledged_bitrate_estimator->bitrate_bps());
}
} // namespace webrtc_cc
} // namespace webrtc*/

View File

@ -16,7 +16,6 @@
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
namespace webrtc {
namespace webrtc_cc {
namespace {
constexpr int kInitialRateWindowMs = 500;
@ -105,5 +104,4 @@ void BitrateEstimator::ExpectFastRateChange() {
bitrate_estimate_var_ += 200;
}
} // namespace webrtc_cc
} // namespace webrtc

View File

@ -16,7 +16,6 @@
#include "api/optional.h"
namespace webrtc {
namespace webrtc_cc {
// Computes a bayesian estimate of the throughput given acks containing
// the arrival time and payload size. Samples which are far from the current
@ -42,7 +41,6 @@ class BitrateEstimator {
float bitrate_estimate_var_;
};
} // namespace webrtc_cc
} // namespace webrtc
#endif // MODULES_CONGESTION_CONTROLLER_GOOG_CC_BITRATE_ESTIMATOR_H_

View File

@ -16,7 +16,6 @@
#include "rtc_base/constructormagic.h"
namespace webrtc {
namespace webrtc_cc {
class DelayIncreaseDetectorInterface {
public:
@ -33,7 +32,7 @@ class DelayIncreaseDetectorInterface {
RTC_DISALLOW_COPY_AND_ASSIGN(DelayIncreaseDetectorInterface);
};
} // namespace webrtc_cc
} // namespace webrtc
#endif // MODULES_CONGESTION_CONTROLLER_GOOG_CC_DELAY_INCREASE_DETECTOR_INTERFACE_H_

View File

@ -18,7 +18,6 @@
#include "rtc_base/logging.h"
namespace webrtc {
namespace webrtc_cc {
constexpr unsigned int kDeltaCounterMax = 1000;
@ -91,5 +90,4 @@ void MedianSlopeEstimator::Update(double recv_delta_ms,
BWE_TEST_LOGGING_PLOT(1, "trendline_slope", arrival_time_ms, trendline_);
}
} // namespace webrtc_cc
} // namespace webrtc

View File

@ -20,7 +20,6 @@
#include "rtc_base/numerics/percentile_filter.h"
namespace webrtc {
namespace webrtc_cc {
class MedianSlopeEstimator {
public:
@ -68,7 +67,7 @@ class MedianSlopeEstimator {
RTC_DISALLOW_COPY_AND_ASSIGN(MedianSlopeEstimator);
};
} // namespace webrtc_cc
} // namespace webrtc
#endif // MODULES_CONGESTION_CONTROLLER_GOOG_CC_MEDIAN_SLOPE_ESTIMATOR_H_

View File

@ -13,7 +13,6 @@
#include "test/gtest.h"
namespace webrtc {
namespace webrtc_cc {
namespace {
constexpr size_t kWindowSize = 20;
@ -70,5 +69,4 @@ TEST(MedianSlopeEstimator, JitteryLineSlopeZero) {
TestEstimator(0, kAvgTimeBetweenPackets / 3.0, 0.02);
}
} // namespace webrtc_cc
} // namespace webrtc

View File

@ -53,7 +53,6 @@ constexpr int kMaxProbeIntervalMs = 1000;
} // namespace
namespace webrtc {
namespace webrtc_cc {
ProbeBitrateEstimator::ProbeBitrateEstimator(RtcEventLog* event_log)
: event_log_(event_log) {}
@ -187,5 +186,4 @@ void ProbeBitrateEstimator::EraseOldClusters(int64_t timestamp_ms) {
}
}
}
} // namespace webrtc_cc
} // namespace webrtc

View File

@ -18,7 +18,6 @@
namespace webrtc {
class RtcEventLog;
namespace webrtc_cc {
class ProbeBitrateEstimator {
public:
@ -51,7 +50,6 @@ class ProbeBitrateEstimator {
rtc::Optional<int> estimated_bitrate_bps_;
};
} // namespace webrtc_cc
} // namespace webrtc
#endif // MODULES_CONGESTION_CONTROLLER_GOOG_CC_PROBE_BITRATE_ESTIMATOR_H_

View File

@ -18,7 +18,6 @@
#include "test/gtest.h"
namespace webrtc {
namespace webrtc_cc {
namespace {
constexpr int kInvalidBitrate = -1;
@ -219,5 +218,4 @@ TEST_F(TestProbeBitrateEstimator, FetchLastEstimatedBitrateBps) {
EXPECT_FALSE(probe_bitrate_estimator_.FetchAndResetLastEstimatedBitrateBps());
}
} // namespace webrtc_cc
} // namespace webrtc

View File

@ -20,7 +20,6 @@
#include "rtc_base/numerics/safe_minmax.h"
namespace webrtc {
namespace webrtc_cc {
namespace {
rtc::Optional<double> LinearFitSlope(
@ -181,5 +180,4 @@ void TrendlineEstimator::UpdateThreshold(double modified_offset,
last_update_ms_ = now_ms;
}
} // namespace webrtc_cc
} // namespace webrtc

View File

@ -20,7 +20,6 @@
#include "rtc_base/constructormagic.h"
namespace webrtc {
namespace webrtc_cc {
class TrendlineEstimator : public DelayIncreaseDetectorInterface {
public:
@ -88,7 +87,6 @@ class TrendlineEstimator : public DelayIncreaseDetectorInterface {
RTC_DISALLOW_COPY_AND_ASSIGN(TrendlineEstimator);
};
} // namespace webrtc_cc
} // namespace webrtc
#endif // MODULES_CONGESTION_CONTROLLER_GOOG_CC_TRENDLINE_ESTIMATOR_H_

View File

@ -13,7 +13,6 @@
#include "test/gtest.h"
namespace webrtc {
namespace webrtc_cc {
namespace {
constexpr size_t kWindowSize = 20;
@ -71,5 +70,4 @@ TEST(TrendlineEstimator, JitteryLineSlopeZero) {
TestEstimator(0, kAvgTimeBetweenPackets / 3.0, 0.02);
}
} // namespace webrtc_cc
} // namespace webrtc