Class VideoFrameProcessorTestRunner
- java.lang.Object
-
- com.google.android.exoplayer2.testutil.VideoFrameProcessorTestRunner
-
@RequiresApi(19) public final class VideoFrameProcessorTestRunner extends Object
A test runner forVideoFrameProcessortests.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceVideoFrameProcessorTestRunner.BitmapReaderReads aBitmapfromVideoFrameProcessoroutput.static classVideoFrameProcessorTestRunner.BuilderA builder forVideoFrameProcessorTestRunnerinstances.static interfaceVideoFrameProcessorTestRunner.OnOutputFrameAvailableForRenderingListenerstatic classVideoFrameProcessorTestRunner.SurfaceBitmapReader
-
Field Summary
Fields Modifier and Type Field Description static intVIDEO_FRAME_PROCESSING_WAIT_MSTime to wait for the decoded frame to populate theVideoFrameProcessorinstance's input surface and theVideoFrameProcessorto finish processing the frame, in milliseconds.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendFrameProcessing()endFrameProcessing(long)withVIDEO_FRAME_PROCESSING_WAIT_MSapplied.voidendFrameProcessing(long videoFrameProcessingWaitTime)Have theVideoFrameProcessorfinish processing.BitmapgetOutputBitmap()Returns theBitmapfrom the providedVideoFrameProcessorTestRunner.BitmapReader.voidprocessFirstFrameAndEnd()voidqueueInputBitmap(Bitmap inputBitmap, long durationUs, long offsetToAddUs, float frameRate)voidqueueInputTexture(GlTextureInfo inputTexture, long pts)voidrelease()
-
-
-
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 theVideoFrameProcessorinstance's input surface and theVideoFrameProcessorto finish processing the frame, in milliseconds.- See Also:
- Constant Field Values
-
-
Method Detail
-
queueInputBitmap
public void queueInputBitmap(Bitmap inputBitmap, long durationUs, long offsetToAddUs, float frameRate)
-
queueInputTexture
public void queueInputTexture(GlTextureInfo inputTexture, long pts)
-
endFrameProcessing
public void endFrameProcessing() throws InterruptedExceptionendFrameProcessing(long)withVIDEO_FRAME_PROCESSING_WAIT_MSapplied.- Throws:
InterruptedException
-
endFrameProcessing
public void endFrameProcessing(long videoFrameProcessingWaitTime) throws InterruptedExceptionHave theVideoFrameProcessorfinish processing.- Throws:
InterruptedException
-
getOutputBitmap
public Bitmap getOutputBitmap()
Returns theBitmapfrom the providedVideoFrameProcessorTestRunner.BitmapReader.Also saves the bitmap to the cache directory.
-
release
public void release()
-
-