Index: webrtc/pc/peerconnection.cc |
diff --git a/webrtc/pc/peerconnection.cc b/webrtc/pc/peerconnection.cc |
index d975ed9ad40170d5a61236a19f57358ef9372db6..ebe7a4b4c41e8a2c70836f378251e03f9aa66661 100644 |
--- a/webrtc/pc/peerconnection.cc |
+++ b/webrtc/pc/peerconnection.cc |
@@ -1285,6 +1285,20 @@ RTCError PeerConnection::SetBitrate(const BitrateParameters& bitrate) { |
return RTCError::OK(); |
} |
+RTCError PeerConnection::SetBitrateAllocationStrategy( |
+ rtc::scoped_refptr<rtc::BitrateAllocationStrategy> |
+ bitrate_allocation_strategy) { |
+ rtc::Thread* worker_thread = factory_->worker_thread(); |
+ if (!worker_thread->IsCurrent()) { |
+ return worker_thread->Invoke<RTCError>( |
+ RTC_FROM_HERE, rtc::Bind(&PeerConnection::SetBitrateAllocationStrategy, |
+ this, std::move(bitrate_allocation_strategy))); |
+ } |
+ RTC_DCHECK(call_.get()); |
+ call_->SetBitrateAllocationStrategy(std::move(bitrate_allocation_strategy)); |
+ return RTCError::OK(); |
+} |
+ |
bool PeerConnection::StartRtcEventLog(rtc::PlatformFile file, |
int64_t max_size_bytes) { |
return factory_->worker_thread()->Invoke<bool>( |