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

Side by Side Diff: webrtc/call/call.h

Issue 2793913008: Add PeerConnectionInterface::UpdateCallBitrate. (Closed)
Patch Set: add a todo about de-duplicating bitrate mask structs Created 3 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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 #ifndef WEBRTC_CALL_CALL_H_ 10 #ifndef WEBRTC_CALL_CALL_H_
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 static const int kDefaultStartBitrateBps; 68 static const int kDefaultStartBitrateBps;
69 69
70 // Bitrate config used until valid bitrate estimates are calculated. Also 70 // Bitrate config used until valid bitrate estimates are calculated. Also
71 // used to cap total bitrate used. 71 // used to cap total bitrate used.
72 struct BitrateConfig { 72 struct BitrateConfig {
73 int min_bitrate_bps = 0; 73 int min_bitrate_bps = 0;
74 int start_bitrate_bps = kDefaultStartBitrateBps; 74 int start_bitrate_bps = kDefaultStartBitrateBps;
75 int max_bitrate_bps = -1; 75 int max_bitrate_bps = -1;
76 } bitrate_config; 76 } bitrate_config;
77 77
78 // TODO(zstein): Consider using PeerConnectionInterface::BitrateParameters
79 // instead (and move BitrateParameters to base/ or api/).
Taylor Brandstetter 2017/04/12 01:33:42 Just FYI, it would be api/ since it's used in the
Zach Stein 2017/04/13 00:26:36 Acknowledged.
80 struct BitrateConfigMask {
81 rtc::Optional<int> min_bitrate_bps;
82 rtc::Optional<int> start_bitrate_bps;
83 rtc::Optional<int> max_bitrate_bps;
84 };
85
78 // AudioState which is possibly shared between multiple calls. 86 // AudioState which is possibly shared between multiple calls.
79 // TODO(solenberg): Change this to a shared_ptr once we can use C++11. 87 // TODO(solenberg): Change this to a shared_ptr once we can use C++11.
80 rtc::scoped_refptr<AudioState> audio_state; 88 rtc::scoped_refptr<AudioState> audio_state;
81 89
82 // Audio Processing Module to be used in this call. 90 // Audio Processing Module to be used in this call.
83 // TODO(solenberg): Change this to a shared_ptr once we can use C++11. 91 // TODO(solenberg): Change this to a shared_ptr once we can use C++11.
84 AudioProcessing* audio_processing = nullptr; 92 AudioProcessing* audio_processing = nullptr;
85 93
86 // RtcEventLog to use for this call. Required. 94 // RtcEventLog to use for this call. Required.
87 // Use webrtc::RtcEventLog::CreateNull() for a null implementation. 95 // Use webrtc::RtcEventLog::CreateNull() for a null implementation.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 137
130 // All received RTP and RTCP packets for the call should be inserted to this 138 // All received RTP and RTCP packets for the call should be inserted to this
131 // PacketReceiver. The PacketReceiver pointer is valid as long as the 139 // PacketReceiver. The PacketReceiver pointer is valid as long as the
132 // Call instance exists. 140 // Call instance exists.
133 virtual PacketReceiver* Receiver() = 0; 141 virtual PacketReceiver* Receiver() = 0;
134 142
135 // Returns the call statistics, such as estimated send and receive bandwidth, 143 // Returns the call statistics, such as estimated send and receive bandwidth,
136 // pacing delay, etc. 144 // pacing delay, etc.
137 virtual Stats GetStats() const = 0; 145 virtual Stats GetStats() const = 0;
138 146
139 // TODO(pbos): Like BitrateConfig above this is currently per-stream instead 147 // Parameters set here are only used if they are not masked by
140 // of maximum for entire Call. This should be fixed along with the above. 148 // SetBitrateConfigMask. Specifying a start bitrate (>0) will currently reset
141 // Specifying a start bitrate (>0) will currently reset the current bitrate 149 // the current bitrate estimate. This is due to how the
142 // estimate. This is due to how the 'x-google-start-bitrate' flag is currently 150 // 'x-google-start-bitrate' flag is currently implemented.
143 // implemented.
144 virtual void SetBitrateConfig( 151 virtual void SetBitrateConfig(
145 const Config::BitrateConfig& bitrate_config) = 0; 152 const Config::BitrateConfig& bitrate_config) = 0;
146 153
154 // Values set here are preferred to values set by SetBitrateConfig.
155 virtual void SetBitrateConfigMask(
Taylor Brandstetter 2017/04/12 01:33:42 Just an idea/bikeshed: calling these methods somet
Zach Stein 2017/04/13 00:26:36 It felt wrong to talk about SDP here, so I tried t
156 const Config::BitrateConfigMask& bitrate_mask) = 0;
157
147 // TODO(skvlad): When the unbundled case with multiple streams for the same 158 // TODO(skvlad): When the unbundled case with multiple streams for the same
148 // media type going over different networks is supported, track the state 159 // media type going over different networks is supported, track the state
149 // for each stream separately. Right now it's global per media type. 160 // for each stream separately. Right now it's global per media type.
150 virtual void SignalChannelNetworkState(MediaType media, 161 virtual void SignalChannelNetworkState(MediaType media,
151 NetworkState state) = 0; 162 NetworkState state) = 0;
152 163
153 virtual void OnTransportOverheadChanged( 164 virtual void OnTransportOverheadChanged(
154 MediaType media, 165 MediaType media,
155 int transport_overhead_per_packet) = 0; 166 int transport_overhead_per_packet) = 0;
156 167
157 virtual void OnNetworkRouteChanged( 168 virtual void OnNetworkRouteChanged(
158 const std::string& transport_name, 169 const std::string& transport_name,
159 const rtc::NetworkRoute& network_route) = 0; 170 const rtc::NetworkRoute& network_route) = 0;
160 171
161 virtual void OnSentPacket(const rtc::SentPacket& sent_packet) = 0; 172 virtual void OnSentPacket(const rtc::SentPacket& sent_packet) = 0;
162 173
163 virtual ~Call() {} 174 virtual ~Call() {}
164 }; 175 };
165 176
166 } // namespace webrtc 177 } // namespace webrtc
167 178
168 #endif // WEBRTC_CALL_CALL_H_ 179 #endif // WEBRTC_CALL_CALL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698