webrtc/modules/congestion_controller/include/network_changed_observer.h
Sebastian Jansson 19704ec698 Removing AvailableBandwidth method on transport controller.
Removing the Synchronous call AvailableBandwidth from the
RtpTransportControllerSend interface. The bandwidth estimate is
provided trough a new interface that communicates with a struct
making it easier to add parameters in the future.

This prepares for removing locking behavior in
SendSideCongestionController that exists just to support this feature.

To keep backwards compatibility with the old
SendSideCongestionController, the struct TargetTransferRate
is constructed in RtpTransportControllerSend. This step can be
removed in the future when the old SendSideCongestionController
 is deprecated.

Bug: webrtc:8415
Change-Id: I06f64a89848157de412901c989650d1ecf35246b
Reviewed-on: https://webrtc-review.googlesource.com/60800
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22387}
2018-03-12 15:53:49 +00:00

41 lines
1.7 KiB
C++

/*
* Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef MODULES_CONGESTION_CONTROLLER_INCLUDE_NETWORK_CHANGED_OBSERVER_H_
#define MODULES_CONGESTION_CONTROLLER_INCLUDE_NETWORK_CHANGED_OBSERVER_H_
#include <stdint.h>
namespace webrtc {
// Note: This interface will be deprecated in favor of the
// TargetTransferRateObserver interface. The new interface provides more
// information about the network connection and uses structs to make it easier
// to add fields.
// Observer class for bitrate changes announced due to change in bandwidth
// estimate or due to that the send pacer is full. Fraction loss and rtt is
// also part of this callback to allow the observer to optimize its settings
// for different types of network environments. The bitrate does not include
// packet headers and is measured in bits per second.
// TODO(srte): Deprecate and remove this class when SendSideCongestionController
// is no longer using this as part of our public API.
class NetworkChangedObserver {
public:
virtual void OnNetworkChanged(uint32_t bitrate_bps,
uint8_t fraction_loss, // 0 - 255.
int64_t rtt_ms,
int64_t probing_interval_ms) = 0;
protected:
virtual ~NetworkChangedObserver() {}
};
} // namespace webrtc
#endif // MODULES_CONGESTION_CONTROLLER_INCLUDE_NETWORK_CHANGED_OBSERVER_H_