Index: webrtc/call/congestion_controller.h |
diff --git a/webrtc/call/congestion_controller.h b/webrtc/call/congestion_controller.h |
index a1c1b853ffa1aa2d71d88ca2ee2cc8b3663a4d74..814dfdb27a4fa803d3c542143b1f31f3482e539b 100644 |
--- a/webrtc/call/congestion_controller.h |
+++ b/webrtc/call/congestion_controller.h |
@@ -12,6 +12,9 @@ |
#define WEBRTC_CALL_CONGESTION_CONTROLLER_H_ |
#include "webrtc/base/scoped_ptr.h" |
+#include "webrtc/base/thread_checker.h" |
+#include "webrtc/modules/include/module.h" |
+#include "webrtc/modules/include/module_common_types.h" |
#include "webrtc/stream.h" |
namespace rtc { |
@@ -22,7 +25,6 @@ namespace webrtc { |
class BitrateController; |
class BitrateObserver; |
-class CallStats; |
class Clock; |
class PacedSender; |
class PacketRouter; |
@@ -30,24 +32,20 @@ class ProcessThread; |
class RemoteBitrateEstimator; |
class RemoteBitrateObserver; |
class RemoteEstimatorProxy; |
-class RtpRtcp; |
class TransportFeedbackAdapter; |
class TransportFeedbackObserver; |
-class CongestionController { |
+class CongestionController : public CallStatsObserver, public Module { |
public: |
CongestionController(Clock* clock, |
- ProcessThread* process_thread, |
- CallStats* call_stats, |
BitrateObserver* bitrate_observer, |
RemoteBitrateObserver* remote_bitrate_observer); |
virtual ~CongestionController(); |
+ |
virtual void SetBweBitrates(int min_bitrate_bps, |
int start_bitrate_bps, |
int max_bitrate_bps); |
- |
virtual void SignalNetworkState(NetworkState state); |
- |
virtual BitrateController* GetBitrateController() const; |
virtual RemoteBitrateEstimator* GetRemoteBitrateEstimator( |
bool send_side_bwe) const; |
@@ -62,19 +60,21 @@ class CongestionController { |
virtual void OnSentPacket(const rtc::SentPacket& sent_packet); |
+ // Implements CallStatsObserver. |
+ void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override; |
+ |
+ // Implements Module. |
+ int64_t TimeUntilNextProcess() override; |
+ int32_t Process() override; |
+ |
private: |
Clock* const clock_; |
+ rtc::ThreadChecker config_thread_checker_; |
rtc::scoped_ptr<PacketRouter> packet_router_; |
rtc::scoped_ptr<PacedSender> pacer_; |
rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; |
rtc::scoped_ptr<RemoteEstimatorProxy> remote_estimator_proxy_; |
- |
- // Registered at construct time and assumed to outlive this class. |
- ProcessThread* const process_thread_; |
- CallStats* const call_stats_; |
- |
rtc::scoped_ptr<ProcessThread> pacer_thread_; |
- |
rtc::scoped_ptr<BitrateController> bitrate_controller_; |
rtc::scoped_ptr<TransportFeedbackAdapter> transport_feedback_adapter_; |
pbos-webrtc
2016/02/17 13:37:21
const every scoped ptr that you create on construc
stefan-webrtc
2016/02/17 14:14:27
Done.
|
int min_bitrate_bps_; |