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

Unified Diff: webrtc/call/call.cc

Issue 2996643002: BWE allocation strategy
Patch Set: BWE allocation strategy Created 3 years, 3 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/call/call.cc
diff --git a/webrtc/call/call.cc b/webrtc/call/call.cc
index ff5ebca0e205d557b32bcc61dce5dfd92c8973c9..5fb46cf814a41103958a63064bb5c5c577264570 100644
--- a/webrtc/call/call.cc
+++ b/webrtc/call/call.cc
@@ -202,6 +202,10 @@ class Call : public webrtc::Call,
void SetBitrateConfigMask(
const webrtc::Call::Config::BitrateConfigMask& bitrate_config) override;
+ void SetBitrateAllocationStrategy(
+ rtc::scoped_refptr<rtc::BitrateAllocationStrategy>
+ bitrate_allocation_strategy) override;
+
void SignalChannelNetworkState(MediaType media, NetworkState state) override;
void OnTransportOverheadChanged(MediaType media,
@@ -1011,6 +1015,19 @@ void Call::UpdateCurrentBitrateConfig(const rtc::Optional<int>& new_start) {
config_.bitrate_config = updated;
}
+void Call::SetBitrateAllocationStrategy(
+ rtc::scoped_refptr<rtc::BitrateAllocationStrategy>
+ bitrate_allocation_strategy) {
+ if (!worker_queue_.IsCurrent()) {
+ worker_queue_.PostTask([this, bitrate_allocation_strategy] {
+ SetBitrateAllocationStrategy(std::move(bitrate_allocation_strategy));
+ });
+ return;
+ }
+ RTC_DCHECK_RUN_ON(&worker_queue_);
+ bitrate_allocator_->SetBitrateAllocationStrategy(bitrate_allocation_strategy);
+}
+
void Call::SignalChannelNetworkState(MediaType media, NetworkState state) {
RTC_DCHECK_RUN_ON(&configuration_thread_checker_);
switch (media) {

Powered by Google App Engine
This is Rietveld 408576698