다음을 통해 공유


MediaCodec.GetOutputImage(Int32) Method

Definition

Returns a read-only Image object for a dequeued output buffer index that contains the raw video frame.

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

Parameters

index
Int32

The index of a client-owned output buffer previously returned from a call to #dequeueOutputBuffer, or received via an onOutputBufferAvailable callback.

Returns

the output image, or null if the index is not a dequeued output buffer, not a raw video frame, or if the codec was configured with an output surface.

Attributes

Exceptions

if not in the Executing state.

upon codec error.

Remarks

Returns a read-only Image object for a dequeued output buffer index that contains the raw video frame.

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

Java documentation for android.media.MediaCodec.getOutputImage(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