Refactor VP8 TemporalLayers
This CL moves all temporal layer rate allocation from
DefaultTemporalLayers and ScreenshareLayers into SimulcastRateAllocator.
This means we don't need an extra call-out to the TemporalLayers
interface to get the last allocation, which simplifies the code path a
lot.
It also paves the wave for removing the TemporalLayersFactory interface
(in a separate cl), which will further simplify the ownership model.
Bug: webrtc:9012
Change-Id: I6540b1848efa1a136dce449f13902ad479d5ee37
Reviewed-on: https://webrtc-review.googlesource.com/62420
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22502}
diff --git a/common_types.h b/common_types.h
index 482cb04..312bc24 100644
--- a/common_types.h
+++ b/common_types.h
@@ -611,6 +611,11 @@
// Get the sum of all the temporal layer for a specific spatial layer.
uint32_t GetSpatialLayerSum(size_t spatial_index) const;
+ // Returns a vector of the temporal layer bitrates for the specific spatial
+ // layer. Length of the returned vector is cropped to the highest temporal
+ // layer with a defined bitrate.
+ std::vector<uint32_t> GetTemporalLayerAllocation(size_t spatial_index) const;
+
uint32_t get_sum_bps() const { return sum_; } // Sum of all bitrates.
uint32_t get_sum_kbps() const { return (sum_ + 500) / 1000; }
@@ -623,7 +628,6 @@
// Expensive, please use only in tests.
std::string ToString() const;
- std::ostream& operator<<(std::ostream& os) const;
private:
uint32_t sum_;