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

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

Issue 2111813002: Revert of Move RtcEventLog object from inside VoiceEngine to Call. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 5 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
(...skipping 11 matching lines...) Expand all
22 #include "webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.h" 22 #include "webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.h"
23 #include "webrtc/modules/remote_bitrate_estimator/transport_feedback_adapter.h" 23 #include "webrtc/modules/remote_bitrate_estimator/transport_feedback_adapter.h"
24 24
25 namespace rtc { 25 namespace rtc {
26 struct SentPacket; 26 struct SentPacket;
27 } 27 }
28 28
29 namespace webrtc { 29 namespace webrtc {
30 30
31 class BitrateController; 31 class BitrateController;
32 class BitrateObserver;
32 class Clock; 33 class Clock;
33 class ProcessThread; 34 class ProcessThread;
34 class RemoteBitrateEstimator; 35 class RemoteBitrateEstimator;
35 class RemoteBitrateObserver; 36 class RemoteBitrateObserver;
36 class RtcEventLog;
37 class TransportFeedbackObserver; 37 class TransportFeedbackObserver;
38 38
39 class CongestionController : public CallStatsObserver, public Module { 39 class CongestionController : public CallStatsObserver, public Module {
40 public: 40 public:
41 // Observer class for bitrate changes announced due to change in bandwidth 41 // Observer class for bitrate changes announced due to change in bandwidth
42 // estimate or due to that the send pacer is full. Fraction loss and rtt is 42 // estimate or due to that the send pacer is full. Fraction loss and rtt is
43 // also part of this callback to allow the observer to optimize its settings 43 // also part of this callback to allow the observer to optimize its settings
44 // for different types of network environments. The bitrate does not include 44 // for different types of network environments. The bitrate does not include
45 // packet headers and is measured in bits per second. 45 // packet headers and is measured in bits per second.
46 class Observer { 46 class Observer {
47 public: 47 public:
48 virtual void OnNetworkChanged(uint32_t bitrate_bps, 48 virtual void OnNetworkChanged(uint32_t bitrate_bps,
49 uint8_t fraction_loss, // 0 - 255. 49 uint8_t fraction_loss, // 0 - 255.
50 int64_t rtt_ms) = 0; 50 int64_t rtt_ms) = 0;
51 51
52 protected: 52 protected:
53 virtual ~Observer() {} 53 virtual ~Observer() {}
54 }; 54 };
55 // Deprecated
56 // TODO(perkj): Remove once no other clients use this ctor.
57 CongestionController(Clock* clock,
58 BitrateObserver* bitrate_observer,
59 RemoteBitrateObserver* remote_bitrate_observer);
60 CongestionController(Clock* clock,
61 Observer* observer,
62 RemoteBitrateObserver* remote_bitrate_observer);
55 CongestionController(Clock* clock, 63 CongestionController(Clock* clock,
56 Observer* observer, 64 Observer* observer,
57 RemoteBitrateObserver* remote_bitrate_observer, 65 RemoteBitrateObserver* remote_bitrate_observer,
58 RtcEventLog* event_log);
59 CongestionController(Clock* clock,
60 Observer* observer,
61 RemoteBitrateObserver* remote_bitrate_observer,
62 RtcEventLog* event_log,
63 std::unique_ptr<PacketRouter> packet_router, 66 std::unique_ptr<PacketRouter> packet_router,
64 std::unique_ptr<PacedSender> pacer); 67 std::unique_ptr<PacedSender> pacer);
65 virtual ~CongestionController(); 68 virtual ~CongestionController();
66 69
67 virtual void SetBweBitrates(int min_bitrate_bps, 70 virtual void SetBweBitrates(int min_bitrate_bps,
68 int start_bitrate_bps, 71 int start_bitrate_bps,
69 int max_bitrate_bps); 72 int max_bitrate_bps);
70 // Resets both the BWE state and the bitrate estimator. Note the first 73 // Resets both the BWE state and the bitrate estimator. Note the first
71 // argument is the bitrate_bps. 74 // argument is the bitrate_bps.
72 virtual void ResetBweAndBitrates(int bitrate_bps, 75 virtual void ResetBweAndBitrates(int bitrate_bps,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 uint8_t last_reported_fraction_loss_ GUARDED_BY(critsect_); 129 uint8_t last_reported_fraction_loss_ GUARDED_BY(critsect_);
127 int64_t last_reported_rtt_ GUARDED_BY(critsect_); 130 int64_t last_reported_rtt_ GUARDED_BY(critsect_);
128 NetworkState network_state_ GUARDED_BY(critsect_); 131 NetworkState network_state_ GUARDED_BY(critsect_);
129 132
130 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController); 133 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController);
131 }; 134 };
132 135
133 } // namespace webrtc 136 } // namespace webrtc
134 137
135 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ 138 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698