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_ContentDecryptionModule_Dev</code> |
| 8 * interface. |
| 9 */ |
| 10 label Chrome { |
| 11 M22 = 0.1 |
| 12 }; |
| 13 |
| 14 /** |
| 15 * <code>PPP_ContentDecryptionModule_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_ContentDecryptionModule_Dev { |
| 20 /** |
| 21 * Generates a key request. key_system is an optional param that is used |
| 22 * to specify the key or licensing system from which to request the key when |
| 23 * the plugin provides access to multiple systems. init_data is a data |
| 24 * buffer containing initialization data for the key system(s) implemented |
| 25 * by the plugin. response is a data buffer filled only when callback is |
| 26 * notified of success. |
| 27 */ |
| 28 PP_Bool GenerateKeyRequest( |
| 29 [in] PP_Instance instance, |
| 30 [in] PP_Var key_system, |
| 31 [in] PP_Resource init_data); |
| 32 |
| 33 /** |
| 34 * Provides a key or license to use for decrypting media data for session_id. |
| 35 */ |
| 36 PP_Bool AddKey( |
| 37 [in] PP_Instance instance, |
| 38 [in] PP_Var session_id, |
| 39 [in] PP_Resource key); |
| 40 |
| 41 /** |
| 42 * Cancels a key request for session_id. |
| 43 */ |
| 44 PP_Bool CancelKeyRequest( |
| 45 [in] PP_Instance instance, |
| 46 [in] PP_Var session_id); |
| 47 |
| 48 /** |
| 49 * Decrypts the block and returns the unencrypted block. |
| 50 * In the case of media, the block contains encoded data. |
| 51 * decrypted_block is valid only after the callback is notified of success. |
| 52 */ |
| 53 PP_Bool Decrypt( |
| 54 [in] PP_Instance instance, |
| 55 [in] PP_Resource encrypted_block, |
| 56 [in] PP_CompletionCallback callback); |
| 57 |
| 58 /** |
| 59 * Decrypts the block then decodes it and returns the raw (decoded) |
| 60 * unencrypted frame. |
| 61 * decoded_frame is valid only after the callback is notified of success. |
| 62 */ |
| 63 PP_Bool DecryptAndDecode( |
| 64 [in] PP_Instance instance, |
| 65 [in] PP_Resource encrypted_block, |
| 66 [in] PP_CompletionCallback callback); |
| 67 }; |
OLD | NEW |