Partager via


MediaCodec.GetInputImage(Int32) Method

Definition

Returns a writable Image object for a dequeued input buffer index to contain the raw input video frame.

[Android.Runtime.Register("getInputImage", "(I)Landroid/media/Image;", "")]
public Android.Media.Image? GetInputImage (int index);
[<Android.Runtime.Register("getInputImage", "(I)Landroid/media/Image;", "")>]
member this.GetInputImage : int -> Android.Media.Image

Parameters

index
Int32

The index of a client-owned input buffer previously returned from a call to #dequeueInputBuffer, or received via an onInputBufferAvailable callback.

Returns

the input image, or null if the index is not a dequeued input buffer, or not a ByteBuffer that contains a raw image.

Attributes

Exceptions

if not in the Executing state.

upon codec error.

Remarks

Returns a writable Image object for a dequeued input buffer index to contain the raw input video frame.

After calling this method any ByteBuffer or Image object previously returned for the same input index MUST no longer be used.

Java documentation for android.media.MediaCodec.getInputImage(int).

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