Index: webrtc/pc/peerconnection.cc |
diff --git a/webrtc/pc/peerconnection.cc b/webrtc/pc/peerconnection.cc |
index a3981039e6cfe89554092b4c14d7f2f7b0f175e4..b5525d53a728b7df0b862302a5084f2d5ba0f843 100644 |
--- a/webrtc/pc/peerconnection.cc |
+++ b/webrtc/pc/peerconnection.cc |
@@ -1235,6 +1235,26 @@ void PeerConnection::RegisterUMAObserver(UMAObserver* observer) { |
} |
} |
+void PeerConnection::UpdateCallBitrate(const BitrateUpdate& update) { |
+ factory_->worker_thread()->Invoke<void>( |
+ RTC_FROM_HERE, |
+ rtc::Bind(&PeerConnection::UpdateCallBitrate_w, this, update)); |
+} |
+ |
+void PeerConnection::UpdateCallBitrate_w(const BitrateUpdate& update) { |
+ Call::Config::BitrateConfigMask mask; |
+ mask.min_bitrate_bps = update.min_bitrate_bps; |
+ mask.start_bitrate_bps = update.start_bitrate_bps; |
+ mask.max_bitrate_bps = update.max_bitrate_bps; |
+ |
+ if (media_controller_) { |
+ Call* call = media_controller_->call_w(); |
+ call->UpdateBitrateConfig(mask); |
+ } else { |
+ 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
|
+ } |
+} |
+ |
bool PeerConnection::StartRtcEventLog(rtc::PlatformFile file, |
int64_t max_size_bytes) { |
return factory_->worker_thread()->Invoke<bool>( |