Modify visibility of onQueueInputBuffer.

Aims to achieve visibility parity with MediaCodecRenderer#onQueueInputBuffer.

Allows measuring the time when the codec queue the first input buffer in the codec. Which means the Codec has been initialized and is about to start decoding.

It also allows measuring how long it takes for the Codec to render its first frame.

PiperOrigin-RevId: 365906756
This commit is contained in:
olly 2021-03-30 23:10:48 +01:00 committed by Oliver Woodman
parent 192c1a18f7
commit db42bef17b

View File

@ -698,7 +698,7 @@ public abstract class DecoderAudioRenderer<
eventDispatcher.inputFormatChanged(inputFormat, evaluation);
}
private void onQueueInputBuffer(DecoderInputBuffer buffer) {
protected void onQueueInputBuffer(DecoderInputBuffer buffer) {
if (allowFirstBufferPositionDiscontinuity && !buffer.isDecodeOnly()) {
// TODO: Remove this hack once we have a proper fix for [Internal: b/71876314].
// Allow the position to jump if the first presentable input buffer has a timestamp that