0

语境:

我想在 Android 上解密 video/mp4 类型的 EME 内容。我MediaDrm使用 PlayReady UUID 打开了一个实例。AMediaDrmKeyTypeKEY_TYPE_STREAMING

我无法从 获取密钥请求AMediaDrm_getKeyRequest。我怀疑我提供的初始化数据不正确,因为这是我不确定的唯一参数。

我能找到的唯一信息是在图书馆的标题中,而且不是很具体:

/*
* init container-specific data, its meaning is interpreted based on the mime type
* provided in the mimeType parameter.  It could contain, for example, the content
* ID, key ID or other data obtained from the content metadata that is required in
* generating the key request. init may be null when keyType is KEY_TYPE_RELEASE.
*/

media_status_t AMediaDrm_getKeyRequest(AMediaDrm *, const AMediaDrmScope *scope,
    const uint8_t *init, size_t initSize, const char *mimeType, AMediaDrmKeyType keyType,
    const AMediaDrmKeyValue *optionalParameters, size_t numOptionalParameters,
    const uint8_t **keyRequest, size_t *keyRequestSize);

对于其他 DRM 库,密钥请求 API 通常需要 PlayReady PSSH 框。我已经尝试过了,AMediaDrm_getKeyRequest()但我只得到一个通用错误-10000。

按照文档的建议,我还尝试了内容 ID 或密钥 ID,但无济于事。

为 PlayReady 内容调用 AMediaDrm_getKeyRequest() 的预期初始化数据是什么?

4

0 回答 0