MediaCodec.MapHardwareBuffer(HardwareBuffer) Method

Definition

Map a HardwareBuffer object into Image, so that the content of the buffer is accessible.

[Android.Runtime.Register("mapHardwareBuffer", "(Landroid/hardware/HardwareBuffer;)Landroid/media/Image;", "", ApiSince=30)]
public static Android.Media.Image? MapHardwareBuffer (Android.Hardware.HardwareBuffer hardwareBuffer);
[<Android.Runtime.Register("mapHardwareBuffer", "(Landroid/hardware/HardwareBuffer;)Landroid/media/Image;", "", ApiSince=30)>]
static member MapHardwareBuffer : Android.Hardware.HardwareBuffer -> Android.Media.Image

Parameters

hardwareBuffer
HardwareBuffer

HardwareBuffer to map.

Returns

Mapped Image object, or null if the buffer is not mappable.

Attributes

Remarks

Map a HardwareBuffer object into Image, so that the content of the buffer is accessible. Depending on the usage and pixel format of the hardware buffer, it may not be mappable; this method returns null in that case.

Java documentation for android.media.MediaCodec.mapHardwareBuffer(android.hardware.HardwareBuffer).

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