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

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

Issue 1208083002: Remove MimdRateControl and factories for RemoteBitrateEstimor. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Updated thresholds for TestTimestampGrouping Created 5 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
11 // This class estimates the incoming available bandwidth. 11 // This class estimates the incoming available bandwidth.
12 12
13 #ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_REMOTE_BITRATE_ESTIMATOR _H_ 13 #ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_REMOTE_BITRATE_ESTIMATOR _H_
14 #define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_REMOTE_BITRATE_ESTIMATOR _H_ 14 #define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_REMOTE_BITRATE_ESTIMATOR _H_
15 15
16 #include <map> 16 #include <map>
17 #include <vector> 17 #include <vector>
18 18
19 #include "webrtc/common_types.h" 19 #include "webrtc/common_types.h"
20 #include "webrtc/modules/interface/module.h" 20 #include "webrtc/modules/interface/module.h"
21 #include "webrtc/modules/interface/module_common_types.h" 21 #include "webrtc/modules/interface/module_common_types.h"
22 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"
stefan-webrtc 2015/06/30 11:38:18 Needed?
sprang_webrtc 2015/07/06 07:54:29 Done.
22 #include "webrtc/typedefs.h" 23 #include "webrtc/typedefs.h"
23 24
24 namespace webrtc { 25 namespace webrtc {
25 26
26 class Clock; 27 class Clock;
27 28
28 enum RateControlType {
29 kMimdControl,
30 kAimdControl
31 };
32
33 // RemoteBitrateObserver is used to signal changes in bitrate estimates for 29 // RemoteBitrateObserver is used to signal changes in bitrate estimates for
34 // the incoming streams. 30 // the incoming streams.
35 class RemoteBitrateObserver { 31 class RemoteBitrateObserver {
36 public: 32 public:
37 // Called when a receive channel group has a new bitrate estimate for the 33 // Called when a receive channel group has a new bitrate estimate for the
38 // incoming streams. 34 // incoming streams.
39 virtual void OnReceiveBitrateChanged(const std::vector<unsigned int>& ssrcs, 35 virtual void OnReceiveBitrateChanged(const std::vector<unsigned int>& ssrcs,
40 unsigned int bitrate) = 0; 36 unsigned int bitrate) = 0;
41 37
42 virtual ~RemoteBitrateObserver() {} 38 virtual ~RemoteBitrateObserver() {}
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 unsigned int* bitrate_bps) const = 0; 114 unsigned int* bitrate_bps) const = 0;
119 115
120 // Returns true if the statistics are available. 116 // Returns true if the statistics are available.
121 virtual bool GetStats(ReceiveBandwidthEstimatorStats* output) const = 0; 117 virtual bool GetStats(ReceiveBandwidthEstimatorStats* output) const = 0;
122 118
123 protected: 119 protected:
124 static const int64_t kProcessIntervalMs = 1000; 120 static const int64_t kProcessIntervalMs = 1000;
125 static const int64_t kStreamTimeOutMs = 2000; 121 static const int64_t kStreamTimeOutMs = 2000;
126 }; 122 };
127 123
128 struct RemoteBitrateEstimatorFactory {
129 RemoteBitrateEstimatorFactory() {}
130 virtual ~RemoteBitrateEstimatorFactory() {}
131
132 virtual RemoteBitrateEstimator* Create(
133 RemoteBitrateObserver* observer,
134 Clock* clock,
135 RateControlType control_type,
136 uint32_t min_bitrate_bps) const;
137 };
138
139 struct AbsoluteSendTimeRemoteBitrateEstimatorFactory
140 : public RemoteBitrateEstimatorFactory {
141 AbsoluteSendTimeRemoteBitrateEstimatorFactory() {}
142 virtual ~AbsoluteSendTimeRemoteBitrateEstimatorFactory() {}
143
144 virtual RemoteBitrateEstimator* Create(
145 RemoteBitrateObserver* observer,
146 Clock* clock,
147 RateControlType control_type,
148 uint32_t min_bitrate_bps) const;
149 };
150 } // namespace webrtc 124 } // namespace webrtc
151 125
152 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_REMOTE_BITRATE_ESTIMA TOR_H_ 126 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_REMOTE_BITRATE_ESTIMA TOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698