Added in API level 23

MediaCodec.OnFrameRenderedListener


public static interface MediaCodec.OnFrameRenderedListener



Listener to be called when an output frame has rendered on the output surface

Summary

Public methods

abstract void onFrameRendered(MediaCodec codec, long presentationTimeUs, long nanoTime)

Called when an output frame has rendered on the output surface.

Public methods

onFrameRendered

Added in API level 23
public abstract void onFrameRendered (MediaCodec codec, 
                long presentationTimeUs, 
                long nanoTime)

Called when an output frame has rendered on the output surface.

Note: This callback is for informational purposes only: to get precise render timing samples, and can be significantly delayed and batched. Starting with Android Build.VERSION_CODES.UPSIDE_DOWN_CAKE, a callback will always be received for each rendered frame providing the MediaCodec is still in the executing state when the callback is dispatched. Prior to Android Build.VERSION_CODES.UPSIDE_DOWN_CAKE, some frames may have been rendered even if there was no callback generated.

See also: