| 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..5f3169abe7bc2fa2ce41ab5662316af0ffddf0de
|
| --- /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 {
|
| + M22 = 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_Resource init_data); /* PPB_Buffer. */
|
| +
|
| + /**
|
| + * 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_Resource key); /* PPB_Buffer. */
|
| +
|
| + /**
|
| + * 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(
|
| + [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);
|
| +};
|
|
|