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_Dev</code> | |
| 8 * interface. | |
| 9 */ | |
| 10 label Chrome { | |
| 11 M23 = 0.1 | |
| 12 }; | |
| 13 | |
| 14 /** | |
| 15 * <code>PPP_ContentDecryptor_Dev</code> structure contains the function | |
| 16 * pointers the decryption plugin MUST implement to provide services needed by | |
| 17 * the media stack. | |
| 18 */ | |
| 19 interface PPP_ContentDecryptor_Dev { | |
| 20 /** | |
| 21 * Generates a key request. key_system specifies the key or licensing system | |
| 22 * from which to request the key when the plugin provides access to multiple | |
| 23 * systems. init_data is a data buffer containing initialization data from | |
| 24 * the media data that is required for use of the plugin's key system(s). | |
| 25 */ | |
| 26 PP_Bool GenerateKeyRequest( | |
| 27 [in] PP_Instance instance, | |
| 28 [in] PP_Var key_system, /* String. */ | |
| 29 [in] PP_Var init_data); /* ArrayBuffer. */ | |
| 30 | |
| 31 /** | |
| 32 * Provides a key or license to use for decrypting media data for session_id. | |
| 33 */ | |
| 34 PP_Bool AddKey( | |
| 35 [in] PP_Instance instance, | |
| 36 [in] PP_Var session_id, /* String. */ | |
| 37 [in] PP_Var key); /* ArrayBuffer. */ | |
| 38 | |
| 39 /** | |
| 40 * Cancels a key request for session_id. | |
| 41 */ | |
| 42 PP_Bool CancelKeyRequest( | |
| 43 [in] PP_Instance instance, | |
| 44 [in] PP_Var session_id); /* String. */ | |
| 45 | |
| 46 /** | |
| 47 * Decrypts the block and returns the unencrypted block. In the case of | |
| 48 * media, the block contains encoded data. | |
| 49 */ | |
| 50 PP_Bool Decrypt( | |
|
xhwang
2012/08/01 18:55:38
We have both sync return (PP_Bool) and async callb
Tom Finegan
2012/08/02 01:12:04
At present a return of false would mean that argum
| |
| 51 [in] PP_Instance instance, | |
| 52 [in] PP_Resource encrypted_block, /* PPB_Buffer. */ | |
| 53 [in] PP_CompletionCallback callback); | |
| 54 | |
| 55 /** | |
| 56 * Decrypts the block then decodes it and returns the unencrypted raw | |
| 57 * (decoded) frame. | |
| 58 */ | |
| 59 PP_Bool DecryptAndDecode( | |
| 60 [in] PP_Instance instance, | |
| 61 [in] PP_Resource encrypted_block, /* PPB_Buffer. */ | |
| 62 [in] PP_CompletionCallback callback); | |
| 63 }; | |
| OLD | NEW |