MediaParser.IOutputConsumer.OnSampleCompleted 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
當所有樣本資料都傳遞給 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
參數
- trackIndex
- Int32
取樣所對應的曲目的索引。
- timeMicros
- Int64
與樣本相關的媒體時間戳記,以微秒為單位。
- flags
- Int32
與樣本相關的旗標。 請參考SAMPLE_FLAG_常數。 值為 0 或以下組合: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
樣本資料的大小,以位元組為單位。
- offset
- Int32
onSampleDataFound(int, MediaParser.InputReader) 在指定軌道上,自最後一個屬於該樣本的元組以來,所消耗的位元組數。
- cryptoInfo
- MediaCodec.CryptoInfo
解密樣本所需的加密資料。 對於未加密的樣本,可能是空的。 實作者應將任何輸出的 CryptoInfo 實例視為不可變。 MediaParser 不會修改任何輸出的 cryptoInfos,實作者也不應該修改它們。
- 屬性
備註
當所有樣本資料都傳遞給 onSampleDataFound(int, InputReader) 後,會呼叫。 包含範例元資料,如簡報時間戳和旗標。
Android 參考資料。android.media.MediaParser.OutputConsumer.onSampleCompleted
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。