VideoFrameProcessor.Listener
public interface VideoFrameProcessor.Listener
Listener for asynchronous frame processing events.
All listener methods must be called from the Executor passed in at creation.
Summary
Public methods |
|
|---|---|
default void |
onEnded()Called after the |
default void |
onError(VideoFrameProcessingException exception)Called when an exception occurs during asynchronous video frame processing. |
default void |
onInputStreamRegistered(Called when the |
default void |
onOutputFrameAvailableForRendering(Called when an output frame with the given |
default void |
onOutputFrameRateChanged(float frameRate)Called when the output frame rate changes. |
default void |
onOutputSizeChanged(int width, int height)Called when the output size changes. |
Public methods
onEnded
default void onEnded()
Called after the VideoFrameProcessor has rendered its final output frame.
onError
default void onError(VideoFrameProcessingException exception)
Called when an exception occurs during asynchronous video frame processing.
If this is called, the calling VideoFrameProcessor must immediately be released.
onInputStreamRegistered
default void onInputStreamRegistered(
@VideoFrameProcessor.InputType int inputType,
Format format,
List<Effect> effects
)
Called when the VideoFrameProcessor finishes registering an input stream.
The VideoFrameProcessor is now ready to accept new input frames, bitmaps or textures.
onOutputFrameAvailableForRendering
default void onOutputFrameAvailableForRendering(
long presentationTimeUs,
boolean isRedrawnFrame
)
Called when an output frame with the given presentationTimeUs becomes available for rendering.
| Parameters | |
|---|---|
long presentationTimeUs |
The presentation time of the frame, in microseconds. |
boolean isRedrawnFrame |
Whether the frame is a frame that is |
onOutputFrameRateChanged
default void onOutputFrameRateChanged(float frameRate)
Called when the output frame rate changes.
| Parameters | |
|---|---|
float frameRate |
The output frame rate in frames per second, or |
onOutputSizeChanged
default void onOutputSizeChanged(int width, int height)
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.