1 /* 2 * Copyright (c) 2019 The WebRTC project authors. All Rights Reserved. 3 * 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 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #ifndef MODULES_CONGESTION_CONTROLLER_GOOG_CC_ROBUST_THROUGHPUT_ESTIMATOR_H_ 12 #define MODULES_CONGESTION_CONTROLLER_GOOG_CC_ROBUST_THROUGHPUT_ESTIMATOR_H_ 13 14 #include <deque> 15 #include <memory> 16 #include <vector> 17 18 #include "absl/types/optional.h" 19 #include "api/transport/network_types.h" 20 #include "api/transport/webrtc_key_value_config.h" 21 #include "api/units/data_rate.h" 22 #include "modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator_interface.h" 23 24 namespace webrtc { 25 26 class RobustThroughputEstimator : public AcknowledgedBitrateEstimatorInterface { 27 public: 28 explicit RobustThroughputEstimator( 29 const RobustThroughputEstimatorSettings& settings); 30 ~RobustThroughputEstimator() override; 31 32 void IncomingPacketFeedbackVector( 33 const std::vector<PacketResult>& packet_feedback_vector) override; 34 35 absl::optional<DataRate> bitrate() const override; 36 PeekRate()37 absl::optional<DataRate> PeekRate() const override { return bitrate(); } SetAlr(bool)38 void SetAlr(bool /*in_alr*/) override {} SetAlrEndedTime(Timestamp)39 void SetAlrEndedTime(Timestamp /*alr_ended_time*/) override {} 40 41 private: 42 const RobustThroughputEstimatorSettings settings_; 43 std::deque<PacketResult> window_; 44 }; 45 46 } // namespace webrtc 47 48 #endif // MODULES_CONGESTION_CONTROLLER_GOOG_CC_ROBUST_THROUGHPUT_ESTIMATOR_H_ 49