Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: ppapi/c/dev/ppb_content_decryptor_dev.h

Issue 10836038: Call CDMWrapper from PpapiDecryptor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add PP_DecryptionBuffer_Dev and update Decrypt() PPP call. Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 5
6 /* From dev/ppb_content_decryptor_dev.idl modified Mon Jul 16 17:58:07 2012. */ 6 /* From dev/ppb_content_decryptor_dev.idl modified Tue Jul 31 09:12:00 2012. */
7 7
8 #ifndef PPAPI_C_DEV_PPB_CONTENT_DECRYPTOR_DEV_H_ 8 #ifndef PPAPI_C_DEV_PPB_CONTENT_DECRYPTOR_DEV_H_
9 #define PPAPI_C_DEV_PPB_CONTENT_DECRYPTOR_DEV_H_ 9 #define PPAPI_C_DEV_PPB_CONTENT_DECRYPTOR_DEV_H_
10 10
11 #include "ppapi/c/pp_bool.h" 11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_completion_callback.h" 12 #include "ppapi/c/pp_completion_callback.h"
13 #include "ppapi/c/pp_instance.h" 13 #include "ppapi/c/pp_instance.h"
14 #include "ppapi/c/pp_macros.h" 14 #include "ppapi/c/pp_macros.h"
15 #include "ppapi/c/pp_resource.h" 15 #include "ppapi/c/pp_resource.h"
16 #include "ppapi/c/pp_stdint.h" 16 #include "ppapi/c/pp_stdint.h"
17 #include "ppapi/c/pp_var.h" 17 #include "ppapi/c/pp_var.h"
18 18
19 #define PPB_CONTENTDECRYPTOR_DEV_INTERFACE_0_1 "PPB_ContentDecryptor(Dev);0.1" 19 #define PPB_CONTENTDECRYPTOR_DEV_INTERFACE_0_1 "PPB_ContentDecryptor(Dev);0.1"
20 #define PPB_CONTENTDECRYPTOR_DEV_INTERFACE \ 20 #define PPB_CONTENTDECRYPTOR_DEV_INTERFACE \
21 PPB_CONTENTDECRYPTOR_DEV_INTERFACE_0_1 21 PPB_CONTENTDECRYPTOR_DEV_INTERFACE_0_1
22 22
23 /** 23 /**
24 * @file 24 * @file
25 * This file defines the <code>PPP_ContentDecryptor_Dev</code> 25 * This file defines the <code>PPP_ContentDecryptor_Dev</code>
26 * interface. 26 * interface.
27 */ 27 */
28 28
29
29 /** 30 /**
30 * @addtogroup Interfaces 31 * @addtogroup Interfaces
31 * @{ 32 * @{
32 */ 33 */
33
34 /** 34 /**
35 * <code>PPB_ContentDecryptor_Dev</code> structure contains the function 35 * <code>PPB_ContentDecryptor_Dev</code> structure contains the function
36 * pointers the browser may implement to support plugins implementing the 36 * pointers the browser may implement to support plugins implementing the
37 * <code>PPP_ContentDecryptor_Dev</code> interface. 37 * <code>PPP_ContentDecryptor_Dev</code> interface.
38 */ 38 */
39 struct PPB_ContentDecryptor_Dev_0_1 { 39 struct PPB_ContentDecryptor_Dev_0_1 {
40 /** 40 /**
41 * A key or license is needed to decrypt media data. 41 * A key or license is needed to decrypt media data.
42 */ 42 */
43 void (*NeedKey)(PP_Instance instance, 43 void (*NeedKey)(PP_Instance instance,
44 struct PP_Var key_system, /* String. */ 44 struct PP_Var key_system,
45 struct PP_Var session_id, /* String. */ 45 struct PP_Var session_id,
46 PP_Resource init_data); /* PPB_Buffer. */ 46 PP_Resource init_data);
47 47 /* PPB_Buffer. */
48 /** 48 /**
49 * A key has been added as the result of a call to the <code>AddKey()</code> 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. 50 * method on the <code>PPP_ContentDecryptor_Dev</code> interface.
51 */ 51 */
52 void (*KeyAdded)(PP_Instance instance, 52 void (*KeyAdded)(PP_Instance instance,
53 struct PP_Var key_system, /* String. */ 53 struct PP_Var key_system,
54 struct PP_Var session_id); /* String. */ 54 struct PP_Var session_id);
55 55 /* String. */
56 /** 56 /**
57 * A message or request has been generated by or for key_system. For example, 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 58 * a key request has been generated as the result of call to the
59 * <code>GenerateKeyRequest()</code> method on the 59 * <code>GenerateKeyRequest()</code> method on the
60 * <code>PPP_ContentDecryptor_Dev</code> interface or another message 60 * <code>PPP_ContentDecryptor_Dev</code> interface or another message
61 * must be sent in response to an <code>AddKey()</code> call. Note that 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 62 * <code>KeyMessage</code> can be used for purposes other than results to
63 * <code>AddKey()</code> calls. 63 * <code>AddKey()</code> calls.
64 */ 64 */
65 void (*KeyMessage)(PP_Instance instance, 65 void (*KeyMessage)(PP_Instance instance,
66 struct PP_Var key_system, /* String. */ 66 struct PP_Var key_system,
67 struct PP_Var session_id, /* String. */ 67 struct PP_Var session_id,
68 PP_Resource message, /* PPB_Buffer. */ 68 PP_Resource message,
69 struct PP_Var default_url); /* String. */ 69 struct PP_Var default_url);
70 70 /* String. */
71 /** 71 /**
72 * An error occured in a <code>PPP_ContentDecryptor_Dev</code> method, 72 * An error occured in a <code>PPP_ContentDecryptor_Dev</code> method,
73 * or within the plugin implementing the interface. 73 * or within the plugin implementing the interface.
74 */ 74 */
75 void (*KeyError)(PP_Instance instance, 75 void (*KeyError)(PP_Instance instance,
76 struct PP_Var key_system, /* String. */ 76 struct PP_Var key_system,
77 struct PP_Var session_id, /* String. */ 77 struct PP_Var session_id,
78 uint16_t media_error, 78 uint16_t media_error,
79 uint16_t system_error); 79 uint16_t system_error);
80
81 /** 80 /**
82 * Called after the <code>Decrypt</code> method on the 81 * Called after the <code>Decrypt</code> method on the
83 * <code>PPP_ContentDecryptor_Dev</code> interface completes to 82 * <code>PPP_ContentDecryptor_Dev</code> interface completes to
84 * deliver decrypted_block to the media stack. 83 * deliver decrypted_block to the media stack.
85 */ 84 */
86 void (*DeliverBlock)(PP_Instance instance, 85 void (*DeliverBlock)(PP_Instance instance,
87 PP_Resource decrypted_block, /* PPB_Buffer. */ 86 PP_Resource decrypted_block,
88 struct PP_CompletionCallback callback); 87 uint32_t id);
89
90 /** 88 /**
91 * Called after the <code>DecryptAndDecode</code> method on the 89 * Called after the <code>DecryptAndDecode</code> method on the
92 * <code>PPP_ContentDecryptor_Dev</code> interface completes to 90 * <code>PPP_ContentDecryptor_Dev</code> interface completes to
93 * deliver decrypted_frame to the media stack. 91 * deliver decrypted_frame to the media stack.
94 */ 92 */
95 void (*DeliverFrame)(PP_Instance instance, 93 void (*DeliverFrame)(PP_Instance instance,
96 PP_Resource decrypted_frame, /* PPB_Buffer. */ 94 PP_Resource decrypted_frame,
97 struct PP_CompletionCallback callback); 95 struct PP_CompletionCallback callback);
98
99 /** 96 /**
100 * Called after the <code>DecryptAndDecode</code> method on the 97 * Called after the <code>DecryptAndDecode</code> method on the
101 * <code>PPP_ContentDecryptor_Dev</code> interface completes to 98 * <code>PPP_ContentDecryptor_Dev</code> interface completes to
102 * deliver decrypted_samples to the media stack. 99 * deliver decrypted_samples to the media stack.
103 */ 100 */
104 void (*DeliverSamples)(PP_Instance instance, 101 void (*DeliverSamples)(PP_Instance instance,
105 PP_Resource decrypted_samples, /* PPB_Buffer. */ 102 PP_Resource decrypted_samples,
106 struct PP_CompletionCallback callback); 103 struct PP_CompletionCallback callback);
107 }; 104 };
108 105
109 typedef struct PPB_ContentDecryptor_Dev_0_1 PPB_ContentDecryptor_Dev; 106 typedef struct PPB_ContentDecryptor_Dev_0_1 PPB_ContentDecryptor_Dev;
110
111 /** 107 /**
112 * @} 108 * @}
113 */ 109 */
114 110
115 #endif /* PPAPI_C_DEV_PPB_CONTENT_DECRYPTOR_DEV_H_ */ 111 #endif /* PPAPI_C_DEV_PPB_CONTENT_DECRYPTOR_DEV_H_ */
112
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698