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

Side by Side Diff: webrtc/call/congestion_controller.h

Issue 1718473002: Move congestion controller to a separate module. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add presubmit Created 4 years, 10 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
« no previous file with comments | « webrtc/call/call.cc ('k') | webrtc/call/congestion_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_CALL_CONGESTION_CONTROLLER_H_
12 #define WEBRTC_CALL_CONGESTION_CONTROLLER_H_
13
14 #include "webrtc/base/scoped_ptr.h"
15 #include "webrtc/base/thread_checker.h"
16 #include "webrtc/modules/include/module.h"
17 #include "webrtc/modules/include/module_common_types.h"
18 #include "webrtc/modules/pacing/packet_router.h"
19 #include "webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.h"
20 #include "webrtc/modules/remote_bitrate_estimator/transport_feedback_adapter.h"
21 #include "webrtc/stream.h"
22
23 namespace rtc {
24 struct SentPacket;
25 }
26
27 namespace webrtc {
28
29 class BitrateController;
30 class BitrateObserver;
31 class Clock;
32 class PacedSender;
33 class ProcessThread;
34 class RemoteBitrateEstimator;
35 class RemoteBitrateObserver;
36 class TransportFeedbackObserver;
37
38 class CongestionController : public CallStatsObserver, public Module {
39 public:
40 CongestionController(Clock* clock,
41 BitrateObserver* bitrate_observer,
42 RemoteBitrateObserver* remote_bitrate_observer);
43 virtual ~CongestionController();
44
45 virtual void SetBweBitrates(int min_bitrate_bps,
46 int start_bitrate_bps,
47 int max_bitrate_bps);
48 virtual void SignalNetworkState(NetworkState state);
49 virtual BitrateController* GetBitrateController() const;
50 virtual RemoteBitrateEstimator* GetRemoteBitrateEstimator(
51 bool send_side_bwe);
52 virtual int64_t GetPacerQueuingDelayMs() const;
53 virtual PacedSender* pacer() { return pacer_.get(); }
54 virtual PacketRouter* packet_router() { return &packet_router_; }
55 virtual TransportFeedbackObserver* GetTransportFeedbackObserver();
56
57 virtual void UpdatePacerBitrate(int bitrate_kbps,
58 int max_bitrate_kbps,
59 int min_bitrate_kbps);
60
61 virtual void OnSentPacket(const rtc::SentPacket& sent_packet);
62
63 // Implements CallStatsObserver.
64 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override;
65
66 // Implements Module.
67 int64_t TimeUntilNextProcess() override;
68 int32_t Process() override;
69
70 private:
71 Clock* const clock_;
72 rtc::ThreadChecker config_thread_checker_;
73 const rtc::scoped_ptr<PacedSender> pacer_;
74 const rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
75 const rtc::scoped_ptr<ProcessThread> pacer_thread_;
76 const rtc::scoped_ptr<BitrateController> bitrate_controller_;
77 PacketRouter packet_router_;
78 RemoteEstimatorProxy remote_estimator_proxy_;
79 TransportFeedbackAdapter transport_feedback_adapter_;
80 int min_bitrate_bps_;
81
82 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController);
83 };
84
85 } // namespace webrtc
86
87 #endif // WEBRTC_CALL_CONGESTION_CONTROLLER_H_
OLDNEW
« no previous file with comments | « webrtc/call/call.cc ('k') | webrtc/call/congestion_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698