Moved bitrate config interface from Call class.

Moving usage of bitrate configuration related interface from Call
interface to the corresponding methods in the RtpSendTransportController
interface.
SetBitrateConfig was replaced with SetSdpBitrateParameters
SetBitrateConfigMask was replaced with SetClientBitratePreferences
OnNetworkRouteChanged was replaced with OnNetworkRouteChanged

This makes it more clear that RtpSendTransportController owns bitrate
configuration and fits a longer term ambition to reduce the scope of
the Call class.

Bug: webrtc:8415
Change-Id: I6d04eaad22a54ecd5ed60096e01689b0c67e9c65
Reviewed-on: https://webrtc-review.googlesource.com/54365
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@{#22131}
This commit is contained in:
Sebastian Jansson
2018-02-21 13:07:13 +01:00
committed by Commit Bot
parent 91bb6671ea
commit 8f83b42946
19 changed files with 189 additions and 162 deletions

View File

@ -147,25 +147,17 @@ class Call {
// Call instance exists.
virtual PacketReceiver* Receiver() = 0;
// This is used to access the transport controller send instance owned by
// Call. The send transport controller is currently owned by Call for legacy
// reasons. (for instance variants of call tests are built on this assumtion)
// TODO(srte): Move ownership of transport controller send out of Call and
// remove this method interface.
virtual RtpTransportControllerSendInterface* GetTransportControllerSend() = 0;
// Returns the call statistics, such as estimated send and receive bandwidth,
// pacing delay, etc.
virtual Stats GetStats() const = 0;
// The greater min and smaller max set by this and SetBitrateConfigMask will
// be used. The latest non-negative start value from either call will be used.
// Specifying a start bitrate (>0) will reset the current bitrate estimate.
// This is due to how the 'x-google-start-bitrate' flag is currently
// implemented. Passing -1 leaves the start bitrate unchanged. Behavior is not
// guaranteed for other negative values or 0.
virtual void SetBitrateConfig(const BitrateConstraints& bitrate_config) = 0;
// The greater min and smaller max set by this and SetBitrateConfig will be
// used. The latest non-negative start value form either call will be used.
// Specifying a start bitrate will reset the current bitrate estimate.
// Assumes 0 <= min <= start <= max holds for set parameters.
virtual void SetBitrateConfigMask(
const BitrateConstraintsMask& bitrate_mask) = 0;
virtual void SetBitrateAllocationStrategy(
std::unique_ptr<rtc::BitrateAllocationStrategy>
bitrate_allocation_strategy) = 0;
@ -180,10 +172,6 @@ class Call {
MediaType media,
int transport_overhead_per_packet) = 0;
virtual void OnNetworkRouteChanged(
const std::string& transport_name,
const rtc::NetworkRoute& network_route) = 0;
virtual void OnSentPacket(const rtc::SentPacket& sent_packet) = 0;
virtual ~Call() {}