OLD | NEW |
---|---|
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 * Usage: this class will register multiple RtcpBitrateObserver's one at each | 10 * Usage: this class will register multiple RtcpBitrateObserver's one at each |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 | 42 |
43 class BitrateController : public Module { | 43 class BitrateController : public Module { |
44 // This class collects feedback from all streams sent to a peer (via | 44 // This class collects feedback from all streams sent to a peer (via |
45 // RTCPBandwidthObservers). It does one aggregated send side bandwidth | 45 // RTCPBandwidthObservers). It does one aggregated send side bandwidth |
46 // estimation and divide the available bitrate between all its registered | 46 // estimation and divide the available bitrate between all its registered |
47 // BitrateObservers. | 47 // BitrateObservers. |
48 public: | 48 public: |
49 static const int kDefaultStartBitrateKbps = 300; | 49 static const int kDefaultStartBitrateKbps = 300; |
50 | 50 |
51 static BitrateController* CreateBitrateController(Clock* clock, | 51 static BitrateController* CreateBitrateController(Clock* clock, |
52 BitrateObserver* observer); | 52 BitrateObserver* observer, |
53 RtcEventLog* event_log); | |
stefan-webrtc
2016/03/11 10:11:53
I think you'll want to keep the old Create method
ivoc
2016/03/16 17:00:32
Done.
| |
53 virtual ~BitrateController() {} | 54 virtual ~BitrateController() {} |
54 | 55 |
55 virtual RtcpBandwidthObserver* CreateRtcpBandwidthObserver() = 0; | 56 virtual RtcpBandwidthObserver* CreateRtcpBandwidthObserver() = 0; |
56 | 57 |
57 virtual void SetStartBitrate(int start_bitrate_bps) = 0; | 58 virtual void SetStartBitrate(int start_bitrate_bps) = 0; |
58 virtual void SetMinMaxBitrate(int min_bitrate_bps, int max_bitrate_bps) = 0; | 59 virtual void SetMinMaxBitrate(int min_bitrate_bps, int max_bitrate_bps) = 0; |
59 | 60 |
60 virtual void UpdateDelayBasedEstimate(uint32_t bitrate_bps) = 0; | 61 virtual void UpdateDelayBasedEstimate(uint32_t bitrate_bps) = 0; |
61 | 62 |
62 virtual void SetEventLog(RtcEventLog* event_log) = 0; | |
63 | |
64 // Gets the available payload bandwidth in bits per second. Note that | 63 // Gets the available payload bandwidth in bits per second. Note that |
65 // this bandwidth excludes packet headers. | 64 // this bandwidth excludes packet headers. |
66 virtual bool AvailableBandwidth(uint32_t* bandwidth) const = 0; | 65 virtual bool AvailableBandwidth(uint32_t* bandwidth) const = 0; |
67 | 66 |
68 virtual void SetReservedBitrate(uint32_t reserved_bitrate_bps) = 0; | 67 virtual void SetReservedBitrate(uint32_t reserved_bitrate_bps) = 0; |
69 }; | 68 }; |
70 } // namespace webrtc | 69 } // namespace webrtc |
71 #endif // WEBRTC_MODULES_BITRATE_CONTROLLER_INCLUDE_BITRATE_CONTROLLER_H_ | 70 #endif // WEBRTC_MODULES_BITRATE_CONTROLLER_INCLUDE_BITRATE_CONTROLLER_H_ |
OLD | NEW |