mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Test: Remove unused DecodeOneCacheFileFrame method.
PiperOrigin-RevId: 547821350
This commit is contained in:
parent
ca10204b2d
commit
952086174a
1 changed files with 0 additions and 26 deletions
|
|
@ -60,32 +60,6 @@ public final class DecodeOneFrameUtil {
|
||||||
/** Timeout for dequeueing buffers from the codec, in microseconds. */
|
/** Timeout for dequeueing buffers from the codec, in microseconds. */
|
||||||
private static final int DEQUEUE_TIMEOUT_US = 5_000_000;
|
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
|
* Reads and decodes one frame from the {@code assetFilePath} and renders it to the {@code
|
||||||
* surface}.
|
* surface}.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue