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_decryptor_dev.idl modified Mon Jul 16 17:58:10 2012. */ |
| 7 |
| 8 #ifndef PPAPI_C_DEV_PPP_CONTENT_DECRYPTOR_DEV_H_ |
| 9 #define PPAPI_C_DEV_PPP_CONTENT_DECRYPTOR_DEV_H_ |
| 10 |
| 11 #include "ppapi/c/pp_bool.h" |
| 12 #include "ppapi/c/pp_completion_callback.h" |
| 13 #include "ppapi/c/pp_instance.h" |
| 14 #include "ppapi/c/pp_macros.h" |
| 15 #include "ppapi/c/pp_resource.h" |
| 16 #include "ppapi/c/pp_stdint.h" |
| 17 #include "ppapi/c/pp_var.h" |
| 18 |
| 19 #define PPP_CONTENTDECRYPTOR_DEV_INTERFACE_0_1 "PPP_ContentDecryptor(Dev);0.1" |
| 20 #define PPP_CONTENTDECRYPTOR_DEV_INTERFACE \ |
| 21 PPP_CONTENTDECRYPTOR_DEV_INTERFACE_0_1 |
| 22 |
| 23 /** |
| 24 * @file |
| 25 * This file defines the <code>PPP_ContentDecryptor_Dev</code> |
| 26 * interface. |
| 27 */ |
| 28 |
| 29 /** |
| 30 * @addtogroup Interfaces |
| 31 * @{ |
| 32 */ |
| 33 |
| 34 /** |
| 35 * <code>PPP_ContentDecryptor_Dev</code> structure contains the function |
| 36 * pointers the decryption plugin MUST implement to provide services needed by |
| 37 * the media stack. |
| 38 */ |
| 39 struct PPP_ContentDecryptor_Dev_0_1 { |
| 40 /** |
| 41 * Generates a key request. key_system specifies the key or licensing system |
| 42 * from which to request the key when the plugin provides access to multiple |
| 43 * systems. init_data is a data buffer containing initialization data from |
| 44 * the media data that is required for use of the plugin's key system(s). |
| 45 */ |
| 46 PP_Bool (*GenerateKeyRequest)(PP_Instance instance, |
| 47 struct PP_Var key_system, /* String. */ |
| 48 PP_Resource init_data); /* PPB_Buffer. */ |
| 49 |
| 50 /** |
| 51 * Provides a key or license to use for decrypting media data for session_id. |
| 52 */ |
| 53 PP_Bool (*AddKey)(PP_Instance instance, |
| 54 struct PP_Var session_id, /* String. */ |
| 55 PP_Resource key); /* PPB_Buffer. */ |
| 56 |
| 57 /** |
| 58 * Cancels a key request for session_id. |
| 59 */ |
| 60 PP_Bool (*CancelKeyRequest)(PP_Instance instance, |
| 61 struct PP_Var session_id); /* String. */ |
| 62 |
| 63 /** |
| 64 * Decrypts the block and returns the unencrypted block. In the case of |
| 65 * media, the block contains encoded data. |
| 66 */ |
| 67 PP_Bool (*Decrypt)(PP_Instance instance, |
| 68 PP_Resource encrypted_block, /* PPB_Buffer. */ |
| 69 struct PP_CompletionCallback callback); |
| 70 |
| 71 /** |
| 72 * Decrypts the block then decodes it and returns the unencrypted raw |
| 73 * (decoded) frame. |
| 74 */ |
| 75 PP_Bool (*DecryptAndDecode)(PP_Instance instance, |
| 76 PP_Resource encrypted_block, /* PPB_Buffer. */ |
| 77 struct PP_CompletionCallback callback); |
| 78 }; |
| 79 |
| 80 typedef struct PPP_ContentDecryptor_Dev_0_1 PPP_ContentDecryptor_Dev; |
| 81 |
| 82 /** |
| 83 * @} |
| 84 */ |
| 85 |
| 86 #endif /* PPAPI_C_DEV_PPP_CONTENT_DECRYPTOR_DEV_H_ */ |
OLD | NEW |