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

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

Issue 1748403002: Move RtcEventLog object from inside VoiceEngine to Call. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: More fixes for bots. Created 4 years, 8 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 * Usage: this class will register multiple RtcpBitrateObserver's one at each 10 * Usage: this class will register multiple RtcpBitrateObserver's one at each
11 * RTCP module. It will aggregate the results and run one bandwidth estimation 11 * RTCP module. It will aggregate the results and run one bandwidth estimation
12 * and push the result to the encoders via BitrateObserver(s). 12 * and push the result to the encoders via BitrateObserver(s).
13 */ 13 */
14 14
15 #ifndef WEBRTC_MODULES_BITRATE_CONTROLLER_INCLUDE_BITRATE_CONTROLLER_H_ 15 #ifndef WEBRTC_MODULES_BITRATE_CONTROLLER_INCLUDE_BITRATE_CONTROLLER_H_
16 #define WEBRTC_MODULES_BITRATE_CONTROLLER_INCLUDE_BITRATE_CONTROLLER_H_ 16 #define WEBRTC_MODULES_BITRATE_CONTROLLER_INCLUDE_BITRATE_CONTROLLER_H_
17 17
18 #include <map> 18 #include <map>
19 19
20 #include "webrtc/base/deprecation.h"
20 #include "webrtc/modules/include/module.h" 21 #include "webrtc/modules/include/module.h"
21 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" 22 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
22 23
23 namespace webrtc { 24 namespace webrtc {
24 25
25 class CriticalSectionWrapper; 26 class CriticalSectionWrapper;
26 class RtcEventLog; 27 class RtcEventLog;
27 struct PacketInfo; 28 struct PacketInfo;
28 29
29 class BitrateObserver { 30 class BitrateObserver {
(...skipping 11 matching lines...) Expand all
41 }; 42 };
42 43
43 class BitrateController : public Module { 44 class BitrateController : public Module {
44 // This class collects feedback from all streams sent to a peer (via 45 // This class collects feedback from all streams sent to a peer (via
45 // RTCPBandwidthObservers). It does one aggregated send side bandwidth 46 // RTCPBandwidthObservers). It does one aggregated send side bandwidth
46 // estimation and divide the available bitrate between all its registered 47 // estimation and divide the available bitrate between all its registered
47 // BitrateObservers. 48 // BitrateObservers.
48 public: 49 public:
49 static const int kDefaultStartBitrateKbps = 300; 50 static const int kDefaultStartBitrateKbps = 300;
50 51
52 // TODO(ivoc): Remove this function.
53 RTC_DEPRECATED static BitrateController* CreateBitrateController(
54 Clock* clock,
55 BitrateObserver* observer);
56
51 static BitrateController* CreateBitrateController(Clock* clock, 57 static BitrateController* CreateBitrateController(Clock* clock,
52 BitrateObserver* observer); 58 BitrateObserver* observer,
59 RtcEventLog* event_log);
tommi 2016/04/04 14:26:47 is the ownership/lifetime of |observer| and |event
ivoc 2016/04/05 08:02:58 The |observer| is Call itself in this case, and |e
tommi 2016/04/07 13:21:53 I see. Well, that does sound a bit fragile but OK
53 virtual ~BitrateController() {} 60 virtual ~BitrateController() {}
54 61
55 virtual RtcpBandwidthObserver* CreateRtcpBandwidthObserver() = 0; 62 virtual RtcpBandwidthObserver* CreateRtcpBandwidthObserver() = 0;
56 63
57 virtual void SetStartBitrate(int start_bitrate_bps) = 0; 64 virtual void SetStartBitrate(int start_bitrate_bps) = 0;
58 virtual void SetMinMaxBitrate(int min_bitrate_bps, int max_bitrate_bps) = 0; 65 virtual void SetMinMaxBitrate(int min_bitrate_bps, int max_bitrate_bps) = 0;
59 66
60 virtual void UpdateDelayBasedEstimate(uint32_t bitrate_bps) = 0; 67 virtual void UpdateDelayBasedEstimate(uint32_t bitrate_bps) = 0;
61 68
62 virtual void SetEventLog(RtcEventLog* event_log) = 0;
63
64 // Gets the available payload bandwidth in bits per second. Note that 69 // Gets the available payload bandwidth in bits per second. Note that
65 // this bandwidth excludes packet headers. 70 // this bandwidth excludes packet headers.
66 virtual bool AvailableBandwidth(uint32_t* bandwidth) const = 0; 71 virtual bool AvailableBandwidth(uint32_t* bandwidth) const = 0;
67 72
68 virtual void SetReservedBitrate(uint32_t reserved_bitrate_bps) = 0; 73 virtual void SetReservedBitrate(uint32_t reserved_bitrate_bps) = 0;
69 }; 74 };
70 } // namespace webrtc 75 } // namespace webrtc
71 #endif // WEBRTC_MODULES_BITRATE_CONTROLLER_INCLUDE_BITRATE_CONTROLLER_H_ 76 #endif // WEBRTC_MODULES_BITRATE_CONTROLLER_INCLUDE_BITRATE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698