Share via


MediaCodec.Metrics Property

Definition

Return Metrics data about the current codec instance.

public Android.OS.PersistableBundle? Metrics { [Android.Runtime.Register("getMetrics", "()Landroid/os/PersistableBundle;", "", ApiSince=26)] get; }
[<get: Android.Runtime.Register("getMetrics", "()Landroid/os/PersistableBundle;", "", ApiSince=26)>]
member this.Metrics : Android.OS.PersistableBundle

Property Value

a PersistableBundle containing the set of attributes and values available for the media being handled by this instance of MediaCodec The attributes are descibed in MetricsConstants.

        Additional vendor-specific fields may also be present in
        the return value. Returns null if there is no Metrics data.
Attributes

Remarks

Return Metrics data about the current codec instance.

Call this method after configuration, during execution, or after the codec has been already stopped.

Beginning with android.os.Build.VERSION_CODES#B this method can be used to get the Metrics data prior to an error. (e.g. in Callback#onError or after a method throws MediaCodec.CodecException.) Before that, the Metrics data was cleared on error, resulting in a null return value.

Java documentation for android.media.MediaCodec.getMetrics().

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