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>PPB_ContentDecryptionModule_Dev</code> structure contains the function |
| 16 * pointers the browser may implement to support plugins implementing the |
| 17 * <code>PPP_ContentDecryptionModule_Dev</code> interface. |
| 18 */ |
| 19 interface PPB_ContentDecryptionModule_Dev { |
| 20 |
| 21 /** |
| 22 * A key or license is needed to decrypt media data. |
| 23 */ |
| 24 void NeedKey( |
| 25 [in] PP_Instance instance, |
| 26 [in] PP_Var key_system, |
| 27 [in] PP_Var session_id, |
| 28 [in] PP_Resource init_data); |
| 29 |
| 30 /** |
| 31 * A key has been added as the result of a call to the <code>AddKey()</code> |
| 32 * method on the <code>PPP_ContentDecryptionModule_Dev</code> interface. |
| 33 */ |
| 34 void KeyAdded( |
| 35 [in] PP_Instance instance, |
| 36 [in] PP_Var key_system, |
| 37 [in] PP_Var session_id); |
| 38 |
| 39 /** |
| 40 * A message or request has been generated by or for key_system. For example, |
| 41 * a key request has been generated as the result of call to the |
| 42 * <code>GenerateKeyRequest()</code> method on the |
| 43 * <code>PPP_ContentDecryptionModule_Dev</code> interface, or another message |
| 44 * must be sent in response to an <code>AddKey()</code> call. |
| 45 */ |
| 46 void KeyMessage( |
| 47 [in] PP_Instance instance, |
| 48 [in] PP_Var key_system, |
| 49 [in] PP_Var session_id, |
| 50 [in] PP_Resource message, |
| 51 [in] PP_Var default_url); |
| 52 |
| 53 /** |
| 54 * An error occured in a <code>PPP_ContentDecryptionModule_Dev</code> method, |
| 55 * or within the plugin implementing the interface. |
| 56 */ |
| 57 void KeyError( |
| 58 [in] PP_Instance instance, |
| 59 [in] PP_Var key_system, |
| 60 [in] PP_Var session_id, |
| 61 [in] uint16_t media_error, |
| 62 [in] uint16_t system_error); |
| 63 |
| 64 /** |
| 65 * Called after the <code>Decrypt</code> method on the |
| 66 * <code>PPP_ContentDecryptionModule_Dev</code> interface completes to |
| 67 * deliver decrypted_block to the media stack. |
| 68 */ |
| 69 void DeliverBlock( |
| 70 [in] PP_Instance instance, |
| 71 [in] PP_Resource decrypted_block, |
| 72 [in] PP_CompletionCallback callback); |
| 73 |
| 74 /** |
| 75 * Called after the <code>DecryptAndDecode</code> method on the |
| 76 * <code>PPP_ContentDecryptionModule_Dev</code> interface completes to |
| 77 * deliver decrypted_frame to the media stack. |
| 78 */ |
| 79 void DeliverFrame( |
| 80 [in] PP_Instance instance, |
| 81 [in] PP_Resource decrypted_frame, |
| 82 [in] PP_CompletionCallback callback); |
| 83 |
| 84 /** |
| 85 * Called after the <code>DecryptAndDecode</code> method on the |
| 86 * <code>PPP_ContentDecryptionModule_Dev</code> interface completes to |
| 87 * deliver decrypted_samples to the media stack. |
| 88 */ |
| 89 void DeliverSamples( |
| 90 [in] PP_Instance instance, |
| 91 [in] PP_Resource decrypted_samples, |
| 92 [in] PP_CompletionCallback callback); |
| 93 }; |
OLD | NEW |