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::SetBitrate(const BitrateParameters& bitrate) { |
| 1239 factory_->worker_thread()->Invoke<void>(RTC_FROM_HERE, [this, &bitrate]() { |
| 1240 Call::Config::BitrateConfigMask mask; |
| 1241 mask.min_bitrate_bps = bitrate.min_bitrate_bps; |
| 1242 mask.start_bitrate_bps = bitrate.start_bitrate_bps; |
| 1243 mask.max_bitrate_bps = bitrate.max_bitrate_bps; |
| 1244 |
| 1245 RTC_DCHECK(media_controller_); |
| 1246 Call* call = media_controller_->call_w(); |
| 1247 call->SetBitrateConfigMask(mask); |
| 1248 }); |
| 1249 } |
| 1250 |
1238 bool PeerConnection::StartRtcEventLog(rtc::PlatformFile file, | 1251 bool PeerConnection::StartRtcEventLog(rtc::PlatformFile file, |
1239 int64_t max_size_bytes) { | 1252 int64_t max_size_bytes) { |
1240 return factory_->worker_thread()->Invoke<bool>( | 1253 return factory_->worker_thread()->Invoke<bool>( |
1241 RTC_FROM_HERE, rtc::Bind(&PeerConnection::StartRtcEventLog_w, this, file, | 1254 RTC_FROM_HERE, rtc::Bind(&PeerConnection::StartRtcEventLog_w, this, file, |
1242 max_size_bytes)); | 1255 max_size_bytes)); |
1243 } | 1256 } |
1244 | 1257 |
1245 void PeerConnection::StopRtcEventLog() { | 1258 void PeerConnection::StopRtcEventLog() { |
1246 factory_->worker_thread()->Invoke<void>( | 1259 factory_->worker_thread()->Invoke<void>( |
1247 RTC_FROM_HERE, rtc::Bind(&PeerConnection::StopRtcEventLog_w, this)); | 1260 RTC_FROM_HERE, rtc::Bind(&PeerConnection::StopRtcEventLog_w, this)); |
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2308 } | 2321 } |
2309 return event_log_->StartLogging(file, max_size_bytes); | 2322 return event_log_->StartLogging(file, max_size_bytes); |
2310 } | 2323 } |
2311 | 2324 |
2312 void PeerConnection::StopRtcEventLog_w() { | 2325 void PeerConnection::StopRtcEventLog_w() { |
2313 if (event_log_) { | 2326 if (event_log_) { |
2314 event_log_->StopLogging(); | 2327 event_log_->StopLogging(); |
2315 } | 2328 } |
2316 } | 2329 } |
2317 } // namespace webrtc | 2330 } // namespace webrtc |
OLD | NEW |