| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |    2  *  Copyright (c) 2012 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  | 
| (...skipping 14 matching lines...) Expand all  Loading... | 
|   25 namespace rtc { |   25 namespace rtc { | 
|   26 struct SentPacket; |   26 struct SentPacket; | 
|   27 } |   27 } | 
|   28  |   28  | 
|   29 namespace webrtc { |   29 namespace webrtc { | 
|   30  |   30  | 
|   31 class BitrateController; |   31 class BitrateController; | 
|   32 class BitrateObserver; |   32 class BitrateObserver; | 
|   33 class Clock; |   33 class Clock; | 
|   34 class ProcessThread; |   34 class ProcessThread; | 
 |   35 class RateLimiter; | 
|   35 class RemoteBitrateEstimator; |   36 class RemoteBitrateEstimator; | 
|   36 class RemoteBitrateObserver; |   37 class RemoteBitrateObserver; | 
|   37 class TransportFeedbackObserver; |   38 class TransportFeedbackObserver; | 
|   38  |   39  | 
|   39 class CongestionController : public CallStatsObserver, public Module { |   40 class CongestionController : public CallStatsObserver, public Module { | 
|   40  public: |   41  public: | 
|   41   // Observer class for bitrate changes announced due to change in bandwidth |   42   // Observer class for bitrate changes announced due to change in bandwidth | 
|   42   // estimate or due to that the send pacer is full. Fraction loss and rtt is |   43   // estimate or due to that the send pacer is full. Fraction loss and rtt is | 
|   43   // also part of this callback to allow the observer to optimize its settings |   44   // also part of this callback to allow the observer to optimize its settings | 
|   44   // for different types of network environments. The bitrate does not include |   45   // for different types of network environments. The bitrate does not include | 
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   76                                    int min_bitrate_bps, |   77                                    int min_bitrate_bps, | 
|   77                                    int max_bitrate_bps); |   78                                    int max_bitrate_bps); | 
|   78   virtual void SignalNetworkState(NetworkState state); |   79   virtual void SignalNetworkState(NetworkState state); | 
|   79   virtual BitrateController* GetBitrateController() const; |   80   virtual BitrateController* GetBitrateController() const; | 
|   80   virtual RemoteBitrateEstimator* GetRemoteBitrateEstimator( |   81   virtual RemoteBitrateEstimator* GetRemoteBitrateEstimator( | 
|   81       bool send_side_bwe); |   82       bool send_side_bwe); | 
|   82   virtual int64_t GetPacerQueuingDelayMs() const; |   83   virtual int64_t GetPacerQueuingDelayMs() const; | 
|   83   virtual PacedSender* pacer() { return pacer_.get(); } |   84   virtual PacedSender* pacer() { return pacer_.get(); } | 
|   84   virtual PacketRouter* packet_router() { return packet_router_.get(); } |   85   virtual PacketRouter* packet_router() { return packet_router_.get(); } | 
|   85   virtual TransportFeedbackObserver* GetTransportFeedbackObserver(); |   86   virtual TransportFeedbackObserver* GetTransportFeedbackObserver(); | 
 |   87   RateLimiter* GetRetransmissionRateLimiter(); | 
|   86  |   88  | 
|   87   // SetAllocatedSendBitrateLimits sets bitrates limits imposed by send codec |   89   // SetAllocatedSendBitrateLimits sets bitrates limits imposed by send codec | 
|   88   // settings. |   90   // settings. | 
|   89   // |min_send_bitrate_bps| is the total minimum send bitrate required by all |   91   // |min_send_bitrate_bps| is the total minimum send bitrate required by all | 
|   90   // sending streams.  This is the minimum bitrate the PacedSender will use. |   92   // sending streams.  This is the minimum bitrate the PacedSender will use. | 
|   91   // Note that CongestionController::OnNetworkChanged can still be called with |   93   // Note that CongestionController::OnNetworkChanged can still be called with | 
|   92   // a lower bitrate estimate. |   94   // a lower bitrate estimate. | 
|   93   // |max_padding_bitrate_bps| is the max bitrate the send streams request for |   95   // |max_padding_bitrate_bps| is the max bitrate the send streams request for | 
|   94   // padding. This can be higher than the current network estimate and tells |   96   // padding. This can be higher than the current network estimate and tells | 
|   95   // the PacedSender how much it should max pad unless there is real packets to |   97   // the PacedSender how much it should max pad unless there is real packets to | 
| (...skipping 18 matching lines...) Expand all  Loading... | 
|  114   bool IsNetworkDown() const; |  116   bool IsNetworkDown() const; | 
|  115   bool HasNetworkParametersToReportChanged(uint32_t bitrate_bps, |  117   bool HasNetworkParametersToReportChanged(uint32_t bitrate_bps, | 
|  116                                            uint8_t fraction_loss, |  118                                            uint8_t fraction_loss, | 
|  117                                            int64_t rtt); |  119                                            int64_t rtt); | 
|  118   Clock* const clock_; |  120   Clock* const clock_; | 
|  119   Observer* const observer_; |  121   Observer* const observer_; | 
|  120   const std::unique_ptr<PacketRouter> packet_router_; |  122   const std::unique_ptr<PacketRouter> packet_router_; | 
|  121   const std::unique_ptr<PacedSender> pacer_; |  123   const std::unique_ptr<PacedSender> pacer_; | 
|  122   const std::unique_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; |  124   const std::unique_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; | 
|  123   const std::unique_ptr<BitrateController> bitrate_controller_; |  125   const std::unique_ptr<BitrateController> bitrate_controller_; | 
 |  126   const std::unique_ptr<RateLimiter> retransmission_rate_limiter_; | 
|  124   RemoteEstimatorProxy remote_estimator_proxy_; |  127   RemoteEstimatorProxy remote_estimator_proxy_; | 
|  125   TransportFeedbackAdapter transport_feedback_adapter_; |  128   TransportFeedbackAdapter transport_feedback_adapter_; | 
|  126   int min_bitrate_bps_; |  129   int min_bitrate_bps_; | 
|  127   rtc::CriticalSection critsect_; |  130   rtc::CriticalSection critsect_; | 
|  128   uint32_t last_reported_bitrate_bps_ GUARDED_BY(critsect_); |  131   uint32_t last_reported_bitrate_bps_ GUARDED_BY(critsect_); | 
|  129   uint8_t last_reported_fraction_loss_ GUARDED_BY(critsect_); |  132   uint8_t last_reported_fraction_loss_ GUARDED_BY(critsect_); | 
|  130   int64_t last_reported_rtt_ GUARDED_BY(critsect_); |  133   int64_t last_reported_rtt_ GUARDED_BY(critsect_); | 
|  131   NetworkState network_state_ GUARDED_BY(critsect_); |  134   NetworkState network_state_ GUARDED_BY(critsect_); | 
|  132  |  135  | 
|  133   RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController); |  136   RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController); | 
|  134 }; |  137 }; | 
|  135  |  138  | 
|  136 }  // namespace webrtc |  139 }  // namespace webrtc | 
|  137  |  140  | 
|  138 #endif  // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ |  141 #endif  // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ | 
| OLD | NEW |