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 /** | 6 /** |
7 * This file defines the <code>PPP_ContentDecryptor_Private</code> | 7 * This file defines the <code>PPP_ContentDecryptor_Private</code> |
8 * interface. Note: This is a special interface, only to be used for Content | 8 * interface. Note: This is a special interface, only to be used for Content |
9 * Decryption Modules, not normal plugins. | 9 * Decryption Modules, not normal plugins. |
10 */ | 10 */ |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 * must call call <code>KeyAdded()</code> on the | 52 * must call call <code>KeyAdded()</code> on the |
53 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser | 53 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser |
54 * must notify the web application. | 54 * must notify the web application. |
55 * | 55 * |
56 * @param[in] session_id A <code>PP_Var</code> of type | 56 * @param[in] session_id A <code>PP_Var</code> of type |
57 * <code>PP_VARTYPE_STRING</code> containing the session ID. | 57 * <code>PP_VARTYPE_STRING</code> containing the session ID. |
58 * | 58 * |
59 * @param[in] key A <code>PP_Var</code> of type | 59 * @param[in] key A <code>PP_Var</code> of type |
60 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the decryption key, license, | 60 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the decryption key, license, |
61 * or other message for the given session ID. | 61 * or other message for the given session ID. |
| 62 * |
| 63 * @param[in] init_data A <code>PP_Var</code> of type |
| 64 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific |
| 65 * initialization data. |
62 */ | 66 */ |
63 PP_Bool AddKey( | 67 PP_Bool AddKey( |
64 [in] PP_Instance instance, | 68 [in] PP_Instance instance, |
65 [in] PP_Var session_id, | 69 [in] PP_Var session_id, |
66 [in] PP_Var key); | 70 [in] PP_Var key, |
| 71 [in] PP_Var init_data); |
67 | 72 |
68 /** | 73 /** |
69 * Cancels a pending key request for the specified session ID. | 74 * Cancels a pending key request for the specified session ID. |
70 * | 75 * |
71 * @param[in] session_id A <code>PP_Var</code> of type | 76 * @param[in] session_id A <code>PP_Var</code> of type |
72 * <code>PP_VARTYPE_STRING</code> containing the session ID. | 77 * <code>PP_VARTYPE_STRING</code> containing the session ID. |
73 */ | 78 */ |
74 PP_Bool CancelKeyRequest( | 79 PP_Bool CancelKeyRequest( |
75 [in] PP_Instance instance, | 80 [in] PP_Instance instance, |
76 [in] PP_Var session_id); | 81 [in] PP_Var session_id); |
77 | 82 |
78 /** | 83 /** |
79 * Decrypts the block and returns the unencrypted block via | 84 * Decrypts the block and returns the unencrypted block via |
80 * <code>DeliverBlock()</code> on the | 85 * <code>DeliverBlock()</code> on the |
81 * <code>PPB_ContentDecryptor_Private</code> interface. The returned block | 86 * <code>PPB_ContentDecryptor_Private</code> interface. The returned block |
82 * contains encoded data. | 87 * contains encoded data. |
83 * | 88 * |
84 * @param[in] resource A <code>PP_Resource</code> corresponding to a | 89 * @param[in] resource A <code>PP_Resource</code> corresponding to a |
85 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data | 90 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data |
86 * block. | 91 * block. |
87 * | 92 * |
88 * @param[in] request_id A value used by the browser to associate data | 93 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that |
89 * returned via the <code>PPB_ContentDecryptor_Private</code> interface with | 94 * contains all auxiliary information needed for decryption of the |
90 * decryption method calls. | 95 * <code>encrypted_block</code>. |
91 */ | 96 */ |
92 PP_Bool Decrypt( | 97 PP_Bool Decrypt( |
93 [in] PP_Instance instance, | 98 [in] PP_Instance instance, |
94 [in] PP_Resource encrypted_block, | 99 [in] PP_Resource encrypted_block, |
95 [in] int32_t request_id); | 100 [in] PP_EncryptedBlockInfo encrypted_block_info); |
96 | 101 |
97 /** | 102 /** |
98 * Decrypts the block, decodes it, and returns the unencrypted uncompressed | 103 * Decrypts the block, decodes it, and returns the unencrypted uncompressed |
99 * (decoded) media to the browser via the | 104 * (decoded) media to the browser via the |
100 * <code>PPB_ContentDecryptor_Private</code> interface. | 105 * <code>PPB_ContentDecryptor_Private</code> interface. |
101 * | 106 * |
102 * Decrypted and decoded video frames are sent to <code>DeliverFrame()</code>, | 107 * Decrypted and decoded video frames are sent to <code>DeliverFrame()</code>, |
103 * and decrypted and decoded audio samples are sent to | 108 * and decrypted and decoded audio samples are sent to |
104 * <code>DeliverSamples()</code>. | 109 * <code>DeliverSamples()</code>. |
105 * | 110 * |
106 * @param[in] resource A <code>PP_Resource</code> corresponding to a | 111 * @param[in] resource A <code>PP_Resource</code> corresponding to a |
107 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data | 112 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data |
108 * block. | 113 * block. |
109 * | 114 * |
110 * @param[in] request_id A value used by the browser to associate data | 115 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that |
111 * returned via the <code>PPB_ContentDecryptor_Private</code> interface with | 116 * contains all auxiliary information needed for decryption of the |
112 * decryption method calls. | 117 * <code>encrypted_block</code>. |
113 */ | 118 */ |
114 PP_Bool DecryptAndDecode( | 119 PP_Bool DecryptAndDecode( |
115 [in] PP_Instance instance, | 120 [in] PP_Instance instance, |
116 [in] PP_Resource encrypted_block, | 121 [in] PP_Resource encrypted_block, |
117 [in] int32_t request_id); | 122 [in] PP_EncryptedBlockInfo encrypted_block_info); |
118 }; | 123 }; |
OLD | NEW |