OLD | NEW |
(Empty) | |
| 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 |
| 3 * found in the LICENSE file. |
| 4 */ |
| 5 |
| 6 /* From dev/ppp_content_decryption_module_dev.idl, |
| 7 * modified Wed Jun 06 16:39:26 2012. |
| 8 */ |
| 9 |
| 10 #ifndef PPAPI_C_DEV_PPP_CONTENT_DECRYPTION_MODULE_DEV_H_ |
| 11 #define PPAPI_C_DEV_PPP_CONTENT_DECRYPTION_MODULE_DEV_H_ |
| 12 |
| 13 #include "ppapi/c/pp_bool.h" |
| 14 #include "ppapi/c/pp_completion_callback.h" |
| 15 #include "ppapi/c/pp_instance.h" |
| 16 #include "ppapi/c/pp_macros.h" |
| 17 #include "ppapi/c/pp_resource.h" |
| 18 #include "ppapi/c/pp_stdint.h" |
| 19 |
| 20 #define PPP_CONTENTDECRYPTIONMODULE_DEV_INTERFACE_0_1 \ |
| 21 "PPP_ContentDecryptionModule(Dev);0.1" |
| 22 #define PPP_CONTENTDECRYPTIONMODULE_DEV_INTERFACE \ |
| 23 PPP_CONTENTDECRYPTIONMODULE_DEV_INTERFACE_0_1 |
| 24 |
| 25 /** |
| 26 * @file |
| 27 * This file defines the <code>PPP_ContentDecryptionModule_Dev</code> |
| 28 * interface. |
| 29 */ |
| 30 |
| 31 /** |
| 32 * @addtogroup Interfaces |
| 33 * @{ |
| 34 */ |
| 35 |
| 36 /** |
| 37 * <code>PPP_ContentDecryptionModule_Dev</code> structure contains the function |
| 38 * pointers the decryption plugin MUST implement to provide services needed by |
| 39 * the media stack. |
| 40 */ |
| 41 struct PPP_ContentDecryptionModule_Dev_0_1 { |
| 42 /** |
| 43 * Provides a key or license to use for decryption. The key determines |
| 44 * which methods are allowed by the plugin. |
| 45 */ |
| 46 PP_Bool (*AddKey)(PP_Instance instance, PP_Resource key); |
| 47 |
| 48 /** |
| 49 * Decrypts the block and returns the unencrypted block. |
| 50 * In the case of media, the block contains encoded data. |
| 51 * decryptedBlock is valid only after the callback is notified of success. |
| 52 */ |
| 53 PP_Bool (*Decrypt)(PP_Instance instance, |
| 54 PP_Resource encrypted_block, |
| 55 PP_Resource decrypted_block, |
| 56 struct PP_CompletionCallback callback); |
| 57 |
| 58 /** |
| 59 * Decrypts the block then decodes it and returns the raw (decoded) |
| 60 * unencrypted frame. |
| 61 * decodedFrame is valid only after the callback is notified of success. |
| 62 */ |
| 63 PP_Bool (*DecryptAndDecode)(PP_Instance instance, |
| 64 PP_Resource encrypted_block, |
| 65 PP_Resource decoded_frame, |
| 66 struct PP_CompletionCallback callback); |
| 67 }; |
| 68 |
| 69 typedef struct PPP_ContentDecryptionModule_Dev_0_1 |
| 70 PPP_ContentDecryptionModule_Dev; |
| 71 |
| 72 /** |
| 73 * @} |
| 74 */ |
| 75 |
| 76 #endif /* PPAPI_C_DEV_PPP_CONTENT_DECRYPTION_MODULE_DEV_H_ */ |
| 77 |
OLD | NEW |