MediaCodec.GetOutputBuffer(Int32) Method

Definition

Returns a read-only ByteBuffer for a dequeued output buffer index.

[Android.Runtime.Register("getOutputBuffer", "(I)Ljava/nio/ByteBuffer;", "")]
public Java.Nio.ByteBuffer? GetOutputBuffer (int index);
[<Android.Runtime.Register("getOutputBuffer", "(I)Ljava/nio/ByteBuffer;", "")>]
member this.GetOutputBuffer : int -> Java.Nio.ByteBuffer

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 buffer, or null if the index is not a dequeued output buffer, or the codec is configured with an output surface.

Attributes

Exceptions

if not in the Executing state.

upon codec error.

Remarks

Returns a read-only ByteBuffer for a dequeued output buffer index. The position and limit of the returned buffer are set to the valid output data.

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.getOutputBuffer(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