VideoFrameProcessorTestRunner


@UnstableApi
class VideoFrameProcessorTestRunner


A test runner for VideoFrameProcessor tests.

Summary

Constants

const Int

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 functions

Unit
awaitFrameProcessingEnd(videoFrameProcessingWaitMs: Long)

After signalEndOfInput, is called, wait for this instance to end.

java-static TimestampIterator!
Unit

endFrameProcessing with VIDEO_FRAME_PROCESSING_WAIT_MS applied.

Unit
endFrameProcessing(videoFrameProcessingWaitMs: Long)

Ends VideoFrameProcessor frame processing.

Unit

Calls flush.

Bitmap!

Returns the Bitmap from the provided BitmapReader.

Unit
Unit
queueInputBitmap(
    inputBitmap: Bitmap!,
    durationUs: Long,
    offsetToAddUs: Long,
    frameRate: Float
)
Unit
queueInputBitmap(
    inputBitmap: Bitmap!,
    durationUs: Long,
    offsetToAddUs: Long,
    frameRate: Float,
    colorInfo: ColorInfo!
)
Unit
queueInputBitmaps(
    width: Int,
    height: Int,
    frames: Array<Pair<Bitmap!, TimestampIterator!>!>!
)
Unit
queueInputBitmaps(
    width: Int,
    height: Int,
    colorInfo: ColorInfo!,
    frames: Array<Pair<Bitmap!, TimestampIterator!>!>!
)
Unit
queueInputTexture(
    inputTexture: GlTextureInfo!,
    pts: Long,
    colorInfo: ColorInfo!
)
Unit
Unit

Calls signalEndOfInput.

Constants

VIDEO_FRAME_PROCESSING_WAIT_MS

const val VIDEO_FRAME_PROCESSING_WAIT_MS = 5000: Int

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 functions

awaitFrameProcessingEnd

fun awaitFrameProcessingEnd(videoFrameProcessingWaitMs: Long): Unit

After signalEndOfInput, is called, wait for this instance to end.

createTimestampIterator

java-static fun createTimestampIterator(elements: (Mutable)List<Long!>!): TimestampIterator!

endFrameProcessing

fun endFrameProcessing(videoFrameProcessingWaitMs: Long): Unit

Ends VideoFrameProcessor frame processing.

Waits for frame processing to end, for videoFrameProcessingWaitMs.

flush

fun flush(): Unit

Calls flush.

getOutputBitmap

fun getOutputBitmap(): Bitmap!

Returns the Bitmap from the provided BitmapReader.

Also saves the bitmap to the cache directory.

processFirstFrameAndEnd

fun processFirstFrameAndEnd(): Unit

queueInputBitmap

fun queueInputBitmap(
    inputBitmap: Bitmap!,
    durationUs: Long,
    offsetToAddUs: Long,
    frameRate: Float
): Unit

queueInputBitmap

fun queueInputBitmap(
    inputBitmap: Bitmap!,
    durationUs: Long,
    offsetToAddUs: Long,
    frameRate: Float,
    colorInfo: ColorInfo!
): Unit

queueInputBitmaps

fun queueInputBitmaps(
    width: Int,
    height: Int,
    frames: Array<Pair<Bitmap!, TimestampIterator!>!>!
): Unit

queueInputBitmaps

fun queueInputBitmaps(
    width: Int,
    height: Int,
    colorInfo: ColorInfo!,
    frames: Array<Pair<Bitmap!, TimestampIterator!>!>!
): Unit

queueInputTexture

fun queueInputTexture(
    inputTexture: GlTextureInfo!,
    pts: Long,
    colorInfo: ColorInfo!
): Unit

release

fun release(): Unit

signalEndOfInput

fun signalEndOfInput(): Unit

Calls signalEndOfInput.

Calling this and awaitFrameProcessingEnd is an alternative to endFrameProcessing.