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

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

Issue 1419803002: Rename ChannelGroup to CongestionController and move to webrtc/call/. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 5 years, 2 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
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_VIDEO_ENGINE_VIE_CHANNEL_GROUP_H_ 11 #ifndef WEBRTC_CALL_CONGESTION_CONTROLLER_H_
12 #define WEBRTC_VIDEO_ENGINE_VIE_CHANNEL_GROUP_H_ 12 #define WEBRTC_CALL_CONGESTION_CONTROLLER_H_
13 13
14 #include <list>
15 #include <map>
16 #include <set>
17 #include <vector> 14 #include <vector>
18 15
19 #include "webrtc/base/criticalsection.h" 16 #include "webrtc/base/criticalsection.h"
20 #include "webrtc/base/scoped_ptr.h" 17 #include "webrtc/base/scoped_ptr.h"
21 #include "webrtc/base/socket.h" 18 #include "webrtc/base/socket.h"
22 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" 19 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h"
23 #include "webrtc/video_receive_stream.h" 20 #include "webrtc/stream.h"
24 #include "webrtc/video_send_stream.h"
25 21
26 namespace webrtc { 22 namespace webrtc {
27 23
28 class BitrateAllocator; 24 class BitrateAllocator;
29 class CallStats; 25 class CallStats;
30 class Config; 26 class Config;
31 class PacedSender; 27 class PacedSender;
32 class PacketRouter; 28 class PacketRouter;
33 class ProcessThread; 29 class ProcessThread;
34 class RemoteBitrateEstimator; 30 class RemoteBitrateEstimator;
35 class RemoteEstimatorProxy; 31 class RemoteEstimatorProxy;
36 class RtpRtcp; 32 class RtpRtcp;
37 class SendStatisticsProxy; 33 class SendStatisticsProxy;
38 class TransportFeedbackAdapter; 34 class TransportFeedbackAdapter;
39 class ViEEncoder; 35 class ViEEncoder;
40 class VieRemb; 36 class VieRemb;
41 37
42 // Channel group contains data common for several channels. All channels in the 38 class CongestionController : public BitrateObserver {
43 // group are assumed to send/receive data to the same end-point.
44 class ChannelGroup : public BitrateObserver {
45 public: 39 public:
46 ChannelGroup(ProcessThread* process_thread, CallStats* call_stats); 40 CongestionController(ProcessThread* process_thread, CallStats* call_stats);
47 ~ChannelGroup(); 41 ~CongestionController();
48 void AddEncoder(ViEEncoder* encoder); 42 void AddEncoder(ViEEncoder* encoder);
49 void RemoveEncoder(ViEEncoder* encoder); 43 void RemoveEncoder(ViEEncoder* encoder);
50 void SetBweBitrates(int min_bitrate_bps, 44 void SetBweBitrates(int min_bitrate_bps,
51 int start_bitrate_bps, 45 int start_bitrate_bps,
52 int max_bitrate_bps); 46 int max_bitrate_bps);
53 47
54 void SetChannelRembStatus(bool sender, bool receiver, RtpRtcp* rtp_module); 48 void SetChannelRembStatus(bool sender, bool receiver, RtpRtcp* rtp_module);
55 49
56 void SignalNetworkState(NetworkState state); 50 void SignalNetworkState(NetworkState state);
57 51
58 BitrateController* GetBitrateController() const; 52 BitrateController* GetBitrateController() const;
59 RemoteBitrateEstimator* GetRemoteBitrateEstimator(bool send_side_bwe) const; 53 RemoteBitrateEstimator* GetRemoteBitrateEstimator(bool send_side_bwe) const;
60 int64_t GetPacerQueuingDelayMs() const; 54 int64_t GetPacerQueuingDelayMs() const;
61 PacedSender* pacer() const { return pacer_.get(); } 55 PacedSender* pacer() const { return pacer_.get(); }
62 PacketRouter* packet_router() const { return packet_router_.get(); } 56 PacketRouter* packet_router() const { return packet_router_.get(); }
63 BitrateAllocator* bitrate_allocator() const { 57 BitrateAllocator* bitrate_allocator() const {
64 return bitrate_allocator_.get(); } 58 return bitrate_allocator_.get(); }
65 TransportFeedbackObserver* GetTransportFeedbackObserver(); 59 TransportFeedbackObserver* GetTransportFeedbackObserver();
66 RtcpIntraFrameObserver* GetRtcpIntraFrameObserver() const;
67 60
68 // Implements BitrateObserver. 61 // Implements BitrateObserver.
69 void OnNetworkChanged(uint32_t target_bitrate_bps, 62 void OnNetworkChanged(uint32_t target_bitrate_bps,
70 uint8_t fraction_loss, 63 uint8_t fraction_loss,
71 int64_t rtt) override; 64 int64_t rtt) override;
72 65
73 void OnSentPacket(const rtc::SentPacket& sent_packet); 66 void OnSentPacket(const rtc::SentPacket& sent_packet);
74 67
75 private: 68 private:
76 rtc::scoped_ptr<VieRemb> remb_; 69 rtc::scoped_ptr<VieRemb> remb_;
pbos-webrtc 2015/10/21 13:15:09 TODO to rename/move?
70 // TODO(mflodman): Move bitrate_allocator_ to Call.
77 rtc::scoped_ptr<BitrateAllocator> bitrate_allocator_; 71 rtc::scoped_ptr<BitrateAllocator> bitrate_allocator_;
78 rtc::scoped_ptr<PacketRouter> packet_router_; 72 rtc::scoped_ptr<PacketRouter> packet_router_;
79 rtc::scoped_ptr<PacedSender> pacer_; 73 rtc::scoped_ptr<PacedSender> pacer_;
80 rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; 74 rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
81 rtc::scoped_ptr<RemoteEstimatorProxy> remote_estimator_proxy_; 75 rtc::scoped_ptr<RemoteEstimatorProxy> remote_estimator_proxy_;
82 76
83 mutable rtc::CriticalSection encoder_crit_; 77 mutable rtc::CriticalSection encoder_crit_;
84 std::vector<ViEEncoder*> encoders_ GUARDED_BY(encoder_crit_); 78 std::vector<ViEEncoder*> encoders_ GUARDED_BY(encoder_crit_);
85 79
86 // Registered at construct time and assumed to outlive this class. 80 // Registered at construct time and assumed to outlive this class.
87 ProcessThread* const process_thread_; 81 ProcessThread* const process_thread_;
88 CallStats* const call_stats_; 82 CallStats* const call_stats_;
89 83
90 rtc::scoped_ptr<ProcessThread> pacer_thread_; 84 rtc::scoped_ptr<ProcessThread> pacer_thread_;
91 85
92 rtc::scoped_ptr<BitrateController> bitrate_controller_; 86 rtc::scoped_ptr<BitrateController> bitrate_controller_;
93 rtc::scoped_ptr<TransportFeedbackAdapter> transport_feedback_adapter_; 87 rtc::scoped_ptr<TransportFeedbackAdapter> transport_feedback_adapter_;
94 int min_bitrate_bps_; 88 int min_bitrate_bps_;
95 }; 89 };
96 90
97 } // namespace webrtc 91 } // namespace webrtc
98 92
99 #endif // WEBRTC_VIDEO_ENGINE_VIE_CHANNEL_GROUP_H_ 93 #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