Share via


MediaCodec.QueueSecureInputBuffer Method

Definition

Similar to #queueInputBuffer queueInputBuffer but submits a buffer that is potentially encrypted.

[Android.Runtime.Register("queueSecureInputBuffer", "(IILandroid/media/MediaCodec$CryptoInfo;JI)V", "")]
public void QueueSecureInputBuffer (int index, int offset, Android.Media.MediaCodec.CryptoInfo info, long presentationTimeUs, Android.Media.MediaCodecBufferFlags flags);
[<Android.Runtime.Register("queueSecureInputBuffer", "(IILandroid/media/MediaCodec$CryptoInfo;JI)V", "")>]
member this.QueueSecureInputBuffer : int * int * Android.Media.MediaCodec.CryptoInfo * int64 * Android.Media.MediaCodecBufferFlags -> unit

Parameters

index
Int32

The index of a client-owned input buffer previously returned in a call to #dequeueInputBuffer.

offset
Int32

The byte offset into the input buffer at which the data starts.

info
MediaCodec.CryptoInfo

Metadata required to facilitate decryption, the object can be reused immediately after this call returns.

presentationTimeUs
Int64

The presentation timestamp in microseconds for this buffer. This is normally the media time at which this buffer should be presented (rendered).

flags
MediaCodecBufferFlags

A bitmask of flags #BUFFER_FLAG_CODEC_CONFIG and #BUFFER_FLAG_END_OF_STREAM. While not prohibited, most codecs do not use the #BUFFER_FLAG_KEY_FRAME flag for input buffers.

Attributes

Exceptions

if not in the Executing state.

upon codec error.

if an error occurs while attempting to decrypt the buffer. An error code associated with the exception helps identify the reason for the failure.

Remarks

Java documentation for android.media.MediaCodec.queueSecureInputBuffer(int, int, android.media.CryptoInfo, long, 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