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