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 private/ppp_content_decryptor_private.idl, | 6 /* From private/ppp_content_decryptor_private.idl, |
7 * modified Mon Oct 01 20:27:29 2012. | 7 * modified Tue Oct 9 18:51:23 2012. |
8 */ | 8 */ |
9 | 9 |
10 #ifndef PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ | 10 #ifndef PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ |
11 #define PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ | 11 #define PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ |
12 | 12 |
13 #include "ppapi/c/pp_bool.h" | 13 #include "ppapi/c/pp_bool.h" |
14 #include "ppapi/c/pp_instance.h" | 14 #include "ppapi/c/pp_instance.h" |
15 #include "ppapi/c/pp_macros.h" | 15 #include "ppapi/c/pp_macros.h" |
16 #include "ppapi/c/pp_resource.h" | 16 #include "ppapi/c/pp_resource.h" |
17 #include "ppapi/c/pp_stdint.h" | 17 #include "ppapi/c/pp_stdint.h" |
18 #include "ppapi/c/pp_var.h" | 18 #include "ppapi/c/pp_var.h" |
19 #include "ppapi/c/private/pp_content_decryptor.h" | 19 #include "ppapi/c/private/pp_content_decryptor.h" |
20 | 20 |
21 #define PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_2 \ | 21 #define PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_3 \ |
22 "PPP_ContentDecryptor_Private;0.2" | 22 "PPP_ContentDecryptor_Private;0.3" |
23 #define PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE \ | 23 #define PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE \ |
24 PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_2 | 24 PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_3 |
25 | 25 |
26 /** | 26 /** |
27 * @file | 27 * @file |
28 * This file defines the <code>PPP_ContentDecryptor_Private</code> | 28 * This file defines the <code>PPP_ContentDecryptor_Private</code> |
29 * interface. Note: This is a special interface, only to be used for Content | 29 * interface. Note: This is a special interface, only to be used for Content |
30 * Decryption Modules, not normal plugins. | 30 * Decryption Modules, not normal plugins. |
31 */ | 31 */ |
32 | 32 |
33 | 33 |
34 /** | 34 /** |
35 * @addtogroup Interfaces | 35 * @addtogroup Interfaces |
36 * @{ | 36 * @{ |
37 */ | 37 */ |
38 /** | 38 /** |
39 * <code>PPP_ContentDecryptor_Private</code> structure contains the function | 39 * <code>PPP_ContentDecryptor_Private</code> structure contains the function |
40 * pointers the decryption plugin must implement to provide services needed by | 40 * pointers the decryption plugin must implement to provide services needed by |
41 * the browser. This interface provides the plugin side support for the Content | 41 * the browser. This interface provides the plugin side support for the Content |
42 * Decryption Module (CDM) for v0.1 of the proposed Encrypted Media Extensions: | 42 * Decryption Module (CDM) for v0.1 of the proposed Encrypted Media Extensions: |
43 * http://goo.gl/rbdnR | 43 * http://goo.gl/rbdnR |
44 */ | 44 */ |
45 struct PPP_ContentDecryptor_Private_0_2 { | 45 struct PPP_ContentDecryptor_Private_0_3 { |
46 /** | 46 /** |
47 * Generates a key request. key_system specifies the key or licensing system | 47 * Generates a key request. key_system specifies the key or licensing system |
48 * to use. init_data is a data buffer containing data for use in generating | 48 * to use. init_data is a data buffer containing data for use in generating |
49 * the request. | 49 * the request. |
50 * | 50 * |
51 * Note: <code>GenerateKeyRequest()</code> must create the session ID used in | 51 * Note: <code>GenerateKeyRequest()</code> must create the session ID used in |
52 * other methods on this interface. The session ID must be provided to the | 52 * other methods on this interface. The session ID must be provided to the |
53 * browser by the CDM via <code>KeyMessage()</code> on the | 53 * browser by the CDM via <code>KeyMessage()</code> on the |
54 * <code>PPB_ContentDecryptor_Private</code> interface. | 54 * <code>PPB_ContentDecryptor_Private</code> interface. |
55 * | 55 * |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 * block. | 107 * block. |
108 * | 108 * |
109 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that | 109 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that |
110 * contains all auxiliary information needed for decryption of the | 110 * contains all auxiliary information needed for decryption of the |
111 * <code>encrypted_block</code>. | 111 * <code>encrypted_block</code>. |
112 */ | 112 */ |
113 void (*Decrypt)(PP_Instance instance, | 113 void (*Decrypt)(PP_Instance instance, |
114 PP_Resource encrypted_block, | 114 PP_Resource encrypted_block, |
115 const struct PP_EncryptedBlockInfo* encrypted_block_info); | 115 const struct PP_EncryptedBlockInfo* encrypted_block_info); |
116 /** | 116 /** |
| 117 * De-initializes the decoder for the <code>PP_StreamType</code> specified |
| 118 * by <code>decoder_type</code>. De-initialization completion is reported to |
| 119 * the browser using the <code>DecoderDeinitializeDone()</code> method on |
| 120 * the <code>PPB_ContentDecryptor_Private</code> interface. |
| 121 * |
| 122 * @param[in] decoder_type A <code>PP_StreamType</code> that specifies the |
| 123 * decoder to de-initialize. |
| 124 * |
| 125 * @param[in] request_id A request ID that allows the browser to associate a |
| 126 * request to de-initialize a decoder with the corresponding call to the |
| 127 * <code>DecoderDeinitializeDone()</code> method on the |
| 128 * <code>PPB_ContentDecryptor_Private</code> interface. |
| 129 */ |
| 130 void (*DeinitializeDecoder)(PP_Instance instance, |
| 131 PP_StreamType decoder_type, |
| 132 uint32_t request_id); |
| 133 /** |
| 134 * Resets the decoder for the <code>PP_StreamType</code> specified |
| 135 * by <code>decoder_type</code>. Reset completion is reported to the browser |
| 136 * using the <code>DecoderResetDone()</code> method on the |
| 137 * <code>PPB_ContentDecryptor_Private</code> interface. |
| 138 * |
| 139 * @param[in] decoder_type A <code>PP_StreamType</code> that specifies the |
| 140 * decoder to reset. |
| 141 * |
| 142 * @param[in] request_id A request ID that allows the browser to associate a |
| 143 * request to reset the decoder with a corresponding call to the |
| 144 * <code>DecoderResetDone()</code> method on the |
| 145 * <code>PPB_ContentDecryptor_Private</code> interface. |
| 146 */ |
| 147 void (*ResetDecoder)(PP_Instance instance, |
| 148 PP_StreamType decoder_type, |
| 149 uint32_t request_id); |
| 150 /** |
117 * Decrypts encrypted_video_frame, decodes it, and returns the unencrypted | 151 * Decrypts encrypted_video_frame, decodes it, and returns the unencrypted |
118 * uncompressed (decoded) video frame to the browser via the | 152 * uncompressed (decoded) video frame to the browser via the |
119 * <code>DeliverFrame()</code> method on the | 153 * <code>DeliverFrame()</code> method on the |
120 * <code>PPB_ContentDecryptor_Private</code> interface. | 154 * <code>PPB_ContentDecryptor_Private</code> interface. |
121 * | 155 * |
122 * @param[in] encrypted_video_frame A <code>PP_Resource</code> corresponding | 156 * @param[in] encrypted_video_frame A <code>PP_Resource</code> corresponding |
123 * to a <code>PPB_Buffer_Dev</code> resource that contains an encrypted video | 157 * to a <code>PPB_Buffer_Dev</code> resource that contains an encrypted video |
124 * frame. | 158 * frame. |
125 * | 159 * |
126 * @param[in] encrypted_video_frame_info A | 160 * @param[in] encrypted_video_frame_info A |
127 * <code>PP_EncryptedVideoFrameInfo</code> that contains all information | 161 * <code>PP_EncryptedVideoFrameInfo</code> that contains all information |
128 * needed to decrypt and decode <code>encrypted_video_frame</code>. | 162 * needed to decrypt and decode <code>encrypted_video_frame</code>. |
129 */ | 163 */ |
130 void (*DecryptAndDecodeFrame)( | 164 void (*DecryptAndDecodeFrame)( |
131 PP_Instance instance, | 165 PP_Instance instance, |
132 PP_Resource encrypted_video_frame, | 166 PP_Resource encrypted_video_frame, |
133 const struct PP_EncryptedVideoFrameInfo* encrypted_video_frame_info); | 167 const struct PP_EncryptedVideoFrameInfo* encrypted_video_frame_info); |
134 }; | 168 }; |
135 | 169 |
136 typedef struct PPP_ContentDecryptor_Private_0_2 PPP_ContentDecryptor_Private; | 170 typedef struct PPP_ContentDecryptor_Private_0_3 PPP_ContentDecryptor_Private; |
137 /** | 171 /** |
138 * @} | 172 * @} |
139 */ | 173 */ |
140 | 174 |
141 #endif /* PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ */ | 175 #endif /* PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ */ |
142 | 176 |
OLD | NEW |