MediaCodec.QueueRequest.SetHardwareBuffer(HardwareBuffer) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Set a hardware graphic buffer to this queue request.
[Android.Runtime.Register("setHardwareBuffer", "(Landroid/hardware/HardwareBuffer;)Landroid/media/MediaCodec$QueueRequest;", "", ApiSince=30)]
public Android.Media.MediaCodec.QueueRequest SetHardwareBuffer(Android.Hardware.HardwareBuffer buffer);
[<Android.Runtime.Register("setHardwareBuffer", "(Landroid/hardware/HardwareBuffer;)Landroid/media/MediaCodec$QueueRequest;", "", ApiSince=30)>]
member this.SetHardwareBuffer : Android.Hardware.HardwareBuffer -> Android.Media.MediaCodec.QueueRequest
Parameters
- buffer
- HardwareBuffer
The hardware graphic buffer object. This value cannot be null.
Returns
this object. This value cannot be null.
- Attributes
Remarks
Set a hardware graphic buffer to this queue request. Exactly one buffer must be set for a queue request before calling queue(). Ownership of the hardware buffer is not transferred to this queue request, nor will it be transferred to the codec once queue() is called. Buffers should have format Ycbcr420888, a single layer, and an appropriate usage (UsageCpuReadOften for software codecs and UsageVideoEncode for hardware codecs). For hardware codecs, the numeric value of Private with UsageVideoEncode can also work; it uses a different managed enum type from HardwareBufferFormat. Codecs may throw an exception if the buffer is not recognizable.
Android reference for android.media.MediaCodec.QueueRequest.setHardwareBuffer.
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.