From 952086174a44dbfcda40163137e9c1c3cc8efb09 Mon Sep 17 00:00:00 2001 From: huangdarwin Date: Thu, 13 Jul 2023 17:19:06 +0100 Subject: [PATCH] Test: Remove unused DecodeOneCacheFileFrame method. PiperOrigin-RevId: 547821350 --- .../media3/test/utils/DecodeOneFrameUtil.java | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/libraries/test_utils/src/main/java/androidx/media3/test/utils/DecodeOneFrameUtil.java b/libraries/test_utils/src/main/java/androidx/media3/test/utils/DecodeOneFrameUtil.java index f614ee3223..27821dce5e 100644 --- a/libraries/test_utils/src/main/java/androidx/media3/test/utils/DecodeOneFrameUtil.java +++ b/libraries/test_utils/src/main/java/androidx/media3/test/utils/DecodeOneFrameUtil.java @@ -60,32 +60,6 @@ public final class DecodeOneFrameUtil { /** Timeout for dequeueing buffers from the codec, in microseconds. */ private static final int DEQUEUE_TIMEOUT_US = 5_000_000; - /** - * Reads and decodes one frame from the {@code cacheFilePath} and renders it to the {@code - * surface}. - * - * @param cacheFilePath The path to the file in the cache directory. - * @param listener A {@link Listener} implementation. - * @param surface The {@link Surface} to render the decoded frame to, {@code null} if the decoded - * frame is not needed. - * @throws IOException If the {@link MediaExtractor} or {@link MediaCodec} cannot be created. - */ - public static void decodeOneCacheFileFrame( - String cacheFilePath, Listener listener, @Nullable Surface surface) throws IOException { - MediaExtractor mediaExtractor = new MediaExtractor(); - - try { - mediaExtractor.setDataSource(cacheFilePath); - if (surface == null) { - decodeOneVideoFrame(mediaExtractor, listener); - } else { - decodeOneVideoFrame(mediaExtractor, listener, surface); - } - } finally { - mediaExtractor.release(); - } - } - /** * Reads and decodes one frame from the {@code assetFilePath} and renders it to the {@code * surface}.