Condividi tramite


MediaCodec.IOnFrameRenderedListener.OnFrameRendered Method

Definition

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

[Android.Runtime.Register("onFrameRendered", "(Landroid/media/MediaCodec;JJ)V", "GetOnFrameRendered_Landroid_media_MediaCodec_JJHandler:Android.Media.MediaCodec/IOnFrameRenderedListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=23)]
public void OnFrameRendered (Android.Media.MediaCodec codec, long presentationTimeUs, long nanoTime);
[<Android.Runtime.Register("onFrameRendered", "(Landroid/media/MediaCodec;JJ)V", "GetOnFrameRendered_Landroid_media_MediaCodec_JJHandler:Android.Media.MediaCodec/IOnFrameRenderedListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=23)>]
abstract member OnFrameRendered : Android.Media.MediaCodec * int64 * int64 -> unit

Parameters

codec
MediaCodec

the MediaCodec instance

presentationTimeUs
Int64

the presentation time (media time) of the frame rendered. This is usually the same as specified in #queueInputBuffer; 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
Int64

The system time when the frame was rendered.

Attributes

Remarks

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

<strong>Note:</strong> 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.

Java documentation for android.media.MediaCodec.OnFrameRenderedListener.onFrameRendered(android.media.MediaCodec, long, long).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to