Android.Media.MediaCodec.ReleaseOutputBuffer Method
If you are done with a buffer, use this call to return the buffer to the codec.

Syntax

[Android.Runtime.Register("releaseOutputBuffer", "(IZ)V", "")]
public void ReleaseOutputBuffer (int index, bool render)

Parameters

index
The index of a client-owned output buffer previously returned from a call to MediaCodec.DequeueOutputBuffer(.BufferInfo, System.Int64).
render
If a valid surface was specified when configuring the codec, passing true renders this output buffer to the surface.

Exceptions

TypeReason
Java.Lang.IllegalStateExceptionif not in the Executing state.
!:NoType:android/media/MediaCodec$CodecException;Href=../../../reference/android/media/MediaCodec.CodecException.htmlupon codec error.

Remarks

If you are done with a buffer, use this call to return the buffer to the codec. If you previously specified a surface when configuring this video decoder you can optionally render the buffer. Once an output buffer is released to the codec, it MUST NOT be used until it is later retrieved by MediaCodec.GetOutputBuffer(int) in response to a MediaCodec.DequeueOutputBuffer(.BufferInfo, System.Int64) return value or a NoType:android/media/MediaCodec$Callback;Href=../../../reference/android/media/MediaCodec.Callback.html#onOutputBufferAvailable(android.media.MediaCodec, int, android.media.MediaCodec.BufferInfo) callback.

[Android Documentation]

Requirements

Namespace: Android.Media
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 16