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