Back to Exoplayer

VideoFrameProcessorTestRunner (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/testutil/VideoFrameProcessorTestRunner.html

latest6.2 KB
Original Source

Package com.google.android.exoplayer2.testutil

Class VideoFrameProcessorTestRunner

  • java.lang.Object

    • com.google.android.exoplayer2.testutil.VideoFrameProcessorTestRunner

@RequiresApi(19)
public final classVideoFrameProcessorTestRunnerextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

A test runner for VideoFrameProcessor tests.

Nested Class Summary

Nested Classes | Modifier and Type | Class | Description | | --- | --- | --- | | static interface | VideoFrameProcessorTestRunner.BitmapReader | Reads a Bitmap from VideoFrameProcessor output. | | static class | VideoFrameProcessorTestRunner.Builder | A builder for VideoFrameProcessorTestRunner instances. | | static interface | VideoFrameProcessorTestRunner.OnOutputFrameAvailableForRenderingListener | | | static class | VideoFrameProcessorTestRunner.SurfaceBitmapReader |

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | static int | VIDEO_FRAME_PROCESSING_WAIT_MS | Time to wait for the decoded frame to populate the VideoFrameProcessor instance's input surface and the VideoFrameProcessor to finish processing the frame, in milliseconds. |

Method Summary

All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description | | --- | --- | --- | | void | endFrameProcessing() | endFrameProcessing(long) with VIDEO_FRAME_PROCESSING_WAIT_MS applied. | | void | endFrameProcessing​(long videoFrameProcessingWaitTime) | Have the VideoFrameProcessor finish processing. | | Bitmap | getOutputBitmap() | Returns the Bitmap from the provided VideoFrameProcessorTestRunner.BitmapReader. | | void | processFirstFrameAndEnd() | | | void | queueInputBitmap​(Bitmap inputBitmap, long durationUs, long offsetToAddUs, float frameRate) | | | void | queueInputTexture​(GlTextureInfo inputTexture, long pts) | | | void | release() | |

- 

Methods inherited from class java.lang.Object

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

Field Detail

- 

VIDEO_FRAME_PROCESSING_WAIT_MS

public static final int VIDEO_FRAME_PROCESSING_WAIT_MS

Time to wait for the decoded frame to populate the VideoFrameProcessor instance's input surface and the VideoFrameProcessor to finish processing the frame, in milliseconds. See Also:Constant Field Values

Method Detail

- 

processFirstFrameAndEnd

public void processFirstFrameAndEnd()
                             throws[Exception](https://developer.android.com/reference/java/lang/Exception.html "class or interface in java.lang")

Throws:Exception

- 

queueInputBitmap

public void queueInputBitmap​([Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html "class or interface in android.graphics")inputBitmap,
                             long durationUs,
                             long offsetToAddUs,
                             float frameRate)
- 

queueInputTexture

public void queueInputTexture​([GlTextureInfo](../util/GlTextureInfo.html "class in com.google.android.exoplayer2.util")inputTexture,
                              long pts)
- 

endFrameProcessing

public void endFrameProcessing()
                        throws[InterruptedException](https://developer.android.com/reference/java/lang/InterruptedException.html "class or interface in java.lang")

endFrameProcessing(long) with VIDEO_FRAME_PROCESSING_WAIT_MS applied. Throws:InterruptedException

- 

endFrameProcessing

public void endFrameProcessing​(long videoFrameProcessingWaitTime)
                        throws[InterruptedException](https://developer.android.com/reference/java/lang/InterruptedException.html "class or interface in java.lang")

Have the VideoFrameProcessor finish processing. Throws:InterruptedException

- 

getOutputBitmap

public[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html "class or interface in android.graphics")getOutputBitmap()

Returns the Bitmap from the provided VideoFrameProcessorTestRunner.BitmapReader.

Also saves the bitmap to the cache directory.

- 

release

public void release()