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 22 matching lines...) Expand all Loading... |
33 class SendStatisticsProxy; | 33 class SendStatisticsProxy; |
34 class TransportFeedbackAdapter; | 34 class TransportFeedbackAdapter; |
35 class TransportFeedbackObserver; | 35 class TransportFeedbackObserver; |
36 class ViEEncoder; | 36 class ViEEncoder; |
37 class VieRemb; | 37 class VieRemb; |
38 | 38 |
39 class CongestionController { | 39 class CongestionController { |
40 public: | 40 public: |
41 CongestionController(ProcessThread* process_thread, CallStats* call_stats, | 41 CongestionController(ProcessThread* process_thread, CallStats* call_stats, |
42 BitrateObserver* bitrate_observer); | 42 BitrateObserver* bitrate_observer); |
43 ~CongestionController(); | 43 virtual ~CongestionController(); |
44 void AddEncoder(ViEEncoder* encoder); | 44 virtual void AddEncoder(ViEEncoder* encoder); |
45 void RemoveEncoder(ViEEncoder* encoder); | 45 virtual void RemoveEncoder(ViEEncoder* encoder); |
46 void SetBweBitrates(int min_bitrate_bps, | 46 virtual void SetBweBitrates(int min_bitrate_bps, |
47 int start_bitrate_bps, | 47 int start_bitrate_bps, |
48 int max_bitrate_bps); | 48 int max_bitrate_bps); |
49 | 49 |
50 void SetChannelRembStatus(bool sender, bool receiver, RtpRtcp* rtp_module); | 50 virtual void SetChannelRembStatus(bool sender, |
| 51 bool receiver, |
| 52 RtpRtcp* rtp_module); |
51 | 53 |
52 void SignalNetworkState(NetworkState state); | 54 virtual void SignalNetworkState(NetworkState state); |
53 | 55 |
54 BitrateController* GetBitrateController() const; | 56 virtual BitrateController* GetBitrateController() const; |
55 RemoteBitrateEstimator* GetRemoteBitrateEstimator(bool send_side_bwe) const; | 57 virtual RemoteBitrateEstimator* GetRemoteBitrateEstimator( |
56 int64_t GetPacerQueuingDelayMs() const; | 58 bool send_side_bwe) const; |
57 PacedSender* pacer() const { return pacer_.get(); } | 59 virtual int64_t GetPacerQueuingDelayMs() const; |
58 PacketRouter* packet_router() const { return packet_router_.get(); } | 60 virtual PacedSender* pacer() const { return pacer_.get(); } |
59 TransportFeedbackObserver* GetTransportFeedbackObserver(); | 61 virtual PacketRouter* packet_router() const { return packet_router_.get(); } |
| 62 virtual TransportFeedbackObserver* GetTransportFeedbackObserver(); |
60 | 63 |
61 void UpdatePacerBitrate(int bitrate_kbps, int max_bitrate_kbps, | 64 virtual void UpdatePacerBitrate(int bitrate_kbps, |
62 int min_bitrate_kbps); | 65 int max_bitrate_kbps, |
| 66 int min_bitrate_kbps); |
63 | 67 |
64 void OnSentPacket(const rtc::SentPacket& sent_packet); | 68 virtual void OnSentPacket(const rtc::SentPacket& sent_packet); |
65 | 69 |
66 private: | 70 private: |
67 rtc::scoped_ptr<VieRemb> remb_; | 71 rtc::scoped_ptr<VieRemb> remb_; |
68 rtc::scoped_ptr<PacketRouter> packet_router_; | 72 rtc::scoped_ptr<PacketRouter> packet_router_; |
69 rtc::scoped_ptr<PacedSender> pacer_; | 73 rtc::scoped_ptr<PacedSender> pacer_; |
70 rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; | 74 rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; |
71 rtc::scoped_ptr<RemoteEstimatorProxy> remote_estimator_proxy_; | 75 rtc::scoped_ptr<RemoteEstimatorProxy> remote_estimator_proxy_; |
72 | 76 |
73 mutable rtc::CriticalSection encoder_crit_; | 77 mutable rtc::CriticalSection encoder_crit_; |
74 std::vector<ViEEncoder*> encoders_ GUARDED_BY(encoder_crit_); | 78 std::vector<ViEEncoder*> encoders_ GUARDED_BY(encoder_crit_); |
75 | 79 |
76 // Registered at construct time and assumed to outlive this class. | 80 // Registered at construct time and assumed to outlive this class. |
77 ProcessThread* const process_thread_; | 81 ProcessThread* const process_thread_; |
78 CallStats* const call_stats_; | 82 CallStats* const call_stats_; |
79 | 83 |
80 rtc::scoped_ptr<ProcessThread> pacer_thread_; | 84 rtc::scoped_ptr<ProcessThread> pacer_thread_; |
81 | 85 |
82 rtc::scoped_ptr<BitrateController> bitrate_controller_; | 86 rtc::scoped_ptr<BitrateController> bitrate_controller_; |
83 rtc::scoped_ptr<TransportFeedbackAdapter> transport_feedback_adapter_; | 87 rtc::scoped_ptr<TransportFeedbackAdapter> transport_feedback_adapter_; |
84 int min_bitrate_bps_; | 88 int min_bitrate_bps_; |
| 89 |
| 90 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController); |
85 }; | 91 }; |
86 | 92 |
87 } // namespace webrtc | 93 } // namespace webrtc |
88 | 94 |
89 #endif // WEBRTC_CALL_CONGESTION_CONTROLLER_H_ | 95 #endif // WEBRTC_CALL_CONGESTION_CONTROLLER_H_ |
OLD | NEW |