Package com.google.android.exoplayer2.testutil

## Class DecodeOneFrameUtil

- java.lang.Object
- - com.google.android.exoplayer2.testutil.DecodeOneFrameUtil

-     public class DecodeOneFrameUtil
      extends Object

  Utilities for decoding a frame for tests.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static interface` | `DecodeOneFrameUtil.Listener` | Listener for decoding events.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static void` | `decodeOneAssetFileFrame​(String assetFilePath, DecodeOneFrameUtil.Listener listener, @Nullable Surface surface)` | Reads and decodes one frame from the `assetFilePath` and renders it to the `surface`.
    `static void` | `decodeOneCacheFileFrame​(String cacheFilePath, DecodeOneFrameUtil.Listener listener, @Nullable Surface surface)` | Reads and decodes one frame from the `cacheFilePath` and renders it to the `surface`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### decodeOneCacheFileFrame

          public static void decodeOneCacheFileFrame​(String cacheFilePath,
                                                     DecodeOneFrameUtil.Listener listener,
                                                     @Nullable Surface surface)
                                              throws Exception

      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:
        `Exception`

    - #### decodeOneAssetFileFrame

          public static void decodeOneAssetFileFrame​(String assetFilePath,
                                                     DecodeOneFrameUtil.Listener listener,
                                                     @Nullable Surface surface)
                                              throws Exception

      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:
        `Exception`