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

Unified Diff: webrtc/call/bitrate_allocator.cc

Issue 1785283002: Move BitrateAllocator reference from ViEEncoder to VideoSendStream. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Comment changes. Created 4 years, 9 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/bitrate_allocator.h ('k') | webrtc/call/bitrate_allocator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/call/bitrate_allocator.cc
diff --git a/webrtc/call/bitrate_allocator.cc b/webrtc/call/bitrate_allocator.cc
index 07f830610c6c2b853d7e4d64fe72d8973f8cecbb..097378f02a17b9728581d955c83dfe5860b31681 100644
--- a/webrtc/call/bitrate_allocator.cc
+++ b/webrtc/call/bitrate_allocator.cc
@@ -41,7 +41,7 @@ uint32_t BitrateAllocator::OnNetworkChanged(uint32_t bitrate,
uint32_t allocated_bitrate_bps = 0;
ObserverBitrateMap allocation = AllocateBitrates();
for (const auto& kv : allocation) {
- kv.first->OnNetworkChanged(kv.second, last_fraction_loss_, last_rtt_);
+ kv.first->OnBitrateUpdated(kv.second, last_fraction_loss_, last_rtt_);
allocated_bitrate_bps += kv.second;
}
return allocated_bitrate_bps;
@@ -60,9 +60,9 @@ BitrateAllocator::ObserverBitrateMap BitrateAllocator::AllocateBitrates() {
return NormalRateAllocation(last_bitrate_bps_, sum_min_bitrates);
}
-int BitrateAllocator::AddBitrateObserver(BitrateObserver* observer,
- uint32_t min_bitrate_bps,
- uint32_t max_bitrate_bps) {
+int BitrateAllocator::AddObserver(BitrateAllocatorObserver* observer,
+ uint32_t min_bitrate_bps,
+ uint32_t max_bitrate_bps) {
rtc::CritScope lock(&crit_sect_);
BitrateObserverConfList::iterator it =
@@ -87,14 +87,14 @@ int BitrateAllocator::AddBitrateObserver(BitrateObserver* observer,
ObserverBitrateMap allocation = AllocateBitrates();
int new_observer_bitrate_bps = 0;
for (auto& kv : allocation) {
- kv.first->OnNetworkChanged(kv.second, last_fraction_loss_, last_rtt_);
+ kv.first->OnBitrateUpdated(kv.second, last_fraction_loss_, last_rtt_);
if (kv.first == observer)
new_observer_bitrate_bps = kv.second;
}
return new_observer_bitrate_bps;
}
-void BitrateAllocator::RemoveBitrateObserver(BitrateObserver* observer) {
+void BitrateAllocator::RemoveObserver(BitrateAllocatorObserver* observer) {
rtc::CritScope lock(&crit_sect_);
BitrateObserverConfList::iterator it =
FindObserverConfigurationPair(observer);
@@ -118,7 +118,7 @@ void BitrateAllocator::GetMinMaxBitrateSumBps(int* min_bitrate_sum_bps,
BitrateAllocator::BitrateObserverConfList::iterator
BitrateAllocator::FindObserverConfigurationPair(
- const BitrateObserver* observer) {
+ const BitrateAllocatorObserver* observer) {
for (auto it = bitrate_observers_.begin(); it != bitrate_observers_.end();
++it) {
if (it->first == observer)
« no previous file with comments | « webrtc/call/bitrate_allocator.h ('k') | webrtc/call/bitrate_allocator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698