Add 'UpdateAllocationLimits' in media transport.
Bug: webrtc:9719
Change-Id: I90bd1d9858c259d7339420c574ad83d6fb18299c
Reviewed-on: https://webrtc-review.googlesource.com/c/118946
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Anton Sukhanov <sukhanov@webrtc.org>
Commit-Queue: Peter Slatala <psla@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26426}
diff --git a/api/media_transport_interface.h b/api/media_transport_interface.h
index a440860..a46c994 100644
--- a/api/media_transport_interface.h
+++ b/api/media_transport_interface.h
@@ -26,6 +26,7 @@
#include "absl/types/optional.h"
#include "api/array_view.h"
#include "api/rtc_error.h"
+#include "api/units/data_rate.h"
#include "api/video/encoded_image.h"
#include "rtc_base/copy_on_write_buffer.h"
#include "rtc_base/deprecation.h"
@@ -49,6 +50,12 @@
virtual void OnFirstAudioPacketReceived(int64_t channel_id) = 0;
};
+struct MediaTransportAllocatedBitrateLimits {
+ DataRate min_pacing_rate = DataRate::Zero();
+ DataRate max_padding_bitrate = DataRate::Zero();
+ DataRate max_total_allocated_bitrate = DataRate::Zero();
+};
+
// A collection of settings for creation of media transport.
struct MediaTransportSettings final {
MediaTransportSettings();
@@ -449,6 +456,11 @@
virtual void SetMediaTransportStateCallback(
MediaTransportStateCallback* callback) = 0;
+ // Updates allocation limits.
+ // TODO(psla): Make abstract when downstream implementation implement it.
+ virtual void SetAllocatedBitrateLimits(
+ const MediaTransportAllocatedBitrateLimits& limits);
+
// Sends a data buffer to the remote endpoint using the given send parameters.
// |buffer| may not be larger than 256 KiB. Returns an error if the send
// fails.