Interface FrameProcessor.Listener
-
- Enclosing interface:
- FrameProcessor
public static interface FrameProcessor.Listener
Listener for asynchronous frame processing events.All listener methods must be called from the same thread.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onFrameProcessingEnded()
Called after theFrameProcessor
has produced its final output frame.void
onFrameProcessingError(FrameProcessingException exception)
Called when an exception occurs during asynchronous frame processing.void
onOutputFrameAvailable(long presentationTimeUs)
Called when an output frame with the givenpresentationTimeUs
becomes available.void
onOutputSizeChanged(int width, int height)
Called when the output size changes.
-
-
-
Method Detail
-
onOutputSizeChanged
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
FrameProcessor.setOutputSurfaceInfo(SurfaceInfo)
.
-
onOutputFrameAvailable
void onOutputFrameAvailable(long presentationTimeUs)
Called when an output frame with the givenpresentationTimeUs
becomes available.- Parameters:
presentationTimeUs
- The presentation time of the frame, in microseconds.
-
onFrameProcessingError
void onFrameProcessingError(FrameProcessingException exception)
Called when an exception occurs during asynchronous frame processing.If an error occurred, consuming and producing further frames will not work as expected and the
FrameProcessor
should be released.
-
onFrameProcessingEnded
void onFrameProcessingEnded()
Called after theFrameProcessor
has produced its final output frame.
-
-