Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Side by Side Diff: ppapi/api/private/ppp_content_decryptor_private.idl

Issue 10876014: Hook up CDM calls in CdmWrapper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resolve comments and Rebase. Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ppapi/c/private/ppp_content_decryptor_private.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 18 matching lines...) Expand all
29 * other methods on this interface. The session ID must be provided to the 29 * other methods on this interface. The session ID must be provided to the
30 * browser by the CDM via <code>KeyMessage()</code> on the 30 * browser by the CDM via <code>KeyMessage()</code> on the
31 * <code>PPB_ContentDecryptor_Private</code> interface. 31 * <code>PPB_ContentDecryptor_Private</code> interface.
32 * 32 *
33 * @param[in] key_system A <code>PP_Var</code> of type 33 * @param[in] key_system A <code>PP_Var</code> of type
34 * <code>PP_VARTYPE_STRING</code> containing the name of the key system. 34 * <code>PP_VARTYPE_STRING</code> containing the name of the key system.
35 * 35 *
36 * @param[in] init_data A <code>PP_Var</code> of type 36 * @param[in] init_data A <code>PP_Var</code> of type
37 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific 37 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific
38 * initialization data. 38 * initialization data.
39 *
40 * @return <code>PP_TRUE</code> if this call was forwarded to the CDM
41 * successfully, <code>PP_FALSE</code> otherwise. Once the call reaches the
42 * CDM, the call result/status should be reported through the
43 * <code>PPB_ContentDecryptor_Private</code> interface.
39 */ 44 */
40 PP_Bool GenerateKeyRequest( 45 PP_Bool GenerateKeyRequest(
41 [in] PP_Instance instance, 46 [in] PP_Instance instance,
42 [in] PP_Var key_system, 47 [in] PP_Var key_system,
43 [in] PP_Var init_data); 48 [in] PP_Var init_data);
44 49
45 /** 50 /**
46 * Provides a key or license to the decryptor for decrypting media data. 51 * Provides a key or license to the decryptor for decrypting media data.
47 * 52 *
48 * When the CDM needs more information to complete addition of the key it 53 * When the CDM needs more information to complete addition of the key it
49 * will call <code>KeyMessage()</code> on the 54 * will call <code>KeyMessage()</code> on the
50 * <code>PPB_ContentDecryptor_Private</code> interface, which the browser 55 * <code>PPB_ContentDecryptor_Private</code> interface, which the browser
51 * passes to the application. When the key is ready to use, the CDM 56 * passes to the application. When the key is ready to use, the CDM
52 * must call call <code>KeyAdded()</code> on the 57 * must call call <code>KeyAdded()</code> on the
53 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser 58 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser
54 * must notify the web application. 59 * must notify the web application.
55 * 60 *
56 * @param[in] session_id A <code>PP_Var</code> of type 61 * @param[in] session_id A <code>PP_Var</code> of type
57 * <code>PP_VARTYPE_STRING</code> containing the session ID. 62 * <code>PP_VARTYPE_STRING</code> containing the session ID.
58 * 63 *
59 * @param[in] key A <code>PP_Var</code> of type 64 * @param[in] key A <code>PP_Var</code> of type
60 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the decryption key, license, 65 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the decryption key, license,
61 * or other message for the given session ID. 66 * or other message for the given session ID.
62 * 67 *
63 * @param[in] init_data A <code>PP_Var</code> of type 68 * @param[in] init_data A <code>PP_Var</code> of type
64 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific 69 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific
65 * initialization data. 70 * initialization data.
71 *
72 * @return <code>PP_TRUE</code> if this call was forwarded to the CDM
73 * successfully, <code>PP_FALSE</code> otherwise. Once the call reaches the
74 * CDM, the call result/status should be reported through the
75 * <code>PPB_ContentDecryptor_Private</code> interface.
66 */ 76 */
67 PP_Bool AddKey( 77 PP_Bool AddKey(
68 [in] PP_Instance instance, 78 [in] PP_Instance instance,
69 [in] PP_Var session_id, 79 [in] PP_Var session_id,
70 [in] PP_Var key, 80 [in] PP_Var key,
71 [in] PP_Var init_data); 81 [in] PP_Var init_data);
72 82
73 /** 83 /**
74 * Cancels a pending key request for the specified session ID. 84 * Cancels a pending key request for the specified session ID.
75 * 85 *
76 * @param[in] session_id A <code>PP_Var</code> of type 86 * @param[in] session_id A <code>PP_Var</code> of type
77 * <code>PP_VARTYPE_STRING</code> containing the session ID. 87 * <code>PP_VARTYPE_STRING</code> containing the session ID.
88 *
89 * @return <code>PP_TRUE</code> if this call was forwarded to the CDM
90 * successfully, <code>PP_FALSE</code> otherwise. Once the call reaches the
91 * CDM, the call result/status should be reported through the
92 * <code>PPB_ContentDecryptor_Private</code> interface.
78 */ 93 */
79 PP_Bool CancelKeyRequest( 94 PP_Bool CancelKeyRequest(
80 [in] PP_Instance instance, 95 [in] PP_Instance instance,
81 [in] PP_Var session_id); 96 [in] PP_Var session_id);
82 97
83 /** 98 /**
84 * Decrypts the block and returns the unencrypted block via 99 * Decrypts the block and returns the unencrypted block via
85 * <code>DeliverBlock()</code> on the 100 * <code>DeliverBlock()</code> on the
86 * <code>PPB_ContentDecryptor_Private</code> interface. The returned block 101 * <code>PPB_ContentDecryptor_Private</code> interface. The returned block
87 * contains encoded data. 102 * contains encoded data.
88 * 103 *
89 * @param[in] resource A <code>PP_Resource</code> corresponding to a 104 * @param[in] resource A <code>PP_Resource</code> corresponding to a
90 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data 105 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data
91 * block. 106 * block.
92 * 107 *
93 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that 108 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that
94 * contains all auxiliary information needed for decryption of the 109 * contains all auxiliary information needed for decryption of the
95 * <code>encrypted_block</code>. 110 * <code>encrypted_block</code>.
111 *
112 * @return <code>PP_TRUE</code> if this call was forwarded to the CDM
113 * successfully, <code>PP_FALSE</code> otherwise. Once the call reaches the
114 * CDM, the call result/status should be reported through the
115 * <code>PPB_ContentDecryptor_Private</code> interface.
96 */ 116 */
97 PP_Bool Decrypt( 117 PP_Bool Decrypt(
98 [in] PP_Instance instance, 118 [in] PP_Instance instance,
99 [in] PP_Resource encrypted_block, 119 [in] PP_Resource encrypted_block,
100 [in] PP_EncryptedBlockInfo encrypted_block_info); 120 [in] PP_EncryptedBlockInfo encrypted_block_info);
101 121
102 /** 122 /**
103 * Decrypts the block, decodes it, and returns the unencrypted uncompressed 123 * Decrypts the block, decodes it, and returns the unencrypted uncompressed
104 * (decoded) media to the browser via the 124 * (decoded) media to the browser via the
105 * <code>PPB_ContentDecryptor_Private</code> interface. 125 * <code>PPB_ContentDecryptor_Private</code> interface.
106 * 126 *
107 * Decrypted and decoded video frames are sent to <code>DeliverFrame()</code>, 127 * Decrypted and decoded video frames are sent to <code>DeliverFrame()</code>,
108 * and decrypted and decoded audio samples are sent to 128 * and decrypted and decoded audio samples are sent to
109 * <code>DeliverSamples()</code>. 129 * <code>DeliverSamples()</code>.
110 * 130 *
111 * @param[in] resource A <code>PP_Resource</code> corresponding to a 131 * @param[in] resource A <code>PP_Resource</code> corresponding to a
112 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data 132 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data
113 * block. 133 * block.
114 * 134 *
115 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that 135 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that
116 * contains all auxiliary information needed for decryption of the 136 * contains all auxiliary information needed for decryption of the
117 * <code>encrypted_block</code>. 137 * <code>encrypted_block</code>.
138 *
139 * @return <code>PP_TRUE</code> if this call was forwarded to the CDM
140 * successfully, <code>PP_FALSE</code> otherwise. Once the call reaches the
141 * CDM, the call result/status should be reported through the
142 * <code>PPB_ContentDecryptor_Private</code> interface.
118 */ 143 */
119 PP_Bool DecryptAndDecode( 144 PP_Bool DecryptAndDecode(
120 [in] PP_Instance instance, 145 [in] PP_Instance instance,
121 [in] PP_Resource encrypted_block, 146 [in] PP_Resource encrypted_block,
122 [in] PP_EncryptedBlockInfo encrypted_block_info); 147 [in] PP_EncryptedBlockInfo encrypted_block_info);
123 }; 148 };
OLDNEW
« no previous file with comments | « no previous file | ppapi/c/private/ppp_content_decryptor_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698