harmony 鸿蒙native_drm_common.h

2025-06-12 浏览 (1)

native_drm_common.h

Overview

The native_drm_common.h file declares the DRM data types.

Library: libnative_drm.so

File to include: <multimedia/drm_framework/native_drm_common.h>

System capability: SystemCapability.Multimedia.Drm.Core

Since: 11

Related module: Drm

Summary

Structs

NameDescription
struct DRM_MediaKeyRequestInfoDescribes the information about a media key request.
struct DRM_MediaKeyRequestDescribes a media key request.
struct DRM_StatisticsDescribes the statistical information of a media key system.
struct DRM_OfflineMediakeyIdArrayDescribes an array holding the IDs of offline media keys.
struct DRM_KeysInfoDescribes the information about media keys.
struct DRM_MediaKeyStatusDescribes the media key status.
struct DRM_PsshInfoDescribes the Protection System Specific Header (PSSH) data in DRM information.
struct DRM_MediaKeySystemInfoDescribes the DRM information, which is used to encrypt content.
struct DRM_MediaKeySystemDescriptionDescribes the DRM solution name and UUID list.

Macros

NameDescription
MAX_MEDIA_KEY_REQUEST_OPTION_COUNT   16Maximum number of optional data items in a media key request.
MAX_MEDIA_KEY_REQUEST_OPTION_NAME_LEN   64Maximum length of an optional data name in a media key request.
MAX_MEDIA_KEY_REQUEST_OPTION_DATA_LEN   128Maximum length of optional data in a media key request.
MAX_INIT_DATA_LEN   2048Maximum length of data in an initial request.
MAX_MIMETYPE_LEN   64Maximum length of a MIME type.
MAX_MEDIA_KEY_REQUEST_DATA_LEN   8192Maximum length of data in a media key request.
MAX_DEFAULT_URL_LEN   2048Maximum length of a URL.
MAX_STATISTICS_COUNT   10Maximum number of statistical items.
MAX_STATISTICS_NAME_LEN   64Maximum length of a statistical item name.
MAX_STATISTICS_BUFFER_LEN   256Maximum length of a statistical item buffer.
MAX_OFFLINE_MEDIA_KEY_ID_COUNT   512Maximum number of offline media key IDs.
MAX_OFFLINE_MEDIA_KEY_ID_LEN   64Maximum length of an offline media key ID.
MAX_KEY_INFO_COUNT   64Maximum number of pieces of media key information.
MAX_KEY_ID_LEN   16Maximum length of a media key ID.
MAX_KEY_STATUS_VALUE_LEN   128Maximum length of a key status value.
MAX_MEDIA_KEY_STATUS_COUNT   64Maximum number of media key statuses.
MAX_MEDIA_KEY_STATUS_NAME_LEN   64Maximum length of a media key status name.
MAX_MEDIA_KEY_STATUS_VALUE_LEN   256Maximum length of a media key status value.
DRM_UUID_LEN   16Length of the UUID of a DRM solution.
MAX_PSSH_DATA_LEN   2048Maximum length of PSSH data.
MAX_PSSH_INFO_COUNT   8Maximum number of pieces of PSSH data.
MAX_MEDIA_KEY_SYSTEM_NAME_LEN   128Maximum length of a MediaKeySystem instance name.
MAX_MEDIA_KEY_SYSTEM_NUM   8Maximum number of MediaKeySystem instances.

Types

NameDescription
typedef enum DRM_EventType DRM_EventTypeDefines an enum for the types of events that can be subscribed to.
typedef enum DRM_ContentProtectionLevel DRM_ContentProtectionLevelDefines an enum for the content protection levels.
typedef enum DRM_MediaKeyType DRM_MediaKeyTypeDefines an enum for the types of media keys.
typedef enum DRM_MediaKeyRequestType DRM_MediaKeyRequestTypeDefines an enum for the types of media key requests.
typedef enum DRM_OfflineMediaKeyStatus DRM_OfflineMediaKeyStatusDefines an enum for the statuses of offline media keys.
typedef enum DRM_CertificateStatus DRM_CertificateStatusDefines an enum for the DRM certificate statuses.
typedef struct DRM_MediaKeyRequestInfo DRM_MediaKeyRequestInfoDefines a struct for the information about a media key request.
typedef struct DRM_MediaKeyRequest DRM_MediaKeyRequestDefines a struct for a media key request.
typedef struct DRM_Statistics DRM_StatisticsDefines a struct for the statistical information of a media key system.
typedef struct DRM_OfflineMediakeyIdArray DRM_OfflineMediakeyIdArrayDefines a struct for the array holding the IDs of offline media keys.
typedef struct DRM_KeysInfo DRM_KeysInfoDefines a struct for the information about media keys.
typedef struct DRM_MediaKeyStatus DRM_MediaKeyStatusDefines a struct for the media key status.
typedef struct DRM_PsshInfo DRM_PsshInfoDefines a struct for PSSH data in DRM information.
typedef struct DRM_MediaKeySystemInfo DRM_MediaKeySystemInfoDefines a struct for the DRM information, which is used to encrypt content.
typedef struct DRM_MediaKeySystemDescription DRM_MediaKeySystemDescriptionDefines a struct for the DRM solution name and UUID list.
typedef void(* DRM_MediaKeySystemInfoCallback) (DRM_MediaKeySystemInfo *mediaKeySystemInfo)Defines a callback for media key system information.
typedef struct MediaKeySystem MediaKeySystemDefines a struct for a media key system.
typedef struct MediaKeySession MediaKeySessionDefines a struct for a media key session.

Enums

NameDescription
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 event types.
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 types of media keys.
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 media key requests.
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 DRM certificate statuses.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙DRM Kit

harmony 鸿蒙DRM_KeysInfo

harmony 鸿蒙DRM_MediaKeyRequest

harmony 鸿蒙DRM_MediaKeyRequestInfo

harmony 鸿蒙DRM_MediaKeyStatus

harmony 鸿蒙DRM_MediaKeySystemDescription

harmony 鸿蒙DRM_MediaKeySystemInfo

harmony 鸿蒙DRM_OfflineMediakeyIdArray

harmony 鸿蒙DRM_PsshInfo

harmony 鸿蒙DRM_Statistics

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/MlRZk1