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

Unified Diff: webrtc/pc/peerconnection.cc

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 side-by-side diff with in-line comments
Download patch
Index: webrtc/pc/peerconnection.cc
diff --git a/webrtc/pc/peerconnection.cc b/webrtc/pc/peerconnection.cc
index a3981039e6cfe89554092b4c14d7f2f7b0f175e4..012489d75c5ce9200b7c2ba12058c4258c6b0049 100644
--- a/webrtc/pc/peerconnection.cc
+++ b/webrtc/pc/peerconnection.cc
@@ -1235,6 +1235,26 @@ void PeerConnection::RegisterUMAObserver(UMAObserver* observer) {
}
}
+void PeerConnection::SetCallBitrate(const BitrateParameters& bitrate) {
+ factory_->worker_thread()->Invoke<void>(
+ RTC_FROM_HERE,
+ rtc::Bind(&PeerConnection::SetCallBitrate_w, this, bitrate));
+}
+
+void PeerConnection::SetCallBitrate_w(const BitrateParameters& bitrate) {
+ Call::Config::BitrateConfigMask mask;
+ mask.min_bitrate_bps = bitrate.min_bitrate_bps;
+ mask.start_bitrate_bps = bitrate.start_bitrate_bps;
+ mask.max_bitrate_bps = bitrate.max_bitrate_bps;
+
+ if (media_controller_) {
+ Call* call = media_controller_->call_w();
+ call->SetBitrateConfigMask(mask);
+ } else {
+ LOG_F(LS_ERROR) << "media_controller_ is NULL.";
Taylor Brandstetter 2017/04/12 01:33:42 Is this ever expected to happen? If not, you can j
Zach Stein 2017/04/13 00:26:36 Done.
+ }
+}
+
bool PeerConnection::StartRtcEventLog(rtc::PlatformFile file,
int64_t max_size_bytes) {
return factory_->worker_thread()->Invoke<bool>(

Powered by Google App Engine
This is Rietveld 408576698