Delete unused stats for preferred_bitrate.
Bug: webrtc:8830 Change-Id: Iaa30488255f2e09e269274136d370740cd030902 Reviewed-on: https://webrtc-review.googlesource.com/78880 Reviewed-by: Erik Språng <sprang@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23529}
This commit is contained in:
@ -228,10 +228,6 @@ SimulcastRateAllocator::ScreenshareTemporalLayerAllocation(
|
||||
return allocation;
|
||||
}
|
||||
|
||||
uint32_t SimulcastRateAllocator::GetPreferredBitrateBps(uint32_t framerate) {
|
||||
return GetAllocation(codec_.maxBitrate * 1000, framerate).get_sum_bps();
|
||||
}
|
||||
|
||||
const VideoCodec& webrtc::SimulcastRateAllocator::GetCodec() const {
|
||||
return codec_;
|
||||
}
|
||||
|
@ -31,7 +31,6 @@ class SimulcastRateAllocator : public VideoBitrateAllocator {
|
||||
|
||||
VideoBitrateAllocation GetAllocation(uint32_t total_bitrate_bps,
|
||||
uint32_t framerate) override;
|
||||
uint32_t GetPreferredBitrateBps(uint32_t framerate) override;
|
||||
const VideoCodec& GetCodec() const;
|
||||
|
||||
private:
|
||||
|
@ -158,10 +158,6 @@ VideoBitrateAllocation SvcRateAllocator::GetAllocationScreenSharing(
|
||||
return bitrate_allocation;
|
||||
}
|
||||
|
||||
uint32_t SvcRateAllocator::GetPreferredBitrateBps(uint32_t framerate) {
|
||||
return GetAllocation(codec_.maxBitrate * 1000, framerate).get_sum_bps();
|
||||
}
|
||||
|
||||
std::vector<size_t> SvcRateAllocator::SplitBitrate(
|
||||
size_t num_layers,
|
||||
size_t total_bitrate,
|
||||
|
@ -29,7 +29,6 @@ class SvcRateAllocator : public VideoBitrateAllocator {
|
||||
|
||||
VideoBitrateAllocation GetAllocation(uint32_t total_bitrate_bps,
|
||||
uint32_t framerate_fps) override;
|
||||
uint32_t GetPreferredBitrateBps(uint32_t framerate_fps) override;
|
||||
|
||||
private:
|
||||
VideoBitrateAllocation GetAllocationNormalVideo(
|
||||
|
@ -38,9 +38,4 @@ VideoBitrateAllocation DefaultVideoBitrateAllocator::GetAllocation(
|
||||
return allocation;
|
||||
}
|
||||
|
||||
uint32_t DefaultVideoBitrateAllocator::GetPreferredBitrateBps(
|
||||
uint32_t framerate) {
|
||||
return GetAllocation(codec_.maxBitrate * 1000, framerate).get_sum_bps();
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
@ -23,7 +23,6 @@ class DefaultVideoBitrateAllocator : public VideoBitrateAllocator {
|
||||
|
||||
VideoBitrateAllocation GetAllocation(uint32_t total_bitrate,
|
||||
uint32_t framerate) override;
|
||||
uint32_t GetPreferredBitrateBps(uint32_t framerate) override;
|
||||
|
||||
private:
|
||||
const VideoCodec codec_;
|
||||
|
@ -464,42 +464,6 @@ TEST_F(SimulcastRateAllocatorTest, ThreeStreamsMiddleInactive) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(SimulcastRateAllocatorTest, GetPreferredBitrateBps) {
|
||||
MockTemporalLayers mock_layers;
|
||||
allocator_.reset(new SimulcastRateAllocator(codec_));
|
||||
EXPECT_CALL(mock_layers, OnRatesUpdated(_, _)).Times(0);
|
||||
EXPECT_EQ(codec_.maxBitrate * 1000,
|
||||
allocator_->GetPreferredBitrateBps(codec_.maxFramerate));
|
||||
}
|
||||
|
||||
TEST_F(SimulcastRateAllocatorTest, GetPreferredBitrateSimulcast) {
|
||||
codec_.numberOfSimulcastStreams = 3;
|
||||
codec_.maxBitrate = 999999;
|
||||
codec_.simulcastStream[0].minBitrate = 10;
|
||||
codec_.simulcastStream[0].targetBitrate = 100;
|
||||
codec_.simulcastStream[0].active = true;
|
||||
|
||||
codec_.simulcastStream[0].maxBitrate = 500;
|
||||
codec_.simulcastStream[1].minBitrate = 50;
|
||||
codec_.simulcastStream[1].targetBitrate = 500;
|
||||
codec_.simulcastStream[1].maxBitrate = 1000;
|
||||
codec_.simulcastStream[1].active = true;
|
||||
|
||||
codec_.simulcastStream[2].minBitrate = 2000;
|
||||
codec_.simulcastStream[2].targetBitrate = 3000;
|
||||
codec_.simulcastStream[2].maxBitrate = 4000;
|
||||
codec_.simulcastStream[2].active = true;
|
||||
CreateAllocator();
|
||||
|
||||
uint32_t preferred_bitrate_kbps;
|
||||
preferred_bitrate_kbps = codec_.simulcastStream[0].targetBitrate;
|
||||
preferred_bitrate_kbps += codec_.simulcastStream[1].targetBitrate;
|
||||
preferred_bitrate_kbps += codec_.simulcastStream[2].maxBitrate;
|
||||
|
||||
EXPECT_EQ(preferred_bitrate_kbps * 1000,
|
||||
allocator_->GetPreferredBitrateBps(codec_.maxFramerate));
|
||||
}
|
||||
|
||||
class ScreenshareRateAllocationTest : public SimulcastRateAllocatorTest {
|
||||
public:
|
||||
void SetupConferenceScreenshare(bool use_simulcast, bool active = true) {
|
||||
|
Reference in New Issue
Block a user