From db42bef17bfcf3f4c6de4ff711ae52a06f9c4c71 Mon Sep 17 00:00:00 2001 From: olly Date: Tue, 30 Mar 2021 23:10:48 +0100 Subject: [PATCH] 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 --- .../google/android/exoplayer2/audio/DecoderAudioRenderer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java b/library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java index e7b20ff605..4367883df9 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java @@ -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