0

[Chromecast] Add optional method to get the minimum buffered time

The minimum amount of buffered audio required to prevent underrun may
vary depending on the platform, and on the audio config. Add an optional
method so that different platforms can specify the appropriate value.

BUG= internal b/65689704

Change-Id: Ifb9b05742ef1e9c4fa5771e34cefcac3713298bf
Reviewed-on: https://chromium-review.googlesource.com/667824
Reviewed-by: Luke Halliwell <halliwell@chromium.org>
Commit-Queue: Kenneth MacKay <kmackay@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502257}
This commit is contained in:
Ken MacKay
2017-09-15 15:07:13 +00:00
committed by Commit Bot
parent b56be486bf
commit 313d77a53f

@ -145,6 +145,12 @@ class MediaPipelineBackend {
// called when playing or paused.
virtual void GetStatistics(Statistics* statistics) = 0;
// Returns the minimum amount of audio data buffered (in microseconds)
// necessary to prevent underrun for the given |config|; ie, if the
// rendering delay falls below this value, then underrun may occur.
static int64_t GetMinimumBufferedTime(const AudioConfig& config)
__attribute__((__weak__));
protected:
~AudioDecoder() override {}
};