DecodeOneFrameUtil
@UnstableApi
class DecodeOneFrameUtil
Utilities for decoding a video frame for tests.
Summary
Nested types |
|---|
interface DecodeOneFrameUtil.ListenerListener for decoding events. |
Public functions |
|
|---|---|
java-static Unit |
decodeOneAssetFileFrame(Reads and decodes one frame synchronously from the |
java-static Unit |
decodeOneMediaItemFrame(Reads and decodes one frame synchronously from the |
Public functions
decodeOneAssetFileFrame
java-static fun decodeOneAssetFileFrame(
assetFilePath: String!,
listener: DecodeOneFrameUtil.Listener!,
surface: Surface!
): Unit
Reads and decodes one frame synchronously from the assetFilePath and renders it to the surface.
This method blocks until the frame has been rendered to the surface.
| Parameters | |
|---|---|
assetFilePath: String! |
The path to the file in the asset directory. |
listener: DecodeOneFrameUtil.Listener! |
A |
surface: Surface! |
The |
| Throws | |
|---|---|
java.lang.Exception |
decodeOneMediaItemFrame
java-static fun decodeOneMediaItemFrame(
mediaItem: MediaItem!,
listener: DecodeOneFrameUtil.Listener!,
surface: Surface!
): Unit
Reads and decodes one frame synchronously from the mediaItem and renders it to the surface.
This method blocks until the frame has been rendered to the surface.
| Parameters | |
|---|---|
mediaItem: MediaItem! |
The |
listener: DecodeOneFrameUtil.Listener! |
A |
surface: Surface! |
The |
| Throws | |
|---|---|
java.lang.Exception |