Adding has_packet_feedback to LimitObserver callback.

This CL adds a boolean indicating availability of per packet feedback
to the OnAllocationLimitsChanged callback on the
BitrateAllocator::LimitObserver interface.

This is part of a series of CLs tracking the transport feedback status
of the streams known to BitrateAllocator and reporting the status to
the congestion controller.

Bug: webrtc:8415
Change-Id: I5bd6e5796733da312556f2f681ff06d49ea2becc
Reviewed-on: https://webrtc-review.googlesource.com/63201
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22533}
This commit is contained in:
Sebastian Jansson
2018-03-21 12:45:20 +01:00
committed by Commit Bot
parent bc900cb1d1
commit fe617a3af1
5 changed files with 26 additions and 7 deletions

View File

@ -21,8 +21,23 @@ using ::testing::NiceMock;
using ::testing::_;
namespace webrtc {
// Emulating old interface for test suite compatibility.
// TODO(srte): Update tests to reflect new interface.
class LimitObserverWrapper : public BitrateAllocator::LimitObserver {
public:
void OnAllocationLimitsChanged(uint32_t min_send_bitrate_bps,
uint32_t max_padding_bitrate_bps,
uint32_t total_bitrate_bps,
bool has_packet_feedback) override {
OnAllocationLimitsChanged(min_send_bitrate_bps, max_padding_bitrate_bps,
total_bitrate_bps);
}
virtual void OnAllocationLimitsChanged(uint32_t min_send_bitrate_bps,
uint32_t max_padding_bitrate_bps,
uint32_t total_bitrate_bps) = 0;
};
class MockLimitObserver : public BitrateAllocator::LimitObserver {
class MockLimitObserver : public LimitObserverWrapper {
public:
MOCK_METHOD3(OnAllocationLimitsChanged,
void(uint32_t min_send_bitrate_bps,