| Index: media/mojo/interfaces/content_decryption_module.mojom
|
| diff --git a/media/mojo/interfaces/content_decryption_module.mojom b/media/mojo/interfaces/content_decryption_module.mojom
|
| index fc98ff90f1cc4fa8ca3042b4b0b982a922869a0f..52c8da5c8c033907848f98a1336b4fcdd322d0a8 100644
|
| --- a/media/mojo/interfaces/content_decryption_module.mojom
|
| +++ b/media/mojo/interfaces/content_decryption_module.mojom
|
| @@ -7,30 +7,9 @@ module media.mojom;
|
| import "media/mojo/interfaces/decryptor.mojom";
|
| import "url/mojo/url.mojom";
|
|
|
| -// Transport layer of media::MediaKeys::Exception (see media/base/media_keys.h).
|
| -// This is used for ContentDecryptionModule (CDM) promise rejections.
|
| -enum CdmException {
|
| - NOT_SUPPORTED_ERROR,
|
| - INVALID_STATE_ERROR,
|
| - INVALID_ACCESS_ERROR,
|
| - QUOTA_EXCEEDED_ERROR,
|
| - UNKNOWN_ERROR,
|
| - CLIENT_ERROR,
|
| - OUTPUT_ERROR
|
| -};
|
| -
|
| -// Transport layer of media::CdmKeyInformation::KeyStatus (see
|
| -// media/base/cdm_key_information.h). This is used for indicating the status
|
| -// of a specific key ID.
|
| -enum CdmKeyStatus {
|
| - USABLE,
|
| - INTERNAL_ERROR,
|
| - EXPIRED,
|
| - OUTPUT_RESTRICTED,
|
| - OUTPUT_DOWNSCALED,
|
| - KEY_STATUS_PENDING,
|
| - RELEASED
|
| -};
|
| +// See media::EmeInitDataType.
|
| +[Native]
|
| +enum EmeInitDataType;
|
|
|
| // Transport layer of media::CdmConfig (see media/base/cdm_config.h).
|
| struct CdmConfig {
|
| @@ -45,8 +24,12 @@ struct CdmConfig {
|
| // - When |success| is false, the promise is rejected with |exception|,
|
| // |system_code| and |error_message|.
|
| struct CdmPromiseResult {
|
| + // See media::MediaKeys::Exception
|
| + [Native]
|
| + enum Exception;
|
| +
|
| bool success;
|
| - CdmException exception;
|
| + Exception exception;
|
| uint32 system_code;
|
| string error_message;
|
| };
|
| @@ -55,35 +38,20 @@ struct CdmPromiseResult {
|
| // media/base/cdm_key_information.h). It is used to specify a key_id and it's
|
| // associated status.
|
| struct CdmKeyInformation {
|
| + [Native]
|
| + enum KeyStatus;
|
| +
|
| array<uint8> key_id;
|
| - CdmKeyStatus status;
|
| + KeyStatus status;
|
| uint32 system_code;
|
| };
|
|
|
| -// See media::MediaKeys::MessageType
|
| -enum CdmMessageType {
|
| - LICENSE_REQUEST,
|
| - LICENSE_RENEWAL,
|
| - LICENSE_RELEASE
|
| -};
|
| -
|
| // An interface that represents a CDM in the Encrypted Media Extensions (EME)
|
| // spec (https://w3c.github.io/encrypted-media/). See media/base/media_keys.h.
|
| interface ContentDecryptionModule {
|
| - // See media::MediaKeys::SessionType.
|
| - enum SessionType {
|
| - TEMPORARY_SESSION,
|
| - PERSISTENT_LICENSE_SESSION,
|
| - PERSISTENT_RELEASE_MESSAGE_SESSION
|
| - };
|
| -
|
| - // See media::EmeInitDataType.
|
| - enum InitDataType {
|
| - UNKNOWN,
|
| - WEBM,
|
| - CENC,
|
| - KEYIDS
|
| - };
|
| + // See media::MediaKeys::SessionType
|
| + [Native]
|
| + enum SessionType;
|
|
|
| // Sets ContentDecryptionModuleClient. Must be called before any other calls.
|
| SetClient(ContentDecryptionModuleClient client);
|
| @@ -105,7 +73,7 @@ interface ContentDecryptionModule {
|
| // provided. If |result.success| is false, the output |session_id| will be
|
| // empty.
|
| CreateSessionAndGenerateRequest(SessionType session_type,
|
| - InitDataType init_data_type,
|
| + EmeInitDataType init_data_type,
|
| array<uint8> init_data)
|
| => (CdmPromiseResult result, string session_id);
|
|
|
| @@ -132,7 +100,11 @@ interface ContentDecryptionModule {
|
|
|
| // Session callbacks. See media/base/media_keys.h for details.
|
| interface ContentDecryptionModuleClient {
|
| - OnSessionMessage(string session_id, CdmMessageType message_type,
|
| + // See media::MediaKeys::MessageType
|
| + [Native]
|
| + enum MessageType;
|
| +
|
| + OnSessionMessage(string session_id, MessageType message_type,
|
| array<uint8> message);
|
|
|
| OnSessionClosed(string session_id);
|
|
|