Add TargetBitrate callback to MediaTransportInterface.

Clients of media_transport_interface need the ability to monitor BWE
estimates, and this change adds a TargetBitrate observer to the media
transport interface.

Bug: webrtc:9719
Change-Id: I90ebbf684c6f269e0c3cd58428010cfa511cc970
Reviewed-on: https://webrtc-review.googlesource.com/c/108106
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Peter Slatala <psla@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25415}
This commit is contained in:
Piotr (Peter) Slatala
2018-10-26 07:59:46 -07:00
committed by Commit Bot
parent c640a936d1
commit 6b9d823f9b
3 changed files with 14 additions and 1 deletions

View File

@ -17,6 +17,7 @@
#ifndef API_MEDIA_TRANSPORT_INTERFACE_H_
#define API_MEDIA_TRANSPORT_INTERFACE_H_
#include <api/transport/network_control.h>
#include <memory>
#include <string>
#include <utility>
@ -240,8 +241,14 @@ class MediaTransportInterface {
// pass a nullptr.
virtual void SetReceiveVideoSink(MediaTransportVideoSinkInterface* sink) = 0;
// Sets a target bitrate observer. Before media transport is destructed
// the observer must be unregistered (set to nullptr).
// A newly registered observer will be called back with the latest recorded
// target rate, if available.
virtual void SetTargetTransferRateObserver(
webrtc::TargetTransferRateObserver* observer) = 0;
// TODO(sukhanov): RtcEventLogs.
// TODO(sukhanov): Bandwidth updates.
};
// If media transport factory is set in peer connection factory, it will be