Sdílet prostřednictvím


MediaDescrambler.Descramble Method

Definition

Descramble a ByteBuffer of data described by a android.media.MediaCodec.CryptoInfo structure.

[Android.Runtime.Register("descramble", "(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;Landroid/media/MediaCodec$CryptoInfo;)I", "", ApiSince=26)]
public int Descramble (Java.Nio.ByteBuffer srcBuf, Java.Nio.ByteBuffer dstBuf, Android.Media.MediaCodec.CryptoInfo cryptoInfo);
[<Android.Runtime.Register("descramble", "(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;Landroid/media/MediaCodec$CryptoInfo;)I", "", ApiSince=26)>]
member this.Descramble : Java.Nio.ByteBuffer * Java.Nio.ByteBuffer * Android.Media.MediaCodec.CryptoInfo -> int

Parameters

srcBuf
ByteBuffer

ByteBuffer containing the scrambled data, which starts at srcBuf.position().

dstBuf
ByteBuffer

ByteBuffer to hold the descrambled data, which starts at dstBuf.position().

cryptoInfo
MediaCodec.CryptoInfo

a android.media.MediaCodec.CryptoInfo structure describing the subsamples contained in srcBuf. The iv and mode fields in CryptoInfo are not used. key[0] contains the MPEG2TS scrambling control bits (as defined in ETSI TS 100 289 (2011): "Digital Video Broadcasting (DVB); Support for use of the DVB Scrambling Algorithm version 3 within digital broadcasting systems"), and the value must be one of #SCRAMBLE_CONTROL_UNSCRAMBLED, #SCRAMBLE_CONTROL_RESERVED, #SCRAMBLE_CONTROL_EVEN_KEY or #SCRAMBLE_CONTROL_ODD_KEY. key[1] is a set of bit flags, with the only possible bit being #SCRAMBLE_FLAG_PES_HEADER currently. key[2~15] are not used.

Returns

number of bytes that have been successfully descrambled, with negative values indicating errors.

Attributes

Remarks

Java documentation for android.media.MediaDescrambler.descramble(java.nio.ByteBuffer, java.nio.ByteBuffer, android.media.CryptoInfo).

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