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 /* From dev/ppb_content_decryptor_dev.idl modified Mon Jul 16 17:58:07 2012. */ |
| 7 |
| 8 #ifndef PPAPI_C_DEV_PPB_CONTENT_DECRYPTOR_DEV_H_ |
| 9 #define PPAPI_C_DEV_PPB_CONTENT_DECRYPTOR_DEV_H_ |
| 10 |
| 11 #include "ppapi/c/pp_bool.h" |
| 12 #include "ppapi/c/pp_completion_callback.h" |
| 13 #include "ppapi/c/pp_instance.h" |
| 14 #include "ppapi/c/pp_macros.h" |
| 15 #include "ppapi/c/pp_resource.h" |
| 16 #include "ppapi/c/pp_stdint.h" |
| 17 #include "ppapi/c/pp_var.h" |
| 18 |
| 19 #define PPB_CONTENTDECRYPTOR_DEV_INTERFACE_0_1 "PPB_ContentDecryptor(Dev);0.1" |
| 20 #define PPB_CONTENTDECRYPTOR_DEV_INTERFACE \ |
| 21 PPB_CONTENTDECRYPTOR_DEV_INTERFACE_0_1 |
| 22 |
| 23 /** |
| 24 * @file |
| 25 * This file defines the <code>PPP_ContentDecryptor_Dev</code> |
| 26 * interface. |
| 27 */ |
| 28 |
| 29 /** |
| 30 * @addtogroup Interfaces |
| 31 * @{ |
| 32 */ |
| 33 |
| 34 /** |
| 35 * <code>PPB_ContentDecryptor_Dev</code> structure contains the function |
| 36 * pointers the browser may implement to support plugins implementing the |
| 37 * <code>PPP_ContentDecryptor_Dev</code> interface. |
| 38 */ |
| 39 struct PPB_ContentDecryptor_Dev_0_1 { |
| 40 /** |
| 41 * A key or license is needed to decrypt media data. |
| 42 */ |
| 43 void (*NeedKey)(PP_Instance instance, |
| 44 struct PP_Var key_system, /* String. */ |
| 45 struct PP_Var session_id, /* String. */ |
| 46 PP_Resource init_data); /* PPB_Buffer. */ |
| 47 |
| 48 /** |
| 49 * A key has been added as the result of a call to the <code>AddKey()</code> |
| 50 * method on the <code>PPP_ContentDecryptor_Dev</code> interface. |
| 51 */ |
| 52 void (*KeyAdded)(PP_Instance instance, |
| 53 struct PP_Var key_system, /* String. */ |
| 54 struct PP_Var session_id); /* String. */ |
| 55 |
| 56 /** |
| 57 * A message or request has been generated by or for key_system. For example, |
| 58 * a key request has been generated as the result of call to the |
| 59 * <code>GenerateKeyRequest()</code> method on the |
| 60 * <code>PPP_ContentDecryptor_Dev</code> interface or another message |
| 61 * must be sent in response to an <code>AddKey()</code> call. Note that |
| 62 * <code>KeyMessage</code> can be used for purposes other than results to |
| 63 * <code>AddKey()</code> calls. |
| 64 */ |
| 65 void (*KeyMessage)(PP_Instance instance, |
| 66 struct PP_Var key_system, /* String. */ |
| 67 struct PP_Var session_id, /* String. */ |
| 68 PP_Resource message, /* PPB_Buffer. */ |
| 69 struct PP_Var default_url); /* String. */ |
| 70 |
| 71 /** |
| 72 * An error occured in a <code>PPP_ContentDecryptor_Dev</code> method, |
| 73 * or within the plugin implementing the interface. |
| 74 */ |
| 75 void (*KeyError)(PP_Instance instance, |
| 76 struct PP_Var key_system, /* String. */ |
| 77 struct PP_Var session_id, /* String. */ |
| 78 uint16_t media_error, |
| 79 uint16_t system_error); |
| 80 |
| 81 /** |
| 82 * Called after the <code>Decrypt</code> method on the |
| 83 * <code>PPP_ContentDecryptor_Dev</code> interface completes to |
| 84 * deliver decrypted_block to the media stack. |
| 85 */ |
| 86 void (*DeliverBlock)(PP_Instance instance, |
| 87 PP_Resource decrypted_block, /* PPB_Buffer. */ |
| 88 struct PP_CompletionCallback callback); |
| 89 |
| 90 /** |
| 91 * Called after the <code>DecryptAndDecode</code> method on the |
| 92 * <code>PPP_ContentDecryptor_Dev</code> interface completes to |
| 93 * deliver decrypted_frame to the media stack. |
| 94 */ |
| 95 void (*DeliverFrame)(PP_Instance instance, |
| 96 PP_Resource decrypted_frame, /* PPB_Buffer. */ |
| 97 struct PP_CompletionCallback callback); |
| 98 |
| 99 /** |
| 100 * Called after the <code>DecryptAndDecode</code> method on the |
| 101 * <code>PPP_ContentDecryptor_Dev</code> interface completes to |
| 102 * deliver decrypted_samples to the media stack. |
| 103 */ |
| 104 void (*DeliverSamples)(PP_Instance instance, |
| 105 PP_Resource decrypted_samples, /* PPB_Buffer. */ |
| 106 struct PP_CompletionCallback callback); |
| 107 }; |
| 108 |
| 109 typedef struct PPB_ContentDecryptor_Dev_0_1 PPB_ContentDecryptor_Dev; |
| 110 |
| 111 /** |
| 112 * @} |
| 113 */ |
| 114 |
| 115 #endif /* PPAPI_C_DEV_PPB_CONTENT_DECRYPTOR_DEV_H_ */ |
OLD | NEW |