Skip to content

Most visited

Recently visited

navigation
added in API level 23

MediaCodec.OnFrameRenderedListener

public static interface MediaCodec.OnFrameRenderedListener

android.media.MediaCodec.OnFrameRenderedListener


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

See also:

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
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. Some frames may have been rendered even if there was no callback generated.

Parameters
codec MediaCodec: the MediaCodec instance
presentationTimeUs long: the presentation time (media time) of the frame rendered. This is usually the same as specified in queueInputBuffer(int, int, int, long, int); however, some codecs may alter the media time by applying some time-based transformation, such as frame rate conversion. In that case, presentation time corresponds to the actual output frame rendered.
nanoTime long: The system time when the frame was rendered.

See also:

This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.