Language

MediaParser.IOutputConsumer.OnSampleCompleted Method

Definition

Called once all the data of a sample has been passed to onSampleDataFound(int, InputReader).

[Android.Runtime.Register("onSampleCompleted", "(IJIIILandroid/media/MediaCodec$CryptoInfo;)V", "GetOnSampleCompleted_IJIIILandroid_media_MediaCodec_CryptoInfo_Handler:Android.Media.MediaParser/IOutputConsumerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=30)]
public void OnSampleCompleted(int trackIndex, long timeMicros, int flags, int size, int offset, Android.Media.MediaCodec.CryptoInfo? cryptoInfo);
[<Android.Runtime.Register("onSampleCompleted", "(IJIIILandroid/media/MediaCodec$CryptoInfo;)V", "GetOnSampleCompleted_IJIIILandroid_media_MediaCodec_CryptoInfo_Handler:Android.Media.MediaParser/IOutputConsumerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=30)>]
abstract member OnSampleCompleted : int * int64 * int * int * int * Android.Media.MediaCodec.CryptoInfo -> unit

Parameters

trackIndex
Int32

The index of the track to which the sample corresponds.

timeMicros
Int64

The media timestamp associated with the sample, in microseconds.

flags
Int32

Flags associated with the sample. See the SAMPLE_FLAG_* constants. Value is either 0 or a combination of the following: MediaParser.SAMPLE_FLAG_KEY_FRAME MediaParser.SAMPLE_FLAG_HAS_SUPPLEMENTAL_DATA MediaParser.SAMPLE_FLAG_LAST_SAMPLE MediaParser.SAMPLE_FLAG_ENCRYPTED MediaParser.SAMPLE_FLAG_DECODE_ONLY

size
Int32

The size of the sample data, in bytes.

offset
Int32

The number of bytes that have been consumed by onSampleDataFound(int, MediaParser.InputReader) for the specified track, since the last byte belonging to the sample whose metadata is being passed.

cryptoInfo
MediaCodec.CryptoInfo

Encryption data required to decrypt the sample. May be null for unencrypted samples. Implementors should treat any output CryptoInfo instances as immutable. MediaParser will not modify any output cryptoInfos and implementors should not modify them either.

Attributes

Remarks

Called once all the data of a sample has been passed to onSampleDataFound(int, InputReader). Includes sample metadata, like presentation timestamp and flags.

Android reference for android.media.MediaParser.OutputConsumer.onSampleCompleted.

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