OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 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 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1228 kEnumCounterAddressFamily, kPeerConnection_IPv6, | 1228 kEnumCounterAddressFamily, kPeerConnection_IPv6, |
1229 kPeerConnectionAddressFamilyCounter_Max); | 1229 kPeerConnectionAddressFamilyCounter_Max); |
1230 } else { | 1230 } else { |
1231 uma_observer_->IncrementEnumCounter( | 1231 uma_observer_->IncrementEnumCounter( |
1232 kEnumCounterAddressFamily, kPeerConnection_IPv4, | 1232 kEnumCounterAddressFamily, kPeerConnection_IPv4, |
1233 kPeerConnectionAddressFamilyCounter_Max); | 1233 kPeerConnectionAddressFamilyCounter_Max); |
1234 } | 1234 } |
1235 } | 1235 } |
1236 } | 1236 } |
1237 | 1237 |
1238 void PeerConnection::UpdateCallBitrate(const BitrateUpdate& update) { | |
1239 factory_->worker_thread()->Invoke<void>( | |
1240 RTC_FROM_HERE, | |
1241 rtc::Bind(&PeerConnection::UpdateCallBitrate_w, this, update)); | |
1242 } | |
1243 | |
1244 void PeerConnection::UpdateCallBitrate_w(const BitrateUpdate& update) { | |
1245 Call::Config::BitrateConfigMask mask; | |
1246 mask.min_bitrate_bps = update.min_bitrate_bps; | |
1247 mask.start_bitrate_bps = update.start_bitrate_bps; | |
1248 mask.max_bitrate_bps = update.max_bitrate_bps; | |
1249 | |
1250 if (media_controller_) { | |
1251 Call* call = media_controller_->call_w(); | |
1252 call->UpdateBitrateConfig(mask); | |
1253 } else { | |
1254 LOG_F(LS_ERROR) << "media_controller_ is NULL."; | |
stefan-webrtc
2017/04/10 13:26:58
Can we simply DCHECK on this instead, or is it pos
Zach Stein
2017/04/10 22:27:53
The user can only hit this if they call UpdateCall
| |
1255 } | |
1256 } | |
1257 | |
1238 bool PeerConnection::StartRtcEventLog(rtc::PlatformFile file, | 1258 bool PeerConnection::StartRtcEventLog(rtc::PlatformFile file, |
1239 int64_t max_size_bytes) { | 1259 int64_t max_size_bytes) { |
1240 return factory_->worker_thread()->Invoke<bool>( | 1260 return factory_->worker_thread()->Invoke<bool>( |
1241 RTC_FROM_HERE, rtc::Bind(&PeerConnection::StartRtcEventLog_w, this, file, | 1261 RTC_FROM_HERE, rtc::Bind(&PeerConnection::StartRtcEventLog_w, this, file, |
1242 max_size_bytes)); | 1262 max_size_bytes)); |
1243 } | 1263 } |
1244 | 1264 |
1245 void PeerConnection::StopRtcEventLog() { | 1265 void PeerConnection::StopRtcEventLog() { |
1246 factory_->worker_thread()->Invoke<void>( | 1266 factory_->worker_thread()->Invoke<void>( |
1247 RTC_FROM_HERE, rtc::Bind(&PeerConnection::StopRtcEventLog_w, this)); | 1267 RTC_FROM_HERE, rtc::Bind(&PeerConnection::StopRtcEventLog_w, this)); |
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2308 } | 2328 } |
2309 return event_log_->StartLogging(file, max_size_bytes); | 2329 return event_log_->StartLogging(file, max_size_bytes); |
2310 } | 2330 } |
2311 | 2331 |
2312 void PeerConnection::StopRtcEventLog_w() { | 2332 void PeerConnection::StopRtcEventLog_w() { |
2313 if (event_log_) { | 2333 if (event_log_) { |
2314 event_log_->StopLogging(); | 2334 event_log_->StopLogging(); |
2315 } | 2335 } |
2316 } | 2336 } |
2317 } // namespace webrtc | 2337 } // namespace webrtc |
OLD | NEW |