Reduce default values for DefaultLoadControl buffer for playback

PiperOrigin-RevId: 693284512
This commit is contained in:
tonihei 2024-11-05 03:35:32 -08:00 committed by Copybara-Service
parent 6f81b5792b
commit 76e4abe428
2 changed files with 5 additions and 2 deletions

View File

@ -20,6 +20,9 @@
* Add a setter to `SntpClient` to set the max elapsed time since the last
update after which the client is re-initialized
([#1794](https://github.com/androidx/media/pull/1794)).
* Reduce default values for `bufferForPlaybackMs` and
`bufferForPlaybackAfterRebufferMs` in `DefaultLoadControl` to 1000 and
2000 ms respectively.
* Transformer:
* Update parameters of `VideoFrameProcessor.registerInputStream` and
`VideoFrameProcessor.Listener.onInputStreamRegistered` to use `Format`.

View File

@ -58,13 +58,13 @@ public class DefaultLoadControl implements LoadControl {
* The default duration of media that must be buffered for playback to start or resume following a
* user action such as a seek, in milliseconds.
*/
public static final int DEFAULT_BUFFER_FOR_PLAYBACK_MS = 2500;
public static final int DEFAULT_BUFFER_FOR_PLAYBACK_MS = 1000;
/**
* The default duration of media that must be buffered for playback to resume after a rebuffer, in
* milliseconds. A rebuffer is defined to be caused by buffer depletion rather than a user action.
*/
public static final int DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS = 5000;
public static final int DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS = 2000;
/**
* The default target buffer size in bytes. The value ({@link C#LENGTH_UNSET}) means that the load