Propagate base minimum delay from video jitter buffer to webrtc/api.

On api level two methods were added to api/media_stream_interface.cc on VideoSourceInterface,
GetLatency and SetLatency. Latency is measured in seconds, delay in milliseconds but both describes
the same concept.


Bug: webrtc:10287
Change-Id: Ib8dc62a4d73f63fab7e10b82c716096ee6199957
Reviewed-on: https://webrtc-review.googlesource.com/c/123482
Commit-Queue: Ruslan Burakov <kuddai@google.com>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26877}
This commit is contained in:
Ruslan Burakov
2019-02-27 15:32:48 +01:00
committed by Commit Bot
parent 48e7065ac6
commit 493a650b1e
32 changed files with 884 additions and 205 deletions

View File

@ -61,6 +61,13 @@ class MediaSourceInterface : public rtc::RefCountInterface,
virtual bool remote() const = 0;
// Sets the minimum latency of the remote source until audio playout. Actual
// observered latency may differ depending on the source. |latency| is in the
// range of [0.0, 10.0] seconds.
// TODO(kuddai) make pure virtual once not only remote tracks support latency.
virtual void SetLatency(double latency) {}
virtual double GetLatency() const;
protected:
~MediaSourceInterface() override = default;
};
@ -201,12 +208,6 @@ class AudioSourceInterface : public MediaSourceInterface {
// be applied in the track in a way that does not affect clones of the track.
virtual void SetVolume(double volume) {}
// Sets the minimum latency of the remote source until audio playout. Actual
// observered latency may differ depending on the source. |latency| is in the
// range of [0.0, 10.0] seconds.
virtual void SetLatency(double latency) {}
virtual double GetLatency() const;
// Registers/unregisters observers to the audio source.
virtual void RegisterAudioObserver(AudioObserver* observer) {}
virtual void UnregisterAudioObserver(AudioObserver* observer) {}