| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  *  Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2  *  Copyright (c) 2017 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 | 
| 11 #ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_ACKNOWLEDGED_BITRATE_ESTIMATOR_H_ | 11 #ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_ACKNOWLEDGED_BITRATE_ESTIMATOR_H_ | 
| 12 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_ACKNOWLEDGED_BITRATE_ESTIMATOR_H_ | 12 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_ACKNOWLEDGED_BITRATE_ESTIMATOR_H_ | 
| 13 | 13 | 
| 14 #include <memory> | 14 #include <memory> | 
| 15 #include <vector> | 15 #include <vector> | 
| 16 | 16 | 
| 17 #include "webrtc/modules/congestion_controller/bitrate_estimator.h" | 17 #include "webrtc/modules/congestion_controller/bitrate_estimator.h" | 
| 18 #include "webrtc/rtc_base/optional.h" | 18 #include "webrtc/rtc_base/optional.h" | 
| 19 | 19 | 
| 20 namespace webrtc { | 20 namespace webrtc { | 
| 21 | 21 | 
|  | 22 class RtcEventLog; | 
| 22 struct PacketFeedback; | 23 struct PacketFeedback; | 
| 23 | 24 | 
| 24 class AcknowledgedBitrateEstimator { | 25 class AcknowledgedBitrateEstimator { | 
| 25  public: | 26  public: | 
| 26   explicit AcknowledgedBitrateEstimator( | 27   explicit AcknowledgedBitrateEstimator( | 
| 27       std::unique_ptr<BitrateEstimator> bitrate_estimator); | 28       std::unique_ptr<BitrateEstimator> bitrate_estimator); | 
| 28 | 29 | 
| 29   AcknowledgedBitrateEstimator(); | 30   AcknowledgedBitrateEstimator(); | 
|  | 31   explicit AcknowledgedBitrateEstimator(RtcEventLog* event_log); | 
| 30 | 32 | 
| 31   void IncomingPacketFeedbackVector( | 33   void IncomingPacketFeedbackVector( | 
| 32       const std::vector<PacketFeedback>& packet_feedback_vector); | 34       const std::vector<PacketFeedback>& packet_feedback_vector); | 
| 33   rtc::Optional<uint32_t> bitrate_bps() const; | 35   rtc::Optional<uint32_t> bitrate_bps() const; | 
| 34   void SetAlrEndedTimeMs(int64_t alr_ended_time_ms); | 36   void SetAlrEndedTimeMs(int64_t alr_ended_time_ms); | 
| 35 | 37 | 
| 36  private: | 38  private: | 
| 37   void MaybeExpectFastRateChange(int64_t packet_arrival_time_ms); | 39   void MaybeExpectFastRateChange(int64_t packet_arrival_time_ms); | 
| 38   rtc::Optional<int64_t> alr_ended_time_ms_; | 40   rtc::Optional<int64_t> alr_ended_time_ms_; | 
| 39   std::unique_ptr<BitrateEstimator> bitrate_estimator_; | 41   std::unique_ptr<BitrateEstimator> bitrate_estimator_; | 
|  | 42   RtcEventLog* event_log_ = nullptr; | 
| 40 }; | 43 }; | 
| 41 | 44 | 
| 42 }  // namespace webrtc | 45 }  // namespace webrtc | 
| 43 | 46 | 
| 44 #endif  // WEBRTC_MODULES_CONGESTION_CONTROLLER_ACKNOWLEDGED_BITRATE_ESTIMATOR_H
    _ | 47 #endif  // WEBRTC_MODULES_CONGESTION_CONTROLLER_ACKNOWLEDGED_BITRATE_ESTIMATOR_H
    _ | 
| OLD | NEW | 
|---|