native_drm_common.h

Overview

The native_drm_common.h file declares the DRM data types.

Library: libnative_drm.z.so

System capability: SystemCapability.Multimedia.Drm.Core

Since: 11

Related module: Drm

Summary

Structs

Name Description
struct  DRM_MediaKeyRequestInfo Describes the information about a media key request.
struct  DRM_MediaKeyRequest Describes a media key request.
struct  DRM_Statistics Describes the statistics information about a media key system.
struct  DRM_OfflineMediakeyIdArray Describes an array holding the IDs of offline media keys.
struct  DRM_KeysInfo Describes the information about media keys.
struct  DRM_MediaKeyStatus Describes the media key status.
struct  DRM_PsshInfo Describes the Protection Scheme Specific Header (PSSH) information of the UUID.
struct  DRM_MediaKeySystemInfo Describes the media key system information obtained from a media source.
struct  DRM_MediaKeySystemDescription Describes the name and UUID of a DRM plug-in.

Macros

Name Description
MAX_MEDIA_KEY_REQUEST_OPTION_COUNT   16 Maximum number of options in a media key request.
MAX_MEDIA_KEY_REQUEST_OPTION_NAME_LEN   64 Maximum length of an option name in a media key request.
MAX_MEDIA_KEY_REQUEST_OPTION_DATA_LEN   128 Maximum length of option data in a media key request.
MAX_INIT_DATA_LEN   2048 Maximum length of data in an initial request.
MAX_MIMETYPE_LEN   64 Maximum length of a MIME type.
MAX_MEDIA_KEY_REQUEST_DATA_LEN   8192 Maximum length of a media key request.
MAX_DEFAULT_URL_LEN   2048 Maximum length of a URL.
MAX_STATISTICS_COUNT   10 Maximum number of statistical items.
MAX_STATISTICS_NAME_LEN   64 Maximum length of a statistical item name.
MAX_STATISTICS_BUFFER_LEN   256 Maximum length of a statistical item buffer.
MAX_OFFLINE_MEDIA_KEY_ID_COUNT   512 Maximum number of offline media key IDs.
MAX_OFFLINE_MEDIA_KEY_ID_LEN   64 Maximum length of an offline media key ID.
MAX_KEY_INFO_COUNT   64 Maximum number of pieces of media key information.
MAX_KEY_ID_LEN   16 Maximum length of a media key ID.
MAX_KEY_STATUS_VALUE_LEN   128 Maximum length of a key status value.
MAX_MEDIA_KEY_STATUS_COUNT   64 Maximum number of media key statuses.
MAX_MEDIA_KEY_STATUS_NAME_LEN   64 Maximum length of a media key status name.
MAX_MEDIA_KEY_STATUS_VALUE_LEN   256 Maximum length of a media key status value.
DRM_UUID_LEN   16 UUID length.
MAX_PSSH_DATA_LEN   2048 Maximum length of PSSH data.
MAX_PSSH_INFO_COUNT   8 Maximum number of pieces of PSSH information.
MAX_MEDIA_KEY_SYSTEM_NAME_LEN   128 Maximum length of a media key system name.
MAX_MEDIA_KEY_SYSTEM_NUM   8 Maximum number of supported media key systems.

Types

Name Description
typedef enum DRM_EventType DRM_EventType Defines an enum for the types of events that can be subscribed to.
typedef enum DRM_ContentProtectionLevel DRM_ContentProtectionLevel Defines an enum for the content protection levels.
typedef enum DRM_MediaKeyType DRM_MediaKeyType Defines an enum for the media key types.
typedef enum DRM_MediaKeyRequestType DRM_MediaKeyRequestType Defines an enum for the types of requests for media keys.
typedef enum DRM_OfflineMediaKeyStatus DRM_OfflineMediaKeyStatus Defines an enum for the statuses of offline media keys.
typedef enum DRM_CertificateStatus DRM_CertificateStatus Defines an enum for the certificate statuses.
typedef struct DRM_MediaKeyRequestInfo DRM_MediaKeyRequestInfo Defines a struct for the information about a media key request.
typedef struct DRM_MediaKeyRequest DRM_MediaKeyRequest Defines a struct for a media key request.
typedef struct DRM_Statistics DRM_Statistics Defines a struct for the statistics information about a media key system.
typedef struct DRM_OfflineMediakeyIdArray DRM_OfflineMediakeyIdArray Defines a struct for an array holding the IDs of offline media keys.
typedef struct DRM_KeysInfo DRM_KeysInfo Defines a struct for the information about media keys.
typedef struct DRM_MediaKeyStatus DRM_MediaKeyStatus Defines a struct for the media key status.
typedef struct DRM_PsshInfo DRM_PsshInfo Defines a struct for the Protection Scheme Specific Header (PSSH) information of the UUID.
typedef struct DRM_MediaKeySystemInfo DRM_MediaKeySystemInfo Defines a struct for the media key system information obtained from a media source.
typedef void(* DRM_MediaKeySystemInfoCallback) (DRM_MediaKeySystemInfo *mediaKeySystemInfo) Defines the callback used to obtain media key system information from a media source.
typedef struct MediaKeySystem MediaKeySystem Defines a struct for a media key system.
typedef struct MediaKeySession MediaKeySession Defines a struct for a media key session.

Enums

Name Description
DRM_EventType {
EVENT_DRM_BASE = 200,
EVENT_PROVISION_REQUIRED = 201,
EVENT_KEY_REQUIRED = 202,
EVENT_KEY_EXPIRED = 203,
EVENT_VENDOR_DEFINED = 204,
EVENT_EXPIRATION_UPDATE = 206
}
Enumerates the types of events that can be subscribed to.
DRM_ContentProtectionLevel {
CONTENT_PROTECTION_LEVEL_UNKNOWN = 0,
CONTENT_PROTECTION_LEVEL_SW_CRYPTO,
CONTENT_PROTECTION_LEVEL_HW_CRYPTO,
CONTENT_PROTECTION_LEVEL_ENHANCED_HW_CRYPTO,
CONTENT_PROTECTION_LEVEL_MAX
}
Enumerates the content protection levels.
DRM_MediaKeyType {
MEDIA_KEY_TYPE_OFFLINE = 0,
MEDIA_KEY_TYPE_ONLINE
}
Enumerates the media key types.
DRM_MediaKeyRequestType {
MEDIA_KEY_REQUEST_TYPE_UNKNOWN = 0,
MEDIA_KEY_REQUEST_TYPE_INITIAL,
MEDIA_KEY_REQUEST_TYPE_RENEWAL,
MEDIA_KEY_REQUEST_TYPE_RELEASE,
MEDIA_KEY_REQUEST_TYPE_NONE,
MEDIA_KEY_REQUEST_TYPE_UPDATE
}
Enumerates the types of requests for media keys.
DRM_OfflineMediaKeyStatus {
OFFLINE_MEDIA_KEY_STATUS_UNKNOWN = 0,
OFFLINE_MEDIA_KEY_STATUS_USABLE,
OFFLINE_MEDIA_KEY_STATUS_INACTIVE }
Enumerates the statuses of offline media keys.
DRM_CertificateStatus {
CERT_STATUS_PROVISIONED = 0,
CERT_STATUS_NOT_PROVISIONED,
CERT_STATUS_EXPIRED,
CERT_STATUS_INVALID,
CERT_STATUS_UNAVAILABLE
}
Enumerates the certificate statuses.