OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CDM_CONTENT_DECRYPTION_MODULE_H_ | 5 #ifndef CDM_CONTENT_DECRYPTION_MODULE_H_ |
6 #define CDM_CONTENT_DECRYPTION_MODULE_H_ | 6 #define CDM_CONTENT_DECRYPTION_MODULE_H_ |
7 | 7 |
8 #if defined(_MSC_VER) | 8 #if defined(_MSC_VER) |
9 typedef unsigned char uint8_t; | 9 typedef unsigned char uint8_t; |
10 typedef unsigned int uint32_t; | 10 typedef unsigned int uint32_t; |
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 // |error| must be specified, |error_message| and |system_code| | 990 // |error| must be specified, |error_message| and |system_code| |
991 // are optional. |error_message_size| should not include null termination. | 991 // are optional. |error_message_size| should not include null termination. |
992 virtual void OnRejectPromise(uint32_t promise_id, | 992 virtual void OnRejectPromise(uint32_t promise_id, |
993 Error error, | 993 Error error, |
994 uint32_t system_code, | 994 uint32_t system_code, |
995 const char* error_message, | 995 const char* error_message, |
996 uint32_t error_message_size) = 0; | 996 uint32_t error_message_size) = 0; |
997 | 997 |
998 // Called by the CDM when it has a message for session |session_id|. | 998 // Called by the CDM when it has a message for session |session_id|. |
999 // Size parameters should not include null termination. | 999 // Size parameters should not include null termination. |
| 1000 // |legacy_destination_url| is only for supporting the prefixed EME API and |
| 1001 // is ignored by unprefixed EME. It should only be non-null if |message_type| |
| 1002 // is kLicenseRenewal. |
1000 virtual void OnSessionMessage(const char* session_id, | 1003 virtual void OnSessionMessage(const char* session_id, |
1001 uint32_t session_id_size, | 1004 uint32_t session_id_size, |
1002 MessageType message_type, | 1005 MessageType message_type, |
1003 const char* message, | 1006 const char* message, |
1004 uint32_t message_size) = 0; | 1007 uint32_t message_size, |
| 1008 const char* legacy_destination_url, |
| 1009 uint32_t legacy_destination_url_length) = 0; |
1005 | 1010 |
1006 // Called by the CDM when there has been a change in keys or their status for | 1011 // Called by the CDM when there has been a change in keys or their status for |
1007 // session |session_id|. |has_additional_usable_key| should be set if a | 1012 // session |session_id|. |has_additional_usable_key| should be set if a |
1008 // key is newly usable (e.g. new key available, previously expired key has | 1013 // key is newly usable (e.g. new key available, previously expired key has |
1009 // been renewed, etc.) and the browser should attempt to resume playback. | 1014 // been renewed, etc.) and the browser should attempt to resume playback. |
1010 // |key_ids| is the list of key ids for this session along with their | 1015 // |key_ids| is the list of key ids for this session along with their |
1011 // current status. |key_ids_count| is the number of entries in |key_ids|. | 1016 // current status. |key_ids_count| is the number of entries in |key_ids|. |
1012 // Size parameter for |session_id| should not include null termination. | 1017 // Size parameter for |session_id| should not include null termination. |
1013 virtual void OnSessionKeysChange(const char* session_id, | 1018 virtual void OnSessionKeysChange(const char* session_id, |
1014 uint32_t session_id_size, | 1019 uint32_t session_id_size, |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1156 virtual AudioFormat Format() const = 0; | 1161 virtual AudioFormat Format() const = 0; |
1157 | 1162 |
1158 protected: | 1163 protected: |
1159 AudioFrames() {} | 1164 AudioFrames() {} |
1160 virtual ~AudioFrames() {} | 1165 virtual ~AudioFrames() {} |
1161 }; | 1166 }; |
1162 | 1167 |
1163 } // namespace cdm | 1168 } // namespace cdm |
1164 | 1169 |
1165 #endif // CDM_CONTENT_DECRYPTION_MODULE_H_ | 1170 #endif // CDM_CONTENT_DECRYPTION_MODULE_H_ |
OLD | NEW |