From da5e5db3d2c109672ca0823349b04e33cdfcb79b Mon Sep 17 00:00:00 2001 From: ibaker Date: Mon, 22 Jan 2024 03:24:55 -0800 Subject: [PATCH] Disable 'skip buffers with identical release times' in GTS tests This optimization always reports buffers as 'skipped' (i.e. deliberately not shown), which makes sense for the target case of high FPS content on a lower refresh rate screen, when lots of the frames will **never** be shown. However the optimization also results in reporting buffers as 'skipped' when decoding is a bit slow, resulting in a frame being released one vsync late, which then means we have two frames to release in the same vsync (when the previous vsync was empty). In this case, it would be more correct to report this as a 'dropped' frame (since it was due to slow decoding). Until we can change the logic to distinguish these cases and report them separately, this CL disables the optimization completely in GTS tests. This is needed because we often assert there were zero skipped frames, so slight decoding slowness can cause spurious/flaky test failures (our threshold for dropped frames is non-zero). #minor-release PiperOrigin-RevId: 600406443 (cherry picked from commit 999e154b2aa8cd6845cdbad2a708280f0069dac7) --- .../test/exoplayer/playback/gts/DebugRenderersFactory.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libraries/test_exoplayer_playback/src/androidTest/java/androidx/media3/test/exoplayer/playback/gts/DebugRenderersFactory.java b/libraries/test_exoplayer_playback/src/androidTest/java/androidx/media3/test/exoplayer/playback/gts/DebugRenderersFactory.java index c2f80194a6..bec56b1ed4 100644 --- a/libraries/test_exoplayer_playback/src/androidTest/java/androidx/media3/test/exoplayer/playback/gts/DebugRenderersFactory.java +++ b/libraries/test_exoplayer_playback/src/androidTest/java/androidx/media3/test/exoplayer/playback/gts/DebugRenderersFactory.java @@ -291,6 +291,13 @@ import java.util.ArrayList; return false; } + // TODO: b/321230611 - Remove this override when 'late' buffers that result in identical release + // timestamps are reported as 'dropped' instead of 'skipped'. + @Override + protected boolean shouldSkipBuffersWithIdenticalReleaseTime() { + return false; + } + private void clearTimestamps() { startIndex = 0; queueSize = 0;