Chromium Code Reviews| Index: ppapi/api/dev/ppp_content_decryptor_dev.idl |
| diff --git a/ppapi/api/dev/ppp_content_decryptor_dev.idl b/ppapi/api/dev/ppp_content_decryptor_dev.idl |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8177ce7bc3dbec1e2483941cd6ac24afd92e7b43 |
| --- /dev/null |
| +++ b/ppapi/api/dev/ppp_content_decryptor_dev.idl |
| @@ -0,0 +1,63 @@ |
| +/* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| + * Use of this source code is governed by a BSD-style license that can be |
| + * found in the LICENSE file. |
| + */ |
| + |
| +/** |
| + * This file defines the <code>PPP_ContentDecryptor_Dev</code> |
| + * interface. |
| + */ |
| +label Chrome { |
| + M23 = 0.1 |
| +}; |
| + |
| +/** |
| + * <code>PPP_ContentDecryptor_Dev</code> structure contains the function |
| + * pointers the decryption plugin MUST implement to provide services needed by |
| + * the media stack. |
| + */ |
| +interface PPP_ContentDecryptor_Dev { |
| + /** |
| + * Generates a key request. key_system specifies the key or licensing system |
| + * from which to request the key when the plugin provides access to multiple |
| + * systems. init_data is a data buffer containing initialization data from |
| + * the media data that is required for use of the plugin's key system(s). |
| + */ |
| + PP_Bool GenerateKeyRequest( |
| + [in] PP_Instance instance, |
| + [in] PP_Var key_system, /* String. */ |
| + [in] PP_Var init_data); /* ArrayBuffer. */ |
| + |
| + /** |
| + * Provides a key or license to use for decrypting media data for session_id. |
| + */ |
| + PP_Bool AddKey( |
| + [in] PP_Instance instance, |
| + [in] PP_Var session_id, /* String. */ |
| + [in] PP_Var key); /* ArrayBuffer. */ |
| + |
| + /** |
| + * Cancels a key request for session_id. |
| + */ |
| + PP_Bool CancelKeyRequest( |
| + [in] PP_Instance instance, |
| + [in] PP_Var session_id); /* String. */ |
| + |
| + /** |
| + * Decrypts the block and returns the unencrypted block. In the case of |
| + * media, the block contains encoded data. |
| + */ |
| + PP_Bool Decrypt( |
|
xhwang
2012/08/01 18:55:38
We have both sync return (PP_Bool) and async callb
Tom Finegan
2012/08/02 01:12:04
At present a return of false would mean that argum
|
| + [in] PP_Instance instance, |
| + [in] PP_Resource encrypted_block, /* PPB_Buffer. */ |
| + [in] PP_CompletionCallback callback); |
| + |
| + /** |
| + * Decrypts the block then decodes it and returns the unencrypted raw |
| + * (decoded) frame. |
| + */ |
| + PP_Bool DecryptAndDecode( |
| + [in] PP_Instance instance, |
| + [in] PP_Resource encrypted_block, /* PPB_Buffer. */ |
| + [in] PP_CompletionCallback callback); |
| +}; |