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: Comments handling 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
« no previous file with comments | « webrtc/call/call.h ('k') | webrtc/examples/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/call/call.cc
diff --git a/webrtc/call/call.cc b/webrtc/call/call.cc
index ff5ebca0e205d557b32bcc61dce5dfd92c8973c9..43bf3d3305851ef46f7fed365c9cab22760bf213 100644
--- a/webrtc/call/call.cc
+++ b/webrtc/call/call.cc
@@ -202,6 +202,9 @@ class Call : public webrtc::Call,
void SetBitrateConfigMask(
const webrtc::Call::Config::BitrateConfigMask& bitrate_config) override;
+ void SetBitrateAllocationStrategy(
+ rtc::BitrateAllocationStrategy* bitrate_allocation_strategy) override;
+
void SignalChannelNetworkState(MediaType media, NetworkState state) override;
void OnTransportOverheadChanged(MediaType media,
@@ -1011,6 +1014,18 @@ void Call::UpdateCurrentBitrateConfig(const rtc::Optional<int>& new_start) {
config_.bitrate_config = updated;
}
+void Call::SetBitrateAllocationStrategy(
+ 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) {
« no previous file with comments | « webrtc/call/call.h ('k') | webrtc/examples/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698