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

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

Issue 10545036: Add PPAPI decryptor interfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed arg names in comments Created 8 years, 6 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
(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/ppp_content_decryption_module_dev.idl,
7 * modified Wed Jun 06 20:44:13 2012.
8 */
9
10 #ifndef PPAPI_C_DEV_PPP_CONTENT_DECRYPTION_MODULE_DEV_H_
11 #define PPAPI_C_DEV_PPP_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
20 #define PPP_CONTENTDECRYPTIONMODULE_DEV_INTERFACE_0_1 \
21 "PPP_ContentDecryptionModule(Dev);0.1"
22 #define PPP_CONTENTDECRYPTIONMODULE_DEV_INTERFACE \
23 PPP_CONTENTDECRYPTIONMODULE_DEV_INTERFACE_0_1
24
25 /**
26 * @file
27 * This file defines the <code>PPP_ContentDecryptionModule_Dev</code>
28 * interface.
29 */
30
31 /**
32 * @addtogroup Interfaces
33 * @{
34 */
35 /**
36 * <code>PPP_ContentDecryptionModule_Dev</code> structure contains the function
37 * pointers the decryption plugin MUST implement to provide services needed by
38 * the media stack.
39 */
40 struct PPP_ContentDecryptionModule_Dev_0_1 {
41 /**
42 * Provides a key or license to use for decryption. The key determines
43 * which methods are allowed by the plugin.
44 */
45 PP_Bool (*AddKey)(PP_Instance instance, PP_Resource key);
46
47 /**
48 * Decrypts the block and returns the unencrypted block.
49 * In the case of media, the block contains encoded data.
50 * decrypted_block is valid only after the callback is notified of success.
51 */
52 PP_Bool (*Decrypt)(PP_Instance instance,
53 PP_Resource encrypted_block,
54 PP_Resource decrypted_block,
55 struct PP_CompletionCallback callback);
56
57 /**
58 * Decrypts the block then decodes it and returns the raw (decoded)
59 * unencrypted frame.
60 * decoded_frame is valid only after the callback is notified of success.
61 */
62 PP_Bool (*DecryptAndDecode)(PP_Instance instance,
63 PP_Resource encrypted_block,
64 PP_Resource decoded_frame,
65 struct PP_CompletionCallback callback);
66 };
67
68 typedef struct PPP_ContentDecryptionModule_Dev_0_1
69 PPP_ContentDecryptionModule_Dev;
70
71 /**
72 * @}
73 */
74
75 #endif /* PPAPI_C_DEV_PPP_CONTENT_DECRYPTION_MODULE_DEV_H_ */
76
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698