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

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

Powered by Google App Engine
This is Rietveld 408576698