Package: android.hardware.cas.native@1.0

types

Properties

ScramblingControl

enum ScramblingControl: uint32_t

Enumerates the keys used to scramble the content.

Details
Members
UNSCRAMBLED = 0
RESERVED = 1
EVENKEY = 2
ODDKEY = 3

BufferType

enum BufferType: uint32_t

A descrambling destination buffer can be either normal user-space shared memory for the non-secure descrambling case, or it can be a secure buffer which is referenced by a native-handle.The native handle is allocated by the vendor's buffer allocator.

Details
Members
SHARED_MEMORY = 0
NATIVE_HANDLE = 1

SubSample

struct SubSample {uint32_t numBytesOfClearData; uint32_t numBytesOfEncryptedData}

A subsample consists of some number of bytes of clear(unscrambled)data followed by a number of bytes of scrambled data.

Details
Members
numBytesOfClearData
numBytesOfEncryptedData

SharedBuffer

struct SharedBuffer {memory heapBase; uint64_t offset; uint64_t size}

SharedBuffer describes a shared buffer which is defined by a heapBase, an offset and a size.The offset is relative to the shared memory base for the memory region identified by heapBase.

Details
Members
heapBase
The shared memory base handle
offset
The offset from the shared memory base
size
The size of the shared buffer in bytes

DestinationBuffer

struct DestinationBuffer {BufferType type; SharedBuffer nonsecureMemory; handle secureMemory}
Details
Members
type
The type of the buffer
nonsecureMemory
If type == SHARED_MEMORY, the descrambled data must be written to user-space non-secure shared memory.
secureMemory
If type == NATIVE_HANDLE, the descrambled data must be written to secure memory referenced by the vendor's buffer allocator.