Share via


MediaCodec.DequeueInputBuffer(Int64) Method

Definition

Returns the index of an input buffer to be filled with valid data or -1 if no such buffer is currently available.

[Android.Runtime.Register("dequeueInputBuffer", "(J)I", "")]
public int DequeueInputBuffer (long timeoutUs);
[<Android.Runtime.Register("dequeueInputBuffer", "(J)I", "")>]
member this.DequeueInputBuffer : int64 -> int

Parameters

timeoutUs
Int64

The timeout in microseconds, a negative timeout indicates "infinite".

Returns

Attributes

Exceptions

if not in the Executing state, or codec is configured in asynchronous mode.

upon codec error.

Remarks

Returns the index of an input buffer to be filled with valid data or -1 if no such buffer is currently available. This method will return immediately if timeoutUs == 0, wait indefinitely for the availability of an input buffer if timeoutUs &lt; 0 or wait up to "timeoutUs" microseconds if timeoutUs &gt; 0.

Java documentation for android.media.MediaCodec.dequeueInputBuffer(long).

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