| Index: webrtc/call/bitrate_allocator.h
|
| diff --git a/webrtc/call/bitrate_allocator.h b/webrtc/call/bitrate_allocator.h
|
| index 9d97720629b14998cdf7cbea3669da1e72bc03ea..d9eb707c6baebd376b89181596495649e972d574 100644
|
| --- a/webrtc/call/bitrate_allocator.h
|
| +++ b/webrtc/call/bitrate_allocator.h
|
| @@ -14,10 +14,12 @@
|
| #include <stdint.h>
|
|
|
| #include <map>
|
| +#include <string>
|
| #include <utility>
|
| #include <vector>
|
| -#include <string>
|
|
|
| +#include "webrtc/rtc_base/bitrateallocationstrategy.h"
|
| +#include "webrtc/rtc_base/scoped_ref_ptr.h"
|
| #include "webrtc/rtc_base/sequenced_task_checker.h"
|
|
|
| namespace webrtc {
|
| @@ -94,6 +96,12 @@ class BitrateAllocator {
|
| // the list of added observers, a best guess is returned.
|
| int GetStartBitrate(BitrateAllocatorObserver* observer);
|
|
|
| + // Sets external allocation strategy. If strategy is not set default WEBRTC
|
| + // allocation mechanism will be used. The strategy may be changed during call.
|
| + // Setting NULL value will restore default WEBRTC allocation strategy.
|
| + void SetBitrateAllocationStrategy(
|
| + rtc::BitrateAllocationStrategy* bitrate_allocation_strategy);
|
| +
|
| private:
|
| // Note: All bitrates for member variables and methods are in bps.
|
| struct ObserverConfig {
|
| @@ -129,6 +137,7 @@ class BitrateAllocator {
|
| typedef std::vector<ObserverConfig> ObserverConfigs;
|
| ObserverConfigs::iterator FindObserverConfig(
|
| const BitrateAllocatorObserver* observer);
|
| + ObserverConfigs::iterator FindObserverConfig(const std::string track_id);
|
|
|
| typedef std::multimap<uint32_t, const ObserverConfig*> ObserverSortingMap;
|
| typedef std::map<BitrateAllocatorObserver*, int> ObserverAllocation;
|
| @@ -172,6 +181,8 @@ class BitrateAllocator {
|
| int64_t last_bwe_log_time_ GUARDED_BY(&sequenced_checker_);
|
| uint32_t total_requested_padding_bitrate_ GUARDED_BY(&sequenced_checker_);
|
| uint32_t total_requested_min_bitrate_ GUARDED_BY(&sequenced_checker_);
|
| + rtc::scoped_refptr<rtc::BitrateAllocationStrategy>
|
| + bitrate_allocation_strategy_ GUARDED_BY(&sequenced_checker_);
|
| };
|
| } // namespace webrtc
|
| #endif // WEBRTC_CALL_BITRATE_ALLOCATOR_H_
|
|
|