Package: android.hardware.drm@1.0

IDrmFactory

interface IDrmFactory

Ref:frameworks/native/include/media/drm/DrmAPI.h:DrmFactory

IDrmFactory is the main entry point for interacting with a vendor's drm HAL to create drm plugin instances.A drm plugin instance creates drm sessions which are used to obtain keys for a crypto session so it can decrypt* protected video content.

Methods

isCryptoSchemeSupported

isCryptoSchemeSupported (uint8_t[16] uuid)
generates (bool isSupported)

Determine if a crypto scheme is supported by this HAL

Details
Parameters
uuid
identifies the crypto scheme in question
Generates
isSupported
must be true only if the scheme is supported

isContentTypeSupported

isContentTypeSupported (string mimeType)
generates (bool isSupported)

Determine if the HAL factory is able to construct plugins that support a given media container format specified by mimeType

Details
Parameters
mimeType
identifies the mime type in question
Generates
isSupported
must be true only if the scheme is supported

createPlugin

createPlugin (uint8_t[16] uuid, string appPackageName)
generates (Status status, IDrmPlugin drmPlugin)

Create a drm plugin instance for the specified uuid and scheme-specific initialization data.

Details
Parameters
uuid
uniquely identifies the drm scheme.See http ://dashif.org/identifiers/protection for uuid assignments
appPackageName
identifies the package name of the calling application.
Generates
status
the status of the call.The HAL implementation must return OK if the plugin is created and ERROR_DRM_CANNOT_HANDLE if the plugin cannot be created.
drmPlugin