VideoFrameProcessorTestRunner
@UnstableApi
public final class VideoFrameProcessorTestRunner
A test runner for VideoFrameProcessor tests.
Summary
Nested types |
|---|
public interface VideoFrameProcessorTestRunner.BitmapReaderReads a |
public final class VideoFrameProcessorTestRunner.BuilderA builder for |
public interface VideoFrameProcessorTestRunner.OnVideoFrameProcessingEndedListener |
public final class VideoFrameProcessorTestRunner.SurfaceBitmapReader implements VideoFrameProcessorTestRunner.BitmapReaderReads from a |
Constants |
|
|---|---|
static final int |
Time to wait for the decoded frame to populate the |
Public methods |
|
|---|---|
void |
awaitFrameProcessingEnd(long videoFrameProcessingWaitMs)After |
static TimestampIterator |
createTimestampIterator(List<Long> elements) |
void |
|
void |
endFrameProcessing(long videoFrameProcessingWaitMs)Ends |
void |
flush()Calls |
Bitmap |
Returns the |
void |
|
void |
queueInputBitmap( |
void |
queueInputBitmap( |
void |
queueInputBitmaps(int width, int height, Pair[] frames) |
void |
queueInputBitmaps( |
void |
queueInputTexture( |
void |
release() |
void |
Calls |
Constants
VIDEO_FRAME_PROCESSING_WAIT_MS
public static final int VIDEO_FRAME_PROCESSING_WAIT_MS = 5000
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.
Public methods
awaitFrameProcessingEnd
public void awaitFrameProcessingEnd(long videoFrameProcessingWaitMs)
After signalEndOfInput, is called, wait for this instance to end.
| Throws | |
|---|---|
java.lang.Exception |
createTimestampIterator
public static TimestampIterator createTimestampIterator(List<Long> elements)
endFrameProcessing
public void endFrameProcessing()
endFrameProcessing with VIDEO_FRAME_PROCESSING_WAIT_MS applied.
| Throws | |
|---|---|
java.lang.Exception |
endFrameProcessing
public void endFrameProcessing(long videoFrameProcessingWaitMs)
Ends VideoFrameProcessor frame processing.
Waits for frame processing to end, for videoFrameProcessingWaitMs.
| Throws | |
|---|---|
java.lang.Exception |
getOutputBitmap
public Bitmap getOutputBitmap()
Returns the Bitmap from the provided BitmapReader.
Also saves the bitmap to the cache directory.
queueInputBitmap
public void queueInputBitmap(
Bitmap inputBitmap,
long durationUs,
long offsetToAddUs,
float frameRate
)
queueInputBitmap
public void queueInputBitmap(
Bitmap inputBitmap,
long durationUs,
long offsetToAddUs,
float frameRate,
ColorInfo colorInfo
)
queueInputBitmaps
public void queueInputBitmaps(
int width,
int height,
ColorInfo colorInfo,
Pair[] frames
)
queueInputTexture
public void queueInputTexture(
GlTextureInfo inputTexture,
long pts,
ColorInfo colorInfo
)
signalEndOfInput
public void signalEndOfInput()
Calls signalEndOfInput.
Calling this and awaitFrameProcessingEnd is an alternative to endFrameProcessing.