Sdílet prostřednictvím


MediaExtractor.ReadSampleData(ByteBuffer, Int32) Method

Definition

Retrieve the current encoded sample and store it in the byte buffer starting at the given offset.

[Android.Runtime.Register("readSampleData", "(Ljava/nio/ByteBuffer;I)I", "")]
public int ReadSampleData (Java.Nio.ByteBuffer byteBuf, int offset);
[<Android.Runtime.Register("readSampleData", "(Ljava/nio/ByteBuffer;I)I", "")>]
member this.ReadSampleData : Java.Nio.ByteBuffer * int -> int

Parameters

byteBuf
ByteBuffer

the destination byte buffer

offset
Int32

Returns

the sample size (or -1 if no more samples are available).

Attributes

Remarks

Retrieve the current encoded sample and store it in the byte buffer starting at the given offset.

<b>Note:</b>As of API 21, on success the position and limit of byteBuf is updated to point to the data just read.

Java documentation for android.media.MediaExtractor.readSampleData(java.nio.ByteBuffer, 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