Chromium Code Reviews| 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 /** | |
| 7 * This file defines the <code>PPP_ContentDecryptor_Private</code> | |
| 8 * interface. | |
| 9 */ | |
| 10 label Chrome { | |
| 11 M23 = 0.1 | |
| 12 }; | |
| 13 | |
| 14 /** | |
| 15 * <code>PPP_ContentDecryptor_Private</code> structure contains the function | |
| 16 * pointers the decryption plugin MUST implement to provide services needed by | |
| 17 * the user agent. This interface provides the plugin side support for v0.1 of | |
|
ddorwin
2012/08/11 22:08:57
... support for the CDM for...
ddorwin
2012/08/11 22:08:57
Throughout this file:
s/user agent/browser/?
"use
Tom Finegan
2012/08/13 16:27:17
Done, because 'idl$ "user agent"' comes up almost
Tom Finegan
2012/08/13 16:27:17
Done.
| |
| 18 * the proposed Encrypted Media Extensions: http://goo.gl/rbdnR | |
| 19 * | |
| 20 * Note: This is a special interface, only to be used for Content Decryption | |
| 21 * Modules, not normal plugins. | |
| 22 */ | |
| 23 interface PPP_ContentDecryptor_Private { | |
| 24 /** | |
| 25 * Generates a key request. key_system specifies the key or licensing system | |
|
ddorwin
2012/08/11 22:08:57
key_system specifies the key or licensing system t
Tom Finegan
2012/08/13 16:27:17
Done.
| |
| 26 * from which to request the key when the plugin provides access to multiple | |
| 27 * systems. init_data is a data buffer containing initialization data from | |
|
ddorwin
2012/08/11 22:08:57
...containing data to use in generating the reques
Tom Finegan
2012/08/13 16:27:17
Done.
| |
| 28 * the media data that is required for use of the plugin's key system(s). | |
| 29 * | |
| 30 * Note: <code>GenerateKeyRequest()</code> is responsible for creating the | |
| 31 * session ID used in other methods on this interface. The session ID will be | |
| 32 * provided to the user agent via <code>KeyMessage()</code> on the | |
| 33 * <code>PPB_ContentDecryptor_Private</code> interface. | |
| 34 * | |
| 35 * @param[in] key_system A <code>PP_Var</code> of type | |
| 36 * <code>PP_VARTYPE_STRING</code> containing the name of the key system. | |
| 37 * | |
| 38 * @param[in] init_data A <code>PP_Var</code> of type | |
| 39 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing content specific | |
|
ddorwin
2012/08/11 22:08:57
s/content/container/
Tom Finegan
2012/08/13 16:27:17
Done.
| |
| 40 * initialization data. | |
| 41 */ | |
| 42 PP_Bool GenerateKeyRequest( | |
| 43 [in] PP_Instance instance, | |
| 44 [in] PP_Var key_system, | |
| 45 [in] PP_Var init_data); | |
| 46 | |
| 47 /** | |
| 48 * Provides a key or license to the decryptor for decrypting media data in the | |
|
ddorwin
2012/08/11 22:08:57
delete everything after "data."
Tom Finegan
2012/08/13 16:27:17
Done.
| |
| 49 * stream associated with session_id. | |
| 50 * | |
| 51 * @param[in] session_id A <code>PP_Var</code> of type | |
| 52 * <code>PP_VARTYPE_STRING</code> containing the session ID. | |
| 53 * | |
| 54 * @param[in] key A <code>PP_Var</code> of type | |
| 55 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the decryption key for the | |
|
ddorwin
2012/08/11 22:08:57
key, license, or other message
Tom Finegan
2012/08/13 16:27:17
Done.
| |
| 56 * given session ID. | |
| 57 */ | |
| 58 PP_Bool AddKey( | |
| 59 [in] PP_Instance instance, | |
| 60 [in] PP_Var session_id, | |
| 61 [in] PP_Var key); | |
| 62 | |
| 63 /** | |
| 64 * Cancels a pending key request for the specified session ID. | |
| 65 * | |
| 66 * @param[in] session_id A <code>PP_Var</code> of type | |
| 67 * <code>PP_VARTYPE_STRING</code> containing the session ID. | |
| 68 */ | |
| 69 PP_Bool CancelKeyRequest( | |
| 70 [in] PP_Instance instance, | |
| 71 [in] PP_Var session_id); | |
| 72 | |
| 73 /** | |
| 74 * Decrypts the block and returns the unencrypted block via | |
| 75 * <code>DeliverBlock()</code> on the | |
| 76 * <code>PPB_ContentDecryptor_Private</code> interface. The returned block | |
| 77 * contains encoded data. | |
| 78 * | |
| 79 * @param[in] resource A <code>PP_Resource</code> corresponding to a | |
| 80 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data | |
| 81 * block. | |
| 82 * | |
| 83 * @param[in] request_id A value used by the user agent to associate data | |
| 84 * returned via the <code>PPB_ContentDecryptor_Private</code> interface with | |
| 85 * decryption method calls. | |
| 86 */ | |
| 87 PP_Bool Decrypt( | |
| 88 [in] PP_Instance instance, | |
| 89 [in] PP_Resource encrypted_block, | |
| 90 [in] uint64_t request_id); | |
| 91 | |
| 92 /** | |
| 93 * Decrypts the block, decodes it, and returns the unencrypted uncompressed | |
| 94 * (decoded) media to the user agent via the | |
|
ddorwin
2012/08/11 22:08:57
remove "to the user agent " or replace user agent
Tom Finegan
2012/08/13 16:27:17
All instances of user agent have been replaced w/b
| |
| 95 * <code>PPB_ContentDecryptor_Private</code> interface. | |
| 96 * | |
| 97 * Note that decrypted and decoded video frames are sent to | |
|
ddorwin
2012/08/11 22:08:57
Remove "Note that ".
Tom Finegan
2012/08/13 16:27:17
Done.
| |
| 98 * <code>DeliverFrame()</code>, while audio samples are sent to | |
| 99 * <code>DeliverSamples()</code>. | |
| 100 * | |
| 101 * @param[in] resource A <code>PP_Resource</code> corresponding to a | |
| 102 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data | |
| 103 * block. | |
| 104 * | |
| 105 * @param[in] request_id A value used by the user agent to associate data | |
| 106 * returned via the <code>PPB_ContentDecryptor_Private</code> interface with | |
| 107 * decryption method calls. | |
| 108 */ | |
| 109 PP_Bool DecryptAndDecode( | |
| 110 [in] PP_Instance instance, | |
| 111 [in] PP_Resource encrypted_block, | |
| 112 [in] uint64_t request_id); | |
| 113 }; | |
| OLD | NEW |