VideoGraph.Listener
public interface VideoGraph.Listener
Listener for video frame processing events.
Summary
Public methods |
|
|---|---|
default void |
onEnded(long finalFramePresentationTimeUs)Called after the |
default void |
onError(VideoFrameProcessingException exception)Called when an exception occurs during video frame processing. |
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(long finalFramePresentationTimeUs)
Called after the VideoGraph has rendered its final output frame.
| Parameters | |
|---|---|
long finalFramePresentationTimeUs |
The timestamp of the last output frame, in microseconds. |
onError
default void onError(VideoFrameProcessingException exception)
Called when an exception occurs during video frame processing.
If this is called, the calling VideoGraph must immediately be released.
onOutputFrameAvailableForRendering
default void onOutputFrameAvailableForRendering(
long framePresentationTimeUs,
boolean isRedrawnFrame
)
Called when an output frame with the given framePresentationTimeUs becomes available for rendering.
| Parameters | |
|---|---|
long framePresentationTimeUs |
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.
| Parameters | |
|---|---|
int width |
The new output width in pixels. |
int height |
The new output width in pixels. |