VideoFrameProcessor.Listener
interface VideoFrameProcessor.Listener
Listener for asynchronous frame processing events.
All listener methods must be called from the Executor passed in at creation.
Summary
Public functions |
|
|---|---|
Unit |
onEnded()Called after the |
Unit |
onError(exception: VideoFrameProcessingException!)Called when an exception occurs during asynchronous video frame processing. |
Unit |
onInputStreamRegistered(Called when the |
Unit |
onOutputFrameAvailableForRendering(Called when an output frame with the given |
Unit |
onOutputFrameRateChanged(frameRate: Float)Called when the output frame rate changes. |
Unit |
onOutputSizeChanged(width: Int, height: Int)Called when the output size changes. |
Public functions
onEnded
fun onEnded(): Unit
Called after the VideoFrameProcessor has rendered its final output frame.
onError
fun onError(exception: VideoFrameProcessingException!): Unit
Called when an exception occurs during asynchronous video frame processing.
If this is called, the calling VideoFrameProcessor must immediately be released.
onInputStreamRegistered
fun onInputStreamRegistered(
@VideoFrameProcessor.InputType inputType: Int,
format: Format!,
effects: (Mutable)List<Effect!>!
): Unit
Called when the VideoFrameProcessor finishes registering an input stream.
The VideoFrameProcessor is now ready to accept new input frames, bitmaps or textures.
onOutputFrameAvailableForRendering
fun onOutputFrameAvailableForRendering(
presentationTimeUs: Long,
isRedrawnFrame: Boolean
): Unit
Called when an output frame with the given presentationTimeUs becomes available for rendering.
| Parameters | |
|---|---|
presentationTimeUs: Long |
The presentation time of the frame, in microseconds. |
isRedrawnFrame: Boolean |
Whether the frame is a frame that is |
onOutputFrameRateChanged
fun onOutputFrameRateChanged(frameRate: Float): Unit
Called when the output frame rate changes.
onOutputSizeChanged
fun onOutputSizeChanged(width: Int, height: Int): Unit
Called when the output size changes.
The output size is the frame size in pixels after applying all effects.
The output size may differ from the size specified using setOutputSurfaceInfo.