docs/doc/reference/com/google/android/exoplayer2/testutil/DecodeOneFrameUtil.html
Package com.google.android.exoplayer2.testutil
public final classDecodeOneFrameUtilextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
Utilities for decoding a video frame for tests.
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static interface | DecodeOneFrameUtil.Listener |
Listener for decoding events.
|
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static String | NO_DECODER_SUPPORT_ERROR_STRING | |
All Methods Static Methods Concrete Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| static void | decodeOneAssetFileFrame(String assetFilePath, DecodeOneFrameUtil.Listener listener, Surface surface) |
Reads and decodes one frame from the assetFilePath and renders it to the surface.
|
| static void | decodeOneCacheFileFrame(String cacheFilePath, DecodeOneFrameUtil.Listener listener, Surface surface) |
Reads and decodes one frame from the cacheFilePath and renders it to the surface.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public static final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")NO_DECODER_SUPPORT_ERROR_STRING
See Also:Constant Field Values
-
public static void decodeOneCacheFileFrame([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")cacheFilePath,[DecodeOneFrameUtil.Listener](DecodeOneFrameUtil.Listener.html "interface in com.google.android.exoplayer2.testutil")listener,
@Nullable[Surface](https://developer.android.com/reference/android/view/Surface.html "class or interface in android.view")surface)
throws[IOException](https://developer.android.com/reference/java/io/IOException.html "class or interface in java.io")
Reads and decodes one frame from the cacheFilePath and renders it to the surface.
Parameters:cacheFilePath - The path to the file in the cache directory.listener - A DecodeOneFrameUtil.Listener implementation.surface - The Surface to render the decoded frame to, null if the decoded frame is not needed.Throws:IOException - If the MediaExtractor or MediaCodec cannot be created.
-
public static void decodeOneAssetFileFrame([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")assetFilePath,[DecodeOneFrameUtil.Listener](DecodeOneFrameUtil.Listener.html "interface in com.google.android.exoplayer2.testutil")listener,
@Nullable[Surface](https://developer.android.com/reference/android/view/Surface.html "class or interface in android.view")surface)
throws[IOException](https://developer.android.com/reference/java/io/IOException.html "class or interface in java.io")
Reads and decodes one frame from the assetFilePath and renders it to the surface.
Parameters:assetFilePath - The path to the file in the asset directory.listener - A DecodeOneFrameUtil.Listener implementation.surface - The Surface to render the decoded frame to, null if the decoded frame is not needed.Throws:IOException - If the MediaExtractor or MediaCodec cannot be created.