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:
committed by
Commit Bot
parent
bc900cb1d1
commit
fe617a3af1
@ -75,10 +75,11 @@ const AudioCodecSpec kCodecSpecs[] = {
|
||||
|
||||
class MockLimitObserver : public BitrateAllocator::LimitObserver {
|
||||
public:
|
||||
MOCK_METHOD3(OnAllocationLimitsChanged,
|
||||
MOCK_METHOD4(OnAllocationLimitsChanged,
|
||||
void(uint32_t min_send_bitrate_bps,
|
||||
uint32_t max_padding_bitrate_bps,
|
||||
uint32_t total_bitrate_bps));
|
||||
uint32_t total_bitrate_bps,
|
||||
bool has_packet_feedback));
|
||||
};
|
||||
|
||||
std::unique_ptr<MockAudioEncoder> SetupAudioEncoderMock(
|
||||
|
||||
@ -220,7 +220,7 @@ void BitrateAllocator::UpdateAllocationLimits() {
|
||||
<< total_requested_padding_bitrate << "bps";
|
||||
limit_observer_->OnAllocationLimitsChanged(total_requested_min_bitrate,
|
||||
total_requested_padding_bitrate,
|
||||
total_requested_bitrate);
|
||||
total_requested_bitrate, true);
|
||||
}
|
||||
|
||||
void BitrateAllocator::RemoveObserver(BitrateAllocatorObserver* observer) {
|
||||
|
||||
@ -54,7 +54,8 @@ class BitrateAllocator {
|
||||
public:
|
||||
virtual void OnAllocationLimitsChanged(uint32_t min_send_bitrate_bps,
|
||||
uint32_t max_padding_bitrate_bps,
|
||||
uint32_t total_bitrate_bps) = 0;
|
||||
uint32_t total_bitrate_bps,
|
||||
bool has_packet_feedback) = 0;
|
||||
|
||||
protected:
|
||||
virtual ~LimitObserver() {}
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -234,7 +234,8 @@ class Call : public webrtc::Call,
|
||||
// Implements BitrateAllocator::LimitObserver.
|
||||
void OnAllocationLimitsChanged(uint32_t min_send_bitrate_bps,
|
||||
uint32_t max_padding_bitrate_bps,
|
||||
uint32_t total_bitrate_bps) override;
|
||||
uint32_t total_bitrate_bps,
|
||||
bool has_packet_feedback) override;
|
||||
|
||||
private:
|
||||
DeliveryStatus DeliverRtcp(MediaType media_type, const uint8_t* packet,
|
||||
@ -1107,7 +1108,8 @@ void Call::OnTargetTransferRate(TargetTransferRate msg) {
|
||||
|
||||
void Call::OnAllocationLimitsChanged(uint32_t min_send_bitrate_bps,
|
||||
uint32_t max_padding_bitrate_bps,
|
||||
uint32_t total_bitrate_bps) {
|
||||
uint32_t total_bitrate_bps,
|
||||
bool has_packet_feedback) {
|
||||
transport_send_->SetAllocatedSendBitrateLimits(
|
||||
min_send_bitrate_bps, max_padding_bitrate_bps, total_bitrate_bps);
|
||||
rtc::CritScope lock(&bitrate_crit_);
|
||||
|
||||
Reference in New Issue
Block a user