Class VideoFrameProcessorTestRunner
- java.lang.Object
-
- com.google.android.exoplayer2.testutil.VideoFrameProcessorTestRunner
-
@RequiresApi(19) public final class VideoFrameProcessorTestRunner extends Object
A test runner forVideoFrameProcessor
tests.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
VideoFrameProcessorTestRunner.BitmapReader
Reads aBitmap
fromVideoFrameProcessor
output.static class
VideoFrameProcessorTestRunner.Builder
A builder forVideoFrameProcessorTestRunner
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 theVideoFrameProcessor
instance's input surface and theVideoFrameProcessor
to finish processing the frame, in milliseconds.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endFrameProcessing()
endFrameProcessing(long)
withVIDEO_FRAME_PROCESSING_WAIT_MS
applied.void
endFrameProcessing(long videoFrameProcessingWaitTime)
Have theVideoFrameProcessor
finish processing.Bitmap
getOutputBitmap()
Returns theBitmap
from the providedVideoFrameProcessorTestRunner.BitmapReader
.void
processFirstFrameAndEnd()
void
queueInputBitmap(Bitmap inputBitmap, long durationUs, long offsetToAddUs, float frameRate)
void
queueInputTexture(GlTextureInfo inputTexture, long pts)
void
release()
-
-
-
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 theVideoFrameProcessor
instance's input surface and theVideoFrameProcessor
to 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 InterruptedException
endFrameProcessing(long)
withVIDEO_FRAME_PROCESSING_WAIT_MS
applied.- Throws:
InterruptedException
-
endFrameProcessing
public void endFrameProcessing(long videoFrameProcessingWaitTime) throws InterruptedException
Have theVideoFrameProcessor
finish processing.- Throws:
InterruptedException
-
getOutputBitmap
public Bitmap getOutputBitmap()
Returns theBitmap
from the providedVideoFrameProcessorTestRunner.BitmapReader
.Also saves the bitmap to the cache directory.
-
release
public void release()
-
-