Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: webrtc/modules/congestion_controller/include/congestion_controller.h

Issue 1917793002: Remove SendPacer from ViEEncoder (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
11 #ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ 11 #ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_
12 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ 12 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_
13 13
14 #include <memory> 14 #include <memory>
15 15
16 #include "webrtc/base/constructormagic.h" 16 #include "webrtc/base/constructormagic.h"
17 #include "webrtc/base/scoped_ptr.h" 17 #include "webrtc/base/scoped_ptr.h"
18 #include "webrtc/modules/include/module.h" 18 #include "webrtc/modules/include/module.h"
19 #include "webrtc/modules/include/module_common_types.h" 19 #include "webrtc/modules/include/module_common_types.h"
20 #include "webrtc/modules/pacing/packet_router.h" 20 #include "webrtc/modules/pacing/packet_router.h"
21 #include "webrtc/modules/pacing/paced_sender.h"
21 #include "webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.h" 22 #include "webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.h"
22 #include "webrtc/modules/remote_bitrate_estimator/transport_feedback_adapter.h" 23 #include "webrtc/modules/remote_bitrate_estimator/transport_feedback_adapter.h"
23 #include "webrtc/stream.h" 24 #include "webrtc/stream.h"
24 25
25 namespace rtc { 26 namespace rtc {
26 struct SentPacket; 27 struct SentPacket;
27 } 28 }
28 29
29 namespace webrtc { 30 namespace webrtc {
30 31
31 class BitrateController; 32 class BitrateController;
32 class BitrateObserver; 33 class BitrateObserver;
33 class Clock; 34 class Clock;
34 class PacedSender;
35 class ProcessThread; 35 class ProcessThread;
36 class RemoteBitrateEstimator; 36 class RemoteBitrateEstimator;
37 class RemoteBitrateObserver; 37 class RemoteBitrateObserver;
38 class TransportFeedbackObserver; 38 class TransportFeedbackObserver;
39 39
40 class CongestionController : public CallStatsObserver, public Module { 40 class CongestionController : public CallStatsObserver, public Module {
41 public: 41 public:
42 CongestionController(Clock* clock, 42 CongestionController(Clock* clock,
43 BitrateObserver* bitrate_observer, 43 BitrateObserver* bitrate_observer,
44 RemoteBitrateObserver* remote_bitrate_observer); 44 RemoteBitrateObserver* remote_bitrate_observer);
45 virtual ~CongestionController(); 45 virtual ~CongestionController();
46 46
47 virtual void SetBweBitrates(int min_bitrate_bps, 47 virtual void SetBweBitrates(int min_bitrate_bps,
48 int start_bitrate_bps, 48 int start_bitrate_bps,
49 int max_bitrate_bps); 49 int max_bitrate_bps);
50 virtual void SignalNetworkState(NetworkState state); 50 virtual void SignalNetworkState(NetworkState state);
51 virtual BitrateController* GetBitrateController() const; 51 virtual BitrateController* GetBitrateController() const;
52 virtual RemoteBitrateEstimator* GetRemoteBitrateEstimator( 52 virtual RemoteBitrateEstimator* GetRemoteBitrateEstimator(
53 bool send_side_bwe); 53 bool send_side_bwe);
54 virtual int64_t GetPacerQueuingDelayMs() const; 54 virtual int64_t GetPacerQueuingDelayMs() const;
55 virtual PacedSender* pacer() { return pacer_.get(); } 55 virtual PacedSender* pacer() { return pacer_.get(); }
56 virtual PacketRouter* packet_router() { return &packet_router_; } 56 virtual PacketRouter* packet_router() { return &packet_router_; }
57 virtual TransportFeedbackObserver* GetTransportFeedbackObserver(); 57 virtual TransportFeedbackObserver* GetTransportFeedbackObserver();
58 58
59 virtual void UpdatePacerBitrate(int bitrate_kbps, 59 void UpdatePaddingBitrate(int bitrate_bps);
60 int max_bitrate_kbps, 60 void SetMinimumSendBitrate(int bitrate_bps);
61 int min_bitrate_kbps);
62 61
63 virtual void OnSentPacket(const rtc::SentPacket& sent_packet); 62 virtual void OnSentPacket(const rtc::SentPacket& sent_packet);
64 63
65 // Implements CallStatsObserver. 64 // Implements CallStatsObserver.
66 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override; 65 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override;
67 66
68 // Implements Module. 67 // Implements Module.
69 int64_t TimeUntilNextProcess() override; 68 int64_t TimeUntilNextProcess() override;
70 void Process() override; 69 void Process() override;
71 70
72 private: 71 private:
73 Clock* const clock_; 72 Clock* const clock_;
74 const std::unique_ptr<PacedSender> pacer_; 73 const std::unique_ptr<PacedSender> pacer_;
75 const std::unique_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; 74 const std::unique_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
76 const std::unique_ptr<BitrateController> bitrate_controller_; 75 const std::unique_ptr<BitrateController> bitrate_controller_;
77 PacketRouter packet_router_; 76 PacketRouter packet_router_;
78 RemoteEstimatorProxy remote_estimator_proxy_; 77 RemoteEstimatorProxy remote_estimator_proxy_;
79 TransportFeedbackAdapter transport_feedback_adapter_; 78 TransportFeedbackAdapter transport_feedback_adapter_;
80 int min_bitrate_bps_; 79 int min_bitrate_bps_;
81 80
82 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController); 81 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController);
83 }; 82 };
84 83
85 } // namespace webrtc 84 } // namespace webrtc
86 85
87 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ 86 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698